/* White Lion Legal portal: small brand and usability tweaks on top of Filament (no build step). */
.wll-brand { display: flex; align-items: center; gap: .6rem; }
.wll-brand__logo { width: 2.5rem; height: 2.5rem; border-radius: 9999px; }
.wll-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.wll-brand__name { font-weight: 700; font-size: 1rem; color: #141416; }
.wll-brand__sub { font-size: .75rem; color: #7a5600; }
.dark .wll-brand__name { color: #fff; }
.dark .wll-brand__sub { color: #f8d878; }
.wll-login-status { margin-bottom: 1rem; padding: .75rem 1rem; border-radius: .5rem; background: #fef3c7; color: #78350f; font-size: .875rem; }

/* Bigger tap targets on phones */
@media (max-width: 640px) {
    .fi-btn, .fi-icon-btn, .fi-ta-actions .fi-link { min-height: 2.75rem; }
    .fi-ta-cell { padding-top: .75rem; padding-bottom: .75rem; }
}

/* Cards and helpers used by portal pages */
.wll-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.wll-empty { padding: 2rem 1rem; text-align: center; color: #475569; }
.dark .wll-empty { color: #cbd5e1; }
.wll-muted { color: #475569; font-size: .875rem; }
.dark .wll-muted { color: #cbd5e1; }
.wll-empty__icon { width: 2.5rem; height: 2.5rem; margin: 0 auto .75rem; color: #7a5600; }
.wll-empty__title { font-size: 1.125rem; font-weight: 600; color: #0f172a; margin-bottom: .25rem; }
.dark .wll-empty__title { color: #fff; }
.wll-title { font-size: 1.25rem; font-weight: 600; color: #0f172a; }
.dark .wll-title { color: #fff; }
.wll-muted + .wll-muted { margin-top: .5rem; }

/* Permission matrix */
.wll-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wll-matrix-wrap { overflow-x: auto; background: #fff; border-radius: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); border: 1px solid #e2e8f0; }
.dark .wll-matrix-wrap { background: #0f172a; border-color: #1e293b; }
.wll-matrix { width: 100%; border-collapse: collapse; font-size: .875rem; }
.wll-matrix th, .wll-matrix td { padding: .6rem .75rem; text-align: center; border-bottom: 1px solid #e2e8f0; }
.dark .wll-matrix th, .dark .wll-matrix td { border-color: #1e293b; color: #e2e8f0; }
.wll-matrix thead th { position: sticky; top: 0; background: #f8fafc; font-weight: 600; color: #0f172a; white-space: nowrap; }
.dark .wll-matrix thead th { background: #1e293b; }
.wll-matrix .wll-matrix__perm { text-align: left; font-weight: 500; min-width: 16rem; color: #0f172a; }
.wll-matrix__key { display: block; font-size: .75rem; color: #64748b; font-weight: 400; font-family: ui-monospace, monospace; }
.wll-matrix__group th { text-align: left; background: #fbf6ea; color: #7a5600; font-weight: 700; }
.dark .wll-matrix__group th { background: #2b2c30; color: #f8d878; }
.wll-check { width: 1.25rem; height: 1.25rem; accent-color: #7a5600; cursor: pointer; }
.wll-check:disabled { cursor: not-allowed; opacity: .6; }

/* Case header card */
.wll-case-card { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #f5b207; border-radius: .75rem; padding: 1rem 1.25rem; }
.dark .wll-case-card { background: #0f172a; border-color: #1e293b; border-left-color: #f5b207; }
.wll-case-card__banner { margin: -.25rem 0 .75rem; padding: .5rem .75rem; border-radius: .5rem; background: #fef3c7; color: #78350f; font-size: .875rem; font-weight: 600; }
.wll-case-card__grid { display: grid; gap: .9rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin: 0; }
.wll-case-card__grid dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.wll-case-card__grid dd { margin: .2rem 0 0; font-size: .95rem; color: #0f172a; }
.dark .wll-case-card__grid dd { color: #f1f5f9; }
.dark .wll-case-card__grid dt { color: #94a3b8; }
.wll-strong { font-weight: 700; }

/* Calendar (FullCalendar 6 via saade/filament-fullcalendar; its own CSS is injected by the JS) */
.filament-fullcalendar.wll-calendar {
    --fc-border-color: #e2e8f0;
    --fc-today-bg-color: rgba(201, 160, 78, .10);
    --fc-button-text-color: #1c1917;
    --fc-button-bg-color: #e7d3a6;
    --fc-button-border-color: transparent;
    --fc-button-hover-bg-color: #f8d878;
    --fc-button-hover-border-color: transparent;
    --fc-button-active-bg-color: #f5b207;
    --fc-button-active-border-color: transparent;
    --fc-event-bg-color: #f5b207;
    --fc-event-border-color: #c48e05;
    --fc-event-text-color: #1c1917;
    --fc-small-font-size: .8rem;
    font-size: .875rem;
}
.dark .filament-fullcalendar.wll-calendar { --fc-border-color: #1e293b; --fc-page-bg-color: #0f172a; --fc-neutral-bg-color: #1e293b; --fc-list-event-hover-bg-color: #1e293b; color: #e2e8f0; }
.filament-fullcalendar .fc-button { border-radius: .5rem; padding: .4rem .75rem; font-size: .85rem; font-weight: 600; box-shadow: none !important; }
.filament-fullcalendar .fc-button:focus-visible { outline: 2px solid #f5b207; outline-offset: 2px; }
.filament-fullcalendar .fc-toolbar-title { font-size: 1.15rem; font-weight: 700; }
.filament-fullcalendar .fc-event { cursor: pointer; }
.filament-fullcalendar .fc-list-event-title a { cursor: pointer; }
@media (max-width: 767px) {
    .filament-fullcalendar .fc-header-toolbar { flex-direction: column; gap: .5rem; }
    .filament-fullcalendar .fc-toolbar-title { font-size: 1rem; }
}

.wll-cal-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; margin-bottom: .75rem; }
.wll-cal-filter { display: flex; flex-direction: column; gap: .25rem; min-width: 10rem; font-size: .8rem; font-weight: 600; color: #475569; }
.dark .wll-cal-filter { color: #cbd5e1; }
.wll-cal-filter--check { flex-direction: row; align-items: center; gap: .5rem; min-width: auto; padding-bottom: .5rem; }
.wll-cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: .8rem; color: #475569; margin: 0 0 .75rem; }
.dark .wll-cal-legend { color: #cbd5e1; }
.wll-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 999px; vertical-align: middle; }
.wll-dot--hearing { background: #f5b207; }
.wll-dot--held { background: #15803d; }
.wll-dot--task { background: #a8a29e; }
.wll-dot--overdue { background: #dc2626; }

/* Cause list (printable) */
.wll-causelist-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.wll-causelist { background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; padding: 1.25rem; }
.dark .wll-causelist { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.wll-causelist__head h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.wll-causelist__head p { margin: .25rem 0 1rem; color: #64748b; font-size: .85rem; }
.wll-causelist__day h3 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .5rem; border-bottom: 2px solid #f5b207; padding-bottom: .25rem; }
.wll-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.wll-table th, .wll-table td { border: 1px solid #e2e8f0; padding: .4rem .5rem; text-align: left; vertical-align: top; }
.dark .wll-table th, .dark .wll-table td { border-color: #334155; }
.wll-table thead th { background: #f8fafc; font-weight: 700; }
.dark .wll-table thead th { background: #1e293b; }
@media print {
    .fi-sidebar, .fi-topbar, .fi-header, .wll-no-print, .fi-sidebar-close-overlay { display: none !important; }
    .fi-main, .fi-page, .fi-main-ctn { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .fi-layout, .fi-main-ctn { display: block !important; }
    .wll-causelist { border: 0; padding: 0; }
    .wll-causelist__day { break-inside: avoid-page; }
    body { background: #fff !important; }
}

/* Dashboard */
.wll-feed { list-style: none; margin: 0; padding: 0; }
.wll-feed li + li { border-top: 1px solid #f1f5f9; }
.dark .wll-feed li + li { border-color: #1e293b; }
.wll-feed a { display: block; padding: .55rem 0; text-decoration: none; }
.wll-feed a:hover .wll-feed__title, .wll-feed a:focus-visible .wll-feed__title { text-decoration: underline; }
.wll-feed__title { display: block; font-size: .9rem; font-weight: 600; color: #0f172a; }
.dark .wll-feed__title { color: #f1f5f9; }
.wll-feed__meta { display: block; font-size: .75rem; color: #64748b; }
.wll-mini-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.wll-mini-cal__title { font-weight: 700; color: #0f172a; text-decoration: none; }
.dark .wll-mini-cal__title { color: #f1f5f9; }
.wll-mini-cal { width: 100%; border-collapse: collapse; text-align: center; font-size: .8rem; table-layout: fixed; }
.wll-mini-cal th { color: #64748b; font-weight: 600; padding: .25rem 0; }
.wll-mini-cal td { padding: .3rem 0; border-radius: .4rem; height: 2.4rem; vertical-align: top; color: #0f172a; }
.dark .wll-mini-cal td { color: #e2e8f0; }
.wll-mini-cal td.is-out { color: #cbd5e1; }
.dark .wll-mini-cal td.is-out { color: #475569; }
.wll-mini-cal td.is-today { outline: 2px solid #f5b207; outline-offset: -2px; font-weight: 700; }
.wll-mini-cal td.has-hearing { background: rgba(201, 160, 78, .12); }
.wll-mini-cal__dots { display: flex; justify-content: center; gap: 2px; margin-top: 2px; }
.wll-mini-cal__dots .wll-dot { width: .4rem; height: .4rem; }

/* ---- Documents (Phase 4) ---- */
.wll-doc-preview__frame { width: 100%; height: 70vh; border: 1px solid rgb(0 0 0 / .1); border-radius: .5rem; background: #fff; }
.wll-doc-preview__image { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: .5rem; }
.wll-doc-preview__links { margin-top: .75rem; font-size: .875rem; color: rgb(107 114 128); }
.wll-doc-preview__links a, .wll-doc-versions a { color: #7a5600; font-weight: 600; text-decoration: underline; }
.wll-doc-versions table { width: 100%; font-size: .875rem; border-collapse: collapse; }
.wll-doc-versions th, .wll-doc-versions td { text-align: left; padding: .5rem; border-bottom: 1px solid rgb(0 0 0 / .08); vertical-align: top; }
.wll-doc-versions small { color: rgb(107 114 128); }
.wll-badge { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; font-size: .7rem; background: #fff3cc; color: #7a5600; }
@media (max-width: 640px) { .wll-doc-preview__frame { height: 60vh; } }

/* Finance: money tiles (overview, ledger, case Fees tab) */
.wll-money-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.wll-money-tile { background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.dark .wll-money-tile { background: #0f172a; border-color: #334155; }
.wll-money-tile span { font-size: .8rem; color: #475569; }
.dark .wll-money-tile span, .dark .wll-money-tile small { color: #cbd5e1; }
.wll-money-tile strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.wll-money-tile small { font-size: .75rem; color: #475569; }
.wll-money-tile--due { border-color: #d97706; }
.wll-money-tile--overdue { border-color: #b91c1c; }
.wll-money-tile--overdue strong { color: #b91c1c; }
.dark .wll-money-tile--overdue strong { color: #fca5a5; }
.wll-ledger-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.wll-ledger-controls .wll-cal-filter { min-width: 220px; flex: 1 1 220px; }
.wll-table--money td.wll-num, .wll-table--money th.wll-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wll-table-wrap { overflow-x: auto; }

/* Case emails and quarantine */
.wll-email__meta { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; font-size: .875rem; margin: 0 0 .75rem; }
.wll-email__meta dt { color: #475569; font-weight: 600; }
.dark .wll-email__meta dt { color: #cbd5e1; }
.wll-email__meta dd { margin: 0; overflow-wrap: anywhere; }
.wll-email__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .5rem; padding: .75rem; max-height: 50vh; overflow-y: auto; }
.dark .wll-email__body { background: #0f172a; border-color: #334155; }
.wll-email__h { font-weight: 700; margin: .75rem 0 .25rem; font-size: .875rem; }
.wll-email__files { list-style: disc; padding-left: 1.25rem; font-size: .875rem; }
.wll-email__headers { margin-top: .75rem; font-size: .8rem; }
.wll-email__headers pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow-y: auto; background: #f8fafc; padding: .5rem; border-radius: .375rem; }
.dark .wll-email__headers pre { background: #0f172a; }

/* Phase 7: reports list, security checks, audit details, legal hold */
.wll-report-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; }
.wll-report-link { display: flex; flex-direction: column; gap: .25rem; min-height: 44px; padding: .75rem 1rem; border: 1px solid #e2e8f0; border-radius: .75rem; text-decoration: none; color: inherit; height: 100%; }
.wll-report-link:hover, .wll-report-link:focus-visible { border-color: #7a5600; background: #fffbeb; }
.wll-report-link:focus-visible { outline: 2px solid #7a5600; outline-offset: 2px; }
.dark .wll-report-link { border-color: #334155; }
.dark .wll-report-link:hover, .dark .wll-report-link:focus-visible { background: #1e293b; border-color: #f5b207; }
.wll-report-link__title { font-weight: 700; }
.wll-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.wll-checks__item { display: flex; gap: .75rem; align-items: flex-start; padding: .5rem .75rem; border-radius: .5rem; border-left: 4px solid #16a34a; background: #f0fdf4; }
.wll-checks__item.is-warn { border-left-color: #d97706; background: #fffbeb; }
.dark .wll-checks__item { background: #052e16; }
.dark .wll-checks__item.is-warn { background: #422006; }
.wll-checks__icon { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .1rem; color: #15803d; }
.wll-checks__item.is-warn .wll-checks__icon { color: #b45309; }
.dark .wll-checks__icon { color: #86efac; }
.dark .wll-checks__item.is-warn .wll-checks__icon { color: #fcd34d; }
.wll-checks__label { font-weight: 700; margin: 0; }
.wll-audit { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; font-size: .875rem; margin: 0 0 .75rem; }
.wll-audit div { display: contents; }
.wll-audit dt { color: #475569; font-weight: 600; }
.dark .wll-audit dt { color: #cbd5e1; }
.wll-audit dd { margin: 0; overflow-wrap: anywhere; }
.wll-case-card__banner--hold { background: #e0e7ff; color: #312e81; }

/* Phase 8: "How do I..." help page */
.wll-help__intro { margin: 0; color: #475569; max-width: 60ch; }
.dark .wll-help__intro { color: #cbd5e1; }
.wll-help__toc { display: flex; flex-wrap: wrap; gap: .5rem; }
.wll-help__toc a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .875rem; border: 1px solid #e2e8f0; border-radius: 999px; text-decoration: none; color: inherit; font-size: .875rem; }
.wll-help__toc a:hover, .wll-help__toc a:focus-visible { border-color: #7a5600; background: #fffbeb; }
.wll-help__toc a:focus-visible { outline: 2px solid #7a5600; outline-offset: 2px; }
.dark .wll-help__toc a { border-color: #334155; }
.dark .wll-help__toc a:hover, .dark .wll-help__toc a:focus-visible { background: #1e293b; border-color: #f5b207; }
.wll-help__guide { padding: 1rem 1.25rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; scroll-margin-top: 5rem; }
.dark .wll-help__guide { border-color: #334155; background: #111827; }
.wll-help__title { margin: 0 0 .5rem; font-size: 1.0625rem; font-weight: 700; }
.wll-help__steps { margin: 0; padding-left: 1.5rem; list-style: decimal; display: grid; gap: .5rem; line-height: 1.5; }
.wll-help__steps li::marker { font-weight: 700; color: #7a5600; }
.dark .wll-help__steps li::marker { color: #f5b207; }
.wll-help__tip { margin: .75rem 0 0; padding: .5rem .75rem; border-left: 4px solid #f5b207; background: #fffbeb; border-radius: .25rem; font-size: .875rem; }
.dark .wll-help__tip { background: #1e293b; }

/* Sign-in code (OTP): "Send a new code" with its 60-second countdown */
.wll-otp-resend { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; font-size: .875rem; }
.wll-otp-resend__button { min-height: 44px; padding: 0 .25rem; font-weight: 600; color: #8a6100; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; }
.wll-otp-resend__button:hover { color: #5c4100; }
.wll-otp-resend__button:focus-visible { outline: 2px solid #7a5600; outline-offset: 2px; border-radius: .25rem; }
.wll-otp-resend__button:disabled { color: #64748b; text-decoration: none; cursor: not-allowed; }
.dark .wll-otp-resend__button { color: #f5b207; }
.dark .wll-otp-resend__button:disabled { color: #94a3b8; }
.wll-otp-resend__wait { color: #475569; }
.dark .wll-otp-resend__wait { color: #cbd5e1; }
