/* Shared Madhyamik portal palette for public pages, login and dashboard. */
:root {
    --saffron: #e87513;
    --saffron-dark: #a33d0a;
    --saffron-deep: #59260f;
    --saffron-light: #fff0da;
    --saffron-cream: #fffbf5;
    --navy: var(--saffron-dark);
    --navy-2: #7b300d;
    --navy2: #7b300d;
    --orange: #a33d0a;
    --gold: #ffd08a;
    --blue: #a33d0a;
    --ink: #35291f;
    --muted: #766657;
    --line: #eedfce;
    --paper: #fff8ee;
    --shadow: 0 18px 45px rgba(102, 46, 12, .12);
    --bs-link-color: #a33d0a;
    --bs-link-hover-color: #742a06;
    --bs-focus-ring-color: rgba(232, 117, 19, .25);
}

/* Public portal */
body { accent-color: var(--saffron-dark); }
.topbar { background: var(--saffron-deep); }
.topbar button, .topbar a { color: #ffecd5; }
.topbar .admin-link { color: #512208; background: var(--gold); }
.brand-header { background: var(--saffron-cream); }
.brand-text strong { color: #a33d0a; }
.state-seal {
    color: #9f440f;
    border-color: #c56a20;
    background: radial-gradient(circle, #fffaf3 45%, #ffe7c3 46%, #fffaf3 66%);
    box-shadow: inset 0 0 0 4px #fffaf3, inset 0 0 0 5px #db9759;
}
.state-seal:before, .state-seal:after { border-color: #c56a20; }
.state-seal i { background: #c56a20; }
.header-search, .password-field button, .captcha-question, .captcha-row > button {
    background: #fff7eb;
    border-color: #e8d2b9;
}
.header-search input::placeholder { color: #806d5b; }
.header-login { background: linear-gradient(120deg, #a33d0a, #c35b0e); }
.header-login:hover { color: #fff; background: #843006; }
.main-nav { background: linear-gradient(100deg, #9b3809, #b64e0d 60%, #a33d0a); border-color: #ffb660; }
.main-nav .nav-link:hover, .main-nav .nav-link:focus, .main-nav .nav-link.active { color: #fff0d8; background: rgba(77, 28, 3, .17); }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item:focus { color: #792a06; background: #fff0da; }
.main-nav .dropdown-item:active { color: #fff; background: var(--saffron-dark); }
.alert-ticker { color: #57260e; background: #ffe0b1; border-bottom: 1px solid #f4c88f; }
.ticker-inner > button { color: #672b09; background: rgba(163, 61, 10, .11); }
.hero-shade {
    background: linear-gradient(90deg, rgba(65, 27, 9, .95) 0%, rgba(91, 39, 12, .83) 39%, rgba(108, 46, 12, .27) 72%, rgba(64, 29, 11, .14) 100%), linear-gradient(0deg, rgba(60, 26, 9, .28), transparent 55%);
}
.hero-content > p, .hero-proof { color: #fff0e0; }
.hero-controls > button { background: rgba(74, 28, 6, .5); }
.btn-gold { color: #4d220b; background: #ffbc68; }
.btn-gold:hover { color: #4d220b; background: #ffd08a; }
.btn-glass:hover { color: #ffe1b3; border-color: #ffe1b3; }
.quick-head { color: #fff; background: linear-gradient(135deg, #a83e0a, #c55b0b); }
.quick-grid > a:hover, .partner-grid a:hover { background: #fff6e9; }
.quick-icon.orange, .quick-icon.blue, .quick-icon.green, .quick-icon.purple, .quick-icon.red, .quick-icon.teal {
    color: #a33d0a;
    background: #fff0db;
}
.leader-grid article { border-top: 3px solid #e87513; box-shadow: 0 8px 24px rgba(102, 46, 12, .06); }
.leader-photo { background: linear-gradient(180deg, #fff8ee, #f6e7d5); }
.data-note { color: #7b6c5e; }
.notice-intro { background: linear-gradient(135deg, #8a320a, #b95110); }
.notice-intro p { color: #ffe6cd; }
.notice-list article { border-color: var(--line); }
.notice-list time, .notice-list article > a { border-color: #e6cfb6; }
.notice-list small { color: #7e6b58; }
.focus-symbol { color: #a33d0a; background: #fff0da; }
.focus-grid article:hover { background: #94380d; }
.focus-index { color: #99806a; }
.approach-section { background: linear-gradient(120deg, #6d2a0d, #9c400f 70%, #bd5a11); }
.approach-grid p, .impact-grid span { color: #ffe6cf; }
.sample-pill { color: #fff0df; }
.featured-resource { background: #fff6e9; }
.book-cover { box-shadow: 7px 7px 0 rgba(135, 62, 13, .1); }
.main-cover { background: linear-gradient(150deg, #78300f, #bf5b13); }
.main-cover small { color: #ffe4c8; }
.main-cover:after { color: #ffdaa0; }
.cover-blue { background: #ad4a0c; }
.cover-green { background: #8b501b; }
.cover-red { background: #953d26; }
.cover-gold { background: #98601a; }
.primary-small:hover { color: #fff; background: #742a06; }
.gallery-section { background: #a8430d; }
.gallery-frame:before { background: linear-gradient(0deg, rgba(64, 25, 8, .82), transparent 58%); }
.news-feature { box-shadow: 0 8px 28px rgba(102, 46, 12, .08); }
.contact-cta { background: linear-gradient(105deg, #8b330b, #b44c0e); }
.contact-cta p { color: #ffe7d2; }
.site-footer { color: #f4d9c1; background: #4c210e; }
.footer-bottom { color: #e4bfa0; border-color: #824927; }
.social-links a { border-color: #a16b47; }
.secure-label { color: #e4bfa0; }
.login-modal { border-top: 5px solid #e87513; box-shadow: 0 25px 70px rgba(70, 27, 7, .28); }
#loginForm label { color: #66513e; }
#loginForm .form-control, #loginForm .form-select { border-color: #e8d2b9; }
#loginForm .form-control:focus, #loginForm .form-select:focus {
    border-color: #c9661c;
    box-shadow: 0 0 0 .2rem rgba(232, 117, 19, .16);
}
#loginForm > button { background: linear-gradient(115deg, #a33d0a, #c05a10); }
#loginForm > button:hover { background: #843006; }
.login-demo-note { color: #806d5b; }

/* Authenticated department dashboard */
.dash-sidebar { color: #ffead4; background: linear-gradient(160deg, #74300e, #a6450e 62%, #74300e); }
.dash-brand small, .dash-help span { color: #ffdab8; }
.nav-label { color: #ffcca1; }
.dash-sidebar nav a { color: #fff0e0; }
.dash-sidebar nav a:hover, .dash-sidebar nav a.active { color: #fff; background: rgba(255, 218, 174, .15); }
.dash-sidebar nav a.active:before { background: #ffd08a; }
.dash-search { color: #8c725c; background: #fff8ee; border-color: #f0e0cc; }
.dash-user > span { color: #8b3209; background: #ffe8c8; }
.dash-demo-note { color: #725234; background: #fff0d6; }
.dash-demo-note i { color: #a14e12; }
.dash-welcome { background: linear-gradient(115deg, #71300e, #a4430d); }
.dash-welcome .eyebrow { color: #ffd08a; }
.dash-welcome p { color: #ffe7d1; }
.dash-welcome a:first-child { color: #602809; background: #ffca82; border-color: #ffca82; }
.dash-kpis article { border-top: 3px solid #e87513; }
.kpi-icon.navy { background: #a33d0a; }
.kpi-icon.orange, .kpi-icon.blue { color: #a33d0a; background: #fff0da; }
.panel-title { background: #fffdf9; }
.chart-y, .dash-notices p { color: #7b6c5e; }
.bars { background: repeating-linear-gradient(to bottom, #f1e5d8 0, #f1e5d8 1px, transparent 1px, transparent 25%); }
.bars i { background: linear-gradient(180deg, #f8a342, #c95b0c); }
.dash-notices article div > span.blue-label { color: #93400d; background: #fff0d9; }
.dash-quick-actions a:hover { background: #fff6e9; }
.district-panel th { color: #7b6c5e; background: #fff9f0; }
.district-panel td > i, .profile-panel > i { background: #f4e7d6; }
.profile-panel:after { border-color: #fff0d8; }

/* Keep the user-selected high-contrast mode above the brand theme. */
.high-contrast .brand-header, .high-contrast .leadership-showcase,
.high-contrast .focus-section, .high-contrast .resource-section,
.high-contrast .partner-section { background: #000; }
.high-contrast .brand-text strong { color: #ffea00; }

/* Language switching and two-step login. */
.department-logo { width: 76px; height: 76px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 3px; border-radius: 50%; background: #fff; color: #59260f; font-weight: 800; }
.department-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.footer-brand .department-logo { width: 50px; height: 50px; }
.dash-brand > .department-logo { width: 44px; height: 44px; border: 0; padding: 2px; background: #fff; }
.department-portals { padding: 52px 0 44px; background: #fff8ee; border-top: 1px solid #f0dfc9; scroll-margin-top: 20px; }
.department-portals .section-heading-row { margin-bottom: 26px; }
.portal-section-note { max-width: 330px; margin: 0; color: #776657; font-size: .85rem; line-height: 1.7; }
.department-portal-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.department-portal-card { display: flex; align-items: flex-start; gap: 22px; padding: 28px; background: #fff; border: 1px solid #e8cfb3; border-top: 3px solid #d86116; color: #59260f; transition: border-color .2s, box-shadow .2s; }
.department-portal-card:hover { color: #59260f; border-color: #bc510f; box-shadow: 0 8px 24px rgba(119,66,23,.08); }
.department-portal-card:focus-visible { outline: 3px solid #a33d0a; outline-offset: 4px; }
.department-portal-icon { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; color: #a33d0a; background: #fff1df; font-size: 1.7rem; }
.department-portal-domain { color: #8a6a4f; font: 600 .78rem "Source Sans 3",sans-serif; letter-spacing: .04em; }
.department-portal-card h3 { margin: 7px 0 10px; color: #59260f; font-size: 1.35rem; font-weight: 800; }
.department-portal-card p { margin: 0 0 18px; color: #776657; font-size: .84rem; line-height: 1.7; }
.department-portal-link { display: inline-flex; align-items: center; gap: 16px; color: #a33d0a; font-size: .8rem; font-weight: 800; }
.external-portal-notice { margin: 18px 0 0; color: #776657; font-size: .72rem; }
.external-portal-notice i { margin-right: 5px; }
.high-contrast .department-portals, .high-contrast .department-portal-card { background: #000; border-color: #ffea00; }
.high-contrast .department-portals p, .high-contrast .department-portal-domain { color: #fff; }
.high-contrast .department-portals h2, .high-contrast .department-portal-card h3 { color: #ffea00; }
.high-contrast .department-portal-link { color: #ffea00; }
@media(max-width:850px) {
    .department-portals .section-heading-row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .portal-section-note { max-width: none; }
    .department-portal-card { padding: 22px; gap: 16px; }
}
@media(max-width:575px) {
    .portal-brand .department-logo { width: 56px; height: 56px; }
    .department-portals { padding: 36px 0; }
    .department-portal-grid { grid-template-columns: 1fr; gap: 16px; }
    .department-portal-icon { width: 44px; height: 44px; font-size: 1.35rem; }
    .department-portal-card h3 { font-size: 1.2rem; }
}

.language-switch { white-space: nowrap; font-size: .75rem; }
.language-switch a { color: #8d370c; padding: 3px 5px; }
.language-switch a.active { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.login-language-links { display: flex; gap: 7px; justify-content: flex-end; margin: -12px 0 16px; color: #9b420f; font-size: .75rem; }
.login-modal > .btn-close { z-index: 2; }
.otp-description, .otp-info { font-size: .8rem; color: var(--muted); }
.otp-info { padding: 10px; background: #edf8ef; color: #286246; }
.otp-form { display: grid; gap: 12px; }
.otp-form label { color: #6b4e37; font-size: .8rem; font-weight: 700; }
.otp-form .form-control { border-radius: 0; border-color: #e8d2b9; font-size: 1.5rem; text-align: center; letter-spacing: .3em; }
.login-modal [hidden] { display: none !important; }
.otp-identity { padding: 12px 14px; background: #fff8ee; border: 1px solid #ead6bd; display: grid; gap: 6px; }
.otp-form .otp-identity .form-control, .otp-form .otp-password-confirm .form-control { font-size: .88rem; letter-spacing: normal; text-align: start; }
.otp-password-confirm { display: grid; gap: 6px; }
.login-modal button:disabled { opacity: .6; cursor: wait; }
.otp-submit { padding: 12px; color: #fff; background: #a33d0a; border: 0; font-weight: 700; }
.otp-link { color: #a33d0a; background: transparent; border: 0; font-size: .75rem; }
html[lang="en"] .main-nav .nav-link { font-size: .78rem; padding-inline: 11px !important; }
html[lang="en"] .brand-text strong { font-size: clamp(1.1rem,1.7vw,1.5rem); }
html[lang="en"] .quick-grid strong { font-size: .76rem; }
html[lang="en"] .leader-grid h3 { font-size: .8rem; }
@media(max-width:560px) {
    .dash-topbar { gap: 8px; }
    .dash-topbar .language-switch { font-size: .65rem; }
    html[lang="en"] .brand-text strong { font-size: .9rem; }
    html[lang="en"] .hero-content h1, html[lang="en"] .hero-content h2 { font-size: 2rem; }
}
