:root {
    --navy: #34435E;
    --navy-dark: #28354C;
    --coral: #D46767;
    --cream: #F3EFE6;
    --white: #FFFFFF;
    --bg: #F7F3EC;
    --text: #222936;
    --muted: #7B8494;
    --line: rgba(52, 67, 94, 0.12);
    --coral-line: rgba(212, 103, 103, 0.35);
    --shadow: 0 24px 70px rgba(40, 53, 76, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* LOGIN / FORGOT PASSWORD */

.login-shell {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.login-brand-top {
    text-align: center;
    margin-bottom: 24px;
    animation: floatIn 0.6s ease both;
}

.login-brand-top img {
    width: 210px;
    display: block;
    margin: 0 auto 10px;
}

.login-brand-top p {
    margin: 0;
    color: rgba(243, 239, 230, 0.82);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

.glass-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
}

.login-card {
    width: 100%;
    max-width: 430px;
    border-radius: 24px;
    padding: 38px;
    animation: floatIn 0.75s ease both;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: -1px;
    text-align: center;
}

.login-card > p {
    margin: 0 0 30px;
    color: var(--muted);
    text-align: center;
    font-size: 15px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 15px 16px;
    font-size: 15px;
    background: var(--white);
    transition: 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(212, 103, 103, 0.16);
}

.btn-primary {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 15px 18px;
    background: var(--navy);
    color: var(--white);
    font-weight: 850;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary:hover {
    background: var(--coral);
    transform: translateY(-2px);
}

.auth-links {
    margin-top: 22px;
    text-align: center;
}

.auth-links a {
    color: var(--coral);
    text-decoration: none;
    font-weight: 800;
}

.alert {
    padding: 13px 15px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #FFF0F0;
    color: #A94343;
}

.alert-success {
    background: #EEF8F0;
    color: #2F7A45;
}

/* DASHBOARD */

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
    background: var(--bg);
    transition: grid-template-columns 0.25s ease;
}

.dashboard-shell.sidebar-collapsed {
    grid-template-columns: 86px 1fr;
}

.dashboard-sidebar {
    background: var(--navy);
    padding: 26px 18px;
    color: var(--cream);
    transition: 0.25s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 38px;
}

.dashboard-logo {
    width: 165px;
    transition: 0.25s ease;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: rgba(243, 239, 230, 0.12);
    color: var(--cream);
    font-size: 18px;
    cursor: pointer;
}

.dashboard-shell.sidebar-collapsed .dashboard-logo {
    display: none;
}

.dashboard-shell.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(243, 239, 230, 0.68);
    text-decoration: none;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-weight: 750;
    transition: 0.2s ease;
}

.dashboard-nav a.active,
.dashboard-nav a:hover {
    color: var(--cream);
    background: rgba(243, 239, 230, 0.12);
}

.nav-icon {
    min-width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(243, 239, 230, 0.12);
    color: var(--cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

.nav-label {
    white-space: nowrap;
}

.dashboard-shell.sidebar-collapsed .nav-label {
    display: none;
}

.dashboard-shell.sidebar-collapsed .dashboard-nav a {
    justify-content: center;
    padding: 14px 10px;
}

.dashboard-main {
    padding: 32px;
}

.dashboard-header {
    height: 76px;
    background: var(--white);
    border: 1px solid var(--coral-line);
    border-radius: 20px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 14px 40px rgba(40, 53, 76, 0.07);
    margin-bottom: 26px;
}

.eyebrow {
    display: block;
    color: var(--coral);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 900;
    margin-bottom: 4px;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 92px;
    display: block;
}

.logout-btn {
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--coral-line);
    padding: 11px 17px;
    border-radius: 14px;
    font-weight: 850;
    cursor: pointer;
}

.logout-btn:hover {
    color: var(--white);
    background: var(--coral);
    border-color: var(--coral);
}

.dashboard-hero {
    min-height: 145px;
    border-radius: 20px;
    border: 1px solid var(--coral-line);
    padding: 24px 28px;
    background: linear-gradient(135deg, #34435E 0%, #3F506D 55%, #D46767 140%);
    color: var(--cream);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 0.95fr 1.35fr;
    gap: 24px;
    margin-bottom: 26px;
    overflow: hidden;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-copy .eyebrow {
    font-size: 18px;
    letter-spacing: -0.2px;
    text-transform: none;
    color: var(--white);
    margin-bottom: 8px;
}

.hero-copy p {
    max-width: none;
    margin: 0;
    opacity: 0.86;
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.mini-stat {
    min-height: 96px;
    padding: 20px 26px;
}

.mini-stat span {
    font-size: 12px;
    margin-bottom: 8px;
}

.mini-stat strong {
    font-size: 54px;
}

.mini-stat.coral {
    background: var(--coral);
    border-color: rgba(255, 255, 255, 0.20);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-card {
    background: var(--white);
    border: 1px solid var(--coral-line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 18px 48px rgba(40, 53, 76, 0.09);
}

.chart-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
}

.chart-heading h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.chart-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.chart-badge {
    background: rgba(52, 67, 94, 0.10);
    color: var(--navy);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
}

.chart-badge.coral {
    background: rgba(212, 103, 103, 0.14);
    color: var(--coral);
}

.animated-card {
    animation: floatIn 0.7s ease both;
}

.delay-one {
    animation-delay: 0.12s;
}

.delay-two {
    animation-delay: 0.22s;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1000px) {
    .dashboard-shell,
    .dashboard-shell.sidebar-collapsed,
    .dashboard-hero,
    .charts-grid,
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: none;
    }

    .login-shell {
        padding: 24px;
    }

    .login-card {
        padding: 32px 26px;
    }
}

.table-card,
.form-card {
    background: var(--white);
    border: 1px solid var(--coral-line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 18px 48px rgba(40, 53, 76, 0.09);
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
}

.table-search {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 14px;
}

.btn-secondary {
    border: 1px solid var(--coral-line);
    background: var(--white);
    color: var(--navy);
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--coral);
    color: var(--white);
}

.btn-primary-link,
.btn-primary-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--navy);
    color: var(--white);
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary-link:hover,
.btn-primary-small:hover {
    background: var(--coral);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(52, 67, 94, 0.08);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: rgba(212, 103, 103, 0.05);
}

.actions-column {
    width: 120px;
    text-align: right !important;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.inline-form {
    display: inline;
    margin: 0;
}

.icon-action {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}

.icon-action.edit:hover {
    background: var(--navy);
    color: var(--white);
}

.icon-action.delete:hover {
    background: var(--coral);
    color: var(--white);
}

.empty-table {
    text-align: center;
    color: var(--muted);
    padding: 34px !important;
}

.pagination {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}

.pagination a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 850;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-wide {
    grid-column: 1 / -1;
}

.field-error {
    margin-top: 7px;
    color: #A94343;
    font-size: 12px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.btn-light-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 850;
}

.btn-light-link:hover {
    border-color: var(--coral);
    color: var(--coral);
}

@media (max-width: 900px) {
    .table-toolbar,
    .search-form,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-search {
        max-width: none;
    }
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(34, 41, 54, 0.52);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--coral-line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    animation: floatIn 0.25s ease both;
}

.modal-card h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 22px;
    letter-spacing: -0.4px;
}

.modal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--coral);
    color: var(--white);
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.btn-danger:hover {
    background: #bf5555;
}
.field-error {
    margin-top: 7px;
    color: #A94343;
    font-size: 12px;
    font-weight: 700;
}