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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Colors */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-600: #059669;
    --green-700: #047857;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --yellow-50: #fefce8;
    --yellow-100: #fef9c3;
    --yellow-600: #ca8a04;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

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

.highlight {
    color: var(--primary-600);
}

p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background-color: var(--gray-50);
    border-color: var(--primary-500);
}

.full-width {
    width: 100%;
    justify-content: center;
}

.small-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Navigation */
.navbar {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.nav-logo i {
    color: var(--primary-600);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-600);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 50%, var(--gray-50) 100%);
    padding: 4rem 0 6rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 2rem 0;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--gray-600);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quick-login {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    max-width: 400px;
}

.quick-login h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

#quickLoginForm input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

#quickLoginForm input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--primary-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-circle i {
    font-size: 6rem;
    color: var(--primary-600);
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    position: absolute;
    bottom: 2rem;
    width: 100%;
    padding: 0 2rem;
}

.stat-card-small {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card-small .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
}

.stat-card-small .stat-label {
    font-size: 0.625rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: white;
}

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

.section-header h2 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-500);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-100);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--primary-600);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Testimonials */
.testimonials {
    padding: 5rem 0;
    background-color: var(--gray-50);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stars {
    color: #fbbf24;
    margin-bottom: 1rem;
}

.stars i {
    margin-right: 0.25rem;
}

.testimonial-card p {
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.testimonial-card .author {
    font-weight: 600;
    color: var(--gray-900);
    font-style: normal;
}

/* Contact */
.contact {
    padding: 5rem 0;
    background-color: var(--primary-50);
}

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

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-600);
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--primary-400);
}

.footer p {
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.875rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.close-btn:hover {
    color: var(--gray-700);
}

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

.login-header i {
    font-size: 3rem;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
}

.login-header h2 {
    margin-bottom: 0.25rem;
}

.login-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.demo-accounts {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.demo-accounts h4 {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.demo-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--gray-50);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.demo-item:hover {
    background: var(--primary-50);
}

.demo-item strong {
    color: var(--gray-900);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header i {
    font-size: 1.5rem;
    color: var(--primary-600);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    color: var(--gray-900);
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--primary-50);
    color: var(--primary-600);
    border-right: 3px solid var(--primary-600);
}

.nav-item i {
    width: 20px;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-600);
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background-color: var(--gray-50);
}

.dashboard-header {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
}

.dashboard-header h1 {
    margin-bottom: 0.25rem;
}

.dashboard-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-600);
}

.stat-card .stat-info h3 {
    font-size: 1.875rem;
    margin-bottom: 0.25rem;
}

.stat-card .stat-info p {
    font-size: 0.875rem;
    margin: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.125rem;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background-color: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--green-100);
    color: var(--green-700);
}

.badge-warning {
    background-color: var(--yellow-100);
    color: var(--yellow-600);
}

.badge-danger {
    background-color: var(--red-100);
    color: var(--red-700);
}

.badge-info {
    background-color: var(--blue-100);
    color: var(--blue-600);
}

.badge-neutral {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary-sm {
    background-color: var(--primary-600);
    color: white;
    padding: 0.5rem 1rem;
}

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

.btn-secondary-sm {
    background-color: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 1rem;
}

.btn-secondary-sm:hover {
    background-color: var(--gray-50);
}

.btn-icon {
    padding: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--gray-700);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}

/* Charts placeholders */
.chart-container {
    width: 100%;
    height: 250px;
    background: var(--gray-50);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-control label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control input,
.form-control select,
.form-control textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: var(--green-50);
    color: var(--green-800);
    border: 1px solid var(--green-100);
}

.alert-error {
    background-color: var(--red-50);
    color: var(--red-800);
    border: 1px solid var(--red-100);
}

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

.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: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

/* Mobile */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .quick-login {
        margin: 0 auto;
    }

    .nav-links {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.hidden { display: none; }

/* Student portal specific */
.attendance-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.attendance-progress {
    height: 100%;
    background: var(--green-600);
    transition: width 0.3s;
}

.subject-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
}
