/* Topbar & Logo Header */
.fi-topbar, .fi-sidebar-header { background-color: #003087 !important; border-bottom: none !important; }
.fi-topbar .fi-icon-btn, 
.fi-topbar .fi-user-menu-btn-name { color: #ffffff !important; }
.fi-topbar .fi-input { color: #000000 !important; background-color: #ffffff !important; }

/* Logo resizing */
.fi-logo { margin-left: 0.5rem; }
.fi-logo img { height: 3rem !important; max-height: 3rem !important; }

/* Sidebar Background */
.fi-sidebar { background-color: #001A4D !important; border-right: none !important; }

/* Inactive Text */
.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item-icon,
.fi-sidebar .fi-sidebar-group-label { 
    color: #ffffff !important; 
}

/* Sidebar Active State Background */
.fi-sidebar .fi-sidebar-item.fi-active > a,
.fi-sidebar .fi-sidebar-item.fi-active > button { 
    background-color: #ffffff !important; 
    border-radius: 0.5rem;
}

/* Sidebar Active State Text */
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon { 
    color: #003087 !important; 
}

/* Sidebar Hover State */
.fi-sidebar a:hover, 
.fi-sidebar button:hover { 
    background-color: rgba(255, 255, 255, 0.1) !important; 
}
.fi-sidebar .fi-sidebar-item.fi-active > a:hover,
.fi-sidebar .fi-sidebar-item.fi-active > button:hover {
    background-color: #f3f4f6 !important; 
}

/* Shared stat card accents.
   The `body` prefix outranks Filament's compiled single-class utilities,
   which load after this sheet and would otherwise win the cascade tie. */
body .stat-card-success,
body .stat-card-info,
body .stat-card-warning,
body .stat-card-danger,
body .stat-card-primary {
    background-color: #ffffff;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card-success {
    --stat-card-accent: #10b981;
    --stat-card-value: #059669;
    --stat-card-tint: rgba(16, 185, 129, 0.12);
}

.stat-card-info {
    --stat-card-accent: #3b82f6;
    --stat-card-value: #2563eb;
    --stat-card-tint: rgba(59, 130, 246, 0.12);
}

.stat-card-warning {
    --stat-card-accent: #f97316;
    --stat-card-value: #ea580c;
    --stat-card-tint: rgba(249, 115, 22, 0.12);
}

.stat-card-danger {
    --stat-card-accent: #ef4444;
    --stat-card-value: #dc2626;
    --stat-card-tint: rgba(239, 68, 68, 0.12);
}

.stat-card-primary {
    --stat-card-accent: #8b5cf6;
    --stat-card-value: #7c3aed;
    --stat-card-tint: rgba(139, 92, 246, 0.12);
}

body .stat-card-success,
body .stat-card-info,
body .stat-card-warning,
body .stat-card-danger,
body .stat-card-primary {
    border-left: 3px solid var(--stat-card-accent);
}

body .stat-card-success .fi-wi-stats-overview-stat-value,
body .stat-card-info .fi-wi-stats-overview-stat-value,
body .stat-card-warning .fi-wi-stats-overview-stat-value,
body .stat-card-danger .fi-wi-stats-overview-stat-value,
body .stat-card-primary .fi-wi-stats-overview-stat-value {
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Status-style stat values render as a soft badge pill (matches x-filament::badge). */
body .stat-card-pill .fi-wi-stats-overview-stat-value {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: var(--stat-card-tint);
    color: var(--stat-card-value);
}

body .stat-card-success .fi-wi-stats-overview-stat-label,
body .stat-card-info .fi-wi-stats-overview-stat-label,
body .stat-card-warning .fi-wi-stats-overview-stat-label,
body .stat-card-danger .fi-wi-stats-overview-stat-label,
body .stat-card-primary .fi-wi-stats-overview-stat-label {
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Verification finding badges: wrap long issue labels instead of clipping.
   Outranks Filament's `.fi-badge:not(.fi-wrapped)` truncate rule. */
body .fi-in-repeatable .fi-badge {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    justify-content: flex-start;
    text-align: left;
    height: auto;
}

/* Client dashboard */
.client-dashboard-subheading {
    color: #475569;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Agency panel dashboard & verification lookup.
   The project has no Tailwind build, so custom blades under
   resources/views/filament/agency use these semantic classes instead of
   utility classes that would never be compiled into any stylesheet. */
.agency-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.agency-header-main {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.875rem;
}

.agency-header-text { min-width: 0; }

.agency-icon-chip {
    display: flex;
    height: 2.75rem;
    width: 2.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: rgba(0, 48, 135, 0.08);
    color: #003087;
}

.agency-icon-chip svg { height: 1.5rem; width: 1.5rem; }

.agency-icon-chip--sm { height: 2.25rem; width: 2.25rem; }
.agency-icon-chip--sm svg { height: 1.25rem; width: 1.25rem; }

.agency-icon-chip--xs {
    height: 2rem;
    width: 2rem;
    border-radius: 0.375rem;
    background-color: #f3f4f6;
    color: #4b5563;
}
.agency-icon-chip--xs svg { height: 1rem; width: 1rem; }

.agency-icon-chip--info { background-color: rgba(59, 130, 246, 0.10); color: #2563eb; }
.agency-icon-chip--success { background-color: rgba(16, 185, 129, 0.10); color: #059669; }

.agency-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
}

.agency-title {
    margin-top: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agency-sub {
    margin-top: 0.25rem;
    max-width: 42rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.agency-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.agency-divider {
    margin-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.25rem;
}

.agency-meta-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .agency-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .agency-meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.agency-meta-item { min-width: 0; }

.agency-meta-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
}

.agency-meta-label svg { height: 1rem; width: 1rem; flex-shrink: 0; }

.agency-meta-value {
    margin-top: 0.25rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agency-total-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.agency-total-value {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1;
    color: #111827;
}

.agency-total-label {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.agency-status-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.agency-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: #374151;
}

.agency-status-row:hover { background-color: #f9fafb; }

.agency-release-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.agency-release-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.agency-release-row:hover { background-color: #f9fafb; }

.agency-release-main {
    display: flex;
    min-width: 0;
    gap: 0.75rem;
}

.agency-release-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agency-release-code {
    margin-top: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agency-release-date {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.agency-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.375rem;
    padding: 1.5rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.agency-empty svg { height: 1.25rem; width: 1.25rem; flex-shrink: 0; }

/* Verification lookup result card. The header rule also bounds the state
   icon, which otherwise renders at full container width because the blade's
   sizing utilities are not in any compiled stylesheet. */
.verification-result {
    margin-top: 1.5rem;
    border: 1px solid;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.verification-result--valid { background-color: #ecfdf5; border-color: #a7f3d0; }
.verification-result--invalid { background-color: #fef2f2; border-color: #fecaca; }

.verification-result-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.verification-result-header svg { height: 1.75rem; width: 1.75rem; flex-shrink: 0; }

.verification-result--valid .verification-result-header { color: #047857; }
.verification-result--invalid .verification-result-header { color: #b91c1c; }

.verification-result-label { font-size: 1.125rem; font-weight: 600; }

.verification-result-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.verification-result-grid {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
    font-size: 0.875rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .verification-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .verification-result-grid .verification-result-wide { grid-column: span 2 / span 2; }
}

.verification-result-field-label { font-weight: 500; color: #374151; }
.verification-result-field-value { color: #4b5563; }

.verification-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    word-break: break-all;
}

/* Agency request review: internal candidate artifacts table.
   Same no-Tailwind-build rationale as the agency panel section above. */
.candidate-table-wrap { overflow-x: auto; }

.candidate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.candidate-table th {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.candidate-table td {
    padding: 0.625rem 1rem;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.candidate-table tbody tr:last-child td { border-bottom: none; }
.candidate-table tbody tr:hover { background-color: #f9fafb; }

.candidate-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* PDS autosave status indicator (client submission wizard).
   Same no-Tailwind-build rationale as the agency panel section above. */
.pds-autosave {
    display: flex;
    min-height: 1.5rem;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.875rem;
}

.pds-autosave-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pds-autosave-state svg { height: 1rem; width: 1rem; flex-shrink: 0; }

.pds-autosave-state--saving { color: #4b5563; }
.pds-autosave-state--error { color: #dc2626; }
.pds-autosave-state--ok { color: #059669; }

/* Agreement body copy (DPA consent page). Replaces the uncompiled
   Tailwind `prose` typography classes with the intended article styling. */
.agreement-prose h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.agreement-prose p {
    font-size: 0.875rem;
    line-height: 1.625;
    color: #374151;
}

.agreement-prose p + p { margin-top: 0.75rem; }
