/* College Management System - Main Stylesheet */
/* Design: Deep navy & slate with warm gold accents, DM Serif Display + Outfit */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary: #1a2744;
    --primary-light: #2d3e5f;
    --secondary: #4a5568;
    --accent: #d4af37;
    --accent-hover: #c9a020;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1a2744;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(26, 39, 68, 0.05);
    --shadow-md: 0 4px 6px rgba(26, 39, 68, 0.07);
    --shadow-lg: 0 10px 15px rgba(26, 39, 68, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    line-height: 1.2;
    color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.5rem;
    background: var(--primary);
    color: white;
    border-bottom: 3px solid var(--accent);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

/* Navigation */
.navbar {
    background: var(--primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand:hover {
    color: var(--accent);
}

.navbar-logo {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.navbar-menu a {
    color: white;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-menu a:hover {
    color: var(--accent);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.navbar-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero .btn {
    margin: 0 0.5rem;
}

/* Hero Image Carousel */
.hero-carousel {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.hero-carousel .hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carousel .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-carousel .hero-slide.active {
    opacity: 1;
}

.hero-carousel .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 39, 68, 0.88) 0%, rgba(26, 39, 68, 0.65) 55%, rgba(212, 175, 55, 0.25) 100%);
    z-index: 1;
}

.hero-carousel .container {
    position: relative;
    z-index: 2;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.hero-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.hero-carousel-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
}

.hero-carousel-nav.prev { left: 1.5rem; }
.hero-carousel-nav.next { right: 1.5rem; }

.hero-carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.6rem;
}

.hero-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.hero-carousel-dots .dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .hero-carousel { min-height: 460px; }
    .hero-carousel-nav { width: 36px; height: 36px; font-size: 1rem; }
    .hero-carousel-nav.prev { left: 0.75rem; }
    .hero-carousel-nav.next { right: 0.75rem; }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tr:hover {
    background: var(--bg-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--info);
    color: #1e40af;
}

/* Page Header */
.page-header {
    background: var(--bg-white);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* Content Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Cards */
.stat-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    border-top: 4px solid var(--accent);
}

.stat-card .number {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Attendance Status */
.status-present {
    color: var(--success);
    font-weight: 600;
}

.status-absent {
    color: var(--danger);
    font-weight: 600;
}

.status-late {
    color: var(--warning);
    font-weight: 600;
}

.status-excused {
    color: var(--info);
    font-weight: 600;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--primary);
    color: white;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--accent);
}

.sidebar-menu svg {
    width: 20px;
    height: 20px;
}

.main-content {
    background: var(--bg-light);
    padding: 2rem;
    overflow-y: auto;
}

.dashboard-header {
    background: var(--bg-white);
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        height: auto;
    }
    
    .navbar-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
