:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;

    --secondary: #0f172a;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;

    --success: #16a34a;
    --success-soft: #dcfce7;

    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --warning: #f59e0b;
    --warning-soft: #fef3c7;

    --info: #0891b2;
    --info-soft: #cffafe;

    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;

    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 30%),
        var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.85));
}

.login-container {
    width: 960px;
    max-width: 100%;
}

.login-card {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(14px);
}

.login-left {
    position: relative;
    padding: 56px 46px;
    color: #ffffff;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(37, 99, 235, 0.9));
}

.login-left::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.login-left h1 {
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.login-left p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.7;
}

.login-right {
    padding: 48px;
}

.login-right h2 {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--secondary);
}

.login-right label,
.form label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
    color: var(--text);
}

.login-right input,
.form input,
.form select,
.form textarea,
.filter-form select,
.table select,
.table input[type="text"],
.table input[type="number"],
textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: 0.2s ease;
    font-family: inherit;
}

.login-right input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus,
.filter-form select:focus,
.table select:focus,
.table input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-right button,
.form button {
    width: 100%;
    margin-top: 20px;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.login-right button:hover,
.form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

/* LAYOUT */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.header-left strong {
    font-size: 20px;
    letter-spacing: -0.3px;
    color: var(--secondary);
}

.header-left span {
    font-size: 12px;
    color: var(--muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-header,
.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-header {
    background: var(--primary);
}

.btn-logout {
    background: var(--danger);
}

.btn-header:hover,
.btn-logout:hover {
    transform: translateY(-1px);
    filter: brightness(0.96);
}

.content-wrapper {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    position: sticky;
    top: 70px;
    width: 270px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 18px 12px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 1));
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-title {
    padding: 12px 14px 16px;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.8;
}

.sidebar a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 650;
    transition: 0.2s ease;
}

.sidebar a::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.45;
}

.sidebar a:hover,
.sidebar a.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.95);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    transform: translateX(3px);
}

.main-content {
    flex: 1;
    width: calc(100% - 270px);
    padding: 28px;
}

.main-content h1 {
    margin: 0 0 22px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.8px;
    color: var(--secondary);
}

.footer {
    padding: 14px 26px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

/* CARD */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.card-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card,
.card-full {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.card {
    padding: 22px;
    overflow: hidden;
    transition: 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 100px;
    height: 100px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
}

.card h3 {
    position: relative;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card p {
    position: relative;
    margin: 0;
    color: var(--primary);
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.card-full {
    margin-bottom: 22px;
    padding: 22px;
}

.card-full h2 {
    margin: 0 0 16px;
    color: var(--secondary);
    font-size: 20px;
    letter-spacing: -0.35px;
}

.card-full h3 {
    margin-top: 0;
    color: var(--secondary);
}

.card-full p {
    color: #475569;
    line-height: 1.7;
}

/* FORM */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.filter-form label {
    font-weight: 800;
    white-space: nowrap;
}

/* TABLE */
.table,
.table-detail {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.table th,
.table td,
.table-detail th,
.table-detail td {
    padding: 12px 13px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: top;
}

.table th,
.table-detail th {
    background: #f8fafc;
    color: #334155;
    font-weight: 850;
    text-align: left;
}

.table tr:last-child td,
.table tr:last-child th,
.table-detail tr:last-child td,
.table-detail tr:last-child th {
    border-bottom: none;
}

.table tbody tr {
    transition: 0.15s ease;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.table-detail th {
    width: 220px;
}

.text-center {
    text-align: center;
}

/* BUTTON */
.btn-small,
.btn-link,
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-small {
    min-height: 32px;
    padding: 7px 10px;
    color: #ffffff;
    font-size: 12px;
    margin: 2px;
}

.btn-link {
    min-height: 40px;
    padding: 10px 14px;
    background: var(--primary);
    color: #ffffff;
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.btn-warning {
    background: var(--warning);
    color: #111827;
}

.btn-primary {
    background: var(--primary);
}

.btn-small:hover,
.btn-link:hover,
.action-link:hover {
    transform: translateY(-1px);
    filter: brightness(0.96);
}

/* DASHBOARD ACTION */
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-link {
    padding: 11px 15px;
    background: #eff6ff;
    color: var(--primary-dark);
    border: 1px solid #bfdbfe;
}

.action-link:hover {
    background: var(--primary);
    color: #ffffff;
}

/* BADGE & ALERT */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-success {
    background: var(--success-soft);
    color: #166534;
}

.badge-warning {
    background: var(--warning-soft);
    color: #92400e;
}

.badge-info {
    background: var(--info-soft);
    color: #155e75;
}

.badge-primary {
    background: var(--primary-soft);
    color: #1e40af;
}

.badge-danger {
    background: var(--danger-soft);
    color: #991b1b;
}

.alert,
.alert-success {
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 650;
}

.alert {
    background: var(--danger-soft);
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: var(--success-soft);
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* SCROLLBAR */
.sidebar::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}

/* JS SUPPORT */
.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

/* DARK MODE */
body.dark-mode {
    --bg: #020617;
    --card: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --secondary: #f8fafc;

    background: #020617;
    color: var(--text);
}

body.dark-mode .header,
body.dark-mode .card,
body.dark-mode .card-full,
body.dark-mode .footer,
body.dark-mode .table,
body.dark-mode .table-detail {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-mode .table th,
body.dark-mode .table-detail th,
body.dark-mode .filter-form {
    background: #111827;
    color: #e2e8f0;
    border-color: #1e293b;
}

body.dark-mode .table tbody tr:hover {
    background: #111827;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #111827;
    border-color: #334155;
    color: #e2e8f0;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-left,
    .login-right {
        padding: 34px 26px;
    }

    .login-left h1 {
        font-size: 30px;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content-wrapper {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 70px;
        left: -290px;
        z-index: 60;
        width: 270px;
        transition: 0.25s ease;
    }

    body.mobile-sidebar-open .sidebar {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 20px;
    }

    .main-content h1 {
        font-size: 25px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .action-link {
        width: 100%;
    }

    .header-right {
        flex-wrap: wrap;
    }
}
/* ================================
   MODERN DASHBOARD OVERRIDE
================================ */

body {
    background: #f3f6fb !important;
    color: #172033 !important;
}

.header {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #172033 !important;
    border-bottom: 1px solid #e6ebf2 !important;
    box-shadow: 0 8px 24px rgba(20, 32, 56, 0.06) !important;
    backdrop-filter: blur(14px);
}

.header-left strong {
    color: #172033 !important;
    font-size: 21px !important;
}

.header-left span {
    color: #667085 !important;
}

.user-info {
    color: #344054;
    font-weight: 700;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a, #1e293b) !important;
    padding: 18px 12px !important;
}

.sidebar a {
    border-bottom: none !important;
    border-radius: 12px !important;
    margin-bottom: 6px !important;
    font-weight: 700;
}

.sidebar a:hover,
.sidebar a.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

.main-content {
    padding: 34px 36px !important;
}

.page-heading {
    margin-bottom: 24px;
    padding: 26px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.22);
}

.page-heading h1 {
    margin: 0 0 8px !important;
    color: #ffffff !important;
    font-size: 32px !important;
}

.page-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e6ebf2;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(20, 32, 56, 0.08);
    transition: 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(20, 32, 56, 0.12);
}

.stat-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 18px;
    font-size: 26px;
}

.stat-card span {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    color: #172033;
    font-size: 30px;
    line-height: 1;
}

.panel {
    background: #ffffff;
    border: 1px solid #e6ebf2;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(20, 32, 56, 0.07);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0 0 6px !important;
    color: #172033 !important;
    font-size: 22px !important;
}

.panel-header p {
    margin: 0;
    color: #667085;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 118px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e6ebf2;
    border-radius: 20px;
    color: #172033 !important;
    text-decoration: none !important;
    transition: 0.2s ease;
}

.quick-card span {
    font-size: 28px;
}

.quick-card strong {
    font-size: 15px;
}

.quick-card:hover {
    background: #2563eb;
    color: #ffffff !important;
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.modern-table th {
    padding: 14px 16px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #e6ebf2;
}

.modern-table td {
    padding: 15px 16px;
    color: #344054;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.modern-table tbody tr:hover {
    background: #f8fbff;
}

.mini-badge {
    display: inline-flex;
    padding: 6px 10px;
    background: #eef4ff;
    color: #2563eb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    background: #2563eb;
    color: #ffffff !important;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
}

.modern-btn:hover {
    background: #1d4ed8;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-center {
    text-align: center;
}

@media (max-width: 1100px) {
    .stat-grid,
    .quick-grid,
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px !important;
    }

    .page-heading {
        padding: 22px;
    }

    .stat-grid,
    .quick-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }
}
/* ================================
   ELEGANT THIN FONT OVERRIDE
   Tempel di paling bawah style.css
================================ */

body {
    font-family: "Segoe UI", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em;
}

/* Header */
.header-left strong {
    font-weight: 650 !important;
    letter-spacing: -0.7px !important;
}

.header-left span {
    font-weight: 400 !important;
}

.user-info {
    font-weight: 500 !important;
}

/* Sidebar */
.sidebar-title {
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    opacity: 0.7;
}

.sidebar a {
    font-weight: 500 !important;
    letter-spacing: -0.2px;
}

/* Heading utama dashboard */
.page-heading h1 {
    font-weight: 650 !important;
    letter-spacing: -1.4px !important;
}

.page-heading p {
    font-weight: 400 !important;
    letter-spacing: -0.2px;
}

/* Statistik card */
.stat-card span {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    font-size: 12px !important;
}

.stat-card strong {
    font-weight: 600 !important;
    letter-spacing: -1.2px !important;
}

/* Icon card lebih soft */
.stat-icon {
    font-weight: 400 !important;
}

/* Panel */
.panel-header h2 {
    font-weight: 600 !important;
    letter-spacing: -0.8px !important;
}

.panel-header p {
    font-weight: 400 !important;
}

/* Menu cepat */
.quick-card strong {
    font-weight: 500 !important;
    letter-spacing: -0.3px;
}

.quick-card span {
    font-weight: 400 !important;
}

/* Table */
.modern-table th {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    font-size: 12px !important;
}

.modern-table td {
    font-weight: 400 !important;
    letter-spacing: -0.15px;
}

.modern-table td strong {
    font-weight: 550 !important;
}

/* Badge dan tombol */
.mini-badge {
    font-weight: 500 !important;
}

.modern-btn,
.btn-header,
.btn-logout {
    font-weight: 550 !important;
    letter-spacing: -0.2px;
}

/* Judul umum */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600 !important;
    letter-spacing: -0.7px;
}

/* Angka besar jangan terlalu tebal */
.card p,
.stat-card strong {
    font-weight: 600 !important;
}

/* Text paragraph */
p,
td,
label,
input,
select,
textarea {
    font-weight: 400 !important;
}

/* Supaya tampilannya lebih airy */
.panel,
.stat-card,
.quick-card {
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06) !important;
}

/* Kurangi kesan bold di card menu */
.quick-card {
    background: #ffffff !important;
}

.quick-card:hover {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
}