/* Custom CSS for School Management System */

/* Base Styles */
:root {
    --primary-color: #3c8dbc;  /* Coffee */
    --secondary-color: #3c8dbc;  /* Sienna */
    --success-color: #3c8dbc;  /* Dark brown */
    --info-color: #3c8dbc;  /* Tan */
    --warning-color: #3c8dbc;  /* Chocolate */
    --danger-color: #A0522D;  /* Saddle brown */
    --light-color: #F5F5DC;  /* Beige */
    --dark-color: #3c8dbc;  /* Dark brown */
    --body-bg: #F8F4E8;  /* Light beige */
    --card-bg: #FFFFFF;
    --text-color: #3c8dbc;  /* Dark brown */
    --text-muted: #8D6E63;  /* Light brown */
    --border-color: #D7CCC8;  /* Light brown border */
    --header-height: 56px;
}

/* Dark theme variables */
[data-bs-theme="dark"] {
    --body-bg: #3c8dbc;  /* Dark coffee */
    --card-bg: #3c8dbc;  /* Dark brown */
    --text-color: #EFEBE9;  /* Light beige */
    --text-muted: #BCAAA4;  /* Light brown */
    --border-color: #3c8dbc;  /* Brown */
}

/* Global Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    padding-top: var(--header-height);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* Layout */
.main-container {
    min-height: calc(100vh - var(--header-height) - 180px);
    padding: 2rem 0;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Forms */
.form-control, .form-select {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Tables */
.table {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom-width: 1px;
}

.table > :not(:last-child) > :last-child > * {
    border-bottom-color: var(--border-color);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6268;
}

/* Back to top button */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 99;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    opacity: 0.8;
}

#btn-back-to-top:hover {
    opacity: 1;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    text-transform: uppercase;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    body {
        font-size: 0.95rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .no-print, .navbar, .footer {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}
