@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --mcd-red: #8b5cf6;
    --mcd-red-dark: #7142db;
    --mcd-yellow: #f4c96b;
    --mcd-yellow-soft: #fff0b8;
    --ink: #f8f6ff;
    --muted: #bdb8d5;
    --bg: #09071a;
    --card: rgba(25, 20, 55, .84);
    --line: rgba(201, 183, 255, .18);
    --shadow: 0 24px 70px rgba(2, 0, 15, .42);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(rgba(7,5,20,.54), rgba(9,7,26,.82)),
        radial-gradient(circle at 8% 14%, rgba(139,92,246,.18), transparent 24%),
        radial-gradient(circle at 90% 6%, rgba(244,201,107,.10), transparent 20%),
        url("celestial-background.png") center top / cover no-repeat,
        linear-gradient(145deg, #070514, #100b2b 55%, #09071a);
    background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* Login */
.login-page { min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: clamp(24px, 5vw, 64px); }
.brand-logo-wrap { display: inline-grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid rgba(244,201,107,.48); box-shadow: 0 14px 38px rgba(3,0,20,.32); }
.brand-logo-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; }
.login-page-logo { flex: 0 0 auto; width: 124px; height: 92px; padding: 7px; border-radius: 18px; }
.login-form-panel { width: 100%; display: grid; place-items: center; }
.login-stack { width: min(100%, 540px); display: grid; justify-items: center; }
.login-card { width: min(100%, 460px); padding: clamp(26px,4vw,42px); border: 1px solid var(--line); border-radius: 28px; background: rgba(17,13,42,.84); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-heading-row { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.login-welcome { margin: 0; color: var(--mcd-yellow); font-size: clamp(24px, 4vw, 34px); line-height: 1.14; letter-spacing: -1px; }
.login-card h2 { margin: 5px 0 8px; font-size: 38px; letter-spacing: -1px; }
.muted, .help-text { color: var(--muted); }
.help-text { font-size: 13px; margin-top: 24px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: 1.8px; font-weight: 900; }
.eyebrow.red { color: #cdb7ff; }
.eyebrow.yellow-dark { color: var(--mcd-yellow); }
.auth-form { display: grid; gap: 18px; margin-top: 32px; }
.auth-form label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
.auth-form input, .auth-form select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.07);
    color: var(--ink);
    border-radius: 14px;
    padding: 15px 16px;
    outline: none;
    transition: .2s ease;
}
.auth-form select option { background: #171132; color: #fff; }
.auth-form input:focus { border-color: #aa83ff; box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
.btn { border: 0; border-radius: 14px; padding: 15px 18px; font-weight: 850; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, #9f72ff, #7440df); color: #fff; box-shadow: 0 12px 30px rgba(110,62,222,.35); }
.btn-primary:hover { background: var(--mcd-red-dark); }
.alert { border-radius: 14px; padding: 13px 15px; margin-top: 20px; font-size: 14px; }
.alert.error { background: #fff0ef; color: #9d1811; border: 1px solid #ffd4d1; }
.alert.success { background: rgba(60,180,110,.14); color: #aaf0c2; border: 1px solid rgba(93,215,139,.3); }
.help-text a { color: var(--mcd-yellow); font-weight: 700; }
.login-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 22px; font-size: 13px; }
.login-actions a { color: var(--mcd-yellow); font-weight: 700; }
.login-account-request { margin-top: 4px; font-size: 13px; }
.login-account-request a { color: var(--mcd-yellow); font-weight: 700; }

/* Dashboard */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(8,6,27,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.brand-link { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.nav-logo { width: 62px; height: 46px; padding: 3px; border-radius: 12px; box-shadow: none; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-links a { padding: 10px 13px; border-radius: 11px; font-size: 14px; font-weight: 750; color: #d8d1ef; }
.nav-links a:hover, .nav-links a.active { background: rgba(139,92,246,.16); color: #f4c96b; }
.user-menu { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; }
.logout-link { color: var(--mcd-yellow); }
.menu-toggle { display: none; border: 1px solid var(--line); color: #fff; background: rgba(255,255,255,.08); width: 42px; height: 42px; border-radius: 12px; font-size: 20px; }

.page-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 60px; }
.hero-card {
    min-height: 150px;
    padding: clamp(28px, 5vw, 52px);
    border-radius: 28px;
    color: white;
    border: 1px solid rgba(218,199,255,.22);
    background:
        radial-gradient(circle at 82% 18%, rgba(244,201,107,.26), transparent 20%),
        radial-gradient(circle at 14% 86%, rgba(139,92,246,.34), transparent 30%),
        linear-gradient(135deg, rgba(28,20,70,.96), rgba(13,9,40,.96));
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    overflow: hidden;
    position: relative;
}
.hero-card::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(244,201,107,.28); border-radius: 50%; right: -100px; bottom: -120px; box-shadow: 0 0 60px rgba(139,92,246,.24); }
.hero-card h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; margin: 10px 0 14px; letter-spacing: -1.8px; }
.hero-card p:not(.eyebrow) { max-width: 680px; color: #d7d0ea; font-size: 17px; line-height: 1.6; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.quick-card { background: linear-gradient(145deg, rgba(31,24,70,.88), rgba(17,13,43,.9)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-height: 190px; display: grid; grid-template-rows: auto 1fr auto; gap: 16px; box-shadow: 0 14px 34px rgba(3,0,19,.22); transition: transform .2s ease, box-shadow .2s ease, border .2s ease; backdrop-filter: blur(12px); }
.quick-card:hover { transform: translateY(-4px); border-color: rgba(244,201,107,.56); box-shadow: var(--shadow); }
.quick-icon { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(145deg, rgba(244,201,107,.22), rgba(139,92,246,.28)); border: 1px solid rgba(244,201,107,.22); display: grid; place-items: center; font-size: 23px; }
.quick-card h3 { margin: 0 0 7px; font-size: 18px; }
.quick-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.arrow { color: var(--mcd-yellow); font-weight: 900; font-size: 20px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 16px 38px rgba(3,0,19,.2); backdrop-filter: blur(12px); }
.panel-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.panel-header h2 { margin: 5px 0 18px; font-size: 25px; }
.panel-header a { color: var(--mcd-red); font-size: 13px; font-weight: 800; }
.info-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.info-row span { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 24px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; max-width: 1240px; margin: 0 auto; }

@media (max-width: 980px) {
    .topbar-inner { grid-template-columns: auto auto 1fr; }
    .menu-toggle { display: inline-grid; place-items: center; justify-self: end; }
    .nav-links { display: none; grid-column: 1 / -1; width: 100%; align-items: stretch; padding-top: 8px; }
    .nav-links.open { display: grid; }
    .nav-links a { padding: 13px 14px; }
    .user-menu { justify-self: end; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .login-heading-row { gap: 14px; }
    .login-page-logo { width: 100px; height: 76px; }
    .login-welcome { font-size: 24px; }
    .topbar-inner { padding: 10px 14px; grid-template-columns: auto auto; }
    .brand-copy small, .user-menu > span { display: none; }
    .user-menu { display: none; }
    .menu-toggle { justify-self: end; }
    .page-wrap { padding: 18px 14px 40px; }
    .hero-card { min-height: 0; padding: 28px 22px; align-items: flex-start; }
    .hero-card h1 { font-size: 36px; }
    .hero-card p:not(.eyebrow) { font-size: 15px; }
    .quick-grid { grid-template-columns: 1fr; }
    .quick-card { min-height: 0; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr; align-items: center; padding: 18px; }
    .quick-card p { display: none; }
    .panel { padding: 20px; }
    .site-footer { display: grid; gap: 7px; padding: 20px 14px; }
}
