/* SETYA DIGITAL LMS - Custom Styles */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1e3a5f;
    --sidebar-hover: #2a4f7a;
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --guru: #10b981;
    --siswa: #f97316;
    --bg: #f1f5f9;
}

body {
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ===== LOGIN ===== */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #fff 100%);
}

.login-hero {
    background: linear-gradient(160deg, #1e40af 0%, #2563eb 60%, #3b82f6 100%);
    color: #fff;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
    top: -80px;
    right: -60px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo .logo-box {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.brand-logo h4 {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
}

.brand-logo small {
    opacity: .8;
    font-size: 12px;
}

.hero-illustration {
    background: rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
    backdrop-filter: blur(10px);
}

.hero-illustration .icon-stack {
    font-size: 80px;
    margin-bottom: 16px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
    padding: 40px;
    max-width: 420px;
    width: 100%;
}

.demo-access {
    margin-top: 24px;
}

.demo-access table {
    font-size: 12px;
}

.demo-access .role-admin {
    color: var(--primary);
    font-weight: 600;
}

.demo-access .role-guru {
    color: var(--guru);
    font-weight: 600;
}

.demo-access .role-siswa {
    color: var(--siswa);
    font-weight: 600;
}

/* ===== SIDEBAR LAYOUT ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
    transition: transform .3s;
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand .logo-sm {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 15px;
}

.sidebar-brand small {
    display: block;
    font-size: 10px;
    opacity: .7;
}

.sidebar-nav {
    padding: 12px 10px;
}

.sidebar-nav .nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .5;
    padding: 10px 14px 4px;
    font-weight: 600;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, .75);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    transition: all .2s;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.theme-guru .sidebar-nav .nav-link.active {
    background: var(--guru);
}

.theme-siswa .sidebar-nav .nav-link.active {
    background: var(--siswa);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.main-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.top-navbar {
    background: #fff;
    padding: 14px 28px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.top-navbar h5 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
}

.top-navbar .welcome-text {
    font-size: 13px;
    color: #64748b;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.theme-admin .user-avatar {
    background: var(--primary);
}

.theme-guru .user-avatar {
    background: var(--guru);
}

.theme-siswa .user-avatar {
    background: var(--siswa);
}

.page-body {
    padding: 28px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #e2e8f0;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .06);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
}

.stat-card .stat-link {
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: #d1fae5;
    color: #10b981;
}

.stat-icon.orange {
    background: #ffedd5;
    color: #f97316;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-icon.red {
    background: #fee2e2;
    color: #ef4444;
}

/* ===== CARDS ===== */
.content-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    height: 100%;
}

.content-card .card-header-custom {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.content-card .card-header-custom h6 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
}

.content-card .card-body-custom {
    padding: 20px;
}

/* ===== ACTIVITY & LIST ITEMS ===== */
.activity-item,
.list-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-item:last-child,
.list-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.progress-thin {
    height: 6px;
    border-radius: 3px;
}

/* ===== TABLE ===== */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
}

.table-custom thead th {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding: 14px 18px;
    vertical-align: middle;
}

.table-custom td {
    padding: 14px 18px;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr {
    transition: background .2s ease, transform .2s ease;
}

.table-custom tbody tr:hover {
    background: #eff6ff;
    transform: translateX(1px);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom td:first-child,
.table-custom th:first-child {
    width: 60px;
    font-weight: 600;
    color: #475569;
}

.table-custom td:last-child,
.table-custom th:last-child {
    width: 150px;
}

.table-responsive {
    overflow-x: auto;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.badge-status.hadir {
    background: #d1fae5;
    color: #047857;
}

.badge-status.alpha {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

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

/* ===== MODAL ===== */
.modal-content {
    border-radius: 18px;
    border: none;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 18px 20px;
}

.modal-header .modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.modal-header .btn-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
}

.modal-body {
    padding: 24px 20px;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 18px 20px;
    background: #fff;
}

.modal-backdrop.show {
    background-color: rgba(15, 23, 42, 0.45);
}

.content-card .card-header-custom.flex-column {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.content-card .card-header-custom form {
    width: 100%;
}

.content-card .card-header-custom .form-control,
.content-card .card-header-custom .form-select,
.content-card .card-header-custom .btn {
    min-height: 44px;
}

/* ===== MATERI / ITEM CARDS ===== */
.materi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: border-color .2s;
}

.materi-card:hover {
    border-color: var(--primary);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
    max-width: 220px;
    margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .login-hero {
        min-height: auto;
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
    }

    .page-body {
        padding: 16px;
    }
}