/* SVC AGILE AI – responsive portal styles */
:root {
    --ink: #1e1b4b;
    --muted: #64748b;
    --brand: #4f46e5;
    --brand-2: #7c3aed;
    --accent: #06b6d4;
    --ok: #059669;
    --err: #dc2626;
    --warn: #d97706;
    --line: #e2e8f0;
    --card: rgba(255, 255, 255, .88);
    --radius: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; color: var(--ink); background: #f5f6ff;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4rem; line-height: 1.25; }
p { margin: 0 0 .8rem; }

/* ---------- guest pages ---------- */
.guest-body {
    display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: #eef2ff url('../images/ai-education-bg.svg') center / cover no-repeat fixed;
}
.guest-body::before { content: ''; position: fixed; inset: 0; background: rgba(255, 255, 255, .45); pointer-events: none; }
.auth-wrap { position: relative; width: 100%; max-width: 580px; }
.auth-card {
    background: var(--card); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .9); border-radius: 24px; padding: 36px 44px 30px;
    box-shadow: 0 25px 60px -15px rgba(79, 70, 229, .35), 0 6px 18px rgba(30, 27, 75, .08);
    animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.logo {
    width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 26px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2) 60%, var(--accent));
    color: #fff; font-size: 38px; box-shadow: 0 14px 30px -8px rgba(79, 70, 229, .6);
}
.brand-name { text-align: center; font-size: 1.7rem; font-weight: 800; letter-spacing: .5px; }
.brand-name span { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.tagline { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.page-title { text-align: center; font-size: 1.3rem; font-weight: 700; margin-top: 4px; }
.page-sub { text-align: center; color: var(--muted); font-size: .93rem; margin-bottom: 18px; }

.cta-btn {
    width: 100%; border: 0; cursor: pointer; color: #fff; font: 700 1rem/1.2 inherit; font-family: inherit;
    padding: 16px 18px; border-radius: 14px; letter-spacing: .6px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 24px -8px rgba(79, 70, 229, .65); transition: transform .15s, box-shadow .15s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -8px rgba(79, 70, 229, .75); }
.cta-btn i { margin: 0 6px; color: #fde68a; animation: twinkle 1.8s infinite ease-in-out; }
@keyframes twinkle { 50% { transform: scale(1.35) rotate(15deg); opacity: .75; } }

.hidden { display: none !important; }
.js .collapsed { display: none; }
html:not(.js) #openAuth { display: none; }
.tabs { display: flex; background: #eef0ff; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tab {
    flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; cursor: pointer;
    font: 600 .95rem inherit; font-family: inherit; color: var(--muted);
}
.tab.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(79, 70, 229, .18); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 5px; }
.input-wrap { position: relative; }
.input-wrap > i.lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.input {
    width: 100%; padding: 13px 14px 13px 42px; font: 500 1rem inherit; font-family: inherit; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .15); }
.input.is-invalid { border-color: var(--err); }
.toggle-pw { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #94a3b8; cursor: pointer; padding: 8px; }
.input-wrap.has-toggle .input { padding-right: 44px; }
.field-error { color: var(--err); font-size: .82rem; margin-top: 5px; display: flex; gap: 6px; align-items: flex-start; }
.hint { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .86rem; margin-bottom: 14px; }
.btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 100%; border: 0; cursor: pointer;
    padding: 14px 18px; border-radius: 12px; font: 700 1rem inherit; font-family: inherit; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .6);
    transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.btn-ghost { background: #fff; color: var(--brand); border: 1.5px solid #c7d2fe; box-shadow: none; }
.btn-sm { width: auto; padding: 9px 16px; font-size: .9rem; }
.divider { display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: .8rem; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.secure-note { display: flex; gap: 8px; justify-content: center; align-items: center; color: var(--muted); font-size: .78rem; margin-top: 18px; text-align: center; }
.otp-input { text-align: center; letter-spacing: .6em; font-size: 1.7rem; font-weight: 700; padding: 14px 8px 14px 18px; }
.back-link { display: block; text-align: center; margin-top: 16px; font-size: .9rem; }

/* ---------- alerts ---------- */
.alert {
    display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; margin-bottom: 16px;
    font-size: .92rem; border: 1px solid; animation: rise .35s ease both; position: relative;
}
.alert i.ico { font-size: 1.25rem; margin-top: 1px; }
.alert strong { display: block; margin-bottom: 1px; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert .close { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; opacity: .6; font-size: 1rem; }

/* ---------- app layout ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 24px; background: linear-gradient(135deg, #312e81, #4f46e5 60%, #7c3aed); color: #fff;
    box-shadow: 0 6px 20px -8px rgba(49, 46, 129, .6);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: #fff; }
.topbar .brand .mini { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.nav { display: flex; gap: 6px; }
.nav a { color: #e0e7ff; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .95rem; display: inline-flex; gap: 8px; align-items: center; }
.nav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.nav a.active { background: #fff; color: var(--brand); }
.user-menu { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.user-meta { line-height: 1.2; font-size: .85rem; }
.user-meta small { color: #c7d2fe; }
.logout-btn { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; padding: 8px 14px; border-radius: 10px; cursor: pointer; font: 600 .88rem inherit; font-family: inherit; }
.logout-btn:hover { background: rgba(255, 255, 255, .15); }
.menu-toggle { display: none; border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 40px; height: 40px; border-radius: 10px; font-size: 1.1rem; cursor: pointer; }

.container { max-width: 1760px; margin: 0 auto; padding: 28px 20px 60px; }
.hero {
    border-radius: 22px; padding: 30px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #06b6d4); box-shadow: 0 20px 40px -18px rgba(79, 70, 229, .7);
}
.hero::after { content: '\f19d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: -10px; bottom: -40px; font-size: 11rem; opacity: .12; }
.hero h1 { font-size: 1.7rem; }
.hero p { opacity: .92; max-width: 560px; margin: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 24px -14px rgba(30, 27, 75, .25); }
.panel h3 { font-size: 1.05rem; display: flex; gap: 10px; align-items: center; }
.panel h3 i { color: var(--brand); }
.info-box { border-left: 5px solid var(--brand); background: linear-gradient(90deg, #eef2ff, #fff); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.kv:last-child { border: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; word-break: break-word; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: #d1fae5; color: #065f46; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty i { font-size: 3rem; color: #c7d2fe; margin-bottom: 12px; }
.toast-zone { position: fixed; top: 76px; right: 16px; left: 16px; max-width: 420px; margin-left: auto; z-index: 50; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
    .topbar { padding: 10px 14px; flex-wrap: wrap; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .nav { display: none; order: 3; width: 100%; flex-direction: column; padding-top: 8px; }
    .nav.open { display: flex; }
    .user-meta { display: none; }
    .container { padding: 18px 14px 50px; }
    .hero { padding: 22px; }
    .hero h1 { font-size: 1.35rem; }
}
@media (max-width: 420px) {
    .auth-card { padding: 28px 18px 22px; border-radius: 20px; }
    .input, .otp-input { font-size: 16px; } /* stops iOS zoom on focus */
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .auth-card { background: rgba(255, 255, 255, .96); } }

/* login card: college logo, programme title, contact block */
.logo.logo-img { width: 96px; height: 96px; border-radius: 50%; padding: 5px; background: #fff; border: 3px solid #f2b134; box-shadow: 0 0 0 5px rgba(242, 177, 52, .22), 0 14px 30px -10px rgba(79, 70, 229, .5); }
.logo.logo-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
.brand-title { text-align: center; margin-bottom: 6px; }
.bt-kicker { display: block; color: #b7791f; font-weight: 800; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; }
.bt-main { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.3; margin-top: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.auth-card .prog-contact { display: grid; gap: 7px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(90deg, #eef2ff, #fff); font-size: .86rem; }
.auth-card .prog-contact strong { color: var(--brand); flex-basis: auto; font-size: .72rem; }
.auth-card .prog-contact strong:not(:first-child) { margin-top: 6px; }
.auth-card .prog-contact a, .auth-card .prog-contact .plain { color: var(--ink); }
.auth-card .prog-contact a:hover { color: var(--brand); }
.auth-card .prog-contact i { color: var(--brand); }
@media (max-width: 640px) { .auth-card { padding: 30px 22px 24px; } }

/* ---------- dashboard: col-md-8 / col-md-4 ---------- */
.dash-cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); margin-top: 22px; align-items: start; }
.dash-main, .dash-side { min-width: 0; }
.dash-side { display: grid; gap: 18px; }
@media (min-width: 1200px) { .dash-cols { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (min-width: 1500px) { .dash-cols { gap: 28px; } }

.pay-card {
    position: relative; overflow: hidden; border-radius: 22px; padding: 26px 24px 22px; color: #fff; text-align: center;
    background: linear-gradient(145deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
    box-shadow: 0 22px 44px -18px rgba(79, 70, 229, .75);
}
.pay-card::before, .pay-card::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.pay-card::before { width: 220px; height: 220px; right: -80px; top: -90px; background: radial-gradient(circle, rgba(252, 211, 77, .35), transparent 70%); }
.pay-card::after { width: 200px; height: 200px; left: -90px; bottom: -100px; background: radial-gradient(circle, rgba(6, 182, 212, .35), transparent 70%); }
.pay-card > * { position: relative; z-index: 1; }
.pay-ribbon { position: absolute !important; top: 14px; right: 14px; background: #fde68a; color: #92400e; font-size: .7rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.pay-icon { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; font-size: 1.5rem; color: #92400e; background: linear-gradient(135deg, #fde68a, #fbbf24); box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .5); }
.pay-title { font-size: 1.3rem; font-weight: 800; margin: 0; }
.pay-sub { color: #c7d2fe; font-size: .88rem; margin: 2px 0 8px; }
.pay-amount { font-size: 3.4rem; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.pay-amount small { font-size: 1.6rem; vertical-align: top; margin-right: 3px; color: #fde68a; }
.pay-list { list-style: none; margin: 14px 0 18px; padding: 14px 0 0; border-top: 1px dashed rgba(255, 255, 255, .3); text-align: left; font-size: .84rem; color: #e0e7ff; display: grid; gap: 8px; }
.pay-list li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.4; }
.pay-list i { color: #86efac; margin-top: 3px; }
.pay-btn {
    display: flex; justify-content: center; align-items: center; gap: 10px; padding: 15px 18px; border-radius: 14px; font-weight: 800; font-size: 1.05rem;
    color: #3b2a00; background: linear-gradient(135deg, #fde68a, #fbbf24); box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .55); transition: transform .15s;
}
.pay-btn:hover { transform: translateY(-2px); text-decoration: none; }
.pay-secure { margin-top: 12px; font-size: .76rem; color: #c7d2fe; display: flex; gap: 7px; justify-content: center; align-items: center; }

/* entrance to the separate administrator login, shown under the applicant login */
.staff-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; border: 1.5px dashed #c7d2fe; background: #f5f6ff; color: #4338ca; font-weight: 700; font-size: .88rem; }
.staff-link:hover { background: #eef2ff; border-color: #6366f1; text-decoration: none; }
