/* ============================================
   TIE DeKUT STUDENT PORTAL
   Cleaned main stylesheet
   Keeps shared page styles and the current dashboard redesign.
   ============================================ */

/* Reset and global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: Arial, sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* Shared navigation */
header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 100;
}

.navbar {
    max-width: 1200px;
    width: 90%;
    min-height: 76px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.logo {
    font-size: 25px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.logo span { color: #2563eb; }

#navLinks {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

#navLinks li a {
    display: inline-block;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    transition: color .25s ease;
}

#navLinks li a:hover { color: #2563eb; }

#navLinks li .login-btn {
    padding: 9px 22px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
}

#navLinks li .login-btn:hover { background: #1d4ed8; }

.menu-btn {
    display: none;
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 27px;
}

/* Homepage hero */
.hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 75px 5%;
    background: linear-gradient(120deg, #eff6ff 0%, #fff 60%, #dbeafe 100%);
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: auto;
}

.welcome {
    margin-bottom: 15px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero-content h1 {
    margin-bottom: 22px;
    color: #111827;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.15;
    font-weight: 800;
}

.hero-content > p:not(.welcome) {
    max-width: 650px;
    margin-bottom: 30px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.8;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 15px; }

.primary-btn,
.secondary-btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.primary-btn { background: #2563eb; color: #fff; }
.primary-btn:hover { background: #1d4ed8; color: #fff; transform: translateY(-2px); }
.secondary-btn { border: 1px solid #2563eb; background: transparent; color: #2563eb; }
.secondary-btn:hover { background: #2563eb; color: #fff; transform: translateY(-2px); }

/* Homepage feature cards */
.features {
    max-width: 1200px;
    width: 90%;
    margin: auto;
    padding: 70px 0;
}

.features > h2 {
    margin-bottom: 35px;
    color: #111827;
    font-size: 30px;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    display: block;
    min-height: 220px;
    padding: 28px 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(17, 24, 39, .04);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .10);
}

.icon {
    width: 55px;
    height: 55px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 28px;
}

.feature-card h3 { margin-bottom: 10px; color: #111827; font-size: 18px; }
.feature-card p { color: #6b7280; font-size: 14px; line-height: 1.7; }
.feature-card:hover h3 { color: #2563eb; }

/* Shared footer */
footer {
    margin-top: auto;
    padding: 38px 20px 22px;
    background: #111827;
    color: #d1d5db;
    text-align: center;
}

.footer-content { max-width: 1200px; margin: auto; }
.footer-content h3 { margin-bottom: 10px; color: #fff; font-size: 23px; }
.footer-content p { margin-bottom: 10px; font-size: 14px; }
.copyright {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 13px;
}

/* Shared buttons, forms and status messages */
.btn,
button.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.btn:hover,
button.btn:hover { background: #1d4ed8; }

form { width: 100%; }
.form-group { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

input[type="checkbox"],
input[type="radio"] { width: auto; }

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

#questionStatus,
#announcementStatus,
#resourceStatus,
#loginStatus,
#registerStatus,
.status,
.message {
    margin: 14px 0;
    padding: 10px 12px;
    border-radius: 6px;
    overflow-wrap: anywhere;
}

.success { background: #dcfce7; color: #166534; }
.error { background: #fee2e2; color: #991b1b; }

/* Timetable */
.page-header {
    padding: 45px 20px 30px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 { margin-bottom: 10px; color: #111827; font-size: 34px; font-weight: 700; }
.page-header p { color: #6b7280; font-size: 16px; }

.timetable-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 0 55px;
}

.year-buttons,
.year-selector,
.semester-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.year-buttons { gap: 12px; margin: 0 0 30px; }

.year-buttons button,
.year-selector button,
.semester-buttons button {
    padding: 10px 18px;
    border: 1px solid #2563eb;
    border-radius: 6px;
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    transition: background .2s ease, color .2s ease;
}

.year-buttons button { min-width: 100px; padding: 11px 20px; }
.year-buttons button:hover,
.year-selector button:hover,
.semester-buttons button:hover,
.year-buttons button.active,
.year-selector button.active,
.semester-buttons button.active,
.year-buttons button:focus {
    background: #2563eb;
    color: #fff;
}

.year-content {
    margin-top: 20px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(17, 24, 39, .04);
}

.year-content.hidden { display: none !important; }
.year-content h2 { margin-bottom: 15px; color: #111827; font-size: 23px; }
.timetable-status { margin-bottom: 15px; color: #6b7280; font-size: 14px; }
.timetable-status:empty { display: none; }

.timetable-container,
.table-container {
    width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.table-container { margin-top: 15px; border-radius: 7px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
th { background: #2563eb; color: #fff; }
tbody tr:nth-child(even) { background: #f9fafb; }
tbody tr:hover { background: #eff6ff; }

.table-container table { min-width: 700px; }
.table-container th { padding: 14px 13px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.table-container td { padding: 13px; color: #374151; font-size: 14px; vertical-align: middle; }
.table-container tbody tr:last-child td { border-bottom: 0; }

/* Announcements */
.announcements-section {
    width: 90%;
    max-width: 1100px;
    min-height: 300px;
    margin: 40px auto 60px;
}

.announcements,
.announcement-list,
.announcements-container,
#announcements,
#announcementsList {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.announcement-list { display: flex; flex-direction: column; gap: 20px; }

.announcement-list > p {
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #555;
    text-align: center;
}

.announcement,
.announcement-card,
.announcement-item {
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .05);
    overflow-wrap: anywhere;
}

.announcement-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.announcement-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(17, 24, 39, .09); }
.announcement h3, .announcement-card h3, .announcement-item h3 { margin-bottom: 10px; color: #2563eb; }
.announcement-card h2, .announcement-card h3 { margin: 0 0 12px; color: #111827; }
.announcement-card p { margin: 10px 0; color: #4b5563; line-height: 1.7; }
.announcement-meta { margin-bottom: 12px; color: #6b7280; font-size: 13px; }

.announcement-date {
    flex: 0 0 105px;
    padding-top: 4px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.announcement-card small,
.announcement-date { font-size: 13px; }

.announcement-content { flex: 1; min-width: 0; }
.announcement-type {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
}

.announcement-content h2 { margin: 0 0 12px; color: #111827; font-size: 21px; line-height: 1.4; }
.announcement-content p { margin: 0 0 18px; color: #4b5563; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.announcement-content small { display: block; padding-top: 12px; border-top: 1px solid #f0f0f0; color: #6b7280; font-size: 12px; }
.announcement-card button { padding: 9px 16px; border: 0; border-radius: 5px; background: #2563eb; color: #fff; }
.announcement-card button:hover { background: #1d4ed8; }

/* Questions and answers */
.qna-section { width: 90%; max-width: 1000px; margin: 40px auto 60px; }

.question-form,
.qna-form,
.answer-form,
.question-card,
.question-item {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow-wrap: anywhere;
}

.ask-question {
    margin-bottom: 40px;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .05);
}

.ask-question h2,
.questions > h2 { margin: 0 0 12px; color: #111827; }

.ask-question > p { margin-bottom: 22px; color: #6b7280; line-height: 1.7; }

#questionForm { display: flex; flex-direction: column; gap: 14px; }

#questionInput {
    width: 100%;
    min-height: 110px;
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 15px;
    resize: vertical;
}

#questionInput:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

#questionForm button {
    align-self: flex-start;
    padding: 12px 22px;
    border: 0;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease;
}

#questionForm button:hover { background: #1d4ed8; }

.questions,
.question-list,
#questions,
#questionsList { display: grid; gap: 18px; }

.questions { display: flex; flex-direction: column; gap: 20px; }
.questions > h2 { margin-bottom: 2px; }

.question-card { border-left: 4px solid #2563eb; box-shadow: 0 4px 14px rgba(17, 24, 39, .04); }
.question-card h3, .question-item h3 { color: #111827; }
.question-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.question-label { display: inline-block; padding: 5px 10px; border-radius: 20px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.question-date, .question-meta, .asked-by { color: #6b7280; font-size: 13px; }
.question-card h3 { margin: 0 0 12px; font-size: 19px; line-height: 1.5; }
.question-author { margin: 0 0 22px; color: #6b7280; font-size: 13px; }

.answers,
.answer-list { margin-top: 15px; padding-left: 15px; border-left: 3px solid #2563eb; }

.answer,
.answer-item {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #f8fafc;
}

.answer strong { display: block; margin-bottom: 8px; color: #2563eb; }
.answer p { margin: 0; color: #4b5563; line-height: 1.7; }

/* Student resources */
.resources,
.resource-list,
#resources,
#resourcesList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.resource-card,
.resource-item,
.upload-form,
.search-form {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow-wrap: anywhere;
}

.resource-card h3, .resource-item h3 { margin-bottom: 10px; color: #2563eb; }
.resource-meta { color: #6b7280; font-size: 13px; }

/* Legacy dashboard shared classes (scoped so they don't override the redesign) */
.dashboard-section:not(.dashboard-page .dashboard-section),
.dashboard-card:not(.dashboard-page .dashboard-card) {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dashboard-card h3 { color: #2563eb; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }

/* Current dashboard redesign — scoped to dashboard.html */
.dashboard-page {
    --dash-bg: #101923;
    --dash-panel: #172331;
    --dash-card: #192735;
    --dash-border: #2b3b4c;
    --dash-text: #f3f7fc;
    --dash-muted: #a3b1c2;
    --dash-blue: #60a5fa;
    min-height: 100vh;
    background: var(--dash-bg);
    color: var(--dash-text);
}

.dashboard-page header { background: #111c28; border-bottom: 1px solid var(--dash-border); }
.dashboard-page .navbar { max-width: 1240px; margin: 0 auto; padding: 16px 24px; }
.dashboard-page .logo { color: #f8fafc; font-size: 1.45rem; font-weight: 800; letter-spacing: -.5px; }
.dashboard-page .logo span { color: var(--dash-blue); }
.dashboard-page #navLinks { gap: 8px; }
.dashboard-page #navLinks a { padding: 10px 13px; border-radius: 9px; color: #c3ceda; transition: background .2s ease, color .2s ease; }
.dashboard-page #navLinks a:hover,
.dashboard-page #navLinks a.active { background: #24374a; color: #fff; }
.dashboard-page .menu-btn { color: #fff; }

.dashboard-page .dashboard-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1192px;
    min-height: 280px;
    margin: 32px auto 0;
    padding: 48px 52px;
    border: 1px solid #30465c;
    border-radius: 24px;
    background: radial-gradient(ellipse at 80% 45%, rgba(37, 99, 235, .19), transparent 45%), linear-gradient(120deg, #172535, #111c29 70%);
}

.dashboard-page .dashboard-hero-content { position: relative; z-index: 2; max-width: 620px; }
.dashboard-page .dashboard-eyebrow { display: block; margin-bottom: 12px; color: #83baff; font-size: .72rem; font-weight: 800; letter-spacing: 1.7px; line-height: 1.6; }
.dashboard-page .dashboard-hero h1 { margin: 0 0 15px; color: #fff; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -1.7px; }
.dashboard-page .dashboard-hero-content > p { max-width: 520px; margin: 0 0 26px; color: #b5c3d2; font-size: 1rem; line-height: 1.8; }
.dashboard-page .dashboard-explore { display: inline-flex; align-items: center; gap: 12px; padding: 13px 18px; border: 1px solid #4a91f5; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.dashboard-page .dashboard-explore:hover { background: #3478f6; transform: translateY(-2px); }

.dashboard-page .dashboard-hero-decoration { position: absolute; z-index: 1; top: 0; right: 4%; width: 290px; height: 100%; display: grid; place-items: center; pointer-events: none; }
.dashboard-page .hero-monogram { z-index: 2; color: rgba(147, 197, 253, .2); font-size: 5rem; font-weight: 900; letter-spacing: -5px; text-shadow: 0 0 45px rgba(59, 130, 246, .25); }
.dashboard-page .hero-orbit { position: absolute; width: 215px; height: 215px; border: 1px solid rgba(96, 165, 250, .3); border-radius: 50%; }
.dashboard-page .orbit-two { width: 165px; height: 165px; border-color: rgba(96, 165, 250, .18); }
.dashboard-page .hero-glow { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: #2563eb; opacity: .13; filter: blur(65px); }

.dashboard-page .dashboard-section { max-width: 1192px; margin: 0 auto; padding: 34px 0 65px; }
.dashboard-page .dashboard-welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 27px 30px; margin-bottom: 43px; border: 1px solid var(--dash-border); border-radius: 18px; background: linear-gradient(135deg, #1a2a3a, #162331); }
.dashboard-page .welcome-copy { flex: 1 1 320px; }
.dashboard-page .welcome-copy .dashboard-eyebrow { margin-bottom: 8px; }
.dashboard-page .dashboard-welcome h2 { margin: 0 0 10px; color: #fff; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.4; overflow-wrap: anywhere; }
.dashboard-page #studentName { color: #8bbcff; }
.dashboard-page .dashboard-welcome p { margin: 0; color: var(--dash-muted); line-height: 1.7; }
.dashboard-page .welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dashboard-page .student-status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #304c5a; border-radius: 999px; color: #c6e7dc; background: #1a3535; font-size: .8rem; white-space: nowrap; }
.dashboard-page .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, .35); }
.dashboard-page .logout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 1px solid #61414a; border-radius: 10px; background: #30232c; color: #ffc4cc; font: inherit; font-weight: 700; transition: background .2s ease, border-color .2s ease; }
.dashboard-page .logout-btn:hover { background: #482832; border-color: #a85565; }
.dashboard-page #logoutStatus { flex-basis: 100%; width: 100%; margin: 0; color: #fca5a5; font-size: .9rem; }

.dashboard-page .dashboard-section-heading { margin-bottom: 23px; scroll-margin-top: 25px; }
.dashboard-page .dashboard-title { margin: 0 0 7px; color: #f8fafc; font-size: 1.8rem; letter-spacing: -.5px; }
.dashboard-page .section-description { margin: 0; color: var(--dash-muted); line-height: 1.7; }
.dashboard-page .dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.dashboard-page .dashboard-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 250px;
    padding: 23px;
    overflow-wrap: anywhere;
    border: 1px solid var(--dash-border);
    border-radius: 17px;
    background: linear-gradient(150deg, #1c2b3a, #162330);
    color: var(--dash-text);
    text-decoration: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.dashboard-page .dashboard-card:hover { transform: translateY(-5px); border-color: #477fc1; box-shadow: 0 12px 35px rgba(0, 0, 0, .2), 0 0 20px rgba(37, 99, 235, .08); }
.dashboard-page .dashboard-card:focus-visible,
.dashboard-page .dashboard-explore:focus-visible,
.dashboard-page .logout-btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 4px; }
.dashboard-page .dashboard-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 13px; font-size: 1.7rem; font-weight: 800; }
.dashboard-page .icon-blue { color: #8bbcff; background: #203b5e; border-color: #2b4e77; }
.dashboard-page .icon-purple { color: #c4b5fd; background: #352b55; border-color: #514077; }
.dashboard-page .icon-cyan { color: #67e8f9; background: #1d3f4b; border-color: #2b5968; }
.dashboard-page .icon-orange { color: #fdba74; background: #4b3527; border-color: #6b4931; }
.dashboard-page .card-label { margin-bottom: 9px; color: #91a7be; font-size: .65rem; font-weight: 800; letter-spacing: 1.1px; }
.dashboard-page .dashboard-card h3 { margin: 0 0 10px; color: #f8fafc; font-size: 1.15rem; line-height: 1.4; }
.dashboard-page .dashboard-card p { margin: 0 0 20px; color: var(--dash-muted); font-size: .91rem; line-height: 1.75; }
.dashboard-page .card-link { display: inline-flex; align-items: center; gap: 9px; margin-top: auto; color: #8bbcff; font-size: .88rem; font-weight: 700; }
.dashboard-page .card-link span { transition: transform .2s ease; }
.dashboard-page .dashboard-card:hover .card-link span { transform: translateX(4px); }

.dashboard-page .rep-area { margin-top: 48px; padding: 29px; border: 1px solid #33465a; border-radius: 20px; background: radial-gradient(ellipse at top right, rgba(37, 99, 235, .09), transparent 45%), #141f2b; }
.dashboard-page .rep-heading { display: flex; align-items: flex-start; gap: 17px; margin-bottom: 27px; }
.dashboard-page .rep-heading-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border: 1px solid #35547a; border-radius: 13px; background: #203754; color: #93c5fd; font-size: 1.5rem; }
.dashboard-page .rep-heading h2 { margin: 0 0 9px; color: #fff; font-size: 1.55rem; }
.dashboard-page .rep-heading p { max-width: 680px; margin: 0; color: var(--dash-muted); line-height: 1.75; }
.dashboard-page .rep-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-page .rep-grid .dashboard-card { min-height: 225px; background: rgba(27, 41, 55, .85); }
.dashboard-page .rep-note { margin: 23px 0 0; color: #94a9bd; font-size: .83rem; line-height: 1.7; }

.dashboard-page footer { border-top: 1px solid var(--dash-border); background: #0c141d; color: #b7c4d3; }
.dashboard-page .footer-content { max-width: 1192px; margin: 0 auto; padding: 32px 24px; }
.dashboard-page .footer-content h3 { color: #fff; }
.dashboard-page .copyright { color: #8494a6; }

/* Responsive layouts */
@media (max-width: 1000px) {
    .dashboard-page .dashboard-hero,
    .dashboard-page .dashboard-section { margin-left: 24px; margin-right: 24px; }
    .dashboard-page .dashboard-grid,
    .dashboard-page .rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-page .dashboard-hero-decoration { right: -55px; opacity: .65; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .navbar { width: 90%; min-height: 70px; flex-wrap: wrap; gap: 12px; padding: 14px 0; }
    .menu-btn { display: block; margin-left: auto; }
    #navLinks { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
    #navLinks.active { display: flex; }
    #navLinks li a { display: block; padding: 12px; }
    #navLinks li .login-btn { display: inline-block; margin-top: 5px; }
    .hero { min-height: auto; padding: 65px 6%; }
    .hero-content h1 { font-size: 40px; }
    .features { padding: 50px 0; }
    .resources, .resource-list, #resources, #resourcesList { grid-template-columns: 1fr; }
    .page-header { padding: 35px 15px 25px; }
    .page-header h1 { font-size: 28px; }
    .timetable-section { width: 94%; padding: 25px 0 40px; }
    .year-content { padding: 16px; }
    .year-content h2 { font-size: 20px; }
    .year-buttons { gap: 8px; }
    .year-buttons button { min-width: 85px; padding: 9px 13px; }
    .announcements-section { width: 92%; margin: 25px auto 40px; }
    .announcement-card { padding: 18px; }
    .announcement-card:hover { transform: none; }
    .qna-section { width: 92%; margin: 25px auto 40px; }
    .ask-question, .question-card { padding: 20px; }
    #questionForm button { width: 100%; padding: 13px; }
    .question-card h3 { font-size: 17px; }
    .question-header { align-items: flex-start; }
}

@media (max-width: 650px) {
    .dashboard-page .dashboard-section { margin: 0 14px; padding: 25px 0 40px; }
}

@media (max-width: 600px) {
    .dashboard-page .navbar { padding: 14px 18px; }
    .dashboard-page .dashboard-hero { min-height: 0; margin: 20px 14px 0; padding: 32px 23px; border-radius: 18px; }
    .dashboard-page .dashboard-hero h1 { font-size: 2.25rem; letter-spacing: -1px; }
    .dashboard-page .dashboard-hero-content > p { font-size: .94rem; }
    .dashboard-page .dashboard-hero-decoration { top: auto; right: -105px; bottom: -35px; height: 170px; opacity: .32; }
    .dashboard-page .hero-orbit { width: 150px; height: 150px; }
    .dashboard-page .orbit-two { width: 110px; height: 110px; }
    .dashboard-page .hero-monogram { font-size: 3.3rem; }
    .dashboard-page .dashboard-welcome { padding: 22px 19px; gap: 20px; margin-bottom: 34px; }
    .dashboard-page .welcome-actions { width: 100%; justify-content: space-between; }
    .dashboard-page .dashboard-grid, .dashboard-page .rep-grid { grid-template-columns: 1fr; gap: 13px; }
    .dashboard-page .dashboard-card, .dashboard-page .rep-grid .dashboard-card { min-height: 0; padding: 21px; }
    .dashboard-page .dashboard-card p { margin-bottom: 18px; }
    .dashboard-page .rep-area { margin-top: 35px; padding: 21px 17px; }
    .dashboard-page .rep-heading { gap: 12px; }
    .dashboard-page .rep-heading h2 { font-size: 1.3rem; }
    .dashboard-page .dashboard-title { font-size: 1.55rem; }
    .dashboard-page .footer-content { padding: 28px 20px; }
    .announcement-card { flex-direction: column; gap: 12px; padding: 20px; }
    .announcement-date { flex-basis: auto; padding: 0; }
    .announcement-content h2 { font-size: 19px; }
    .announcement-content p { font-size: 14px; }
    .ask-question, .question-card { padding: 20px; }
    .question-card h3 { font-size: 17px; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 33px; }
    .hero-content > p:not(.welcome) { font-size: 15px; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .primary-btn, .secondary-btn { width: 100%; }
    .features > h2 { font-size: 25px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .page-header h1 { font-size: 25px; }
    .year-content { padding: 12px; }
    .year-buttons button { flex: 1 1 28%; min-width: 0; }
    th, td { padding: 9px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .feature-card,
    .primary-btn,
    .secondary-btn,
    .dashboard-page .dashboard-card,
    .dashboard-page .dashboard-explore,
    .dashboard-page .logout-btn,
    .dashboard-page .card-link span { transition: none; }
    .feature-card:hover,
    .primary-btn:hover,
    .secondary-btn:hover,
    .dashboard-page .dashboard-card:hover,
    .dashboard-page .dashboard-explore:hover { transform: none; }
}

/* =========================================================
   TIE DeKUT — TIMETABLE MANAGEMENT
   Scoped styles to preserve existing page designs
   ========================================================= */

#timetableManagement {
    max-width: 1000px;
    margin: 32px auto;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#timetableManagement h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.6rem;
    font-weight: 700;
}

#timetableManagement > p {
    margin: 0 0 24px;
    color: #64748b;
    line-height: 1.6;
}

#timetableManagement #timetableForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

#timetableManagement .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

#timetableManagement .form-group label {
    color: #334155;
    font-size: 0.92rem;
    font-weight: 600;
}

#timetableManagement .form-group input,
#timetableManagement .form-group select {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#timetableManagement .form-group input:focus,
#timetableManagement .form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#timetableManagement #saveTimetableButton,
#timetableManagement #cancelEditButton {
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#timetableManagement #saveTimetableButton {
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

#timetableManagement #saveTimetableButton:hover {
    background: #1d4ed8;
}

#timetableManagement #cancelEditButton {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

#timetableManagement #cancelEditButton:hover {
    background: #e2e8f0;
}

#timetableManagement button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#timetableManagement #timetableFormStatus {
    grid-column: 1 / -1;
    min-height: 20px;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Timetable edit/delete action buttons */

.timetable-section table td button[data-action] {
    display: inline-block;
    margin: 3px;
    padding: 7px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.timetable-section table td button[data-action="edit"]:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.timetable-section table td button[data-action="delete"] {
    color: #b91c1c;
}

.timetable-section table td button[data-action="delete"]:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Keep management layout comfortable on phones */

@media (max-width: 600px) {
    #timetableManagement {
        margin: 20px 12px;
        padding: 18px;
        border-radius: 12px;
    }

    #timetableManagement h2 {
        font-size: 1.35rem;
    }

    #timetableManagement #timetableForm {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #timetableManagement #saveTimetableButton,
    #timetableManagement #cancelEditButton {
        width: 100%;
    }

    .timetable-section table td button[data-action] {
        margin: 2px 0;
        padding: 7px 9px;
    }
}
/* =========================================
   TIE DeKUT Q&A PAGE IMPROVEMENTS
   Scoped to Q&A elements to protect other pages
========================================= */

.qna-section {
    width: min(100% - 32px, 1000px);
    margin: 36px auto;
}

.qna-section > h1 {
    margin-bottom: 10px;
    color: #1e293b;
}

.qna-section > p {
    color: #64748b;
    line-height: 1.7;
}

/* Question submission form */
#questionForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 36px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

#questionInput {
    width: 100%;
    min-height: 110px;
    padding: 14px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

#questionInput:focus,
.answer-input:focus {
    outline: 3px solid rgba(37, 99, 235, 0.15);
    border-color: #2563eb;
}

#questionForm button,
.answer-button {
    align-self: flex-start;
    padding: 11px 20px;
    color: #ffffff;
    background: #2563eb;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#questionForm button:hover,
.answer-button:hover {
    background: #1d4ed8;
}

#questionForm button:active,
.answer-button:active {
    transform: translateY(1px);
}

#questionForm button:disabled,
.answer-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#questionStatus,
.answer-status {
    margin: 4px 0 0;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Recent questions section */
.questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.questions > h2 {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: 1.6rem;
}

.question-card {
    min-width: 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.045);
    overflow-wrap: anywhere;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.question-label {
    display: inline-block;
    padding: 5px 10px;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.question-date,
.answer-date {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.question-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.question-author {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Answers */
.answers-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.answers-section h4 {
    margin: 0 0 14px;
    color: #1e293b;
    font-size: 1.05rem;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.answer {
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.answer-author {
    display: block;
    margin-bottom: 8px;
    color: #1d4ed8;
    font-size: 0.93rem;
    line-height: 1.5;
}

.answer p {
    margin: 0 0 10px;
    color: #334155;
    line-height: 1.75;
    white-space: pre-wrap;
}

.answer-date {
    display: block;
}

.answer-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
}

.answer-input {
    width: 100%;
    min-height: 85px;
    padding: 12px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    line-height: 1.6;
}

.answer-permission-note {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

.qna-empty {
    padding: 24px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

/* Keyboard accessibility */
#questionForm button:focus-visible,
.answer-button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

/* Mobile layout */
@media (max-width: 600px) {
    .qna-section {
        width: calc(100% - 24px);
        margin: 24px auto;
    }

    #questionForm,
    .question-card {
        padding: 16px;
    }

    .questions > h2 {
        font-size: 1.35rem;
    }

    .question-card h3 {
        font-size: 1.08rem;
    }

    .question-header {
        align-items: flex-start;
        flex-direction: column;
    }

    #questionForm button,
    .answer-button {
        width: 100%;
        min-height: 44px;
    }
}
