/* Preserve Aklame's exact acid-lime on dark Filament surfaces.
   Filament normally maps primary actions to a darker generated 600 shade. */
.fi,
.dark {
    --primary-300: #D2FF4B;
    --primary-400: #C8FE1C;
    --primary-500: #C8FE1C;
    --primary-600: #C8FE1C;
    --primary-700: #B5E619;
}

.fi-btn.fi-color-primary {
    background-color: #C8FE1C;
    color: #121411;
}

.fi-btn.fi-color-primary:hover {
    background-color: #D2FF4B;
    color: #121411;
}

.fi-input-wrp:focus-within {
    --tw-ring-color: #C8FE1C !important;
}

/* Keep page titles readable when a Filament header contains many actions. */
@media (min-width: 40rem) {
    .fi-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fi-header > :first-child {
        flex: 1 1 24rem;
        min-width: 0;
    }

    .fi-header-actions-ctn {
        flex: 1 1 48rem;
        max-width: 100%;
        min-width: 0;
    }

    .fi-header-actions-ctn > .fi-ac {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 39.999rem) {
    .fi-header-actions-ctn,
    .fi-header-actions-ctn > .fi-ac {
        width: 100%;
    }

    .fi-header-actions-ctn > .fi-ac {
        justify-content: flex-start;
    }
}

/* Website audit: editorial cards that remain stable outside Tailwind's content scan. */
.ak-audit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.ak-audit-category {
    overflow: hidden;
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    background: rgb(255 255 255);
}

.ak-audit-category__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.125rem;
    border-bottom: 1px solid rgb(226 232 240);
    background: linear-gradient(135deg, rgb(248 250 252), rgb(244 248 239));
}

.ak-audit-category__icon {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: .7rem;
    color: rgb(63 98 17);
    background: rgb(217 249 157);
}

.ak-audit-category__icon svg { width: 1.2rem; height: 1.2rem; }
.ak-audit-category__header strong { display: block; color: rgb(15 23 42); font-size: .9rem; line-height: 1.3; }
.ak-audit-category__header small { display: block; margin-top: .15rem; color: rgb(100 116 139); font-size: .72rem; line-height: 1.35; }
.ak-audit-category__count { min-width: 1.8rem; padding: .25rem .45rem; border-radius: 999px; color: rgb(71 85 105); background: rgb(255 255 255); font-size: .7rem; font-weight: 700; text-align: center; box-shadow: 0 1px 3px rgb(15 23 42 / 8%); }
.ak-audit-findings { display: grid; gap: .65rem; padding: .75rem; }

.ak-audit-finding {
    position: relative;
    padding: .9rem 1rem .9rem 1.15rem;
    border: 1px solid rgb(226 232 240);
    border-radius: .75rem;
    background: rgb(248 250 252 / 72%);
}

.ak-audit-finding::before { content: ''; position: absolute; inset: .65rem auto .65rem 0; width: 3px; border-radius: 3px; background: rgb(14 165 233); }
.ak-audit-finding--pass::before { background: rgb(101 163 13); }
.ak-audit-finding--warning::before { background: rgb(245 158 11); }
.ak-audit-finding--critical::before { background: rgb(239 68 68); }
.ak-audit-finding__topline { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ak-audit-finding h4 { margin: 0; color: rgb(15 23 42); font-size: .82rem; font-weight: 700; line-height: 1.45; }
.ak-audit-finding > p { margin: .3rem 0 0; color: rgb(71 85 105); font-size: .78rem; line-height: 1.55; }
.ak-audit-status { flex: 0 0 auto; padding: .2rem .45rem; border-radius: 999px; color: rgb(3 105 161); background: rgb(224 242 254); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ak-audit-status--pass { color: rgb(63 98 18); background: rgb(236 252 203); }
.ak-audit-status--warning { color: rgb(146 64 14); background: rgb(254 243 199); }
.ak-audit-status--critical { color: rgb(153 27 27); background: rgb(254 226 226); }
.ak-audit-recommendation { display: flex; gap: .45rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px dashed rgb(203 213 225); color: rgb(51 65 85); font-size: .72rem; font-weight: 600; line-height: 1.5; }
.ak-audit-recommendation svg { flex: 0 0 auto; width: .9rem; height: .9rem; margin-top: .1rem; color: rgb(101 163 13); }

.ak-capture-email { display: grid; gap: 1rem; }
.ak-capture-email__subject, .ak-capture-email__message { overflow: hidden; border: 1px solid rgb(226 232 240); border-radius: .9rem; background: rgb(248 250 252 / 70%); }
.ak-capture-email__subject { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.125rem; }
.ak-capture-email__subject > div { min-width: 0; }
.ak-capture-email__label { display: block; margin-bottom: .3rem; color: rgb(100 116 139); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ak-capture-email__subject p { overflow: hidden; margin: 0; color: rgb(15 23 42); font-size: .9rem; font-weight: 650; line-height: 1.45; text-overflow: ellipsis; }
.ak-capture-email__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid rgb(226 232 240); background: rgb(255 255 255); }
.ak-capture-email__toolbar .ak-capture-email__label { margin: 0; }
.ak-capture-email__body { min-height: 18rem; padding: 1.25rem; color: rgb(30 41 59); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .78rem; line-height: 1.75; white-space: pre-wrap; }
.ak-copy-button { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .45rem .65rem; border: 1px solid rgb(203 213 225); border-radius: .55rem; color: rgb(51 65 85); background: rgb(255 255 255); font-size: .68rem; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.ak-copy-button:hover { border-color: rgb(132 204 22); color: rgb(63 98 18); transform: translateY(-1px); }
.ak-copy-button svg { width: .9rem; height: .9rem; }

.dark .ak-audit-category, .dark .ak-capture-email__subject, .dark .ak-capture-email__message { border-color: rgb(55 65 81); background: rgb(17 24 39); }
.dark .ak-audit-category__header { border-color: rgb(55 65 81); background: linear-gradient(135deg, rgb(24 33 47), rgb(28 39 28)); }
.dark .ak-audit-category__header strong, .dark .ak-audit-finding h4, .dark .ak-capture-email__subject p { color: rgb(248 250 252); }
.dark .ak-audit-category__header small, .dark .ak-audit-finding > p { color: rgb(148 163 184); }
.dark .ak-audit-category__count, .dark .ak-audit-finding, .dark .ak-capture-email__toolbar, .dark .ak-copy-button { border-color: rgb(55 65 81); background: rgb(31 41 55); color: rgb(203 213 225); }
.dark .ak-audit-recommendation { border-color: rgb(71 85 105); color: rgb(203 213 225); }
.dark .ak-capture-email__toolbar { border-bottom-color: rgb(55 65 81); }
.dark .ak-capture-email__body { color: rgb(226 232 240); }

@media (max-width: 70rem) {
    .ak-audit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
    .ak-capture-email__subject { align-items: flex-start; flex-direction: column; }
    .ak-audit-finding__topline { align-items: flex-start; flex-direction: column-reverse; gap: .4rem; }
}
