:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #fca311;
    --info-color: #4895ef;
    --light-bg: #f8f9fa;
    --dark-text: #2b2d42;
    --light-text: #edf2f4;
    --sidebar-width: 300px;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

body {
    background-color: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--light-text);
    transition: all var(--transition-speed) ease;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-top: 1rem;
    padding-bottom: 2rem;
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    background-clip: content-box;
}

.sidebar-header {
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    text-align: center;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 20px;
    margin: 4px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    padding: 1.5rem 1.5rem .5rem;
    letter-spacing: 1px;
}

.sidebar-heading .bi-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-heading[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0 2rem 2rem;
    transition: margin-left var(--transition-speed) ease;
    min-height: 100vh;
}

/* Navbar Styling */
.top-navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    background: #fff;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Stats Cards */
.stats-card {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.stats-card .card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stats-card .display-4 {
    font-weight: 700;
    font-size: 2.5rem;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color)) !important;
    color: #fff;
}

.bg-gradient-success {
    background: linear-gradient(45deg, #11998e, #38ef7d) !important;
    color: #fff;
}

.bg-gradient-warning {
    background: linear-gradient(45deg, #f2994a, #f2c94c) !important;
    color: #fff;
}

.bg-gradient-danger {
    background: linear-gradient(45deg, #eb3349, #f45c43) !important;
    color: #fff;
}

.bg-gradient-info {
    background: linear-gradient(45deg, #4facfe, #00f2fe) !important;
    color: #fff;
}

/* Table Styling */
.table {
    vertical-align: middle;
}

.table thead th {
    background-color: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.table-hover tbody tr:hover {
    background-color: #f8f9ff;
}

/* Button Styling */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    background-color: #fcfcfc;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

/* User Profile in Sidebar */
.user-profile {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-profile .d-flex {
    align-items: center;
    color: #fff;
    margin-bottom: 10px;
}

.user-profile i {
    font-size: 2rem;
    margin-right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 50%;
}

.user-profile .btn-logout {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    margin-top: 10px;
}

.user-profile .btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.active {
        margin-left: var(--sidebar-width);
    }
}

/* Login Page Specifics - SMP Theme */
.login-body {
    /* SMP Navy Blue Gradient */
    background: linear-gradient(135deg, #001f3f, #003366);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.login-header {
    /* SMP Navy Blue */
    background: #001f3f;
    color: #fff;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid #003366;
}

.login-header h4 {
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-header small {
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Form Polish */
.login-card .input-group-text {
    border-color: #dee2e6;
    background-color: #f8f9fa;
    color: #001f3f;
}

.login-card .input-group:focus-within .input-group-text,
.login-card .input-group:focus-within .form-control {
    border-color: #001f3f;
    box-shadow: none;
}

.login-card .input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(0, 31, 63, 0.15);
    border-radius: 0.375rem;
}

.login-card .form-control:focus {
    box-shadow: none;
}

/* Override button for login page */
.login-card .btn-primary {
    background-color: #001f3f;
    border-color: #001f3f;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
    background-color: #003366;
    border-color: #003366;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 31, 63, 0.3);
}

/* Animated Background Shapes (Kotak Bergerak) */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.background-shapes li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 4px;
}

.background-shapes li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.background-shapes li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* NEW DASHBOARD STYLES */
.welcome-banner {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.15);
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.stat-card-v2 {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
}

.stat-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

.stat-icon-primary { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.stat-icon-success { background: rgba(76, 201, 240, 0.1); color: var(--success-color); }
.stat-icon-warning { background: rgba(252, 163, 17, 0.1); color: var(--warning-color); }
.stat-icon-danger { background: rgba(247, 37, 133, 0.1); color: var(--danger-color); }
.stat-icon-info { background: rgba(72, 149, 239, 0.1); color: var(--info-color); }
.stat-icon-secondary { background: rgba(108, 117, 125, 0.1); color: #6c757d; }

.stat-content h3 {
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--dark-text);
}

.stat-content p {
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
    height: 100%;
}

.quick-action-btn:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.status-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.status-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: var(--dark-text);
}

.status-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: #6c757d;
    font-weight: 500;
}

.status-value {
    font-weight: 600;
    color: var(--dark-text);
}

/* Guide Card Styling */
.guide-card {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
    margin-bottom: 2rem;
}

.guide-step {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 10px;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: transform 0.2s;
}

.guide-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
}

.bg-primary-soft { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.bg-info-soft { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.bg-success-soft { background: rgba(25, 135, 84, 0.1); color: #198754; }
.bg-warning-soft { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.bg-danger-soft { background: rgba(220, 53, 69, 0.1); color: #dc3545; }

/* Class Card Styling */
.class-card {
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.class-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(to right, #ffffff, #f8f9fa);
}

.class-card-body {
    padding: 1.25rem;
}

.class-card-footer {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.progress-label {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.action-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-action-soft {
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-action-primary { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.btn-action-primary:hover { background: var(--primary-color); color: #fff; }

.btn-action-success { background: rgba(25, 135, 84, 0.1); color: #198754; }
.btn-action-success:hover { background: #198754; color: #fff; }

.btn-action-info { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.btn-action-info:hover { background: #0dcaf0; color: #fff; }

.btn-action-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }
.btn-action-warning:hover { background: #ffc107; color: #000; }

.cursor-pointer {
    cursor: pointer;
}

.transition-icon {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .transition-icon {
    transform: rotate(180deg);
}
