:root {
    --primary: #e60228;
    --secondary: #0e1e32;
    --heading: #0E1E32;
    --text: #5B5F64;
    --light: #959FA8;
    --border: #E2E6E8;
    --bg: #F3F4F7;
    --surface: #ffffff;
    --success: #18a058;
    --warning: #f0a202;

    --r-sm: 12px;
    --r-md: 20px;
    --r-lg: 32px;

    --shadow-soft: 0 12px 30px rgba(14,30,50,.08);
    --shadow-strong: 0 24px 70px rgba(14,30,50,.14);

    --font-head: "Fira Sans", Arial, sans-serif;
    --font-body: "Roboto", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 80% 0%, rgba(230,2,40,.08), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
}

h1, h2, h3, strong {
    margin: 0;
    color: var(--heading);
    font-family: var(--font-head);
}

p {
    margin: 0;
    line-height: 1.55;
}

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

button {
    font: inherit;
}

.sgh-app {
    min-height: 100vh;
}

.sgh-main {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 24px 18px 112px;
}

.sgh-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.sgh-kicker,
.panel-label {
    display: inline-flex;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: .08em;
    font-size: 12px;
    margin-bottom: 8px;
}

.sgh-topbar h1 {
    font-size: clamp(36px, 9vw, 58px);
    letter-spacing: -.05em;
    line-height: .95;
}

.sgh-topbar p {
    margin-top: 10px;
    font-weight: 700;
    color: var(--light);
}

.top-actions {
    display: flex;
    gap: 10px;
}

.icon-btn,
.user-pill {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    font-weight: 900;
}

.user-pill {
    background: var(--secondary);
    color: white;
}

.today-panel {
    min-height: 235px;
    border-radius: 38px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(14,30,50,.96), rgba(14,30,50,.86)),
        var(--secondary);
    box-shadow: var(--shadow-strong);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

.today-panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    right: -80px;
    top: -70px;
    background: rgba(230,2,40,.38);
}

.today-panel h2 {
    color: white;
    font-size: clamp(32px, 8vw, 54px);
    line-height: .98;
    letter-spacing: -.04em;
}

.today-panel p {
    margin-top: 12px;
    max-width: 520px;
    color: rgba(255,255,255,.72);
    font-weight: 600;
}

.primary-action {
    align-self: flex-start;
    min-height: 58px;
    padding: 0 22px;
    border: 0;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-weight: 900;
    box-shadow: 0 18px 38px rgba(230,2,40,.32);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.primary-action span {
    font-size: 24px;
    line-height: 1;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.app-card,
.timeline-card {
    border: 1px solid rgba(226,230,232,.88);
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
}

.app-card {
    min-height: 155px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .18s ease, box-shadow .18s ease;
}

.app-card:active {
    transform: scale(.985);
}

.app-card-large {
    grid-column: 1 / -1;
    min-height: 175px;
    background:
        linear-gradient(135deg, #fff, #fff5f7);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.card-icon.muted {
    background: #f0f2f5;
    color: var(--secondary);
}

.app-card h3 {
    font-size: 21px;
    letter-spacing: -.03em;
}

.app-card p {
    margin-top: 6px;
    color: var(--light);
    font-weight: 700;
}

.timeline-card {
    padding: 22px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.section-title h2 {
    font-size: 25px;
    letter-spacing: -.03em;
}

.section-title a {
    color: var(--primary);
    font-weight: 900;
}

.timeline {
    display: grid;
    gap: 14px;
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 58px 22px 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: white;
}

.timeline-item time {
    color: var(--heading);
    font-weight: 900;
}

.timeline-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(24,160,88,.12);
}

.timeline-item.pending .timeline-dot {
    background: var(--warning);
    box-shadow: 0 0 0 6px rgba(240,162,2,.16);
}

.timeline-content strong,
.timeline-content span {
    display: block;
}

.timeline-content span {
    margin-top: 5px;
    color: var(--light);
    font-weight: 700;
    font-size: 14px;
}

.timeline-item em {
    grid-column: 1 / -1;
    justify-self: start;
    font-style: normal;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(24,160,88,.12);
    color: var(--success);
}

.timeline-item.pending em {
    background: rgba(240,162,2,.16);
    color: #9a6600;
}

.fab {
    position: fixed;
    left: 50%;
    bottom: 54px;
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    border: 7px solid var(--bg);
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(230,2,40,.32);
    z-index: 20;
}

.sgh-bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 74px;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-strong);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 10;
}

.sgh-bottom-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--light);
    font-size: 11px;
    font-weight: 900;
}

.sgh-bottom-nav a span {
    font-size: 22px;
}

.sgh-bottom-nav a.active {
    color: var(--primary);
}

.sgh-rail {
    display: none;
}

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

.login-card {
    width: min(100%, 430px);
    background: white;
    border-radius: 36px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
}

@media (min-width: 980px) {
    .sgh-app {
        display: grid;
        grid-template-columns: 92px 1fr;
    }

    .sgh-rail {
        display: flex;
        min-height: 100vh;
        background: var(--secondary);
        padding: 24px 16px;
        flex-direction: column;
        align-items: center;
        gap: 34px;
        position: sticky;
        top: 0;
    }

    .rail-logo {
        width: 52px;
        height: 52px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        background: var(--primary);
        color: white;
        font-weight: 900;
    }

    .sgh-rail nav {
        display: grid;
        gap: 14px;
    }

    .sgh-rail a {
        width: 54px;
        height: 54px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        color: rgba(255,255,255,.56);
        font-size: 25px;
        font-weight: 900;
    }

    .sgh-rail a.active,
    .sgh-rail a:hover {
        background: rgba(255,255,255,.12);
        color: white;
    }

    .sgh-main {
        padding: 42px;
    }

    .today-panel {
        min-height: 280px;
        padding: 40px;
        flex-direction: row;
        align-items: flex-end;
    }

    .action-grid {
        grid-template-columns: 1.35fr 1fr 1fr 1fr;
    }

    .app-card-large {
        grid-column: auto;
    }

    .fab,
    .sgh-bottom-nav {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 70px 24px 1fr auto;
    }

    .timeline-item em {
        grid-column: auto;
    }
}
