/* Chess Academy ERP - Custom Styles */

/* ── CSS Variables ─────────────────────── */
:root {
    --sidebar-width: 250px;
    --primary-color: #2c3e50;
    --accent-color: #f39c12;
    --sidebar-bg: #1a1a2e;
    --sidebar-hover: #16213e;
    --success-green: #27ae60;
    --danger-red: #e74c3c;
}

/* ── Sidebar ───────────────────────────── */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg) !important;
    transition: margin 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}

#page-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    padding-left: 1.3rem;
}

.sidebar .nav-link.active {
    background: var(--sidebar-hover);
    border-left: 3px solid var(--accent-color);
    font-weight: 600;
}

.sidebar .nav-header {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.sidebar-brand {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* ── Responsive Sidebar ────────────────── */
@media (max-width: 992px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.show {
        margin-left: 0;
    }

    #page-content-wrapper {
        margin-left: 0;
    }
}

/* ── Auth Pages ────────────────────────── */
.auth-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

.auth-body .card {
    border-radius: 12px;
}

.auth-body h4 {
    color: #fff;
}

.auth-body > .container > .row > .col-md-5 > .text-muted,
.auth-body > .container > .row > .col-md-5 > p {
    color: rgba(255,255,255,0.7) !important;
}

/* ── Dashboard Cards ───────────────────── */
.stat-card {
    border-radius: 12px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ── Tables ────────────────────────────── */
.table th {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ── Status Badges ─────────────────────── */
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-trial { background: #cce5ff; color: #004085; }
.badge-suspended { background: #fff3cd; color: #856404; }
.badge-present { background: #d4edda; color: #155724; }
.badge-absent { background: #f8d7da; color: #721c24; }
.badge-late { background: #fff3cd; color: #856404; }
.badge-leave { background: #e2e3e5; color: #383d41; }

/* ── Chess Level Badges ────────────────── */
.level-beginner { background: #d4edda; color: #155724; }
.level-elementary { background: #cce5ff; color: #004085; }
.level-intermediate { background: #fff3cd; color: #856404; }
.level-advanced { background: #f8d7da; color: #721c24; }
.level-expert { background: #d6d8db; color: #1b1e21; }

/* ── Cards ─────────────────────────────── */
.card {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-weight: 600;
}

/* ── Profile Card ──────────────────────── */
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.profile-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
    border: 3px solid var(--accent-color);
}

/* ── Attendance Grid ───────────────────── */
.attendance-grid .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
}

.attendance-status-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.attendance-status-btn.selected {
    transform: scale(1.1);
}

.att-present { background: #d4edda; color: #155724; border-color: #28a745; }
.att-absent { background: #f8d7da; color: #721c24; border-color: #dc3545; }
.att-late { background: #fff3cd; color: #856404; border-color: #ffc107; }

/* ── Misc ──────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h4 {
    margin: 0;
    font-weight: 700;
}

main {
    flex: 1;
}

.cursor-pointer {
    cursor: pointer;
}

/* ── Print Styles ──────────────────────── */
@media print {
    .sidebar, .navbar, .footer, .no-print {
        display: none !important;
    }
    #page-content-wrapper {
        margin-left: 0 !important;
    }
}
