:root {
    --bg-main: #f4f9fc;
    --bg-soft: rgba(255, 255, 255, 0.72);
    --bg-strong: #ffffff;
    --text-main: #00090d;
    --text-soft: #526476;
    --line: rgba(8, 19, 28, 0.10);
    --accent: #1f72d4;
    --accent-deep: #163a66;
    --accent-ink: #00090d;
    --accent-sand: #e9f4fb;
    --shadow-soft: 0 20px 60px rgba(8, 19, 28, 0.09);
    --radius-xl: 8px;
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --font-main: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: var(--text-main);
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 58%, #eef6fb 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.shell-body {
    min-height: 100vh;
}

.shell-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--line);
}

.shell-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-mark {
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.brand-title {
    font-size: 1.18rem;
    font-weight: 700;
}

.shell-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

.shell-nav-link,
.shell-logout {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.96rem;
    font-weight: 600;
    transition: 0.22s ease;
}

.shell-nav-link:hover,
.shell-logout:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.75);
}

.shell-nav-link.is-active {
    background: var(--accent-ink);
    color: #ffffff;
}

.shell-logout {
    color: var(--accent-deep);
    background: rgba(31, 114, 212, 0.10);
}

.shell-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 24px 48px;
}

.home-shell {
    display: grid;
    gap: 18px;
}

.home-hero {
    min-height: 210px;
    display: grid;
    align-items: end;
    padding: 30px;
    border: 1px solid rgba(8, 19, 28, 0.08);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 52%, rgba(238, 248, 253, 0.82) 100%),
        url("/static/images/uiu.jpg?v=20260630-stp-v7") right center / auto 100% no-repeat;
    box-shadow: var(--shadow-soft);
}

.home-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 760px;
    margin: 12px 0 0;
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.02;
    letter-spacing: 0;
}

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

.home-card {
    min-height: 260px;
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(8, 19, 28, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 38px rgba(8, 19, 28, 0.07);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.home-card:hover {
    border-color: rgba(31, 114, 212, 0.22);
    background: #f9fdff;
}

.home-card-primary {
    color: #ffffff;
    background: linear-gradient(155deg, #00090d, #163a66);
}

.home-card-primary:hover {
    background: linear-gradient(155deg, #00090d, #1f72d4);
}

.home-card-primary p,
.home-card-primary .home-card-link {
    color: rgba(255, 255, 255, 0.78);
}

.home-card-tag {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    background: #e9f4fb;
    color: #163a66;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-card-primary .home-card-tag {
    background: rgba(94, 192, 227, 0.18);
    color: #ffffff;
}

.home-card h2 {
    margin: 0;
    font-size: 1.42rem;
    line-height: 1.15;
}

.home-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    text-wrap: pretty;
}

.home-card-link {
    color: var(--accent-deep);
    font-weight: 700;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 22px;
    align-items: stretch;
}

.dashboard-copy,
.hero-sidecard,
.info-panel,
.menu-card,
.auth-card {
    background: var(--bg-soft);
    border: 1px solid rgba(8, 19, 28, 0.08);
    box-shadow: var(--shadow-soft);
}

.dashboard-copy,
.hero-sidecard,
.info-panel {
    border-radius: var(--radius-xl);
}

.dashboard-copy {
    padding: 34px;
}

.hero-pill,
.auth-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-deep);
    background: rgba(31, 114, 212, 0.10);
}

.dashboard-copy h1 {
    margin: 18px 0 12px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.98;
}

.dashboard-copy p,
.hero-sidecard-note,
.info-panel-item span,
.auth-description,
.auth-note {
    color: var(--text-soft);
    line-height: 1.65;
}

.hero-sidecard {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.hero-sidecard-label {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

.hero-sidecard-value {
    font-size: 1.52rem;
    font-weight: 800;
    line-height: 1.15;
}

.menu-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.menu-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: var(--radius-xl);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.menu-card::after {
    display: none;
}

.menu-card:hover {
    border-color: rgba(31, 114, 212, 0.22);
    background: #f9fdff;
}

.menu-card-warm {
    background: #ffffff;
}

.menu-card-warm::after {
    background: transparent;
}

.menu-card-ink {
    color: #ffffff;
    background: linear-gradient(155deg, #00090d, #163a66);
}

.menu-card-ink .menu-card-tag,
.menu-card-ink .menu-card-link,
.menu-card-ink p {
    color: rgba(247, 241, 231, 0.86);
}

.menu-card-ink::after {
    background: transparent;
}

.menu-card-sand {
    background: #eef6fb;
}

.menu-card-sand::after {
    background: transparent;
}

.menu-card-tag {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-deep);
}

.menu-card h2 {
    margin: 0 0 12px;
    font-size: 1.7rem;
}

.menu-card p {
    margin: 0 0 26px;
    color: var(--text-soft);
    line-height: 1.6;
}

.menu-card-link {
    font-weight: 700;
    color: var(--accent-ink);
}

.info-panel {
    margin-top: 24px;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.info-panel-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-panel-item strong {
    font-size: 1rem;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 520px;
}

.auth-card {
    border-radius: var(--radius-xl);
    padding: 36px;
}

.auth-card h1 {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1;
}

.auth-form {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-label {
    font-weight: 700;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    min-height: 58px;
    padding: 0 118px 0 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    font-size: 1.08rem;
    background: rgba(255, 255, 255, 0.9);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(31, 114, 212, 0.72);
    box-shadow: 0 0 0 4px rgba(31, 114, 212, 0.12);
}

.auth-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    min-width: 90px;
    min-height: 38px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(20, 37, 49, 0.08);
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
}

.auth-submit {
    min-height: 56px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.22s ease;
}

.auth-submit:hover {
    background: #1765bd;
}

.auth-error {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(171, 38, 19, 0.16);
    background: rgba(171, 38, 19, 0.08);
    color: #8f240d;
    font-weight: 700;
}

.site-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(20, 37, 49, 0.94);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.22s ease;
}

.site-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1060px) {
    .dashboard-hero,
    .menu-grid,
    .info-panel {
        grid-template-columns: 1fr;
    }

    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: 180px;
        padding: 20px;
    }

    .home-card {
        min-height: 210px;
    }
}

@media (max-width: 820px) {
    .shell-header-inner {
        flex-wrap: wrap;
    }

    .shell-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .shell-main,
    .shell-header-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-copy,
    .hero-sidecard,
    .menu-card,
    .auth-card,
    .info-panel {
        padding: 22px;
        border-radius: var(--radius-xl);
    }
}
