/*
 * HIBS PURPLE SCHOOL THEME
 * Loaded after page stylesheets so it can recolour shared UI consistently.
 * Accessible contrast: deep violet navigation, vivid purple actions, pale lavender surfaces.
 */
:root {
    --navy: #291344;
    --navy-2: #4c1d95;
    --blue: #7c3aed;
    --blue-dark: #5b21b6;
    --gold: #a78bfa;
    --paper: #f7f3ff;
    --canvas: #f7f4fc;
    --surface: #ffffff;
    --ink: #241333;
    --muted: #71627f;
    --line: #e8ddf4;
    --shadow: 0 18px 50px rgba(49, 20, 84, .10);
    --hibs-navy: #35145f;
    --hibs-blue: #7c3aed;
    --hibs-blue-deep: #4c1d95;
    --hibs-gold: #c4b5fd;
    --hibs-ink: #2e1646;
    --hibs-muted: #78658d;
    --hibs-line: #e7dcf4;
}

/* General surface and navigation */
body, .app-body { color: #241333; background-color: #f7f4fc; }
a, .breadcrumb a, .mini-link { color: #6d28d9; }
a:hover, .mini-link:hover { color: #4c1d95; }
.sidebar { background: linear-gradient(180deg, #211035 0%, #32154e 58%, #27113f 100%) !important; }
.side-link { color: #e4d9f1; }
.side-link:hover { background: rgba(196,181,253,.14); color: #fff; }
.side-link.active { background: linear-gradient(100deg, #6d28d9, #54209b) !important; box-shadow: inset 3px 0 #ddd6fe !important; color: #fff; }
.nav-symbol { color: #c4b5fd !important; }
.side-section-label { color: #b7a4d0; }
.secure-label { color: #c4b5d8; }
.brand-mark { background: linear-gradient(145deg, #8b5cf6, #4c1d95) !important; box-shadow: 0 8px 18px rgba(109,40,217,.24); }
.avatar { color: #5b21b6 !important; background: #ede9fe !important; }

/* Primary buttons, focus rings and form controls */
.button-primary, .btn-primary, .filter-submit button, button.primary, input[type="submit"], .hibs-signin-button {
    color: #fff !important;
    border-color: #6d28d9 !important;
    background: linear-gradient(100deg, #8b5cf6 0%, #5b21b6 100%) !important;
    box-shadow: 0 10px 22px rgba(91,33,182,.18), inset 0 1px 0 rgba(255,255,255,.16) !important;
}
.button-primary:hover, .btn-primary:hover, .filter-submit button:hover, button.primary:hover, input[type="submit"]:hover, .hibs-signin-button:hover {
    background: linear-gradient(100deg, #7c3aed 0%, #4c1d95 100%) !important;
}
.button-outline, .button-link { color: #5b21b6; border-color: #d8c6f0; }
.button-outline:hover, .button-link:hover { background: #f4edff; border-color: #b89ae8; }
.button-secondary { color: #4c1d95; border-color: #d9c8ef; }
input:focus, select:focus, textarea:focus, .form-field input:focus, .form-field select:focus,
.form-field textarea:focus, .filter-select:focus, .filter-row input:focus, .filter-row select:focus,
.mark-input:focus, .comment-input:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139,92,246,.17) !important;
    outline-color: #8b5cf6;
}
input[type="checkbox"], input[type="radio"], .checkbox-label input { accent-color: #7c3aed; }

/* Shared dashboard and page accents */
.eyebrow, .page-subtitle strong { color: #7c3aed; }
.welcome-panel, .reporting-hero, .guardian-welcome {
    color: #fff;
    background: linear-gradient(115deg, #32144d 0%, #5b21b6 58%, #8b5cf6 100%) !important;
}
.welcome-panel .eyebrow { color: #e9ddff; }
.welcome-panel p:not(.eyebrow) { color: #f2eaff; }
.welcome-mark { color: rgba(255,255,255,.22); background: rgba(255,255,255,.09); }
.metric-value, .detail-value, .result-score, .form-card h2, .content-card h2 { color: #35145f; }
.metric-blue .metric-icon, .metric-icon, .module-icon, .reporting-module-icon, .finance-action-icon {
    color: #6d28d9;
    background: #f0e8ff;
}
.metric-card:hover, .content-card:hover, .form-card:hover { border-color: #e0d0f5; }
.status-pill, .count-pill, .role-chip { color: #5b21b6; background: #f1e9ff; border-color: #e1d2f4; }
.check-icon { color: #6d28d9; background: #f0e8ff; }
.feature-index { color: #6d28d9; background: #f0e8ff; }
.finance-action:hover { border-color: #b99be8; }

/* Tables, report tabs and interactive highlights */
.data-table th { color: #5c4773; background: #f2ebfb; }
.data-table td strong { color: #35145f; }
.report-tab.active, .report-tabs .active, .notification-filter-form .active {
    color: #5b21b6;
    border-color: #bda0ed;
    background: #f1e9ff;
}
.reporting-bar-fill { background: linear-gradient(90deg, #a78bfa, #6d28d9) !important; }
.notification-unread { border-left-color: #8b5cf6; background: #faf7ff; }
.notification-nav-count { color: #fff; background: #8b5cf6; }
.notification-kind-announcement, .notification-kind-examination, .notification-kind-general,
.notification-kind-payment, .notification-kind-system { color: #5b21b6; background: #f1e9ff; }
.comm-card, .comm-provider-card, .guardian-child-card, .reporting-activity-card { border-color: #e5d8f4; }
.comm-toggle:checked, .comm-toggle[aria-checked="true"] { background: #7c3aed; }

/* Login page recolour: use the actual school photograph, no logo/crest. */
body.hibs-login-page {
    --hibs-navy: #35145f;
    --hibs-blue: #7c3aed;
    --hibs-blue-deep: #4c1d95;
    --hibs-gold: #c4b5fd;
    --hibs-ink: #2e1646;
    --hibs-muted: #78658d;
    --hibs-line: #e7dcf4;
    background-color: #211035;
    background-image: linear-gradient(100deg, rgba(35,12,52,.63) 0%, rgba(43,16,64,.42) 48%, rgba(31,11,47,.49) 100%), url("../images/classroom-login-background.jpg");
    background-position: center center, center center;
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
}
.hibs-background-shade { background: linear-gradient(90deg, rgba(28,10,47,.20) 0%, rgba(43,16,70,.08) 54%, rgba(28,10,47,.15) 100%); }
.hibs-background-shade::before { right: -13vw; bottom: -39vh; width: 66vw; height: 43vh; border-top-color: rgba(255,255,255,.34); background: linear-gradient(165deg, rgba(124,58,237,.68) 0%, rgba(46,16,101,.85) 82%); opacity: .78; }
.hibs-background-shade::after { background: linear-gradient(135deg, rgba(124,58,237,.19), rgba(255,255,255,.025)); }
.hibs-brand-panel { color: #35145f; }
.hibs-gold-rule, .hibs-bottom-line { background: linear-gradient(90deg, #c4b5fd, #8b5cf6) !important; }
.hibs-card-heading h1 { color: #35145f !important; }
.hibs-input-wrap:focus-within { border-color: #8b5cf6 !important; box-shadow: 0 0 0 4px rgba(139,92,246,.15) !important; }
.hibs-input-leading, .hibs-password-toggle { color: #6d28d9 !important; }
.hibs-password-toggle:hover, .hibs-forgot-button { color: #6d28d9 !important; }
.hibs-password-toggle:focus-visible, .hibs-forgot-button:focus-visible { outline-color: #8b5cf6 !important; }
.hibs-remember-option input { accent-color: #7c3aed !important; }
.hibs-forgot-button:hover { color: #4c1d95 !important; }
.hibs-forgot-help { color: #4c1d95 !important; background: #f3ecff !important; }
.hibs-role-tile { color: #35145f !important; border-color: #e5d8f4 !important; }
.hibs-role-student .hibs-role-icon { color: #6d28d9 !important; background: #f1e9ff !important; }
.hibs-role-teacher .hibs-role-icon { color: #7c3aed !important; background: #ede9fe !important; }
.hibs-role-guardian .hibs-role-icon { color: #9333ea !important; background: #fae8ff !important; }
.hibs-role-staff .hibs-role-icon { color: #5b21b6 !important; background: #e9ddff !important; }
.hibs-card-footer b { color: #8b5cf6 !important; }

@media (max-width: 820px) {
    .sidebar { position: static; width: 100%; }
}
@media print {
    /* Keep printouts legible and do not force purple backgrounds onto paper. */
    .reporting-hero, .welcome-panel { print-color-adjust: economy; -webkit-print-color-adjust: economy; }
}
