@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --navy: #06224a;
    --navy-2: #083b7a;
    --blue: #0b63ce;
    --blue-2: #1683ff;
    --sky: #eaf4ff;
    --bg: #f5f8fc;
    --card: #ffffff;
    --text: #10213f;
    --muted: #667085;
    --border: #dce7f2;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --radius: 16px;
    --shadow: 0 10px 25px rgba(15, 35, 70, .08);
    --sidebar: 285px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #06224a, #0b63ce);
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    padding: 36px;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: var(--sky);
    color: var(--blue);
    font-size: 36px;
    margin-bottom: 20px;
}

.login-card h1 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 24px;
    font-weight: 900;
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.login-card label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 800;
    font-size: 13px;
}

.login-card input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f9fbfe;
    font-size: 15px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(11,99,206,.12);
}

.login-card button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
}

/* LAYOUT */
.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
}

/* SIDEBAR */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, var(--navy), var(--navy-2));
    color: #fff;
    padding: 20px 14px;
    overflow-y: auto;
    box-shadow: 8px 0 28px rgba(6,34,74,.22);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px 22px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.14);
    font-size: 30px;
}

.sidebar-brand h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.sidebar-brand span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255,255,255,.72);
}

.sidebar-menu {
    display: grid;
    gap: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 15px;
    border-radius: 12px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: .18s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(22,131,255,.28);
}

/* MAIN */
.app-main {
    min-width: 0;
    padding: 0 28px 32px;
}

/* TOPBAR */
.app-topbar {
    height: 72px;
    margin: 0 -28px 24px;
    padding: 0 28px;
    background: linear-gradient(90deg, var(--navy-2), var(--blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(6,34,74,.18);
}

.app-topbar h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 900;
    color: #fff;
}

.app-topbar p {
    margin: 4px 0 0;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user div {
    text-align: right;
}

.topbar-user strong,
.topbar-user span {
    display: block;
}

.topbar-user strong {
    font-size: 14px;
}

.topbar-user span {
    font-size: 12px;
    color: rgba(255,255,255,.72);
}

.logout-btn {
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,.16);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
}

.logout-btn:hover {
    background: rgba(255,255,255,.26);
}

/* PAGE HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0;
    color: var(--navy);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.page-header p {
    margin: 7px 0 0;
    color: var(--muted);
    font-weight: 500;
}

/* CARDS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: .18s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card h3 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 900;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.stat-number {
    font-size: 30px !important;
    font-weight: 900;
    color: var(--blue) !important;
    margin-top: 6px !important;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    text-decoration: none;
    border-radius: 12px;
    padding: 11px 15px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: .18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(11,99,206,.22);
}

.btn-light {
    background: var(--sky);
    color: var(--navy);
}

.btn:hover {
    transform: translateY(-1px);
}

/* ALERT */
.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

/* TABLE */
.table-card,
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th {
    background: #f4f8fd;
    color: var(--navy);
    text-align: left;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

td {
    padding: 14px;
    border-bottom: 1px solid #edf3fa;
    color: var(--text);
    font-size: 14px;
}

tbody tr:hover {
    background: #f8fbff;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px;
}

/* FORM */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.form-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 900;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fbfe;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(11,99,206,.12);
}

textarea {
    resize: vertical;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* IMAGE */
.table-image {
    width: 66px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* CONTENT GRID */
.content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.section-title {
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
    font-weight: 900;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

/* QUICK ACTIONS */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.quick-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: .18s ease;
}

.quick-card:hover {
    transform: translateY(-2px);
}

.quick-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 900;
}

.quick-card span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* CHECKLIST */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fbfe;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px;
    color: var(--navy);
    font-weight: 900;
    cursor: pointer;
}

.check-card input {
    width: 18px;
    height: 18px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid-2 {
        grid-template-columns: 1fr;
    }

    .checklist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 1000;
        left: -300px;
        width: var(--sidebar);
        transition: .25s ease;
    }

    .app-layout.sidebar-collapsed .sidebar {
        left: 0;
    }

    .sidebar-toggle {
        display: grid;
        place-items: center;
    }

    .app-main {
        padding: 0 16px 24px;
    }

    .app-topbar {
        margin: 0 -16px 20px;
        padding: 0 16px;
    }

    .app-topbar h2 {
        font-size: 17px;
    }

    .topbar-user div {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-grid,
    .quick-actions,
    .form-grid,
    .checklist-grid {
        grid-template-columns: 1fr;
    }
}