:root {
    --font-sans: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

    --bg-body: #f3f7fb;
    --bg-soft: #f8fafc;
    --bg-white: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: rgba(255, 255, 255, 0.9);

    --border-color: #d9e3ee;
    --border-soft: #e5edf5;

    --primary: #0d6efd;
    --primary-dark: #0a2540;
    --primary-mid: #123d6a;
    --primary-light: #1c5d99;

    --success: #198754;
    --warning: #f59e0b;
    --danger: #dc3545;
    --info: #0ea5e9;
    --secondary: #6c757d;

    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 40px rgba(10, 37, 64, 0.18);
    --shadow-xl: 0 22px 60px rgba(0, 0, 0, 0.22);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 26px;

    --transition: all 0.25s ease;
}

html,
body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background: var(--bg-body);
}

body.auth-page,
body.public-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(10, 37, 64, 0.92), rgba(10, 37, 64, 0.88)),
        linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 50%, var(--primary-light) 100%);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.95;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

.page-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.admin-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.top-intro {
    color: #fff;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
}

.top-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.top-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

.top-desc {
    color: rgba(255,255,255,0.88);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 620px;
    margin-bottom: 0;
}

.form-card,
.content-card,
.stat-card,
.side-card,
.auth-card {
    border: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.form-card .card-body,
.content-card .card-body,
.stat-card .card-body,
.side-card .card-body {
    padding: 20px;
}

.auth-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.auth-card .card-body {
    padding: 24px;
}

.form-header {
    padding: 1rem 1rem 1.2rem;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 1.25rem;
}

.form-header-title,
.section-title {
    color: var(--text-main);
    font-weight: 800;
}

.form-header-title {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.form-header-desc {
    color: var(--text-muted);
    font-size: 0.93rem;
    margin-bottom: 0;
}

.section-title {
    font-size: 1.08rem;
    margin-bottom: 16px;
}

.admin-topbar,
.auth-head {
    color: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.admin-topbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 60%, var(--primary-light) 100%);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-topbar-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.admin-topbar-desc {
    color: var(--text-light);
    margin-bottom: 0;
}

.admin-topbar--green {
    background: linear-gradient(135deg, #14532d 0%, #166534 60%, #15803d 100%);
}

.admin-topbar--orange {
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 60%, #ea580c 100%);
}

.admin-topbar--indigo {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 60%, #4f46e5 100%);
}

.admin-topbar--danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 60%, #b91c1c 100%);
}

.auth-head {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    padding: 28px 24px;
}

.auth-badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.auth-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-desc {
    margin: 0;
    color: var(--text-light);
    font-size: .95rem;
    line-height: 1.5;
}

.section-box,
.filter-box,
.info-box-soft,
.footer-note {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}

.section-box,
.filter-box {
    padding: 16px;
    margin-bottom: 1rem;
}

.section-label {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #eaf2ff;
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.info-box {
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
}

.info-box-soft {
    padding: 16px;
}

.info-label {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 6px;
}

.info-value {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0;
}

.footer-note {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 14px 16px;
    margin-top: 1rem;
}

.form-label {
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    padding-left: 14px;
    padding-right: 14px;
    font-size: 0.96rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: #7aa8ff;
    box-shadow: 0 0 0 0.22rem rgba(29, 78, 216, 0.12);
}

textarea.form-control {
    min-height: 110px;
    padding-top: 12px;
}

.helper-text,
.form-hint {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.required {
    color: #dc2626;
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-submit,
.btn-login {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.18);
}

.quick-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-action-bar .qa-btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.94rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: none;
}

.quick-action-bar .qa-btn:hover {
    transform: translateY(-1px);
}

.quick-action-bar .qa-btn-primary {
    background: #ffffff;
    color: #0a2540;
    border-color: rgba(255,255,255,0.18);
}

.quick-action-bar .qa-btn-primary:hover {
    background: #f8fafc;
    color: #0a2540;
}

.quick-action-bar .qa-btn-soft {
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    border-color: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
}

.quick-action-bar .qa-btn-soft:hover {
    background: rgba(255,255,255,0.16);
    color: #ffffff;
}

.quick-action-bar .qa-btn-danger {
    background: rgba(220, 53, 69, 0.16);
    color: #ffffff;
    border-color: rgba(255,255,255,0.12);
}

.quick-action-bar .qa-btn-danger:hover {
    background: rgba(220, 53, 69, 0.24);
    color: #ffffff;
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    font-weight: 600;
    font-size: .9rem;
    color: #fff;
}

.table-wrap {
    border-radius: 18px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    white-space: nowrap;
    font-size: .92rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.table td {
    font-size: .94rem;
}

.alert {
    border-radius: var(--radius-md);
}

.badge {
    border-radius: 999px;
    padding: 0.5em 0.7em;
    font-weight: 700;
    letter-spacing: .02em;
}

.auth-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 24px 0;
}

.auth-container {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
}

.auth-footer-note {
    text-align: center;
    margin-top: 16px;
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.stat-label {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .container.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1.2rem !important;
    }

    .top-title {
        font-size: 1.55rem;
    }

    .top-desc {
        font-size: 0.93rem;
    }

    .form-card,
    .auth-card,
    .admin-topbar {
        border-radius: 20px;
    }

    .form-card .card-body,
    .content-card .card-body,
    .stat-card .card-body,
    .side-card .card-body {
        padding: 16px;
    }

    .form-header {
        padding: 0.2rem 0.2rem 1rem;
    }

    .section-box,
    .filter-box {
        border-radius: 16px;
        padding: 14px;
    }

    .admin-topbar {
        padding: 18px;
    }

    .admin-topbar-title {
        font-size: 1.35rem;
    }

    .auth-head {
        padding: 22px 18px;
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .auth-desc {
        font-size: 0.92rem;
    }

    .quick-action-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quick-action-bar .qa-btn,
    .btn-submit,
    .btn-login {
        width: 100%;
    }

    .stat-value {
        font-size: 1.45rem;
    }
}