/* ===========================
   Rice University — Modern CSS
   =========================== */

:root {
    --primary: #00205B;          /* Rice Navy */
    --primary-dark: #001443;
    --accent: #B7B7B7;
    --gold: #D6A419;
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --text: #1c2340;
    --text-muted: #5a6378;
    --border: #e4e8ef;
    --success: #2ecc71;
    --danger: #e74c3c;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 32, 91, 0.10);
    --shadow-lg: 0 20px 48px rgba(0, 32, 91, 0.18);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --transition: 0.3s cubic-bezier(.4,.2,.2,1);
    --container: 1200px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--primary); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b9880d; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; }

/* ===== Header / Navigation ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 800; color: var(--primary); font-size: 1.15rem; }
.brand .logo {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary);
    display: grid; place-items: center;
    color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
    box-shadow: inset 0 0 0 3px var(--gold);
}
.brand .brand-sub { display: block; font-size: 0.7rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-menu a { font-weight: 500; color: var(--text); position: relative; padding: 0.4rem 0; transition: color var(--transition); }
.nav-menu a::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; background: var(--gold); transition: width var(--transition);
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-actions { display: flex; gap: 0.6rem; align-items: center; }
.nav-actions .btn { padding: 0.55rem 1.25rem; font-size: 0.9rem; }

.hamburger {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative;
}
.hamburger span {
    position: absolute; left: 8px; height: 2px; width: 24px;
    background: var(--primary); transition: var(--transition);
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }
.hamburger.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 88vh;
    display: grid;
    place-items: center;
    padding: 6rem 1.5rem 5rem;
    background:
        linear-gradient(135deg, rgba(0, 20, 67, 0.85), rgba(0, 32, 91, 0.55)),
        url('https://images.unsplash.com/photo-1562774053-701939374585?auto=format&fit=crop&w=1920&q=80') center/cover;
    color: #fff;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at 20% 30%, rgba(214, 164, 25, 0.25), transparent 60%);
    pointer-events: none;
}
.hero-content { position: relative; text-align: center; max-width: 920px; z-index: 1; }
.hero .kicker {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}
.hero h1 { color: #fff; margin-bottom: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.hero h1 span { color: var(--gold); font-style: italic; }
.hero p { font-size: 1.15rem; max-width: 680px; margin: 0 auto 2.25rem; opacity: 0.92; }
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* Stats Bar */
.stats-bar {
    position: relative;
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 900px;
    margin-left: auto; margin-right: auto;
    backdrop-filter: blur(10px);
    z-index: 1;
}
.stats-bar > div {
    padding: 1.5rem 1rem;
    background: rgba(0, 20, 67, 0.4);
    text-align: center;
}
.stats-bar strong { display: block; font-family: var(--font-heading); font-size: 2rem; color: var(--gold); }
.stats-bar span { font-size: 0.85rem; opacity: 0.9; }

/* ===== Sections ===== */
section { padding: 5rem 0; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head .eyebrow {
    color: var(--gold); font-weight: 600; font-size: 0.85rem;
    letter-spacing: 0.2em; text-transform: uppercase; display: block; margin-bottom: 0.5rem;
}
.section-head p { color: var(--text-muted); max-width: 680px; margin: 1rem auto 0; }

.bg-alt { background: var(--bg-alt); }

/* Features / About */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: #fff;
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-icon {
    width: 56px; height: 56px; border-radius: var(--radius-sm);
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #003580);
    color: #fff; font-size: 1.5rem; margin-bottom: 1.25rem;
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Programs */
.programs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.program-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 340px;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    isolation: isolate;
}
.program-card::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-size: cover; background-position: center;
    transition: transform 0.8s ease;
}
.program-card::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, rgba(0, 20, 67, 0.92) 10%, rgba(0, 20, 67, 0.3) 60%, transparent);
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.program-card:hover::before { transform: scale(1.08); }
.program-card .tag {
    position: absolute; top: 1.25rem; left: 1.25rem;
    background: var(--gold); color: #111;
    padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.05em;
}
.program-card h3 { color: #fff; font-size: 1.35rem; margin-bottom: 0.4rem; }
.program-card p { font-size: 0.9rem; opacity: 0.9; }

.program-card.p1::before { background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&w=800&q=80'); }
.program-card.p2::before { background-image: url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=800&q=80'); }
.program-card.p3::before { background-image: url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=800&q=80'); }
.program-card.p4::before { background-image: url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=800&q=80'); }
.program-card.p5::before { background-image: url('https://images.unsplash.com/photo-1576086213369-97a306d36557?auto=format&fit=crop&w=800&q=80'); }
.program-card.p6::before { background-image: url('https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=800&q=80'); }

/* About Split */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split .eyebrow { color: var(--gold); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; }
.split h2 { margin: 0.6rem 0 1rem; }
.split ul { list-style: none; margin-top: 1.25rem; }
.split ul li { padding: 0.5rem 0 0.5rem 1.75rem; position: relative; color: var(--text-muted); }
.split ul li::before {
    content: '✓'; position: absolute; left: 0; top: 0.45rem;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold); color: #fff;
    font-size: 0.75rem; display: grid; place-items: center; font-weight: 700;
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.testimonial {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gold);
    position: relative;
}
.testimonial::before {
    content: '\201C';
    position: absolute; top: -10px; right: 20px;
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.25;
    line-height: 1;
}
.testimonial p { color: var(--text-muted); font-style: italic; margin-bottom: 1.25rem; }
.testimonial-author { display: flex; align-items: center; gap: 0.85rem; }
.testimonial-author .avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff; display: grid; place-items: center;
    font-weight: 700;
}
.testimonial-author strong { display: block; color: var(--primary); }
.testimonial-author small { color: var(--text-muted); }

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 5rem 1.5rem;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 4rem auto;
    max-width: calc(var(--container) - 3rem);
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(600px circle at 10% 20%, rgba(214,164,25,0.25), transparent 50%),
        radial-gradient(500px circle at 90% 80%, rgba(255,255,255,0.15), transparent 60%);
}
.cta-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta h2 { color: #fff; }
.cta p { opacity: 0.92; margin: 1rem 0 2rem; }

/* ===== Footer ===== */
.site-footer {
    background: #0a1532;
    color: #bfc7dc;
    padding: 4rem 1.5rem 1.5rem;
}
.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2.5rem;
}
.footer-grid h4 { color: #fff; margin-bottom: 1.25rem; font-size: 1rem; font-family: var(--font-body); letter-spacing: 0.05em; text-transform: uppercase; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 0.6rem; }
.footer-grid ul a { transition: color var(--transition); font-size: 0.92rem; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-brand p { font-size: 0.92rem; margin-top: 1rem; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand .brand-sub { color: var(--gold); }
.socials { display: flex; gap: 0.7rem; margin-top: 1.5rem; }
.socials a {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.08);
    transition: var(--transition);
}
.socials a:hover { background: var(--gold); color: #111; transform: translateY(-3px); }
.footer-bottom {
    max-width: var(--container); margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center; font-size: 0.85rem; color: #8892b0;
}

/* ===== Auth Pages (Login / Register) ===== */
.auth-wrap {
    min-height: calc(100vh - 90px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-alt);
}
.auth-side {
    position: relative;
    padding: 4rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0,20,67,0.88), rgba(0,32,91,0.85)),
        url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?auto=format&fit=crop&w=1200&q=80') center/cover;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-side::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(500px circle at 20% 30%, rgba(214,164,25,0.3), transparent 60%);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { color: #fff; margin-bottom: 1rem; font-size: 2.3rem; }
.auth-side p { opacity: 0.9; font-size: 1.05rem; }
.auth-features { margin-top: 2rem; list-style: none; }
.auth-features li { padding: 0.5rem 0 0.5rem 2rem; position: relative; opacity: 0.9; }
.auth-features li::before {
    content: '✓'; position: absolute; left: 0; top: 0.55rem;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold); color: #111;
    font-weight: 700; font-size: 0.8rem;
    display: grid; place-items: center;
}

.auth-form-wrap {
    display: grid; place-items: center;
    padding: 3rem 2rem;
}
.auth-form {
    background: #fff;
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 480px;
}
.auth-form h1 { color: var(--primary); font-size: 2rem; margin-bottom: 0.4rem; }
.auth-form > p { color: var(--text-muted); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #fff;
    color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 32, 91, 0.12);
}
.form-group .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-group .error { font-size: 0.82rem; color: var(--danger); margin-top: 0.35rem; display: none; }
.form-group.invalid input, .form-group.invalid select { border-color: var(--danger); }
.form-group.invalid .error { display: block; }

.input-icon { position: relative; }
.input-icon input { padding-left: 2.75rem; }
.input-icon .icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none;
}
.toggle-pw {
    position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.25rem;
}

.check-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.88rem; }
.check-row label { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-muted); cursor: pointer; }
.check-row a { color: var(--primary); font-weight: 600; }

.form-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.75rem 0 1.25rem;
    color: var(--text-muted); font-size: 0.82rem;
}
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.social-login { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.social-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.88rem; color: var(--text);
    cursor: pointer; transition: var(--transition);
}
.social-btn:hover { border-color: var(--primary); transform: translateY(-2px); }

.auth-footer-text { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.92rem; }
.auth-footer-text a { color: var(--primary); font-weight: 700; }

/* Flash notification */
.flash {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    display: none;
}
.flash.show { display: block; animation: slideDown 0.4s ease; }
.flash.success { background: #e8f9ef; color: #1d7a42; border-left: 4px solid var(--success); }
.flash.error { background: #fdecec; color: #9b1f1f; border-left: 4px solid var(--danger); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Sub-page hero ===== */
.page-hero {
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px circle at 30% 20%, rgba(214,164,25,0.25), transparent 60%);
}
.page-hero h1 { color: #fff; position: relative; }
.page-hero p { opacity: 0.9; margin-top: 1rem; position: relative; max-width: 640px; margin-left: auto; margin-right: auto; }
.breadcrumb { position: relative; font-size: 0.88rem; opacity: 0.85; margin-top: 1rem; }
.breadcrumb a { color: var(--gold); }

/* ===== Dashboard (Portal Murid) ===== */
.portal { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 70px); background: var(--bg-alt); }

/* Sidebar */
.sidebar {
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}
.sidebar .profile-mini {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.sidebar .profile-mini .avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
    flex-shrink: 0;
}
.sidebar .profile-mini .info { min-width: 0; flex: 1; }
.sidebar .profile-mini .name { font-weight: 700; color: var(--primary); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .profile-mini .nim { color: var(--text-muted); font-size: 0.78rem; }

.sidebar-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin: 1rem 0.6rem 0.5rem; }

.sidebar nav a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500; font-size: 0.93rem;
    transition: var(--transition);
    margin-bottom: 0.15rem;
    cursor: pointer;
    border: 1px solid transparent;
}
.sidebar nav a:hover { background: var(--bg-alt); }
.sidebar nav a.active {
    background: var(--primary); color: #fff;
    box-shadow: 0 6px 16px rgba(0,32,91,0.25);
}
.sidebar nav a .ico {
    width: 22px; height: 22px; display: grid; place-items: center; font-size: 1rem;
}
.sidebar-logout {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.7rem;
    background: transparent; border: 1.5px solid var(--border);
    color: var(--danger); font-weight: 600; cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-logout:hover { border-color: var(--danger); background: #fdecec; }

/* Main content */
.portal-main { padding: 2rem 2rem 3rem; min-width: 0; }
.portal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap; gap: 1rem;
}
.portal-header h1 { font-size: 1.8rem; margin: 0; }
.portal-header .semester-chip {
    background: #fff; border: 1px solid var(--border);
    padding: 0.5rem 1rem; border-radius: 999px;
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.portal-header .semester-chip strong { color: var(--primary); }

.panel { display: none; animation: panelIn 0.3s ease; }
.panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Stat cards */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 1.75rem; }
.dash-card {
    background: #fff;
    padding: 1.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.dash-card::before {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
    background: var(--primary);
}
.dash-card.c-gold::before { background: var(--gold); }
.dash-card.c-success::before { background: var(--success); }
.dash-card.c-danger::before { background: var(--danger); }
.dash-card .label { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.dash-card .value { font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary); margin-top: 0.3rem; line-height: 1.1; }
.dash-card .sub { font-size: 0.78rem; color: var(--success); margin-top: 0.25rem; }
.dash-card .sub.muted { color: var(--text-muted); }

/* Panel blocks */
.panel-block {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.panel-block-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap; gap: 0.5rem;
}
.panel-block-head h3 { font-family: var(--font-heading); color: var(--primary); font-size: 1.2rem; margin: 0; }
.panel-block-head .action-btn {
    background: transparent; border: 1.5px solid var(--primary); color: var(--primary);
    padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
}
.panel-block-head .action-btn:hover { background: var(--primary); color: #fff; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg-alt); }
.data-table tbody tr:hover { background: var(--bg-alt); }
.data-table td strong { color: var(--primary); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.success { background: #e8f9ef; color: #1d7a42; }
.badge.warning { background: #fff7e0; color: #8a6100; }
.badge.danger { background: #fdecec; color: #9b1f1f; }
.badge.info { background: #e6f0ff; color: #1c3e7a; }
.badge.muted { background: #eef0f5; color: var(--text-muted); }

/* Progress bar */
.progress { height: 8px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 999px; }

/* Schedule timeline */
.week-schedule { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }
.week-day {
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    min-height: 220px;
}
.week-day h4 { font-family: var(--font-body); font-size: 0.85rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.75rem; text-align: center; }
.week-slot {
    background: #fff;
    border-left: 3px solid var(--primary);
    padding: 0.65rem 0.7rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    box-shadow: var(--shadow-sm);
}
.week-slot.accent { border-left-color: var(--gold); }
.week-slot.success { border-left-color: var(--success); }
.week-slot.danger { border-left-color: var(--danger); }
.week-slot .time { color: var(--text-muted); font-size: 0.74rem; font-weight: 600; }
.week-slot .course { color: var(--primary); font-weight: 700; margin: 0.15rem 0; }
.week-slot .room { color: var(--text-muted); font-size: 0.76rem; }

/* GPA hero */
.gpa-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: var(--radius);
    padding: 2rem; display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
    position: relative; overflow: hidden;
    margin-bottom: 1.25rem;
}
.gpa-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(500px circle at 20% 30%, rgba(214,164,25,0.3), transparent 60%);
}
.gpa-hero > * { position: relative; z-index: 1; }
.gpa-ring {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--ipk, 3.78) * 25%), rgba(255,255,255,0.2) 0);
    display: grid; place-items: center;
    padding: 8px;
}
.gpa-ring-inner {
    width: 100%; height: 100%;
    background: var(--primary); border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-heading); font-size: 2rem; font-weight: 700;
}
.gpa-hero .gpa-info h2 { color: #fff; font-size: 1.6rem; margin-bottom: 0.25rem; }
.gpa-hero .gpa-info p { opacity: 0.88; font-size: 0.95rem; }
.gpa-hero .stats { display: flex; gap: 2rem; margin-top: 0.75rem; flex-wrap: wrap; }
.gpa-hero .stats strong { display: block; font-family: var(--font-heading); font-size: 1.3rem; color: var(--gold); }
.gpa-hero .stats span { font-size: 0.8rem; opacity: 0.85; }

/* Tagihan / finance */
.invoice-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; background: var(--bg-alt); border-radius: var(--radius-sm);
    margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem;
}
.invoice-card .title { font-weight: 700; color: var(--primary); }
.invoice-card .sub { font-size: 0.82rem; color: var(--text-muted); }
.invoice-card .amount { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--text); }

/* Assignments */
.task-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    align-items: center;
}
.task-check {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--border);
    display: grid; place-items: center;
    cursor: pointer; color: transparent; font-size: 0.7rem; font-weight: 900;
    transition: var(--transition);
    background: #fff;
}
.task-check.done { background: var(--success); border-color: var(--success); color: #fff; }
.task-item.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-title { font-weight: 600; color: var(--text); }
.task-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }

/* E-Learning */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.course-thumb {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.course-thumb:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-thumb .cover {
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff; display: grid; place-items: center;
    font-family: var(--font-heading); font-size: 1.3rem; padding: 1rem; text-align: center;
}
.course-thumb .body { padding: 1rem; }
.course-thumb .body strong { display: block; color: var(--primary); margin-bottom: 0.25rem; }
.course-thumb .body small { color: var(--text-muted); font-size: 0.82rem; }
.course-thumb .meta { display: flex; justify-content: space-between; margin-top: 0.75rem; font-size: 0.78rem; color: var(--text-muted); }

/* Library */
.book-item {
    display: grid; grid-template-columns: 60px 1fr auto;
    gap: 1rem; padding: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    align-items: center; margin-bottom: 0.6rem;
}
.book-cover {
    width: 60px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: 4px;
    display: grid; place-items: center;
    color: #fff; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
}

/* Profile */
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.profile-form .full { grid-column: 1 / -1; }

/* Mobile */
@media (max-width: 960px) {
    .portal { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        width: 280px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-md);
    }
    .sidebar.open { transform: translateX(0); }
    .portal-main { padding: 1.25rem; }
    .week-schedule { grid-template-columns: 1fr; }
    .gpa-hero { grid-template-columns: 1fr; text-align: center; }
    .gpa-hero .stats { justify-content: center; }
    .profile-form { grid-template-columns: 1fr; }
    .sidebar-toggle {
        display: inline-grid !important;
    }
}
.sidebar-toggle {
    display: none;
    place-items: center;
    background: var(--primary); color: #fff;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    border: none; cursor: pointer; font-size: 1.2rem;
}
body[data-page="dashboard"] .nav-actions {
    position: static !important;
    transform: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
}
body[data-page="dashboard"] .nav-actions .btn { width: auto; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .split { grid-template-columns: 1fr; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { padding: 3rem 2rem; min-height: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu, .nav-actions {
        position: fixed;
        top: 70px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.8rem;
        transform: translateY(-120%);
        transition: transform 0.35s ease;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.active, .nav-actions.active { transform: translateY(0); }
    .nav-actions.active { top: auto; }
    .nav-menu { align-items: stretch; }
    .nav-menu a { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .nav-actions { flex-direction: column; padding-top: 0; }
    .nav-actions .btn { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    section { padding: 3.5rem 0; }
    .auth-form { padding: 2rem 1.5rem; }
    .hero { min-height: 75vh; padding: 4rem 1.5rem 3rem; }
    .cta { margin: 2rem 1rem; padding: 3rem 1.5rem; }
    .social-login { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
}

/* Fade-in animation for scrolling */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Disclaimer Modal ===== */
.disclaimer-overlay {
    position: fixed; inset: 0;
    background: rgba(8, 15, 40, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    animation: overlayIn 0.35s ease;
}
.disclaimer-overlay.show { display: flex; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.disclaimer-card {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: cardIn 0.45s cubic-bezier(.2,.8,.2,1);
    position: relative;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.disclaimer-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 2rem 1.75rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.disclaimer-header::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(400px circle at 50% 0%, rgba(214,164,25,0.35), transparent 70%);
}
.disclaimer-icon {
    position: relative;
    display: inline-grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--gold); color: #111;
    font-size: 1.8rem; font-weight: 800;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(214,164,25,0.4);
}
.disclaimer-header h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0;
    position: relative;
}
.disclaimer-header .subtitle {
    position: relative;
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.85rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.disclaimer-body {
    padding: 1.75rem;
    color: var(--text);
}
.disclaimer-body p { color: var(--text-muted); margin-bottom: 0.9rem; font-size: 0.95rem; }
.disclaimer-body ul {
    list-style: none;
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--gold);
}
.disclaimer-body ul li {
    font-size: 0.88rem;
    color: var(--text);
    padding: 0.25rem 0 0.25rem 1.4rem;
    position: relative;
}
.disclaimer-body ul li::before {
    content: '•'; color: var(--gold);
    position: absolute; left: 0.4rem; font-weight: 900;
}
.disclaimer-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.disclaimer-actions .btn { flex: 1; }
.disclaimer-remember {
    display: flex; align-items: center; gap: 0.55rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    justify-content: center;
}

@media (max-width: 480px) {
    .disclaimer-actions { flex-direction: column; }
}
