/**
 * Custom Styles
 * Aplikasi Kehadiran Siswa SMKN 2 Kota Serang
 */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --sidebar-width: 280px;
    --navbar-height: 64px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--dark) 0%, #0f172a 100%);
    color: #fff;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
}

.sidebar-brand .bi {
    font-size: 2rem;
    color: var(--primary-light);
}

.sidebar-brand>div {
    margin-left: 0.5rem;
}

.sidebar-brand .fw-bold {
    font-size: 1rem;
    line-height: 1.2;
}

.sidebar-brand small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-close {
    color: #fff;
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-nav .nav-link .bi {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.main-content .navbar {
    height: var(--navbar-height);
}

/* ===== AVATAR ===== */
.avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
    font-weight: 600;
}

.avatar-md {
    width: 48px;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-stat {
    position: relative;
    overflow: hidden;
}

.card-stat .card-body {
    position: relative;
    z-index: 1;
}

.card-stat .stat-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    opacity: 0.1;
    z-index: 0;
}

.card-stat.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.card-stat.bg-gradient-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.card-stat.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.card-stat.bg-gradient-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.card-stat.bg-gradient-info {
    background: linear-gradient(135deg, var(--info) 0%, #0284c7 100%);
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

/* ===== TABLES ===== */
.table-responsive {
    border-radius: 0.75rem;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--dark);
    color: #fff;
    font-weight: 600;
    padding: 1rem;
    border: none;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.05);
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* ===== ABSENSI RADIO BUTTONS ===== */
.absensi-radio {
    display: inline-flex;
}

.absensi-radio .btn-check:checked+.btn-outline-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.absensi-radio .btn-check:checked+.btn-outline-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: #fff;
}

.absensi-radio .btn-check:checked+.btn-outline-info {
    background: var(--info);
    border-color: var(--info);
    color: #fff;
}

.absensi-radio .btn-check:checked+.btn-outline-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.absensi-radio .btn-check:checked+.btn-outline-dark {
    background: var(--dark);
    border-color: var(--dark);
    color: #fff;
}

.absensi-radio .btn {
    min-width: 45px;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

/* ===== STUDENT LIST ===== */
.student-list {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.student-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.student-info {
    display: flex;
    align-items: center;
}

.student-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.student-name {
    font-weight: 500;
}

.student-nis {
    font-size: 0.875rem;
    color: var(--secondary);
}

/* ===== BADGE ===== */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.login-header .bi {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-body {
    padding: 2rem;
}

.login-body .form-control {
    padding: 1rem 1.25rem;
}

.login-body .btn-primary {
    padding: 1rem;
    font-size: 1.1rem;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .student-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-info {
        margin-bottom: 0.75rem;
    }

    .absensi-radio {
        width: 100%;
        justify-content: space-between;
    }

    .absensi-radio .btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        border-radius: 1rem;
    }

    .login-header {
        padding: 1.5rem;
    }

    .login-body {
        padding: 1.5rem;
    }
}

/* ===== STICKY FOOTER BUTTON ===== */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

@media (max-width: 991.98px) {
    .sticky-footer {
        left: 0;
    }
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    position: relative;
    height: 300px;
}

/* ===== TODAY SCHEDULE CARD ===== */
.schedule-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
}

.schedule-card .schedule-time {
    font-size: 2rem;
    font-weight: 700;
}

.schedule-card .schedule-subject {
    font-size: 1.25rem;
    opacity: 0.9;
}

.schedule-card .schedule-class {
    font-size: 1rem;
    opacity: 0.75;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== QR SCANNER STYLES ===== */
.qr-scanner-container {
    width: 100%;
    min-height: 300px;
    background: #000;
    position: relative;
}

.qr-scanner-container video {
    width: 100% !important;
    height: auto !important;
}

.scan-result-list {
    max-height: 500px;
    overflow-y: auto;
}

.scan-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition);
}

.scan-result-item:hover {
    background: #f8fafc;
}

.scan-result-item:last-child {
    border-bottom: none;
}

.scan-result-error {
    background: #fef2f2;
}

.scan-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.scan-result-info {
    flex: 1;
    min-width: 0;
}

.scan-result-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scan-result-detail {
    font-size: 0.875rem;
    color: var(--secondary);
}

.scan-result-actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

.scan-result-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== QR ID CARD STYLES ===== */
.qr-cards-container {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 1rem;
}

.qr-size-small .qr-cards-container,
.qr-cards-container.qr-size-small {
    grid-template-columns: repeat(3, 1fr);
}

.qr-size-medium .qr-cards-container,
.qr-cards-container.qr-size-medium {
    grid-template-columns: repeat(2, 1fr);
}

.qr-size-large .qr-cards-container,
.qr-cards-container.qr-size-large {
    grid-template-columns: repeat(2, 1fr);
}

.qr-card-wrapper {
    break-inside: avoid;
}

.qr-id-card {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
    border: none;
    width: 320px;
    overflow: hidden;
}

.qr-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    padding: 1rem 0.75rem;
    border-bottom: none;
    margin-bottom: 0;
}

.qr-card-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
}

.qr-card-school {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-card-body {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.qr-code-placeholder {
    display: block;
    text-align: center;
    margin: 0 auto 0.75rem auto;
    padding: 0;
    background: transparent;
}

.qr-code-placeholder img,
.qr-code-placeholder canvas {
    display: block !important;
    margin: 0 auto !important;
}

.qr-card-info {
    margin-top: 0.5rem;
    width: 100%;
}

.qr-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qr-card-details {
    font-size: 0.7rem;
    color: var(--secondary);
}

.qr-card-nis {
    font-weight: 600;
    color: var(--primary);
}

.qr-card-divider {
    margin: 0 0.25rem;
    color: #cbd5e1;
}

.qr-card-footer {
    text-align: center;
    font-size: 0.6rem;
    color: #fff;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== PRINT STYLES FOR QR CARDS ===== */
@media print {
    body * {
        visibility: hidden;
    }

    .qr-cards-container,
    .qr-cards-container * {
        visibility: visible;
    }

    .qr-cards-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff;
        padding: 10mm;
    }

    .qr-cards-container.qr-size-small {
        grid-template-columns: repeat(3, 1fr);
    }

    .qr-cards-container.qr-size-medium {
        grid-template-columns: repeat(3, 1fr);
    }

    .qr-cards-container.qr-size-large {
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-id-card {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .sidebar,
    .main-content .navbar,
    .card:not(.qr-cards-container),
    .btn,
    .alert {
        display: none !important;
    }
}

/* ===== MOBILE RESPONSIVE FOR QR SCANNER ===== */
@media (max-width: 767.98px) {
    .qr-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-id-card {
        padding: 0.75rem;
        min-width: auto;
    }

    .qr-card-name {
        font-size: 0.8rem;
    }

    .scan-result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .scan-result-actions {
        margin-left: 0;
        margin-top: 0.75rem;
        width: 100%;
    }

    .scan-result-actions .btn-group {
        width: 100%;
    }

    .scan-result-actions .btn {
        flex: 1;
    }
}

/* ===== MODERN DASHBOARD STYLES ===== */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.dashboard-title h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.dashboard-title p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
}

.dashboard-actions .btn {
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* Modern Stat Cards */
.stat-card-modern {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    height: 100%;
}

.stat-card-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-card-info {
    flex: 1;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-circle.bg-soft-primary {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
}

.stat-icon-circle.bg-soft-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-icon-circle.bg-soft-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-icon-circle.bg-soft-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-icon-circle.bg-soft-info {
    background: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

/* Chart Card */
.chart-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.chart-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
}

.chart-card-header i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.chart-card-header h6 {
    font-weight: 600;
    margin: 0;
}

.chart-card-body {
    padding: 1.5rem;
}

/* Donut Chart Container */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.donut-chart-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.donut-label {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

/* Chart Legend */
.chart-legend {
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.hadir {
    background: var(--success);
}

.legend-dot.sakit {
    background: #fb923c;
}

.legend-dot.izin {
    background: var(--info);
}

.legend-dot.alpa {
    background: var(--danger);
}

.legend-text {
    font-size: 0.9rem;
    color: var(--dark);
}

.legend-value {
    font-weight: 600;
    color: var(--dark);
}

/* Attendance Progress */
.attendance-progress {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-size: 0.85rem;
    color: var(--secondary);
}

.progress-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.progress-link:hover {
    text-decoration: underline;
}

.attendance-progress .progress {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.attendance-progress .progress-bar {
    border-radius: 4px;
}

/* Quick Actions Card */
.quick-actions-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.quick-actions-card .card-header {
    padding: 1.25rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
}

.quick-actions-card .card-header h6 {
    font-weight: 600;
    margin: 0;
}

.quick-action-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.quick-action-item:last-child {
    border-bottom: none;
}

.quick-action-item:hover {
    background: #f8fafc;
    color: var(--primary);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.quick-action-icon.bg-soft-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.quick-action-icon.bg-soft-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.quick-action-icon.bg-soft-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.quick-action-icon.bg-soft-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.quick-action-text {
    flex: 1;
    font-weight: 500;
}

.quick-action-arrow {
    color: var(--secondary);
    font-size: 1rem;
}

/* Recent Table Card */
.recent-table-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.recent-table-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.recent-table-header h6 {
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-table-header h6 i {
    color: var(--secondary);
}

.view-all-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

.recent-table-card .table {
    margin-bottom: 0;
}

.recent-table-card .table thead th {
    background: #f8fafc;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    border: none;
}

.recent-table-card .table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.recent-table-card .table tbody tr:last-child td {
    border-bottom: none;
}

/* Method Badge */
.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--secondary);
}

/* Mobile Responsive for Dashboard */
@media (max-width: 991.98px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions .btn {
        flex: 1;
    }

    .donut-chart-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .donut-chart-wrapper {
        margin: 0 auto;
    }
}

@media (max-width: 767.98px) {
    .stat-card-modern {
        padding: 1rem 1.25rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-icon-circle {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .quick-action-item {
        padding: 0.875rem 1.25rem;
    }

    .recent-table-card .table thead th,
    .recent-table-card .table tbody td {
        padding: 0.75rem 1rem;
    }
}

/* ===== GURU CARD STYLES ===== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.page-header-title h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.page-header-title p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Search Box */
.search-box {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-box .form-control {
    border: none;
    padding-left: 2.5rem;
    background: transparent;
}

.search-box .form-control:focus {
    box-shadow: none;
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

/* Guru Cards Grid */
.guru-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* Guru Card */
.guru-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    overflow: hidden;
}

.guru-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.guru-card-header {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 1rem;
}

.guru-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.guru-avatar.bg-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.guru-avatar.bg-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.guru-avatar.bg-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.guru-avatar.bg-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.guru-avatar.bg-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.guru-info {
    flex: 1;
    min-width: 0;
}

.guru-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guru-nip {
    font-size: 0.8rem;
    color: var(--secondary);
}

.guru-menu-btn {
    background: transparent;
    border: none;
    color: var(--secondary);
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: var(--transition);
}

.guru-menu-btn:hover {
    background: #f1f5f9;
    color: var(--dark);
}

/* Guru Card Body */
.guru-card-body {
    padding: 0 1.25rem 1.25rem;
}

/* Role Badge */
.guru-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid;
}

.guru-role-badge.role-guru {
    background: #fef3c7;
    color: #d97706;
    border-color: #fcd34d;
}

.guru-role-badge.role-walikelas {
    background: #dbeafe;
    color: #2563eb;
    border-color: #93c5fd;
}

.guru-role-badge.role-admin {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.guru-role-badge.role-petugas {
    background: #d1fae5;
    color: #059669;
    border-color: #6ee7b7;
}

/* Guru Contact Info */
.guru-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guru-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dark);
}

.guru-contact-item i {
    color: var(--secondary);
    width: 16px;
    text-align: center;
}

.guru-contact-item a {
    color: var(--dark);
    text-decoration: none;
}

.guru-contact-item a:hover {
    color: var(--primary);
}

/* Wali Kelas Badge */
.guru-wali-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.guru-wali-label {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.guru-wali-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

/* Dropdown Menu for Card */
.guru-dropdown {
    position: relative;
}

.guru-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.guru-dropdown-menu.show {
    display: block;
}

.guru-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.guru-dropdown-menu a:hover {
    background: #f8fafc;
}

.guru-dropdown-menu a.text-danger:hover {
    background: #fef2f2;
}

/* Responsive */
@media (max-width: 767.98px) {
    .guru-cards-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
}