
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #101a35;
    --navy-light: #182746;
    --ink: #202b45;
    --muted: #77839b;
    --green: #4567ed;
    --mint: #edf1ff;
    --bg: #f4f6fc;
    --line: #e5e9f2;
    --white: #ffffff;
    --orange: #f2a66d;
    --purple: #8057e8;
    --shadow: 0 8px 30px rgba(25, 42, 82, .06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: .2s ease;
}

.container {
    width: min(1200px, calc(100% - 42px));
    margin: auto;
}

.topbar {
    min-height: 76px;
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(22px, calc((100% - 1200px)/2));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(10,20,45,.12);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: white;
    font: 800 18px Manrope, sans-serif;
    letter-spacing: -.6px;
}

.brand > span:last-child > span {
    color: #8b9dff;
}

.brand small {
    display: block;
    font: 700 8px 'DM Sans';
    letter-spacing: 1.8px;
    color: #9ba9c4;
}

.brand-icon {
    height: 42px;
    width: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg,#4168f4,#8758e8);
    color: white;
    display: grid;
    place-items: center;
    font: 800 23px Manrope;
    box-shadow: 0 6px 18px rgba(75,100,240,.3);
}

.topnav {
    display: flex;
    align-items: center;
    gap: 19px;
    font-size: 12px;
    font-weight: 700;
    color: #bdc9e0;
}

.topnav a:hover {
    color: white;
}

.topnav .nav-cta {
    background: linear-gradient(135deg,#4567ed,#8057e8);
    color: white;
    padding: 10px 16px;
    border-radius: 9px;
}

.logout {
    color: #ff9c9c;
}

.menu-btn {
    display: none;
    border: 1px solid rgba(255,255,255,.15);
    background: var(--navy-light);
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 19px;
    color: white;
    cursor: pointer;
}

main.container {
    min-height: calc(100vh - 150px);
}

.hero {
    padding: 80px 0 70px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--green);
    font-weight: 800;
}

.hero h1,
.auth-aside h1 {
    font: 800 clamp(42px,5.2vw,68px)/1.08 Manrope,sans-serif;
    letter-spacing: -3.5px;
    margin: 17px 0;
}

.hero h1 em,
.auth-aside h1 em {
    font-family: Georgia,serif;
    color: var(--green);
    font-weight: 500;
}

.hero-copy > p,
.auth-aside p {
    color: var(--muted);
    max-width: 520px;
    font-size: 15px;
}

.actions {
    display: flex;
    gap: 12px;
    margin: 27px 0;
}

.btn {
    border: 0;
    border-radius: 9px;
    padding: 12px 19px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font: 700 12px 'DM Sans';
    cursor: pointer;
    text-decoration: none;
    transition: .2s ease;
}

.btn:hover,
.small-btn:hover {
    transform: translateY(-2px);
}

.primary {
    background: linear-gradient(135deg,#4567ed,#8057e8);
    color: white;
    box-shadow: 0 6px 16px rgba(69,103,237,.2);
}

.secondary {
    background: white;
    border: 1px solid var(--line);
    color: var(--ink);
}

.full {
    width: 100%;
}

.hero-points {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #65738d;
    font-size: 11px;
    font-weight: 700;
}

.hero-visual {
    background: linear-gradient(135deg,#e8edff,#eee9ff);
    border-radius: 25px;
    padding: 35px;
    min-height: 340px;
    display: grid;
    place-items: center;
}

.mock-window {
    width: 100%;
    max-width: 430px;
    background: white;
    padding: 22px;
    border-radius: 15px;
    box-shadow: 0 25px 60px rgba(27,43,90,.13);
}

.mock-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.mock-head span {
    color: var(--purple);
}

.mock-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin: 22px 0;
}

.mock-stats div {
    background: #f3f5fc;
    padding: 12px;
    border-radius: 8px;
}

.mock-stats small,
.mock-stats b {
    display: block;
}

.mock-stats small {
    font-size: 9px;
    color: var(--muted);
}

.mock-stats b {
    font-size: 19px;
}

.mock-chart {
    height: 110px;
    display: flex;
    align-items: end;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 0 8px;
}

.mock-chart i {
    flex: 1;
    background: linear-gradient(#8d75f0,#4567ed);
    border-radius: 5px 5px 0 0;
}

.mock-line {
    font-size: 10px;
    color: var(--muted);
    margin-top: 12px;
}

.section {
    padding: 50px 0 85px;
}

.section-title {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 35px;
}

.section-title h2 {
    font: 800 34px Manrope;
    letter-spacing: -1.5px;
    margin: 8px 0;
}

.section-title p {
    color: var(--muted);
    font-size: 13px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.feature-grid article,
.panel,
.stat-card,
.plan-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 23px;
    box-shadow: var(--shadow);
}

.feature-grid article {
    transition: .2s ease;
}

.feature-grid article:hover {
    transform: translateY(-4px);
    border-color: #cbd5ff;
}

.feature-grid article > b {
    color: var(--green);
    font: 700 22px Georgia;
}

.feature-grid h3 {
    font: 700 17px Manrope;
    margin: 15px 0 6px;
}

.feature-grid p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.footer {
    background: var(--navy);
    color: #bdc9e0;
    padding: 24px 0;
    font-size: 11px;
}

.auth-wrap {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 60px;
    align-items: center;
    padding: 55px 0;
}

.auth-aside h1 {
    max-width: 530px;
}

.panel {
    box-shadow: var(--shadow);
}

.auth-form h2,
.panel h2 {
    font: 800 21px Manrope;
    margin: 0 0 20px;
}

.auth-form label,
.compact-form label,
.form-grid label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 14px;
}

.auth-form input,
.compact-form input,
.compact-form select,
.form-grid input,
.form-grid select,
.form-grid textarea,
select,
input,
textarea {
    font-family: 'DM Sans',sans-serif;
}

.auth-form input,
.compact-form input,
.compact-form select,
.form-grid input,
.form-grid select,
.form-grid textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #dce3f0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    color: var(--ink);
    transition: .2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #c5ceff;
    border-color: var(--green);
}

.muted {
    font-size: 11px;
    color: var(--muted);
}

.muted a {
    color: var(--green);
    font-weight: 700;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 38px 0 25px;
}

.page-heading h1 {
    font: 800 30px Manrope;
    letter-spacing: -1px;
    margin: 4px 0;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.stat-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: #edf0ff;
    right: -22px;
    top: -22px;
}

.stat-card span,
.stat-card b,
.stat-card strong {
    display: block;
    position: relative;
    z-index: 1;
}

.stat-card span {
    font-size: 11px;
    color: var(--muted);
}

.stat-card b,
.stat-card strong {
    font: 800 29px Manrope;
    margin-top: 7px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    margin: 20px 0 45px;
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-links a {
    padding: 13px;
    background: #f1f3ff;
    border-radius: 9px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
}

.quick-links a:hover {
    background: #e7eaff;
}

.table-panel {
    margin: 18px 0 25px;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 11px;
}

th {
    text-align: left;
    color: #75819a;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
    background: #f5f7fc;
}

td,
th {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
}

td {
    color: #42506b;
}

tbody tr:hover {
    background: #f8f9ff;
}

.inline-form {
    display: flex;
    gap: 5px;
}

.small-btn {
    border: 0;
    background: #e9edff;
    color: #3e5ed4;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.small-btn.danger {
    background: #faecea;
    color: #a9443d;
}

.compact-form {
    margin-bottom: 20px;
}

.compact-form h2 {
    margin-bottom: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px 15px;
}

.alert {
    margin: 18px 0;
    padding: 13px 16px;
    border-radius: 9px;
    font-size: 12px;
}

.alert.success {
    background: #e8f7ef;
    color: #17664f;
}

.alert.error {
    background: #fff0ed;
    color: #a9443d;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 17px;
}

.plan-card {
    transition: .2s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5ff;
}

.plan-card h2 {
    margin: 0;
}

.plan-card p {
    font-size: 12px;
    color: var(--muted);
}

.price {
    font: 800 26px Manrope;
    margin: 22px 0;
}

.price small {
    font: 400 11px 'DM Sans';
    color: var(--muted);
}

.plan-card ul {
    padding-left: 18px;
    color: #5d6c82;
    font-size: 12px;
    line-height: 2.2;
    min-height: 120px;
}

.payment-panel {
    margin-top: 25px;
}

.empty-state {
    padding: 60px;
    text-align: center;
    color: var(--muted);
}

.payment-panel p {
    font-size: 13px;
    color: var(--muted);
}

@media(max-width:850px) {
    .topnav {
        gap: 12px;
    }

    .hero {
        gap: 25px;
    }

    .feature-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .stat-grid,
    .stats-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:680px) {
    .container {
        width: calc(100% - 32px);
    }

    .topbar {
        min-height: 68px;
        padding: 0 16px;
    }

    .menu-btn {
        display: block;
    }

    .topnav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--navy);
        padding: 15px 20px 22px;
        box-shadow: 0 15px 25px rgba(10,20,45,.2);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-open .topnav {
        display: flex;
    }

    .topnav a {
        padding: 11px 5px;
    }

    .topnav .nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 48px 0;
        gap: 30px;
    }

    .hero h1,
    .auth-aside h1 {
        font-size: 47px;
        letter-spacing: -2.4px;
    }

    .hero-visual {
        padding: 18px;
        min-height: 280px;
    }

    .section {
        padding: 35px 0 60px;
    }

    .section-title h2 {
        font-size: 29px;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .auth-wrap {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 0;
    }

    .auth-aside h1 {
        margin: 10px 0;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px;
    }
}

@media(max-width:390px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 41px;
    }
}

/* =========================================
   SCHOOLPRO DASHBOARD SIDEBAR
========================================= */

.has-sidebar {
    --sidebar-width: 255px;
}

.has-sidebar .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sidebar-toggle {
    display: block;
    margin-left: auto;
    cursor: pointer;
}

.app-sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 25px 16px;
    background: #101a35;
    border-right: 1px solid rgba(255,255,255,.08);
    overflow-y: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-heading {
    padding: 0 12px 12px;
    color: #8290b0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.sidebar-section-heading {
    margin-top: 25px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 45px;
    padding: 10px 13px;
    border-radius: 10px;
    color: #bdc8df;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(110deg, #4567ed, #8057e8);
    box-shadow: 0 5px 15px rgba(69,103,237,.25);
}

.sidebar-icon {
    width: 22px;
    text-align: center;
    font-size: 19px;
}

.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 15px;
}

.sidebar-link.logout {
    color: #ff9b9b;
}

.sidebar-link.logout:hover {
    background: rgba(255,80,80,.12);
}

.has-sidebar .container {
    width: auto;
    max-width: none;
    margin-left: calc(var(--sidebar-width) + 25px);
    margin-right: 25px;
    padding-top: 28px;
}

.sidebar-backdrop {
    display: none;
}

/* Mobile sidebar */
@media (max-width: 850px) {
    .app-sidebar {
        top: 0;
        width: 270px;
        transform: translateX(-105%);
        transition: transform .25s ease;
        z-index: 1200;
        padding-top: 85px;
    }

    body.nav-open .app-sidebar {
        transform: translateX(0);
    }

    body.nav-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(5,10,25,.6);
        z-index: 1100;
    }

    .has-sidebar .container {
        margin-left: auto;
        margin-right: auto;
        width: auto;
        padding: 22px 16px;
    }

    .sidebar-toggle {
        display: block;
    }
}

/* DASHBOARD OVERVIEW IMPROVEMENTS */

.dashboard-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}

.dashboard-metric span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-metric strong {
    font-size: 23px;
    color: var(--ink);
}

.attendance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.attendance-item {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
}

.attendance-item-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.attendance-item-head strong {
    font-size: 20px;
}

.attendance-track {
    height: 9px;
    background: #e3e8f2;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.attendance-fill {
    height: 100%;
    border-radius: 20px;
}

.attendance-present {
    background: #16a37a;
}

.attendance-absent {
    background: #e05265;
}

.attendance-late {
    background: #e5a33b;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--line);
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item h3 {
    margin-bottom: 6px;
}

.notification-item p {
    margin-bottom: 8px;
}

@media (max-width: 680px) {
    .attendance-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-metric strong {
        font-size: 20px;
    }
}


/* REPORTS AND ANALYTICS */

.report-filter,
.report-panel {
    margin-bottom: 24px;
}

.report-filter-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.report-filter-form > div {
    flex: 1;
    min-width: 160px;
}

.report-filter-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.report-filter-form input,
.report-filter-form select {
    width: 100%;
}

.report-section-title {
    margin: 25px 0 15px;
}

.report-panel {
    padding: 24px;
}

.report-panel h3 {
    margin-bottom: 8px;
}

.report-bars {
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin-top: 24px;
}

.report-bar-row {
    display: grid;
    grid-template-columns: 85px minmax(50px, 1fr) 45px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.report-bar-track {
    height: 13px;
    background: #e8ebf4;
    border-radius: 20px;
    overflow: hidden;
}

.report-bar-fill {
    height: 100%;
    min-width: 3px;
    border-radius: 20px;
    background: linear-gradient(90deg, #4567ed, #8057e8);
}

.report-bar-row strong {
    text-align: right;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 18px;
}

.report-summary-item {
    padding: 18px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
}

.report-summary-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.report-summary-item strong {
    font-size: 23px;
}

@media(max-width: 680px) {
    .report-filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filter-form > div {
        width: 100%;
    }

    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .report-bar-row {
        grid-template-columns: 65px minmax(40px, 1fr) 35px;
        gap: 8px;
        font-size: 12px;
    }

    .report-panel {
        padding: 16px;
    }
}
