@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;500;600;700;800&display=swap");

/* =========================================================
   LMS SEKOLAH V3
   Global UI / UX stylesheet
   Bootstrap tetap digunakan sebagai fondasi komponen.
   File ini sengaja tidak di-minify agar mudah dikembangkan.
   ========================================================= */

:root {
    --page-bg: #f4f6f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #f1f5f9;
    --ink: #172033;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --success: #15803d;
    --warning: #b45309;
    --danger: #be123c;
    --info: #0369a1;

    --theme-start: #2563eb;
    --theme-end: #4338ca;
    --theme-accent: #0ea5e9;
    --theme-rgb: 37, 99, 235;
    --sidebar-start: #0f172a;
    --sidebar-end: #172554;

    --sidebar-width: 268px;
    --sidebar-mini-width: 84px;
    --navbar-height: 72px;
    --footer-height: 48px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 3px 12px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 12px 35px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* =========================================================
   APP SHELL
   ========================================================= */

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.10), transparent 34%),
        linear-gradient(180deg, var(--sidebar-end), var(--sidebar-start) 68%);
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.10);
    transition: width 0.24s ease, transform 0.24s ease;
}

.sidebar-brand-wrap {
    flex: 0 0 auto;
    height: var(--navbar-height);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.sidebar-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo-box {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.brand-logo-box img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity 0.18s ease;
}

.brand-copy strong {
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-copy small {
    max-width: 175px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.66);
    font-size: 10.5px;
}

/* Hanya area ini yang boleh scroll vertikal pada sidebar. */
.sidebar-menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.20) transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-role-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-avatar,
.navbar-avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-start), var(--theme-accent));
    font-weight: 800;
    letter-spacing: 0.02em;
}

.sidebar-avatar.has-photo,
.navbar-avatar.has-photo,
.profile-avatar-large.has-photo {
    overflow: hidden;
    padding: 0;
    background: #e2e8f0;
}

.sidebar-avatar img,
.navbar-avatar img,
.profile-avatar-large img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.sidebar-role-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    white-space: nowrap;
}

.sidebar-role-copy strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12.5px;
}

.sidebar-role-copy small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.60);
    font-size: 10.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-section-title {
    padding: 18px 10px 7px;
    color: rgba(255, 255, 255, 0.43);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    white-space: nowrap;
}

.sidebar-section-title:first-child {
    padding-top: 5px;
}

.sidebar-link {
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.76);
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: var(--theme-start);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.nav-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.active-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--theme-start);
    box-shadow: 0 0 0 4px rgba(var(--theme-rgb), 0.12);
}

.sidebar-footer {
    flex: 0 0 auto;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.10);
}

.sidebar-footer > i {
    width: 24px;
    flex: 0 0 24px;
    text-align: center;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.74);
}

.sidebar-footer-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-footer-copy strong {
    font-size: 11.5px;
}

.sidebar-footer-copy small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.53);
    font-size: 9.5px;
}

.app-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.24s ease;
}

/* =========================================================
   SIDEBAR MINI - DESKTOP
   State disimpan oleh assets/js/app.js di localStorage.
   ========================================================= */

@media (min-width: 992px) {
    html.sidebar-state-collapsed .app-sidebar {
        width: var(--sidebar-mini-width);
    }

    html.sidebar-state-collapsed .app-main {
        margin-left: var(--sidebar-mini-width);
    }

    html.sidebar-state-collapsed .sidebar-brand-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    html.sidebar-state-collapsed .sidebar-brand {
        justify-content: center;
    }

    html.sidebar-state-collapsed .brand-copy,
    html.sidebar-state-collapsed .sidebar-role-copy,
    html.sidebar-state-collapsed .nav-label,
    html.sidebar-state-collapsed .active-dot,
    html.sidebar-state-collapsed .sidebar-footer-copy {
        display: none;
    }

    html.sidebar-state-collapsed .sidebar-role-card {
        justify-content: center;
        padding: 9px;
    }

    html.sidebar-state-collapsed .sidebar-section-title {
        height: 15px;
        margin: 9px 8px 2px;
        padding: 0;
        overflow: hidden;
        color: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    html.sidebar-state-collapsed .sidebar-link {
        justify-content: center;
        padding-left: 9px;
        padding-right: 9px;
    }

    html.sidebar-state-collapsed .sidebar-footer {
        justify-content: center;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* =========================================================
   TOP NAVBAR
   ========================================================= */

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--navbar-height);
    flex: 0 0 var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(12px);
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-left {
    min-width: 0;
    gap: 14px;
}

.navbar-right {
    gap: 12px;
}

.navbar-icon-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #334155;
    background: #ffffff;
    font-size: 22px;
    transition: all 0.16s ease;
}

.navbar-icon-button:hover {
    color: var(--theme-start);
    border-color: rgba(var(--theme-rgb), 0.24);
    background: rgba(var(--theme-rgb), 0.05);
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.mobile-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.page-heading {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.page-heading h1 {
    max-width: 550px;
    margin: 3px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
    font-size: 18px;
    font-weight: 750;
}

.page-kicker {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.academic-chip {
    align-items: center;
    gap: 9px;
    height: 43px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.academic-chip > i {
    color: var(--theme-start);
    font-size: 17px;
}

.academic-chip > span {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.academic-chip small {
    color: var(--muted);
    font-size: 9px;
}

.academic-chip strong {
    margin-top: 3px;
    font-size: 11.5px;
}

.user-dropdown-button {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 8px 5px 5px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    transition: all 0.16s ease;
}

.user-dropdown-button:hover,
.user-dropdown-button[aria-expanded="true"] {
    border-color: var(--line);
    background: var(--surface-soft);
}

.navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 11.5px;
    box-shadow: 0 6px 15px rgba(var(--theme-rgb), 0.20);
}

.navbar-avatar.large {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 13px;
}

.navbar-user-copy {
    min-width: 0;
    max-width: 165px;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.navbar-user-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1e293b;
    font-size: 11.5px;
}

.navbar-user-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9.5px;
}

.dropdown-chevron {
    color: #94a3b8;
    font-size: 10px;
}

.user-menu {
    width: 245px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px;
}

.user-menu-header > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-menu-header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.user-menu-header small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 12.5px;
}

.user-menu .dropdown-item:hover {
    background: var(--surface-muted);
}

.user-menu .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

/* =========================================================
   MAIN CONTENT + FOOTER
   ========================================================= */

.content-wrapper {
    width: 100%;
    max-width: 1600px;
    flex: 1 0 auto;
    padding: 24px;
    margin: 0;
}

.app-footer {
    min-height: var(--footer-height);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #ffffff;
    font-size: 11px;
}

.sidebar-backdrop {
    display: none;
}

/* =========================================================
   CARDS / DASHBOARD
   ========================================================= */

.card {
    display: block;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card h2,
.card h3,
.card h4 {
    color: #0f172a;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    border: 0;
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.18), transparent 26%),
        radial-gradient(circle at 72% 95%, rgba(255, 255, 255, 0.10), transparent 31%),
        linear-gradient(135deg, var(--theme-start), var(--theme-end));
    box-shadow: 0 16px 36px rgba(var(--theme-rgb), 0.18);
}

.hero h1,
.hero h2,
.hero h3,
.hero h4,
.hero strong {
    color: #ffffff;
}

.hero .muted,
.hero p {
    color: rgba(255, 255, 255, 0.82);
}

.hero .badge {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.14);
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
    position: relative;
    overflow: hidden;
    min-height: 112px;
}

.stat::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: rgba(var(--theme-rgb), 0.055);
}

.stat small {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.stat strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 7px;
    color: #0f172a;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.muted {
    color: var(--muted);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border-radius: 10px;
    font-weight: 650;
    font-size: 13px;
    box-shadow: none;
}

.btn-primary {
    border-color: var(--theme-start);
    background: linear-gradient(135deg, var(--theme-start), var(--theme-end));
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: var(--theme-end) !important;
    background: linear-gradient(135deg, var(--theme-end), var(--theme-start)) !important;
    box-shadow: 0 7px 18px rgba(var(--theme-rgb), 0.18) !important;
}

.btn-outline-primary {
    color: var(--theme-start);
    border-color: rgba(var(--theme-rgb), 0.34);
}

.btn-outline-primary:hover {
    color: #ffffff;
    border-color: var(--theme-start);
    background: var(--theme-start);
}

.btn-small {
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 11px;
}

/* =========================================================
   TOOLBAR / TABLE
   ========================================================= */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 17px;
}

.table-wrap,
.table-responsive {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.table {
    width: 100%;
    min-width: 760px;
    margin-bottom: 0;
    color: #334155;
    font-size: 12.5px;
}

.table > :not(caption) > * > * {
    padding: 11px 12px;
    vertical-align: middle;
    border-bottom-color: var(--line);
}

.table thead th {
    color: #64748b;
    background: #f8fafc;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr:hover > * {
    background: rgba(var(--theme-rgb), 0.025);
}

.table code {
    color: var(--theme-end);
}

/* =========================================================
   FORMS
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.form-label {
    margin-bottom: 0;
    color: #334155;
    font-size: 11.5px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea,
.form-control,
.form-select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: #1e293b;
    background-color: #ffffff;
    font-size: 13px;
    box-shadow: none;
}

.field input,
.field select,
.field textarea {
    padding: 8px 10px;
}

.field textarea {
    min-height: 108px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--theme-rgb), 0.62);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.09);
    outline: none;
}

.form-check-input:checked {
    border-color: var(--theme-start);
    background-color: var(--theme-start);
}

/* =========================================================
   BADGE / ALERT / PROGRESS
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.badge.green {
    color: #166534;
    border-color: #bbf7d0;
    background: #dcfce7;
}

.badge.orange {
    color: #92400e;
    border-color: #fed7aa;
    background: #ffedd5;
}

.badge.red {
    color: #9f1239;
    border-color: #fecdd3;
    background: #ffe4e6;
}

.alert-soft {
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(var(--theme-rgb), 0.13);
    border-radius: 11px;
    color: #334155;
    background: rgba(var(--theme-rgb), 0.06);
}

.alert-soft.warn {
    color: #7c2d12;
    border-color: #fed7aa;
    background: #fff7ed;
}

.alert-soft.danger {
    color: #9f1239;
    border-color: #fecdd3;
    background: #fff1f2;
}

.progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf4;
}

.progress-bar-custom {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--theme-start), var(--theme-accent));
}

/* =========================================================
   COURSE / SECTION / ASSESSMENT
   ========================================================= */

.section-card {
    overflow: hidden;
    margin-bottom: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
}

.section-head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    color: #1e293b;
    background: #f8fafc;
    transition: background-color 0.15s ease;
}

.section-head:hover {
    background: rgba(var(--theme-rgb), 0.045);
}

.section-body {
    padding: 15px 16px;
    border-top: 1px solid var(--line);
}

.item {
    padding: 11px 13px;
    margin: 9px 0;
    border: 1px solid var(--line);
    border-left: 3px solid var(--theme-start);
    border-radius: 10px;
    background: #ffffff;
}

.item h4 {
    margin: 6px 0 4px;
    font-size: 14px;
}

.course-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.course-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--theme-rgb), 0.25);
    box-shadow: var(--shadow-md);
}

.course-card h3 {
    margin: 6px 0;
    font-size: 16px;
}

.course-card .meta,
.hero .meta {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 11px;
}

.question {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.question:last-child {
    border-bottom: 0;
}

.options {
    display: grid;
    gap: 8px;
    margin-top: 9px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}

.option:hover {
    border-color: rgba(var(--theme-rgb), 0.24);
    background: rgba(var(--theme-rgb), 0.025);
}

.option input {
    width: auto;
    margin-top: 3px;
}

.score {
    color: var(--theme-end);
    font-size: 34px;
    font-weight: 850;
}

/* =========================================================
   SWEETALERT LAYER
   SweetAlert harus selalu berada di atas custom modal/form LMS.
   ========================================================= */

.swal2-container {
    z-index: 99999 !important;
}

.swal2-popup {
    position: relative;
    z-index: 100000;
}

/* =========================================================
   CUSTOM MODAL (dipertahankan agar kompatibel dengan view lama)
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(5px);
}

.modal.open {
    display: flex;
}

.modal-box {
    width: min(820px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
}

/* =========================================================
   RICH TEXT EDITOR
   ========================================================= */

.rich-editor-toolbar {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 7px;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f8fafc;
}

.rich-editor-toolbar button {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
}

.rich-editor-toolbar button:hover {
    color: var(--theme-start);
    border-color: rgba(var(--theme-rgb), 0.30);
}

.rich-editor {
    min-height: 170px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 0 0 10px 10px;
    background: #ffffff;
    outline: 0;
}

.rich-editor:focus {
    border-color: rgba(var(--theme-rgb), 0.62);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.08);
}

.rich-editor img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   PROFILE / SETTINGS
   ========================================================= */

.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar-large {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-start), var(--theme-accent));
    box-shadow: 0 12px 28px rgba(var(--theme-rgb), 0.22);
    font-size: 22px;
    font-weight: 850;
}


.profile-photo-editor {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.profile-photo-preview {
    width: 118px;
    height: 118px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 4px solid #ffffff;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-start), var(--theme-accent));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    font-size: 30px;
    font-weight: 850;
}

.profile-photo-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-photo-controls {
    min-width: 0;
}

.profile-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.profile-photo-help {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.profile-info-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.profile-info-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.42fr) 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.profile-info-row:last-child {
    border-bottom: 0;
}

.profile-info-row dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.profile-info-row dd {
    margin: 0;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 650;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.theme-option {
    position: relative;
}

.theme-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-choice {
    display: block;
    padding: 9px;
    border: 2px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.16s ease;
}

.theme-choice:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
}

.theme-option input:checked + .theme-choice {
    border-color: var(--theme-start);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.08);
}

.theme-preview {
    height: 62px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 9px;
    border-radius: 9px;
    color: #ffffff;
}

.theme-preview span {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.20);
}

.theme-preview i {
    font-size: 18px;
}

.theme-name {
    display: block;
    padding: 8px 2px 1px;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
}

.logo-preview-card {
    min-height: 150px;
    display: grid;
    place-items: center;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 13px;
    background: #f8fafc;
}

.logo-preview-card img {
    max-width: 160px;
    max-height: 95px;
    object-fit: contain;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: block;
    padding: 0;
    background: #f5f7fb;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(390px, 0.95fr) minmax(500px, 1.05fr);
}

.login-showcase {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 64px);
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.20), transparent 21%),
        radial-gradient(circle at 85% 84%, rgba(255, 255, 255, 0.13), transparent 25%),
        linear-gradient(145deg, var(--theme-start), var(--theme-end));
}

.login-showcase::before,
.login-showcase::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.login-showcase::before {
    width: 360px;
    height: 360px;
    right: -140px;
    top: -105px;
}

.login-showcase::after {
    width: 260px;
    height: 260px;
    left: -120px;
    bottom: 20%;
}

.login-showcase > * {
    position: relative;
    z-index: 1;
}

.login-showcase-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.login-showcase-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.15);
}

.login-showcase-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.login-showcase-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.login-showcase-brand strong {
    font-size: 15px;
    font-weight: 850;
}

.login-showcase-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
}

.login-showcase-content {
    max-width: 520px;
    padding: 55px 0;
}

.login-showcase-content .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.09);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.login-showcase-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 850;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.login-showcase-content p {
    max-width: 470px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.7;
}

.login-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-top: 28px;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 11px;
}

.login-feature i {
    font-size: 16px;
}

.login-showcase-footer {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(26px, 5vw, 70px);
    background:
        radial-gradient(circle at 90% 10%, rgba(var(--theme-rgb), 0.055), transparent 24%),
        #f7f9fc;
}

.login-panel {
    width: min(470px, 100%);
}

.login-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.login-mobile-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.login-mobile-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.login-mobile-brand strong {
    font-size: 14px;
}

.login-mobile-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.login-panel-heading {
    margin-bottom: 24px;
}

.login-panel-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 25px;
    font-weight: 820;
    letter-spacing: -0.025em;
}

.login-panel-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 17px;
}

.role-option {
    position: relative;
}

.role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-card {
    min-height: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    color: #64748b;
    background: #ffffff;
    transition: all 0.15s ease;
}

.role-card i {
    font-size: 17px;
}

.role-card span {
    font-size: 9.5px;
    font-weight: 700;
}

.role-option input:checked + .role-card {
    color: var(--theme-start);
    border-color: rgba(var(--theme-rgb), 0.45);
    background: rgba(var(--theme-rgb), 0.06);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.06);
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > i {
    position: absolute;
    z-index: 2;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.login-input-wrap .form-control {
    min-height: 46px;
    padding-left: 39px;
}

.login-input-wrap.has-action .form-control {
    padding-right: 42px;
}

.login-input-action {
    position: absolute;
    z-index: 3;
    right: 8px;
    top: 50%;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    color: #64748b;
    background: transparent;
}

.login-input-action:hover {
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), 0.05);
}

.login-submit {
    min-height: 46px;
    margin-top: 6px;
    font-size: 13px;
}

.login-help {
    padding: 11px 12px;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
    background: #ffffff;
    font-size: 10.5px;
    line-height: 1.65;
}

.login-help summary {
    cursor: pointer;
    color: #475569;
    font-weight: 750;
}

/* Kompatibilitas nama class login lama. */
.login-box,
.login-brand,
.demo {
    display: none;
}

/* =========================================================
   UTILITIES
   ========================================================= */

.empty {
    padding: 38px 18px;
    text-align: center;
    color: var(--muted);
}

.text-right {
    text-align: right;
}

.mt {
    margin-top: 16px;
}

.mb {
    margin-bottom: 16px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    html.sidebar-state-collapsed .app-sidebar {
        width: var(--sidebar-width);
    }

    .app-sidebar {
        width: var(--sidebar-width);
        transform: translateX(-102%);
        box-shadow: 16px 0 38px rgba(15, 23, 42, 0.24);
    }

    html.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-main,
    html.sidebar-state-collapsed .app-main {
        margin-left: 0;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(2px);
        transition: opacity 0.20s ease, visibility 0.20s ease;
    }

    html.sidebar-mobile-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .app-navbar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mobile-brand {
        display: flex;
    }

    .page-heading {
        display: none;
    }

    .content-wrapper {
        padding: 18px;
    }

    .form-grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        display: none;
    }

    .login-form-side {
        min-height: 100vh;
        padding: 34px 22px;
    }

    .login-mobile-brand {
        display: flex;
    }
}

@media (max-width: 639.98px) {
    :root {
        --navbar-height: 64px;
    }

    .app-navbar {
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar-left {
        gap: 8px;
    }

    .navbar-right {
        gap: 5px;
    }

    .navbar-icon-button {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 10px;
        font-size: 20px;
    }

    .mobile-brand span {
        display: none;
    }

    .mobile-brand img {
        width: 32px;
        height: 32px;
    }

    .navbar-avatar {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .dropdown-chevron {
        display: none;
    }

    .user-dropdown-button {
        padding-right: 5px;
    }

    .content-wrapper {
        padding: 14px 11px 18px;
    }

    .app-footer {
        padding: 10px 13px;
    }

    .grid-4,
    .grid-3,
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 15px;
        border-radius: 12px;
    }

    .hero {
        border-radius: 14px;
    }

    .stat {
        min-height: 96px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-box {
        width: 100%;
        max-height: 92vh;
        padding: 17px 14px calc(17px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
    }

    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-info-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .role-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-form-side {
        align-items: flex-start;
        padding: 24px 17px;
    }

    .login-panel-heading h2 {
        font-size: 22px;
    }
}

/* =========================================================
   DASHBOARD METRIC CARDS
   ========================================================= */

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.metric-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.metric-value {
    display: block;
    margin-top: 5px;
    color: #0f172a;
    font-size: 30px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric-note {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 9.5px;
}

.metric-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), 0.08);
    font-size: 25px;
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 105px;
    height: 105px;
    right: -40px;
    bottom: -48px;
    border-radius: 50%;
    background: rgba(var(--theme-rgb), 0.045);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #ffffff;
    transition: all 0.16s ease;
}

.quick-action:hover {
    transform: translateY(-1px);
    color: var(--theme-start);
    border-color: rgba(var(--theme-rgb), 0.24);
    background: rgba(var(--theme-rgb), 0.025);
}

.quick-action-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), 0.07);
    font-size: 17px;
}

.quick-action span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.quick-action strong {
    font-size: 11.5px;
}

.quick-action small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9.5px;
}

@media (max-width: 767.98px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   PROFILE PHOTO · RESPONSIVE
   ========================================================= */
@media (max-width: 575.98px) {
    .profile-photo-editor {
        grid-template-columns: 1fr;
    }

    .profile-photo-preview {
        width: 104px;
        height: 104px;
        border-radius: 24px;
    }

    .profile-photo-actions .btn {
        flex: 1 1 auto;
    }
}

/* =========================================================
   REFINEMENT 2026-09 - PAGINATION
   ========================================================= */
.pagination .page-item.active > .page-link,
.pagination .page-item.active > .page-link:hover,
.pagination .page-item.active > .page-link:focus {
    color: #ffffff !important;
}

/* =========================================================
   SIDEBAR SUBMENU
   ========================================================= */
.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-submenu-toggle {
    width: 100%;
    border: 0;
    text-align: left;
}

.sidebar-submenu-chevron {
    display: grid;
    place-items: center;
    width: 20px;
    flex: 0 0 20px;
    font-size: 12px;
    transition: transform .18s ease;
}

.sidebar-submenu.open .sidebar-submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu-list {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 1px 0 5px;
    padding-left: 34px;
}

.sidebar-submenu.open .sidebar-submenu-list {
    display: flex;
}

.sidebar-sublink {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    color: rgba(255,255,255,.66);
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}

.sidebar-sublink:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar-sublink.active {
    color: var(--theme-start);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.sidebar-sublink-button {
    width: 100%;
    cursor: pointer;
}

.sidebar-subicon {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    font-size: 13px;
}

@media (min-width: 992px) {
    html.sidebar-state-collapsed .sidebar-submenu-list,
    html.sidebar-state-collapsed .sidebar-submenu-chevron {
        display: none !important;
    }
}

/* =========================================================
   DASHBOARD MODERN
   Shared visual language; content tetap diatur dari view masing-masing.
   ========================================================= */
.dashboard-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-welcome {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr);
    align-items: center;
    gap: 28px;
    padding: 30px 32px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-start), var(--theme-end));
    box-shadow: 0 20px 45px rgba(var(--theme-rgb), .20);
}

.dashboard-welcome::before,
.dashboard-welcome::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.dashboard-welcome::before {
    width: 260px;
    height: 260px;
    right: -95px;
    top: -120px;
    background: rgba(255,255,255,.10);
}

.dashboard-welcome::after {
    width: 180px;
    height: 180px;
    right: 100px;
    bottom: -130px;
    background: rgba(255,255,255,.07);
}

.dashboard-welcome-copy,
.dashboard-welcome-side {
    position: relative;
    z-index: 1;
}

.dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.92);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.dashboard-welcome h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.025em;
}

.dashboard-welcome p {
    max-width: 720px;
    margin: 10px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 13.5px;
    line-height: 1.7;
}

.dashboard-welcome-side {
    display: grid;
    gap: 10px;
}

.dashboard-status-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
}

.dashboard-status-chip i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.14);
    font-size: 15px;
}

.dashboard-status-chip span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.dashboard-status-chip small {
    color: rgba(255,255,255,.62);
    font-size: 10px;
}

.dashboard-status-chip strong {
    margin-top: 2px;
    color: #fff;
    font-size: 12.5px;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-stat-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-stat-card {
    min-height: 132px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(15,23,42,.05);
}

.dashboard-stat-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-stat-label {
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
}

.dashboard-stat-value {
    margin-top: 7px;
    color: #172033;
    font-size: 31px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.03em;
}

.dashboard-stat-note {
    margin-top: 9px;
    color: #94a3b8;
    font-size: 10.5px;
}

.dashboard-stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), .08);
    font-size: 20px;
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 18px;
}

.dashboard-panel {
    padding: 22px;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(15,23,42,.045);
}

.dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

.dashboard-panel-head h2 {
    margin: 0;
    color: #172033;
    font-size: 15px;
    font-weight: 800;
}

.dashboard-panel-head p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 11px;
}

.dashboard-panel-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), .08);
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-quick-link {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #e9eef5;
    border-radius: 14px;
    color: #334155;
    background: #fbfdff;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.dashboard-quick-link:hover {
    color: #1f2937;
    border-color: rgba(var(--theme-rgb), .22);
    box-shadow: 0 8px 22px rgba(var(--theme-rgb), .08);
    transform: translateY(-1px);
}

.dashboard-quick-link > i {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), .08);
    font-size: 16px;
}

.dashboard-quick-link span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-quick-link strong {
    font-size: 11.5px;
    font-weight: 800;
}

.dashboard-quick-link small {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 9.8px;
    line-height: 1.35;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dashboard-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 11px 12px;
    border: 1px solid #edf1f6;
    border-radius: 13px;
    background: #fcfdff;
}

.dashboard-list-main {
    min-width: 0;
}

.dashboard-list-main strong {
    display: block;
    color: #334155;
    font-size: 11.5px;
}

.dashboard-list-main small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 9.8px;
}

.dashboard-list-value {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--theme-start);
    background: rgba(var(--theme-rgb), .08);
    font-size: 10px;
    font-weight: 800;
}

.dashboard-course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-course-card {
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #edf1f6;
    border-radius: 14px;
    background: #fcfdff;
    text-decoration: none;
}

.dashboard-course-thumb {
    width: 78px;
    height: 55px;
    flex: 0 0 78px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-start), var(--theme-end));
}

.dashboard-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-course-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-course-copy strong {
    overflow: hidden;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-course-copy small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 9.5px;
    line-height: 1.35;
}

.dashboard-empty {
    padding: 25px 14px;
    color: #94a3b8;
    text-align: center;
    font-size: 11px;
}

@media (max-width: 1100px) {
    .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .dashboard-welcome {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 24px 20px;
    }
    .dashboard-welcome-side { grid-template-columns: 1fr 1fr; }
    .dashboard-stat-grid,
    .dashboard-stat-grid.cols-3 { grid-template-columns: 1fr; }
    .dashboard-quick-grid,
    .dashboard-course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dashboard-welcome-side { grid-template-columns: 1fr; }
}

.sidebar-submenu-toggle {
    background: transparent;
    font: inherit;
    cursor: pointer;
}
