:root {
    color-scheme: dark;

    --background: #101214;
    --card: #1b1f23;
    --card-light: #23282e;
    --border: #4b525a;
    --amber: #ffb020;
    --amber-light: #ffc44d;
    --text: #ffffff;
    --muted: #b9c0c7;
    --danger: #ff6b6b;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top,
            #20252a 0%,
            var(--background) 42%
        );
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}
.app-logo {
    display: block;
    width: min(100%, 440px);
    aspect-ratio: 2.35 / 1;
    margin: 0 auto 14px;
    border-radius: 14px;
    object-fit: cover;
    object-position: center;
}
.app-shell {
    width: min(100%, 720px);
    min-height: 100vh;
    margin: 0 auto;
    padding:
        max(28px, env(safe-area-inset-top))
        20px
        max(32px, env(safe-area-inset-bottom));
}

.app-header {
    margin-bottom: 28px;
    text-align: center;
}

.app-header h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.profile-tab {
    min-width: 0;
    min-height: 50px;
    padding: 8px 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--card);
    color: var(--muted);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-tab.active {
    border-color: var(--amber);
    background: rgba(255, 176, 32, 0.13);
    color: var(--amber-light);
    box-shadow: 0 0 0 2px rgba(255, 176, 32, 0.12);
}

.profile-name-button {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 7px 12px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 750;
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-name-button::after {
    margin-left: 7px;
    color: var(--amber);
    content: "✎";
}

.screen {
    width: 100%;
}

.hidden {
    display: none !important;
}

.card,
.shift-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            #20252a,
            var(--card)
        );
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.card {
    padding: 28px 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--amber);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card h2,
.week-section h2 {
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.instructions {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.55;
}

label {
    display: block;
    margin: 20px 0 8px;
    font-weight: 700;
}

select,
input {
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    background: #121518;
    color: var(--text);
}

select:focus,
input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.2);
}

.primary-button,
.secondary-button {
    min-height: 58px;
    border-radius: 15px;
    font-weight: 800;
    transition:
        transform 160ms ease,
        background-color 160ms ease;
}

.primary-button:active,
.secondary-button:active {
    transform: scale(0.98);
}

.primary-button {
    width: 100%;
    margin-top: 24px;
    border: 0;
    background: var(--amber);
    color: #101214;
}

.primary-button:hover {
    background: var(--amber-light);
}

.secondary-button {
    border: 1px solid var(--border);
    background: var(--card-light);
    color: var(--text);
}

.today-heading {
    margin-bottom: 18px;
    text-align: center;
}

.today-heading p {
    margin: 0 0 4px;
    color: var(--amber);
    font-weight: 800;
    text-transform: uppercase;
}

.today-heading h2 {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.2rem, 5vw, 1.7rem);
}

.shift-card {
    position: relative;
    overflow: hidden;
    padding: 28px 22px;
    text-align: center;
}

.shift-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: var(--amber);
    content: "";
}

.shift-code {
    color: var(--amber);
    font-size: clamp(4rem, 20vw, 7rem);
    font-weight: 900;
    line-height: 1;
}

.shift-time {
    margin-top: 18px;
    padding: 18px 0;
    border-top: 1px solid #363c42;
    border-bottom: 1px solid #363c42;
    font-size: clamp(1.45rem, 7vw, 2.4rem);
    font-weight: 800;
}

.roster-name {
    margin-top: 20px;
    font-size: 1.35rem;
    font-weight: 750;
}

.roster-position {
    margin-top: 8px;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 650;
}

.navigation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.week-section {
    margin-top: 30px;
}

.week-list {
    display: grid;
    gap: 10px;
}

.week-day {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid #363c42;
    border-radius: 14px;
    background: var(--card);
}

.week-day-date {
    font-weight: 750;
    text-align: center;
}

.week-day-shift {
    color: var(--amber);
    font-weight: 850;
    text-align: center;
}

.full-width {
    width: 100%;
    margin-top: 12px;
}

.text-button {
    display: block;
    margin: 22px auto 0;
    padding: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
}

footer {
    margin-top: 34px;
    color: #8f979f;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 420px) {
        .shift-card {
        padding: 20px 16px;
    }

    .shift-code {
        font-size: clamp(3.2rem, 17vw, 5rem);
    }

    .shift-time {
        margin-top: 14px;
        padding: 14px 0;
        font-size: clamp(1.2rem, 6vw, 1.8rem);
    }

    .roster-name {
        margin-top: 16px;
        font-size: 1.15rem;
    }

    .roster-position {
        margin-top: 6px;
        font-size: 0.95rem;
    }
    
    .app-shell {
        padding-right: 14px;
        padding-left: 14px;
    }
    
    .card,
    .shift-card {
        border-radius: 20px;
    }

    .navigation-buttons {
        grid-template-columns: 1fr;
    }

    .profile-tab {
        min-height: 46px;
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media print {
    body {
        background: #ffffff;
        color: #000000;
    }

    .app-header,
    .profile-tabs,
    .profile-name-button,
    #setup-screen,
    #home-screen,
    footer {
        display: none !important;
    }
}
