/* 
 * HALLEY International School - Student Portal
 * Premium Design System
 */

:root {
    /* Color Palette */
    --primary-color: #0c2461;
    /* Deep Navy Blue */
    --primary-light: #1e3799;
    --accent-color: #f6b93b;
    /* Academic Gold */
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f5f6fa;
    --white: #ffffff;
    --danger: #e55039;
    --success: #20bf6b;

    /* Spacing & Shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Login/Auth Pages */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.school-logo {
    width: 80px;
    height: auto;
    max-height: 80px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
}

.login-header h2 {
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(12, 36, 97, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Dashboard Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    font-weight: 500;
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
    background: #eef1f6;
}

.nav-item.logout {
    color: var(--danger);
}

.nav-item.logout:hover {
    background: #ffecec;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-blue {
    background: #e3f2fd;
    color: #1565c0;
}

.icon-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.icon-orange {
    background: #fff3e0;
    color: #ef6c00;
}

.icon-purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
    color: var(--text-dark);
}

.stat-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Compact Quick Action Cards (Added for AdminPro/SectionAdmin) */
.quick-action-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid #f1f2f6;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #dcdde1;
}

.quick-action-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-action-card .stat-info h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.quick-action-card .stat-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid #dfe6e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f2f6;
}

th {
    background-color: #f8f9fa;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f8f9fa;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-EgyBoys {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-EgyGirls {
    background: #fce4ec;
    color: #c2185b;
}

.badge-InterBoys {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-InterGirls {
    background: #fff3e0;
    color: #ef6c00;
}

/* File Download List for Students */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.file-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    border-left: 5px solid var(--primary-color);
}

.file-card:hover {
    box-shadow: var(--shadow-md);
}

.file-header {
    margin-bottom: 10px;
}

.file-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: block;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.file-actions {
    margin-top: auto;
    padding-top: 15px;
}

.btn-download {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: #eef1f6;
    color: var(--primary-color);
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.btn-download:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #2e7d32;
}

.alert-danger {
    background-color: #ffecec;
    color: #d63031;
    border-color: #d63031;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.9rem;
    }
}