:root {
    --pink: #ff1493;
    --magenta: #e91e8c;
    --yellow: #ffd700;
    --orange: #ff6b35;
    --purple: #9b59b6;
    --cyan: #00d9ff;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #0f3460;
    --text: #f7f7fb;
    --muted: #b8c0d9;
    --line: rgba(255,255,255,0.14);
    --good: #22c55e;
    --bad: #f87171;
    --team-vh: 100vh;
}
@supports (height: 100dvh) {
    :root { --team-vh: 100dvh; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg-dark); }
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
body.team-app-page {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 0;
    height: var(--team-vh);
    overflow: hidden;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.45rem; line-height: 1.05; }
h2 { font-size: 1.15rem; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.auth-shell { width: min(100%, 430px); }
.auth-card {
    background: rgba(22, 33, 62, 0.96);
    border: 2px solid var(--pink);
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(255, 20, 147, 0.23), 0 18px 60px rgba(0, 0, 0, 0.34);
    padding: 3rem 2rem 3.25rem;
    text-align: center;
}
.auth-brand {
    display: inline-block;
    max-width: 100%;
    text-align: left;
}
.auth-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    font-family: 'Fredoka One', 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: 0;
    background: linear-gradient(90deg, var(--pink), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-icon { flex: 0 0 auto; }
.brand-name { flex: 0 1 auto; }
.auth-card .eyebrow {
    margin-bottom: 0.45rem;
    padding-left: 3.2rem;
    text-align: left;
}
.auth-copy {
    color: var(--muted);
    line-height: 1.45;
    margin: 0.72rem auto 0;
    max-width: 18rem;
}
.auth-status {
    margin-top: 1rem;
    min-height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 52, 96, 0.48);
    color: var(--muted);
    display: grid;
    place-items: center start;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 800;
}
.auth-status.error { color: var(--bad); border-color: rgba(248, 113, 113, 0.45); }
.auth-status.success { color: var(--good); border-color: rgba(34, 197, 94, 0.45); }
.auth-actions {
    display: grid;
    gap: 0.75rem;
    width: min(100%, 280px);
    margin: 2.1rem auto 0;
}
.sso-container { min-height: 40px; }
.sso-button {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    background: rgba(15, 52, 96, 0.72);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0 0.85rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0, 0, 0, 0.18);
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.sso-button:hover,
.sso-button:focus-visible {
    border-color: rgba(255, 20, 147, 0.55);
    background: rgba(26, 26, 46, 0.96);
    outline: none;
}
.sso-button:active {
    transform: translateY(1px);
}
.ms-mark {
    width: 20px;
    height: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.ms-mark i:nth-child(1) { background: #f25022; }
.ms-mark i:nth-child(2) { background: #7fba00; }
.ms-mark i:nth-child(3) { background: #00a4ef; }
.ms-mark i:nth-child(4) { background: #ffb900; }
.google-mark {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: block;
}

@media (max-width: 420px) {
    .auth-card { padding: 2.35rem 1.25rem 2.6rem; }
    .auth-title { font-size: 1.7rem; }
    .auth-card .eyebrow { padding-left: 2.78rem; }
}

.app-shell {
    position: fixed;
    inset: 0;
    width: min(100%, 720px);
    margin: 0 auto;
    height: var(--team-vh);
    min-height: 0;
    padding: env(safe-area-inset-top) 1rem 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}
main {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: 1rem;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.55rem 0 0.55rem;
}
.topbar-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
}
.topbar-user {
    display: grid;
    justify-items: start;
    gap: 0.16rem;
    min-width: 0;
    padding-top: 0.12rem;
}
.signed-in-user {
    max-width: 8.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 900;
}
.eyebrow {
    margin: 0 0 0.15rem;
    color: var(--pink);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.icon-button, .text-button, .primary-button, .nav-item, .sync-card, .receipt-picker-button, .receipt-action-button, .expense-receipt-preview {
    border: 0;
    cursor: pointer;
}
.icon-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: var(--pink);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
}
.sign-out-button {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
.text-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--yellow);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-weight: 900;
}
.primary-button {
    width: 100%;
    min-height: 2.75rem;
    background: linear-gradient(135deg, var(--pink), var(--magenta));
    color: #fff;
    border-radius: 8px;
    font-weight: 900;
}
.primary-button:disabled {
    background: rgba(148, 163, 184, 0.28);
    color: rgba(219, 227, 244, 0.58);
    cursor: not-allowed;
    box-shadow: none;
}

.panel, .compose-card, .metric, .sync-card, .team-card, .map-card {
    background: rgba(22, 33, 62, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
.panel { padding: 0.85rem; margin-bottom: 0.85rem; }
.panel.compact { margin-top: 1rem; }
.profile-badge,
.role-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    font-weight: 900;
}
.profile-badge {
    background: rgba(15, 52, 96, 0.72);
    color: var(--yellow);
    border: 1px solid rgba(255, 20, 147, 0.78);
    padding: 0.17rem 0.46rem;
    font-size: 0.68rem;
    line-height: 1.1;
}
.role-badge {
    background: rgba(255, 215, 0, 0.14);
    color: var(--yellow);
    border: 1px solid rgba(255, 215, 0, 0.26);
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.view { display: none; }
.view.active { display: block; }
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.75rem 0;
}
#view-calendar .section-title {
    margin: 0.58rem 0 0.58rem;
}
#view-calendar .calendar-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
}
#calendarTitle,
#refreshCalendarButton {
    font-size: 0.96rem;
    line-height: 1;
}
#refreshCalendarButton {
    padding: 0.32rem 0.52rem;
    border-radius: 7px;
}
.calendar-slice-control {
    position: relative;
    display: inline-grid;
    grid-template-columns: max-content max-content;
    gap: 0.22rem;
    justify-content: center;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
}
.calendar-view-button,
.calendar-slice-button {
    width: auto;
    min-height: 1.54rem;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    background: rgba(15, 52, 96, 0.58);
    color: var(--text);
    padding: 0.18rem 0.52rem;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-view-button.active,
.calendar-slice-button.active {
    border-color: rgba(255, 20, 147, 0.72);
    background: var(--pink);
    color: #fff;
    box-shadow: 0 5px 14px rgba(255, 20, 147, 0.22);
}
.calendar-view-button:not(.active),
.calendar-slice-button:not(.active) {
    cursor: pointer;
}
.calendar-view-button {
    padding-inline: 0.42rem;
}
.calendar-slice-button {
    max-width: 9rem;
}
.calendar-view-button:focus-visible,
.calendar-slice-button:focus-visible,
.mini-calendar-nav:focus-visible,
.calendar-mode-switch button:focus-visible,
.mini-calendar-day:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}
.calendar-picker {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.4rem);
    left: 50%;
    width: min(15.4rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    padding: 0.68rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 20, 147, 0.14);
}
.mini-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}
.mini-calendar-head strong {
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1;
}
.mini-calendar-nav {
    width: 1.55rem;
    height: 1.55rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}
.calendar-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.18rem;
    margin: 0.55rem 0 0.48rem;
    padding: 0.14rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(15, 52, 96, 0.48);
}
.calendar-mode-switch button {
    min-height: 1.34rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}
.calendar-mode-switch button.active {
    background: var(--pink);
    color: #fff;
}
.mini-calendar-weekdays,
.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.16rem;
}
.mini-calendar-weekdays {
    margin-bottom: 0.2rem;
}
.mini-calendar-weekdays span {
    color: var(--muted);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}
.mini-calendar-day {
    width: 100%;
    aspect-ratio: 1;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
}
.mini-calendar-day.is-muted {
    color: rgba(184, 192, 217, 0.58);
}
.mini-calendar-day.is-in-week {
    background: rgba(255, 20, 147, 0.13);
}
.mini-calendar-day.is-today:not(.is-selected) {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.mini-calendar-day.is-selected {
    background: var(--pink);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 6px 14px rgba(255, 20, 147, 0.28);
}
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.48rem;
    margin-bottom: 0.7rem;
}
.metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.32rem;
    padding: 0.5rem 0.54rem;
    min-width: 0;
}
.metric span {
    flex: 0 0 auto;
    font-size: 0.98rem;
    line-height: 1;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.metric small {
    min-width: 0;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    text-align: right;
    text-transform: uppercase;
}
.card-list { display: grid; gap: 0.75rem; }
.team-card { padding: 0.85rem; }
.team-card strong { display: block; margin-bottom: 0.25rem; }
.team-card p { color: var(--muted); line-height: 1.45; font-size: 0.9rem; }
.calendar-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(4.7rem, 1fr) 3.3rem;
    grid-template-rows: auto auto auto auto;
    column-gap: 0.28rem;
    align-items: start;
    overflow: hidden;
    padding: 0.72rem;
    border-width: 2px;
    border-color: var(--performer-color, var(--line));
    background: linear-gradient(135deg, var(--performer-wash, transparent), rgba(22, 33, 62, 0.92) 38%);
    box-shadow: 0 0 0 1px var(--performer-glow, rgba(255,255,255,0.08)), 0 10px 26px rgba(0, 0, 0, 0.18);
}
.calendar-card-head {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.calendar-card-head strong {
    min-width: 0;
    margin: 0;
    max-width: min(100%, 16.5rem);
    overflow-wrap: anywhere;
}
.calendar-card p {
    margin-top: 0.25rem;
    font-size: 0.82rem;
}
.calendar-time-line {
    grid-column: 1;
    grid-row: 2;
    color: #dbe3f4;
    font-weight: 900;
}
.calendar-card-tools {
    grid-column: 3;
    grid-row: 1 / 4;
    position: relative;
    display: grid;
    justify-items: center;
    justify-content: end;
    min-width: 0;
    min-height: 1.56rem;
}
.calendar-mini-slot {
    grid-column: 2;
    grid-row: 1 / 4;
    position: relative;
    display: grid;
    place-items: center;
    justify-self: stretch;
    width: 100%;
    align-self: stretch;
    min-width: 0;
    min-height: clamp(4.35rem, 18vw, 5.2rem);
}
.calendar-mini-month {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: min(100%, clamp(4.9rem, 22vw, 6.2rem));
    height: auto;
    aspect-ratio: 7 / 5.4;
    overflow: hidden;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 6px;
    background: rgba(15, 52, 96, 0.72);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
    color: var(--text);
    text-align: center;
}
.calendar-mini-month strong {
    display: block;
    margin: 0;
    background: var(--pink);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.14rem 0.08rem;
}
.calendar-mini-month div {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 0.04rem;
    height: calc(100% - 0.84rem);
    padding: 0.16rem;
}
.calendar-mini-day {
    display: grid;
    place-items: center;
    min-width: 0;
    border-radius: 999px;
    color: var(--muted);
    font-size: clamp(0.42rem, 1.6vw, 0.62rem);
    font-weight: 900;
    line-height: 1;
}
.calendar-mini-day.is-muted {
    opacity: 0.18;
}
.calendar-mini-day.is-event {
    width: min(1.05rem, 100%);
    height: min(1.05rem, 100%);
    justify-self: center;
    align-self: center;
    background: var(--yellow);
    color: #111827;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.38), 0 0 8px rgba(255, 215, 0, 0.48);
}
.payment-stoplight {
    flex: 0 0 auto;
    position: absolute;
    z-index: 1;
    top: 1.92rem;
    right: 0.38rem;
    width: 1.94rem;
    min-height: 4.72rem;
    padding: 0.28rem 0.26rem;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 0.64rem;
    background: linear-gradient(180deg, #222 0%, #05070c 52%, #1a1d24 100%);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.18), inset 0 -6px 9px rgba(0,0,0,0.55), 0 5px 14px rgba(0,0,0,0.35);
}
.payment-stoplight::before {
    content: '';
    position: absolute;
    left: 0.19rem;
    right: 0.19rem;
    top: -0.15rem;
    height: 0.28rem;
    border-radius: 0.18rem 0.18rem 0 0;
    background: linear-gradient(180deg, #444954, #090b10);
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2);
}
.payment-light {
    position: relative;
    z-index: 2;
    width: 0.94rem;
    height: 0.94rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, rgba(148, 157, 168, 0.34), rgba(45, 50, 60, 0.7) 42%, #07080c 100%);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.22), inset 0 -1px 2px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.45);
}
.payment-light::before,
.payment-light::after {
    content: '';
    position: absolute;
    top: 0.05rem;
    width: 0.26rem;
    height: 0.84rem;
    background: linear-gradient(180deg, #5d6570, #11141b 78%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.22);
}
.payment-light::before {
    left: -0.76rem;
    border-radius: 0.36rem 0 0 0.36rem;
    box-shadow: inset -1px 0 1px rgba(255,255,255,0.22);
}
.payment-light::after {
    right: -0.76rem;
    border-radius: 0 0.36rem 0.36rem 0;
    box-shadow: inset 1px 0 1px rgba(255,255,255,0.22);
}
.payment-stoplight-post {
    position: absolute;
    z-index: 0;
    left: 50%;
    top: calc(100% + 0.02rem);
    width: 0.22rem;
    height: 0.42rem;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,0.12);
    border-top: 0;
    background: linear-gradient(90deg, #06070b, #2b3038 45%, #080a0f);
    box-shadow: inset 1px 0 1px rgba(255,255,255,0.14), 0 4px 9px rgba(0,0,0,0.28);
    pointer-events: none;
}
.payment-stoplight.is-unpaid .payment-light-red {
    background: radial-gradient(circle at 35% 28%, #fff2ef, #ff1f1f 44%, #b00000 100%);
    box-shadow: 0 0 18px rgba(255, 31, 31, 0.95), 0 0 8px rgba(255, 255, 255, 0.28), inset 0 1px 3px rgba(255,255,255,0.48), inset 0 -2px 4px rgba(0,0,0,0.32);
}
.payment-stoplight.is-partial .payment-light-yellow {
    background: radial-gradient(circle at 35% 28%, #fffbd1, #ffea00 44%, #c79200 100%);
    box-shadow: 0 0 18px rgba(255, 234, 0, 0.95), 0 0 8px rgba(255, 255, 255, 0.28), inset 0 1px 3px rgba(255,255,255,0.48), inset 0 -2px 4px rgba(0,0,0,0.3);
}
.payment-stoplight.is-paid .payment-light-green {
    background: radial-gradient(circle at 35% 28%, #e5fff0, #00ff66 44%, #058c3e 100%);
    box-shadow: 0 0 18px rgba(0, 255, 102, 0.95), 0 0 8px rgba(255, 255, 255, 0.28), inset 0 1px 3px rgba(255,255,255,0.48), inset 0 -2px 4px rgba(0,0,0,0.3);
}
.payment-stoplight.is-cancelled .payment-light {
    background: radial-gradient(circle at 35% 28%, #d8dde2, #9aa0a6 45%, #4d535a 100%);
}
.region-chip {
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid var(--region-border, rgba(0, 217, 255, 0.24));
    border-radius: 999px;
    background: var(--region-bg, rgba(0, 217, 255, 0.11));
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.25rem 0.42rem;
    white-space: nowrap;
}
.region-star {
    color: var(--region-color, var(--cyan));
    font-size: 0.96rem;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.region-star.is-dfw-cowboys {
    -webkit-text-stroke: 1px #ffffff;
    text-stroke: 1px #ffffff;
    paint-order: stroke fill;
    text-shadow: 0 0 1px #ffffff, 0 1px 2px rgba(0,0,0,0.6);
}
.calendar-quick {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.55rem;
    align-items: center;
    margin-top: 0.42rem;
    min-width: 0;
    max-width: min(100%, 16.5rem);
}
.calendar-quick strong,
.calendar-quick a,
.calendar-quick span {
    margin: 0;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}
.calendar-quick a {
    color: var(--yellow);
    text-decoration: none;
}
.calendar-action-row {
    grid-column: 1 / -1;
    grid-row: 4;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.36rem 0.9rem;
    margin-top: 0.45rem;
}
.calendar-details {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.18rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.36rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(26, 26, 46, 0.82);
}
.calendar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.14rem 0.28rem;
    align-items: baseline;
    min-width: 0;
    line-height: 1.25;
}
.calendar-row span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.16rem;
}
.calendar-row span::after {
    content: ':';
    color: rgba(184, 192, 217, 0.8);
}
.calendar-row span b {
    font-size: 0.74rem;
    line-height: 1;
    text-transform: none;
}
.calendar-row strong,
.calendar-row a {
    min-width: 0;
    color: #dbe3f4;
    font-size: 0.8rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.calendar-row a,
.calendar-quick a,
.calendar-actions a {
    color: var(--yellow);
    text-decoration: none;
}
.calendar-row a:focus-visible,
.calendar-quick a:focus-visible,
.calendar-actions a:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}
.calendar-actions {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0;
    justify-content: flex-start;
}
.calendar-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.32rem;
    padding: 0.1rem 0.46rem;
    border: 1px solid rgba(255, 20, 147, 0.78);
    border-radius: 999px;
    background: rgba(15, 52, 96, 0.72);
    color: var(--yellow);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.1;
}
.calendar-more {
    display: contents;
}
.calendar-details-toggle {
    grid-column: 1;
    grid-row: 1;
    width: max-content;
    min-height: 1.45rem;
    border: 0;
    background: transparent;
    color: var(--yellow);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 900;
}
.calendar-details-toggle::before {
    content: '▸';
    margin-right: 0.18rem;
    transition: transform 140ms ease;
}
.calendar-details-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}
.calendar-details-toggle:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
    border-radius: 6px;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
}
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: rgba(0, 217, 255, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(0, 217, 255, 0.2);
    font-size: 0.74rem;
    font-weight: 900;
}

.compose-card { padding: 0.9rem; display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }
label { color: var(--muted); font-size: 0.78rem; font-weight: 900; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text);
    padding: 0.68rem 0.75rem;
}
textarea { resize: vertical; min-height: 6rem; }

.expense-receipt-control {
    display: grid;
    gap: 0.45rem;
}
.expense-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.receipt-picker-button,
.receipt-action-button {
    min-height: 2.55rem;
    border: 1px solid rgba(255, 20, 147, 0.78);
    border-radius: 8px;
    background: rgba(15, 52, 96, 0.72);
    color: var(--yellow);
    font-size: 0.9rem;
    font-weight: 900;
}
.receipt-picker-button:disabled,
.receipt-action-button:disabled {
    cursor: progress;
    opacity: 0.72;
}
.receipt-action-button.is-ready {
    background: linear-gradient(135deg, var(--pink), var(--magenta));
    color: #fff;
}
.receipt-action-button[hidden] { display: none; }
.expense-receipt-preview {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-radius: 8px;
    background: rgba(0, 217, 255, 0.08);
    color: var(--text);
    text-align: left;
}
.expense-receipt-preview[hidden] { display: none; }
.expense-receipt-preview img {
    width: 3.6rem;
    height: 3.6rem;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.16);
}
.expense-receipt-preview strong,
.expense-receipt-preview span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.expense-receipt-preview strong {
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 900;
}
.expense-receipt-preview span {
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}
.expense-receipt-status {
    min-height: 1rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.map-card { position: relative; overflow: hidden; margin-bottom: 0.85rem; }
#teamMap { width: 100%; height: min(58vh, 420px); min-height: 310px; }
.map-status {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    background: rgba(15, 52, 96, 0.92);
    color: #fff;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 900;
}
.sync-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.sync-card { text-align: left; padding: 1rem; color: var(--text); }
.sync-card strong { display: block; margin-bottom: 0.25rem; }
.sync-card span { color: var(--muted); font-weight: 900; }

.bottom-nav {
    position: relative;
    width: auto;
    margin: 0 -1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: center;
    gap: 0.2rem;
    padding: 0.36rem 0.65rem calc(0.36rem + env(safe-area-inset-bottom));
    background: rgba(17, 17, 51, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
    z-index: 10;
}
.nav-item {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.08rem;
    padding: 0.12rem 0.24rem;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}
.nav-item.active { background: var(--pink); color: #fff; }

@media (orientation: landscape) and (max-height: 520px) {
    .bottom-nav {
        gap: 0.14rem;
        padding: 0.16rem 0.5rem 0.14rem;
    }
    .nav-item {
        height: 1.56rem;
        min-height: 0;
        padding: 0 0.18rem;
        border-radius: 6px;
        font-size: 0.7rem;
    }
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 1rem;
    color: var(--muted);
    background: rgba(15, 52, 96, 0.35);
    text-align: center;
    font-weight: 800;
}

@media (min-width: 560px) {
    .sync-grid { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 1.7rem; }
}
.expense-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    background: rgba(255, 20, 147, 0.22);
    color: var(--yellow);
    font-size: 0.86rem;
    font-weight: 900;
}