/* Kidvive School Report System - Base Stylesheet */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #06b6d4;
    --accent-color: #8b5cf6;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar & Brand */
.navbar-custom {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.5rem;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(90deg, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 0.5rem;
}

/* Sidebar Layout */
.app-wrapper {
    display: flex;
    flex: 1;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #1e293b;
    color: #f8fafc;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.8), rgba(139, 92, 246, 0.8));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    min-height: 100vh;
}

/* Glassmorphism Cards & Panels */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.card-custom:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

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

.card-body-custom {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card-indigo {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.stat-card-cyan {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}

.stat-card-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.stat-card-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.stat-card-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.25;
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-success-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
}

.btn-success-custom:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: white;
}

/* Status Badges */
.badge-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pending {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-submitted {
    background-color: #dbeafe;
    color: #1d4ed8;
}

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

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

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

/* Tables */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    background-color: #f1f5f9;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

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

.table-custom tr:hover td {
    background-color: #f8fafc;
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 1.75rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #cbd5e1;
    cursor: pointer;
    padding: 0 0.1rem;
    transition: color 0.2s ease;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f59e0b;
}

/* Auth Cards */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    padding: 2rem 1rem;
}

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 520px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    height: 54px;
    margin-bottom: 1rem;
}

/* Modal styling */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Sidebar and Layout Mobile Collapse Overrides */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        height: 100vh !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15) !important;
    }
    .sidebar.show {
        transform: translateX(0) !important;
    }
    .main-content {
        padding: 5rem 1rem 2rem 1rem !important; /* give space for floating toggler */
    }
}

/* Floating hamburger menu toggler on mobile */
.floating-toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease;
}
.floating-toggle-btn:hover {
    background: #334155;
    color: #ffffff;
}

/* Colored square-bullet list layout */
.square-bullet-list {
    padding-left: 0;
}
.square-bullet-list li {
    list-style-type: none;
    position: relative;
    padding-left: 28px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.square-bullet-list .bullet {
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Mobile View Table & Font Size Decreases */
@media (max-width: 575.98px) {
    body {
        font-size: 0.85rem !important;
    }
    .table {
        font-size: 0.78rem !important;
    }
    .table th, .table td {
        padding: 0.5rem 0.4rem !important;
    }
    .btn-sm, .btn-group-sm > .btn {
        font-size: 0.72rem !important;
        padding: 0.2rem 0.45rem !important;
    }
    .card-body-custom {
        padding: 1rem !important;
    }
    .card-header-custom {
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
    }
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* Custom 50-50 height scrollable tables for Exams */
.exam-table-container {
    max-height: 32vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
