:root {
    --primary: #3a7bd5;
    --secondary: #00d2ff;
    --danger: #ff4e50;
    --success: #5efc82;
    --background: #f5f7fb;
    --text-dark: #1e1e2f;
    --text-light: #6b7280;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-radius: 18px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    min-height: 100vh;
    color: var(--text-dark);
}

body.login {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dashboard {
    background: var(--background);
    display: flex;
    align-items: flex-start;
}

body.home {
    background: var(--background);
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

.login-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: min(480px, 90%);
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 5vw;
}

.home-logo {
    font-weight: 700;
    font-size: 1.5rem;
}

.home-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 0 5vw 4rem;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.12), rgba(0, 210, 255, 0.12));
    border-radius: var(--border-radius);
    padding: 3.5rem 4rem;
}

.hero-content h1 {
    margin-top: 0;
    font-size: clamp(2.1rem, 4vw, 3rem);
}

.hero-content p {
    color: var(--text-light);
    font-size: 1.05rem;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.hero-card ul {
    padding-left: 1rem;
    margin: 1rem 0 0;
    color: var(--text-light);
}

.home-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-section h2 {
    margin: 0;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.feature-card p {
    color: var(--text-light);
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(58, 123, 213, 0.22);
}

.home-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.suggestion-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.suggestion-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.suggestion-form label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.suggestion-form input,
.suggestion-form textarea,
.feedback-form input,
.feedback-form textarea,
.feedback-comment-form textarea {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.home-footer {
    padding: 2rem 5vw 3rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.form-feedback {
    margin: 0;
    font-size: 0.9rem;
}

.form-feedback.success {
    color: var(--success);
}

.form-feedback.error {
    color: var(--danger);
}

.muted {
    color: var(--text-light);
}

.login-wrapper h1 {
    margin-top: 0;
    font-size: 2rem;
    color: var(--text-dark);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(58, 123, 213, 0.15);
}

.button {
    width: 100%;
    padding: 0.95rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(58, 123, 213, 0.22);
}

.alert {
    background: rgba(255, 78, 80, 0.1);
    color: var(--danger);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.dashboard-container {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    gap: 2rem;
    padding: 2.5rem 5vw 3rem;
    transition: background-color 0.6s ease;
}

.sidebar {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2.5rem;
    height: fit-content;
}

.sidebar h2 {
    margin: 0;
    font-size: 1.6rem;
}

.user-info {
    background: rgba(58, 123, 213, 0.08);
    padding: 1.25rem;
    border-radius: 14px;
    line-height: 1.5;
}

.user-info strong {
    display: block;
    font-size: 1.1rem;
}

.logout-link,
.admin-link {
    text-align: center;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.2);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.logout-link:hover,
.admin-link:hover {
    background: rgba(148, 163, 184, 0.35);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.grades-layout .sidebar {
    position: sticky;
    top: 2.5rem;
}

.grades-summary-card {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.grades-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grades-overview-hero {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.grades-overview-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 520px;
}

.overview-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.overview-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(58, 123, 213, 0.12);
    font-size: 0.9rem;
}

.overview-pill strong {
    font-weight: 700;
}

.progress-ring {
    --size: 130px;
    --track: rgba(148, 163, 184, 0.25);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: conic-gradient(var(--accent, var(--primary)) var(--progress, 0%), var(--track) 0);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-weight: 600;
}

.progress-ring::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: white;
    z-index: 0;
}

.progress-ring span,
.progress-ring small {
    position: absolute;
    z-index: 1;
}

.progress-ring span {
    font-size: 1.6rem;
    font-weight: 700;
}

.progress-ring small {
    top: 62%;
    font-size: 0.8rem;
    color: var(--text-light);
}

.progress-ring.large {
    --size: 160px;
}

.grades-summary-card .summary-details {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.summary-card {
    background: rgba(15, 23, 42, 0.05);
    padding: 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.summary-card.success {
    background: rgba(94, 252, 130, 0.16);
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.summary-progress {
    position: relative;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.summary-progress span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.summary-progress-target {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.insight-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.insight-card {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-card h5 {
    margin: 0;
    font-size: 1rem;
}

.insight-card p {
    margin: 0;
    color: var(--text-light);
}

.insight-card.success {
    background: rgba(94, 252, 130, 0.16);
    color: var(--success);
}

.insight-card.success p,
.insight-card.success h5 {
    color: inherit;
}

.insight-card.warning {
    background: rgba(255, 160, 67, 0.16);
    color: #b75300;
}

.insight-card.warning p,
.insight-card.warning h5 {
    color: inherit;
}

.insight-card.focus {
    background: rgba(58, 123, 213, 0.1);
}

.insight-card.focus p {
    color: var(--text-dark);
}

.grades-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.semester-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.semester-banner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.semester-banner-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 260px;
}

.average-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.average-pill {
    background: rgba(148, 163, 184, 0.2);
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.average-pill strong {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.average-pill.filled {
    background: rgba(58, 123, 213, 0.14);
    color: var(--text-dark);
}

.semester-banner-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 140px;
}

.semester-badge {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(148, 163, 184, 0.2);
}

.semester-badge.valid {
    background: rgba(94, 252, 130, 0.18);
    color: var(--success);
}

.semester-badge.pending {
    background: rgba(255, 160, 67, 0.18);
    color: #ff7d27;
}

.ue-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ue-card {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ue-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.ue-header-actions {
    display: flex;
    align-items: center;
}

.ue-meta {
    margin: 0.35rem 0 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.ue-status {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(148, 163, 184, 0.25);
}

.ue-status.valid {
    background: rgba(94, 252, 130, 0.18);
    color: var(--success);
}

.ue-status.pending {
    background: rgba(255, 78, 80, 0.18);
    color: var(--danger);
}

.ue-progress {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ue-progress-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.ue-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
}

.ue-progress-fill.projected {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.ue-progress-fill.actual {
    background: rgba(58, 123, 213, 0.6);
}

.ue-progress-target {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: var(--danger);
    left: var(--target, 0%);
    transform: translateX(-50%);
}

.ue-progress-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.ue-progress-labels strong {
    color: var(--text-dark);
}

.subject-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.subject-item {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subject-header h5 {
    margin: 0;
    font-size: 1.05rem;
}

.subject-meta {
    margin: 0.4rem 0 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.subject-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.subject-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    font-size: 0.85rem;
    color: var(--text-light);
}

.subject-pill strong {
    color: var(--text-dark);
}

.subject-pill.filled {
    background: rgba(58, 123, 213, 0.12);
    color: var(--text-dark);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.note-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(58, 123, 213, 0.08);
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    gap: 1rem;
}

.note-chip-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.note-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
}

.note-chip-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.note-label {
    font-weight: 600;
    color: var(--text-dark);
}

.note-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

.note-chip-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-button {
    border: none;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
    background: rgba(148, 163, 184, 0.4);
    transform: translateY(-1px);
}

.icon-button.danger {
    color: var(--danger);
    background: rgba(255, 78, 80, 0.18);
}

.icon-button.danger:hover {
    background: rgba(255, 78, 80, 0.28);
}

.note-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.note-form-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.note-form label {
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.note-form input[type="text"],
.note-form input[type="number"] {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 0.95rem;
}

.note-form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.note-form-actions .button.secondary {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-dark);
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.grades-structure {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-grade-semester {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-grade-semester h4 {
    margin: 0;
}

.admin-grade-ues {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-grade-ue {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-grade-ue header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-grade-ue header h5 {
    margin: 0;
}

.admin-grade-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-grade-actions button {
    border: none;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    background: rgba(148, 163, 184, 0.25);
    cursor: pointer;
}

.admin-grade-actions button.danger {
    background: rgba(255, 78, 80, 0.18);
    color: var(--danger);
}

.admin-grade-form {
    display: grid;
    gap: 0.5rem;
}

.admin-grade-form input,
.admin-grade-form select {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.admin-grade-form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
}

.admin-grade-subjects {
    display: grid;
    gap: 0.75rem;
}

.admin-grade-subject {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: center;
}

.admin-grades-forms {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-grades-forms .admin-form {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-grades-forms .admin-form h4 {
    margin: 0 0 0.5rem 0;
}

.admin-grades-forms .admin-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

.admin-grades-forms .admin-form input,
.admin-grades-forms .admin-form select {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 0.95rem;
}

.admin-grades-forms .admin-form .checkbox-inline {
    font-weight: 500;
    color: var(--text-light);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.card h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.course-card {
    padding-bottom: 3.5rem;
}

.course-background {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 0;
    opacity: 0.2;
    pointer-events: none;
    transition: width 0.8s ease, background 0.8s ease, opacity 0.6s ease;
}

.course-content {
    position: relative;
    z-index: 1;
}

.course-details {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
    font-weight: 500;
    color: var(--text-light);
}

.dropout-toggle {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
}

.dropout-toggle button {
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dropout-toggle button.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.dropout-toggle button.danger {
    background: linear-gradient(135deg, #ff6a88, #ff99ac);
    color: white;
}

.dropout-toggle button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.18);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-weight: 600;
    gap: 0.75rem;
}

.progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
    margin-top: 0.75rem;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.6s ease, background 0.6s ease;
}

.progress-remaining {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-percent {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(58, 123, 213, 0.08);
    padding: 1.5rem;
    border-radius: 16px;
}

.chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    background: #ffffff;
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 20;
}

.chat-panel.open {
    transform: translateX(0);
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.chat-close {
    border: none;
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-dark);
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: white;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message .meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.chat-message-attachment {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.04);
    padding: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.chat-message-attachment img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.chat-message-attachment span {
    display: inline-block;
    margin-left: 0.35rem;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-input-row input[type="text"] {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.chat-attachment-label {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    background: rgba(148, 163, 184, 0.25);
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-attachment-label:hover {
    background: rgba(148, 163, 184, 0.4);
}

.chat-attachment-input {
    display: none;
}

.chat-form-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.chat-anonymous {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.chat-attachment-name {
    flex: 1;
    min-width: 160px;
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-form button {
    margin-left: auto;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    z-index: 19;
}

.chat-toggle[data-unread="true"]::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 78, 80, 0.2);
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
}

.upcoming-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.upcoming-item {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(58, 123, 213, 0.08);
    display: grid;
    gap: 0.35rem;
}

.upcoming-item h4 {
    margin: 0;
    font-size: 1rem;
}

.upcoming-item .upcoming-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.admin-feedback {
    min-height: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.admin-feedback.success {
    color: var(--success);
}

.admin-feedback.error {
    color: var(--danger);
}

.admin-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-form label {
    font-weight: 600;
    color: var(--text-light);
}

.admin-form input,
.admin-form select {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 1rem;
}

.admin-form button {
    width: fit-content;
    padding-inline: 2.5rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.admin-table .status-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
}

.admin-table button {
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: rgba(58, 123, 213, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-table button.secondary {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-dark);
}

.admin-table button.secondary:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.4);
}

.admin-table button:hover:not(:disabled) {
    background: rgba(58, 123, 213, 0.3);
    transform: translateY(-1px);
}

.admin-table button.danger {
    background: rgba(255, 78, 80, 0.18);
}

.admin-table button.danger:hover:not(:disabled) {
    background: rgba(255, 78, 80, 0.3);
}

.admin-table button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard-container.dashboard-admin {
    grid-template-columns: minmax(260px, 300px) 1fr;
}

@media (max-width: 1080px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem 3rem;
    }

    .sidebar {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {
    body {
        align-items: flex-start;
    }

    .login-wrapper {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }

    .course-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .chat-panel {
        width: 100vw;
        padding: 1.25rem;
    }

    .chat-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}
.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-subtitle {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-link {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: rgba(148, 163, 184, 0.2);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.section {
    display: none;
    flex-direction: column;
    gap: 2rem;
}

.section.active {
    display: flex;
}

.section-intro {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.filter-form {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1.5rem;
}

.filter-form label {
    font-weight: 600;
    color: var(--text-light);
}

.filter-form select {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 1rem;
    background: white;
}

.schedule-table {
    display: grid;
    gap: 1.5rem;
}

.schedule-day {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 18px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

.schedule-day-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.schedule-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.schedule-events li {
    background: white;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.35rem;
}

.schedule-events li strong {
    font-size: 1rem;
}

.schedule-events li span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.schedule-location {
    color: var(--text-light);
    font-size: 0.9rem;
}

.crous-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.crous-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.crous-payment {
    margin: 0;
    color: var(--text-light);
    font-weight: 500;
}

.crous-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.crous-meal {
    background: rgba(58, 123, 213, 0.08);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crous-meal h5 {
    margin: 0;
    font-size: 1.1rem;
}

.crous-category {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crous-category-name {
    font-weight: 600;
    color: var(--primary);
}

.crous-category ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.3rem;
}

.servers-list {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.server-item {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 18px;
    padding: 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.server-description {
    margin: 0;
    color: var(--text-light);
}

.server-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.server-meta code {
    background: white;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-family: 'Fira Code', 'Source Code Pro', monospace;
    font-size: 0.95rem;
}

.button.secondary {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-dark);
    width: auto;
}

.button.secondary:hover {
    background: rgba(148, 163, 184, 0.4);
    transform: none;
    box-shadow: none;
}

.button.danger {
    background: rgba(255, 78, 80, 0.18);
    color: var(--danger);
    width: auto;
}

.button.danger:hover {
    background: rgba(255, 78, 80, 0.28);
    transform: none;
    box-shadow: none;
}

.button.tertiary {
    background: rgba(58, 123, 213, 0.18);
    color: var(--text-dark);
    width: auto;
    padding: 0.55rem 1rem;
}

.button.tertiary:hover {
    background: rgba(58, 123, 213, 0.3);
    transform: none;
    box-shadow: none;
}

.feedback-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-form-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feedback-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.feedback-intro .button,
.feedback-form .button,
.feedback-comment-form .button {
    width: auto;
}

.feedback-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(280px, 1fr) 2fr;
}

.feedback-topics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-topic {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-topic:hover {
    border-color: rgba(58, 123, 213, 0.35);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.feedback-topic.active {
    border-color: rgba(58, 123, 213, 0.6);
    box-shadow: 0 14px 28px rgba(58, 123, 213, 0.18);
}

.feedback-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.feedback-topic-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-topic-header h4 {
    margin: 0;
}

.feedback-topic-meta {
    color: var(--text-light);
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.feedback-topic-problem {
    margin: 1rem 0;
    color: var(--text-dark);
}

.feedback-topic-actions {
    display: flex;
    gap: 0.75rem;
}

.feedback-vote {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    background: rgba(148, 163, 184, 0.2);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.feedback-vote.active,
.feedback-vote:hover {
    background: rgba(58, 123, 213, 0.18);
}

.feedback-topic-voters {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.feedback-thread-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.feedback-thread-actions .button {
    width: auto;
}

.feedback-status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(148, 163, 184, 0.15);
}

.feedback-status-validated {
    background: rgba(94, 252, 130, 0.2);
    color: #0f8a3b;
}

.feedback-thread {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.feedback-thread-header h3 {
    margin: 0;
}

.feedback-thread-meta {
    margin: 0.35rem 0 0;
    color: var(--text-light);
}

.feedback-thread-body h4 {
    margin-bottom: 0.5rem;
}

.feedback-thread-body p {
    color: var(--text-dark);
}

.feedback-thread-votes {
    margin-top: 1rem;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    color: var(--text-light);
}

.feedback-comments {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-comment {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.12);
}

.feedback-comment header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.feedback-comment header strong {
    color: var(--text-dark);
}

.feedback-comment p {
    margin: 0.75rem 0 0;
    color: var(--text-dark);
}

.feedback-comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-comment-form label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal[hidden] {
    display: none;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 22px;
    width: min(420px, 90%);
    box-shadow: var(--shadow);
    text-align: center;
    display: grid;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.highlight {
    animation: pulse 1.5s ease;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0.0); }
    50% { box-shadow: 0 0 0 12px rgba(58, 123, 213, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0.0); }
}

@media (max-width: 900px) {
    .filter-form {
        grid-template-columns: 1fr;
    }

    .server-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        padding: 2rem;
    }

    .feedback-layout {
        grid-template-columns: 1fr;
    }

    .feedback-intro {
        flex-direction: column;
        align-items: flex-start;
    }
}
