﻿/*
 * SGDMS Platform Readability Standard
 * Critical rule: text must maintain strong contrast against its surface.
 * Loaded last across Directorate, Secure Access, public portal and Youth Connect.
 */
:root {
    --ink: #11241d;
    --muted: #4f615a;
    --brand-dark: #073d2b;
    --cc-ink: #10231c;
    --cc-muted: #50665d;
    --read-ink: #10231c;
    --read-body: #30473e;
    --read-muted: #53665e;
    --read-subtle: #63756e;
    --read-on-dark: #ffffff;
    --read-on-dark-soft: #e8f3ee;
    --read-border: #cbd8d2;
    --read-surface: #ffffff;
    --read-surface-soft: #f4f8f6;
}

html { font-size: 16px; }
body { color: var(--read-ink); }

/* High-contrast typography on light application surfaces. */
.page-heading,
.simple-page-heading,
.panel,
.metric-card,
.control-card,
.verification-panel,
.verification-metrics article,
.admin-insight-panel,
.admin-metric-grid article,
.classification-metric,
.classification-panel,
.registry-table,
.access-registry-panel,
.control-onboarding-panel,
.group-section,
.command-principle {
    color: var(--read-ink);
}

.page-heading h1,
.page-heading h2,
.simple-page-heading h1,
.panel h1,
.panel h2,
.panel h3,
.metric-card strong,
.metric-value,
.classification-metric strong,
.classification-panel h2,
.verification-panel h2,
.verification-panel h3,
.admin-insight-panel h2,
.control-card h2,
.control-card h3 {
    color: var(--read-ink) !important;
}

/* Supporting copy should remain clearly readable, never washed out. */
.page-heading p,
.panel p,
.panel small,
.metric-card small,
.metric-label,
.command-principle span,
.classification-metric span,
.classification-metric small,
.classification-panel p,
.verification-panel p,
.verification-panel small,
.verification-metrics span,
.admin-insight-panel p,
.admin-insight-panel small,
.admin-metric-grid span,
.admin-metric-grid small,
.control-card p,
.control-card small,
.health-component-card small,
.access-registry-heading p,
.registry-table small,
.group-section small,
.empty-state {
    color: var(--read-muted) !important;
}

/* Minimum readable sizes for labels/secondary copy on operational pages. */
.metric-label,
.metric-card small,
.verification-metrics span,
.admin-metric-grid span,
.admin-metric-grid small,
.classification-metric span,
.classification-metric small,
.registry-table th,
.registry-table td,
.admin-insight-table th,
.admin-insight-table td,
.health-component-card small,
.control-card small,
.panel small {
    font-size: max(.74rem, 12px) !important;
    line-height: 1.35 !important;
}

.panel p,
.page-heading p,
.command-principle span,
.classification-panel p,
.verification-panel p,
.control-card p {
    font-size: max(.82rem, 13px) !important;
    line-height: 1.55 !important;
}

/* Form readability. */
input,
select,
textarea,
button {
    color: var(--read-ink);
}
input,
select,
textarea {
    font-size: max(.82rem, 13px) !important;
}
input::placeholder,
textarea::placeholder {
    color: #667871 !important;
    opacity: 1 !important;
}
label {
    color: #30483f;
}

/* Dark application chrome: always use light foregrounds. */
.sgdms-control-topbar,
.sgdms-control-sidebar,
.classification-hero,
.secure-admin-hero,
.verification-hero:is(.dark,.is-dark) {
    color: var(--read-on-dark) !important;
}
.sgdms-control-sidebar p,
.sgdms-control-sidebar small {
    color: #b8d8cc !important;
}
.sgdms-control-sidebar a,
.sgdms-control-sidebar summary,
.sgdms-control-topbar a,
.sgdms-control-topbar button,
.sgdms-control-topbar strong {
    color: #f8fcfa !important;
}
.sgdms-control-sidebar a {
    font-size: max(.80rem, 13px) !important;
}
.sgdms-control-sidebar p {
    font-size: max(.64rem, 10.5px) !important;
}
.classification-hero h1,
.classification-hero h2,
.classification-hero h3,
.classification-hero strong {
    color: #fff !important;
}
.classification-hero p {
    color: #e9f5f0 !important;
    font-size: max(.82rem, 13px) !important;
}
.classification-status {
    color: #fff !important;
}

/* Classification & Intelligence cards. */
.classification-metric,
.classification-panel,
.classification-filter-card {
    background: #fff !important;
}
.classification-metric span,
.classification-metric small,
.classification-panel label,
.classification-panel .help-text {
    color: #53665e !important;
}
.classification-panel select,
.classification-panel input {
    background: #fff !important;
    color: #10231c !important;
    border-color: #bdcdc6 !important;
}

/* Dashboard map: bright intelligence surface instead of a dark veil. */
.dashboard-page .map-panel,
.dashboard-page .map-hero {
    background: #edf5f1 !important;
    color: var(--read-ink) !important;
    border-color: #c8d8d0 !important;
}
.dashboard-page .map-info-rail {
    background: transparent !important;
    color: var(--read-ink) !important;
}
.dashboard-page .map-stage {
    background:
        radial-gradient(circle at 50% 46%, rgba(35, 139, 96, .10), transparent 29rem),
        linear-gradient(180deg, #f7fbf9 0%, #e5f0ea 100%) !important;
    filter: none !important;
}
.dashboard-page .nigeria-map,
.dashboard-page #nigeria-map {
    opacity: 1 !important;
    filter: saturate(1.12) contrast(1.08) brightness(1.04) !important;
}
.dashboard-page .map-hero-overlay,
.dashboard-page .state-panel,
.dashboard-page .map-hero .state-panel {
    background: rgba(255,255,255,.975) !important;
    color: var(--read-ink) !important;
    border-color: #bfd0c8 !important;
}
.dashboard-page .map-hero-overlay h1,
.dashboard-page .state-panel h3,
.dashboard-page .map-panel h2,
.dashboard-page .state-panel strong,
.dashboard-page .state-group strong,
.dashboard-page .state-stat strong {
    color: #0d2b21 !important;
}
.dashboard-page .map-baseline,
.dashboard-page .map-key,
.dashboard-page .state-panel p,
.dashboard-page .state-stat span,
.dashboard-page .state-group small,
.dashboard-page .state-empty,
.dashboard-page .state-group-acronym {
    color: #465b52 !important;
}
.dashboard-page .state-stat,
.dashboard-page .state-group {
    background: #fff !important;
    border-color: #c8d7d0 !important;
}
.dashboard-page .state-stat span {
    font-size: max(.62rem, 10px) !important;
}
.dashboard-page .state-group strong {
    font-size: max(.70rem, 11px) !important;
}
.dashboard-page .state-group small {
    font-size: max(.63rem, 10px) !important;
}
.dashboard-page .state-name-label-text {
    color: #09291e !important;
    font-size: 8.8px !important;
    font-weight: 950 !important;
    text-shadow:
        0 1px 0 #fff,
        1px 0 0 #fff,
        -1px 0 0 #fff,
        0 -1px 0 #fff,
        0 0 4px rgba(255,255,255,1) !important;
}

/* Public-facing text: keep supporting information strong on pale cards. */
.public-page :is(.public-card,.public-panel,.public-stat,.public-state-panel,.support-card) small,
.public-page :is(.public-card,.public-panel,.public-stat,.public-state-panel,.support-card) p,
.public-portal-page :is(.public-card,.public-panel,.public-stat,.public-state-panel,.support-card) small,
.public-portal-page :is(.public-card,.public-panel,.public-stat,.public-state-panel,.support-card) p {
    color: #4f625a !important;
}

/* Youth Connect inherits the same readability threshold without changing its identity. */
.yc-shell :is(.yc-card,.yc-panel,.yc-stat,.yc-section) p,
.yc-shell :is(.yc-card,.yc-panel,.yc-stat,.yc-section) small {
    color: #50635b !important;
}

@media (max-width: 760px) {
    .metric-label,
    .metric-card small,
    .verification-metrics span,
    .admin-metric-grid span,
    .admin-metric-grid small,
    .classification-metric span,
    .classification-metric small {
        font-size: max(.76rem, 12.2px) !important;
    }

    .dashboard-page .map-stage {
        background:
            radial-gradient(circle at 50% 50%, rgba(35,139,96,.08), transparent 18rem),
            linear-gradient(180deg,#f8fcfa 0%,#e6f1eb 100%) !important;
    }
    .dashboard-page .map-hero .state-panel[data-populated="true"] {
        background: rgba(255,255,255,.985) !important;
        border: 1px solid #b8cbc2 !important;
        box-shadow: 0 10px 28px rgba(16,49,37,.19) !important;
    }
    .dashboard-page .map-hero .state-panel h3 {
        font-size: 1rem !important;
    }
    .dashboard-page .map-hero .state-stat strong {
        font-size: .92rem !important;
    }
    .dashboard-page .map-hero .state-stat span {
        font-size: .66rem !important;
    }
    .dashboard-page .state-group strong {
        font-size: .72rem !important;
    }
    .dashboard-page .state-group small {
        font-size: .64rem !important;
    }
    .dashboard-page .state-name-label-text {
        font-size: 7.1px !important;
    }
}

@media (max-width: 390px) {
    .dashboard-page .state-name-label-text {
        font-size: 6.7px !important;
    }
}
