/* RESET & GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #e0f2f1 100%);
    color: #2c3e50;
    min-height: 100vh;
}

/* LOGIN PAGE */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 150, 136, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #00897b;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #78909c;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #546e7a;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #26a69a;
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 137, 123, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e57373 0%, #f44336 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* DASHBOARD LAYOUT */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #00897b 0%, #00695c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 4px 0;
    letter-spacing: 1px;
    color: white;
}

.sidebar-header p {
    font-size: 11px;
    opacity: 0.85;
    margin: 0;
    color: white;
}

.logo-container {
    margin-bottom: 10px;
    text-align: center;
}

.school-logo {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    padding: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    display: block;
    margin: 0 auto;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #4db6ac;
    padding-left: 21px;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
}

/* TOPBAR */
.topbar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left h1 {
    font-size: 24px;
    color: #00897b;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* CONTENT AREA */
.content {
    padding: 30px;
}

/* CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border-left: 4px solid #26a69a;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 150, 136, 0.15);
}

.stat-card h3 {
    color: #78909c;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #00897b;
}

.stat-card .label {
    font-size: 12px;
    color: #b0bec5;
    margin-top: 5px;
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-bottom: 2px solid #26a69a;
}

.card-header h3 {
    color: #00695c;
    font-size: 18px;
}

.card-body {
    padding: 25px;
}

/* TABLE */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table thead {
    background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
    color: white;
}

table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

table tbody td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

table tbody tr:hover {
    background: #f1f8f6;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* BADGE */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge-danger {
    background: #ffcdd2;
    color: #c62828;
}

.badge-warning {
    background: #fff9c4;
    color: #f57f17;
}

.badge-info {
    background: #b2ebf2;
    color: #006064;
}

/* ALERT */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c8e6c9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-danger {
    background: #ffcdd2;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-info {
    background: #b2ebf2;
    color: #006064;
    border-left: 4px solid #00bcd4;
}

.alert-warning {
    background: #fff9c4;
    color: #f57f17;
    border-left: 4px solid #fbc02d;
}

/* FORM */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ACTIONS */
.actions {
    display: flex;
    gap: 8px;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h3 {
    color: #00897b;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* PRINT */
@media print {
    .sidebar, .topbar, .btn, .actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .topbar {
        padding: 15px;
    }
    
    .content {
        padding: 15px;
    }
}
