@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #ea580c; /* Vivid orange from the new image */
    --primary-hover: #c2410c;
    --secondary-color: #ffedd5;
    --bg-gradient: linear-gradient(180deg, #e0f2fe 0%, #ffedd5 100%); /* Light cyan to peach gradient */
    --text-main: #111827;
    --text-muted: #4b5563;
    --card-bg: #ffffff;
    --card-border: #f3f4f6;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --star-active: #f59e0b;
    --star-inactive: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient) !important;
    background-attachment: fixed !important;
    color: var(--text-main) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Aggressively override all cosmic dark theme text classes */
.text-white, .text-light { color: var(--text-main) !important; }
h1, h2, h3, h4, h5, h6, .fw-bold { color: #111827 !important; }

/* Dashboard and Standard Cards */
.glass-card, .card {
    background: var(--card-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px !important; 
    box-shadow: var(--card-shadow) !important;
}

.card-header, .card-footer {
    border-bottom: 1px solid var(--card-border) !important;
    border-top: 1px solid var(--card-border) !important;
    background: transparent !important;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid var(--card-border) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.navbar-brand {
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
.navbar-brand i { color: var(--primary-color) !important; }

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}
.nav-link:hover { color: var(--primary-color) !important; }

/* Form Elements */
.form-control, .form-select, textarea {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus, textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.15) !important;
}

.form-control::placeholder, textarea::placeholder {
    color: #9ca3af !important;
}

.form-label {
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.95rem;
}

.form-check-input {
    border-color: #d1d5db !important;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}


/* Input addons */
.input-group-text {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
    color: var(--text-muted) !important;
}

/* Admin Enhancements */
.glass-nav {
    background: rgba(15, 15, 25, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-pills .nav-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-pills .nav-link.active {
    background: var(--primary-color) !important;
}

.table-dark {
    background: transparent !important;
}

.table-dark thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.table-dark td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 30px !important; /* Rounded pill buttons from the image */
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(234, 88, 12, 0.4) !important;
}

.btn-outline-light, .btn-outline-info {
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-weight: 600 !important;
}

.btn-outline-light:hover, .btn-outline-info:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: var(--primary-color) !important;
}

/* Specific text overrides replacing inline classes */
.text-muted, .text-secondary { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: var(--star-active) !important; }
.text-info { color: #0ea5e9 !important; }
.text-success { color: #10b981 !important; }

/* Dashboard stats cards */
.stat-card {
    background: #ffffff !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
    padding: 24px !important;
    text-align: center !important;
}
.stat-card h3 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: var(--primary-color) !important;
    margin: 10px 0 0 !important;
}

/* Alerts */
.alert-glass {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
    backdrop-filter: none !important;
}
.alert-success-glass {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    backdrop-filter: none !important;
}

/* Modals */
.modal-content {
    background: var(--card-bg) !important;
    border-radius: 12px !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}
.modal-header, .modal-footer {
    border-bottom: 1px solid var(--card-border) !important;
}
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(0) !important;
}

/* Badges */
.badge.bg-primary {
    background: rgba(234, 88, 12, 0.1) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(234, 88, 12, 0.2) !important;
}
.badge.bg-secondary {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb !important;
}

/* Star Rating System */
.star-rating {
    direction: rtl;
    display: inline-flex;
}
.star-rating input { display: none; }
.star-rating label {
    color: var(--star-inactive);
    font-size: 2.5rem;
    padding: 0 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--star-active);
    transform: scale(1.15);
}

/* Teacher Hover Animation */
.teacher-card { transition: all 0.3s ease; }
.teacher-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(234, 88, 12, 0.15) !important; }

/* Loader */
.spinner-overlay {
    background: rgba(255, 255, 255, 0.9) !important;
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 9999;
}
.spinner-border { color: var(--primary-color) !important; }
.hidden { display: none !important; }

/* Animations */
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer overrides */
footer { background: transparent !important; border-top: none !important; }
footer .text-white { color: rgba(0,0,0,0.5) !important; font-weight: 500; }
footer .btn-outline-danger {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: #ffffff !important;
}

.transition-hover {
    transition: all 0.3s ease;
}
.transition-hover:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Feedback Specific Rating Styles */
.rating-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
}

.rating-options {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.rating-btn {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #d1d5db;
    color: var(--text-main);
    font-weight: 600;
}

.rating-input:checked + .rating-btn {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.3);
    border-color: transparent;
    color: #fff;
}

.rating-btn:hover {
    background: #e5e7eb;
}

/* Ensure Admin Table looks good with white background */
.tab-pane .glass-card {
    background: #fff !important;
}
.table-dark {
    color: #111827 !important;
}
.table-dark td, .table-dark th {
    color: #111827 !important;
    border-color: #f3f4f6 !important;
}