:root {
  --ink: #18161f;
  --ink-2: #24212c;
  --ink-3: #35313e;
  --paper: #f5f4f1;
  --paper-2: #eeece8;
  --card: #ffffff;
  --line: #dedbd5;
  --muted: #6e6977;
  --soft: #938d9d;
  --red: #ef3d46;
  --red-dark: #c72d36;
  --purple: #7557ff;
  --green: #1bbf9c;
  --gold: #efb43d;
  --blue: #4598ff;
  --pink: #e260a7;
  --danger: #e84855;
  --shadow: 0 16px 40px rgba(26, 22, 34, .09);
  --shadow-sm: 0 8px 24px rgba(26, 22, 34, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 248px;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: var(--paper); -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--paper); touch-action: pan-x pan-y; }
button, input, select, textarea { max-width: 100%; font: inherit; }
select {
  min-width: 0;
  min-height: 46px;
  padding: 0 42px 0 14px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%236e6977' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
}
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }

.auth-screen { display: grid; min-height: 100dvh; place-items: center; padding: 30px 18px; color: white; background: var(--red); }
.auth-card { width: min(410px, 100%); padding: 26px 30px; }
.auth-brand { display: grid; margin: 0 0 46px; place-items: center; }
.auth-brand img { display: block; width: min(205px, 58vw); height: auto; object-fit: contain; }
.auth-form { display: grid; gap: 17px; }
.auth-form .field label { color: white; }
.auth-form .field input { min-height: 52px; border-color: rgba(255,255,255,.72); color: #18161f; background: white; box-shadow: 0 8px 20px rgba(117,20,27,.12); }
.auth-form .field input:focus { border-color: white; box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 8px 20px rgba(117,20,27,.14); }
.button.auth-submit { width: 100%; min-height: 52px; margin-top: 3px; border-color: white; color: var(--red); background: white; box-shadow: 0 8px 22px rgba(117,20,27,.16); }
.button.auth-submit:hover { border-color: #18161f; color: white; background: #18161f; }
.auth-help { margin: 0; color: rgba(255,255,255,.78); font-size: 10px; line-height: 1.6; text-align: center; }
.auth-message, .auth-error { padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.45; }
.auth-message { margin-bottom: 17px; color: white; background: rgba(108,15,22,.22); }
.auth-error { color: #8f1f28; background: white; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow: hidden;
  padding: 28px 18px 20px;
  color: #f9f8fb;
  background:
    radial-gradient(circle at 22% 2%, rgba(117, 87, 255, .2), transparent 30%),
    linear-gradient(155deg, #1d1a26, #141219 72%);
}
.sidebar::after { content: ""; position: absolute; right: -70px; bottom: -20px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.045); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.015), 0 0 0 56px rgba(255,255,255,.012); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark { position: relative; display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 2px; color: #9892a4; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.primary-nav { display: grid; min-height: 0; gap: 4px; overflow-y: auto; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.nav-section-label { margin: 18px 13px 6px; color: #736e7e; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: capitalize; }
.nav-item { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 11px; color: #a9a4b2; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; transition: .2s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: rgba(255,255,255,.095); box-shadow: inset 3px 0 var(--red); }
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-item .nav-avatar { width: 27px; height: 27px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; object-fit: cover; }
.nav-item > span { text-transform: capitalize; }
.nav-item .nav-badge { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 10px; color: #241820; background: var(--red); font-family: "DM Mono", monospace; font-size: 9px; text-align: center; }
.theme-menu-item { width: 100%; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); }
.theme-menu-item:hover { background: rgba(255,255,255,.075); }
.theme-toggle-track { position: relative; display: block; width: 36px; height: 21px; flex: 0 0 auto; margin-left: auto; padding: 2px; border-radius: 12px; background: #3c3844; transition: .2s ease; }
.theme-toggle-track i { display: block; width: 17px; height: 17px; border-radius: 50%; background: #9992a2; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .2s ease; }
[data-theme="dark"] .theme-toggle-track { background: rgba(239,61,70,.3); }
[data-theme="dark"] .theme-toggle-track i { background: var(--red); transform: translateX(15px); }
.sidebar-foot { position: relative; z-index: 1; display: grid; gap: 15px; margin-top: auto; }
.profile-switcher { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 11px; width: 100%; padding: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; color: white; background: rgba(255,255,255,.04); cursor: pointer; text-align: left; }
.profile-switcher:hover { background: rgba(255,255,255,.075); }
.profile-switcher img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.profile-switcher span { min-width: 0; display: flex; flex-direction: column; }
.profile-switcher strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-switcher small { color: #847f8c; font-size: 9px; text-transform: capitalize; }
.profile-switcher svg { width: 14px; color: #766f7d; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar); padding-top: 90px; }
.topbar { position: fixed; z-index: 30; top: 0; right: 0; left: var(--sidebar); display: flex; height: 90px; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 3vw, 50px); border-bottom: 1px solid rgba(222,219,213,.84); background: rgba(245,244,241,.9); backdrop-filter: blur(16px); }
.topbar-context { display: flex; align-items: center; gap: 12px; }
.topbar-context small { display: block; margin-bottom: 4px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.topbar-context h1 { margin: 0; font-size: 20px; line-height: 1; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; width: 39px; height: 39px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--card); cursor: pointer; }
.icon-button:hover { border-color: #c7c2bb; box-shadow: var(--shadow-sm); }
.icon-button svg { width: 17px; height: 17px; }
.burger-icon { display: flex; width: 20px; height: 15px; flex-direction: column; justify-content: space-between; }
.burger-icon i { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; }
.notification-button { position: relative; }
.notification-button i { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border: 1.5px solid white; border-radius: 50%; background: var(--red); }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: -.01em; text-transform: capitalize; transition: .2s ease; }
.button svg { width: 15px; height: 15px; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:disabled { opacity: .48; pointer-events: none; }
.button-primary { color: white; background: var(--red); box-shadow: 0 7px 17px rgba(239,61,70,.2); }
.button-primary:hover { background: var(--red-dark); }
.button-dark { color: white; background: var(--ink); }
.button-secondary { border-color: var(--line); background: white; }
.button-ghost { color: var(--muted); background: transparent; }
.button-danger { color: #9f2430; border-color: #f2c8cd; background: #fff5f5; }
.mobile-brand, .mobile-avatar, .mobile-only { display: none; }
.view { min-height: calc(100vh - 90px); padding: clamp(24px, 3vw, 46px) clamp(22px, 3.4vw, 54px) 60px; }
.loading-state { display: grid; min-height: 60vh; place-items: center; align-content: center; color: var(--muted); }
.loading-logo { display: grid; width: 58px; height: 58px; place-items: center; animation: pulse 1.4s ease-in-out infinite; }
.loading-logo img { width: 100%; height: 100%; object-fit: contain; }
.loading-state p { font-size: 11px; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-intro h2 { margin: 0; font-size: clamp(25px, 3.2vw, 40px); line-height: 1.03; letter-spacing: -.055em; }
.page-intro h2 em { color: var(--red); font-style: normal; }
.page-intro p { max-width: 580px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.page-actions { display: flex; gap: 8px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-header h2, .section-header h3 { margin: 0; font-size: 15px; letter-spacing: -.035em; }
.page-intro h2, .section-header h2, .section-header h3, .rota-board-header h3, .drawer-section-head h3, .modal-head h2, .empty-state h3 { text-transform: capitalize; }
.media-preview-modal .modal-head h2 { text-transform: none; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.section-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 10px; font-weight: 700; text-transform: capitalize; }
.text-link:hover { color: var(--red); }
.text-link svg { width: 13px; }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.dashboard-main, .dashboard-side { display: grid; align-content: start; gap: 22px; }
.signal-stack { display: grid; min-width: 0; gap: 14px; }
.signal-stack.multiple { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.signal-card { position: relative; overflow: hidden; min-height: 155px; padding: 25px 26px; border-radius: var(--radius); color: white; background: linear-gradient(120deg, #211e2a, #16141c); box-shadow: var(--shadow); }
.signal-card::after { content: ""; position: absolute; right: -30px; bottom: -70px; width: 250px; height: 250px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 76px rgba(255,255,255,.015); }
.signal-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; color: #aaa4b2; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(239,61,70,.13); }
.signal-content { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 28px; }
.signal-content h2 { margin: 0 0 7px; font-size: clamp(22px, 2.5vw, 33px); letter-spacing: -.05em; }
.signal-meta { display: flex; flex-wrap: wrap; gap: 14px; color: #a9a3b1; font-size: 10px; }
.signal-meta span { display: flex; align-items: center; gap: 5px; }
.signal-meta svg { width: 13px; }
.signal-countdown { flex: 0 0 auto; text-align: right; }
.signal-countdown strong { display: block; font-family: "DM Mono", monospace; font-size: 23px; font-weight: 500; }
.signal-countdown small { color: #817b89; font-size: 8px; letter-spacing: .11em; text-transform: uppercase; }
.meal-signal-card { background: linear-gradient(120deg, #322414, #1d1814); }
.meal-signal-card .signal-dot { background: var(--gold); box-shadow: 0 0 0 5px rgba(239,180,61,.13); }
.schedule-point-signal { background: linear-gradient(120deg, #2b1d25, #17141b); }
.schedule-point-signal.editable { cursor: pointer; }
.schedule-point-signal .signal-dot { background: var(--red); }
.happening-card { min-height: 0; padding: 21px 24px; }
.happening-card .signal-top small { margin-left: auto; color: #77717f; font-family: "Manrope", system-ui, sans-serif; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.happening-list { position: relative; z-index: 1; display: grid; margin-top: 15px; }
.happening-item { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border: 0; color: white; background: transparent; text-align: left; }
button.happening-item { cursor: pointer; }
.happening-item + .happening-item { border-top: 1px solid rgba(255,255,255,.09); }
.happening-item > div { min-width: 0; }
.happening-item h2 { overflow: hidden; margin: 0 0 6px; font-size: 20px; line-height: 1.15; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.happening-item > svg { width: 17px; flex: 0 0 auto; color: #77717f; }
.meal-happening-item { color: #f5dfb9; }
.meal-happening-item .signal-meta { color: #b19b78; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stat-item { position: relative; padding: 18px 19px; }
.stat-item + .stat-item { border-left: 1px solid var(--line); }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.stat-label i { width: 6px; height: 6px; border-radius: 50%; }
.stat-value { display: flex; align-items: baseline; gap: 5px; margin-top: 8px; }
.stat-value strong { font-family: "DM Mono", monospace; font-size: 22px; font-weight: 500; }
.stat-value small { color: var(--soft); font-size: 9px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 0 rgba(255,255,255,.5); }
.card-pad { padding: 21px; }
.day-rundown { position: relative; overflow: hidden; }
.overview-time-marker { position: absolute; z-index: 6; right: 0; left: 0; height: 2px; background: var(--red); box-shadow: 0 0 8px rgba(239,61,70,.42); pointer-events: none; transform: translateY(-1px); transition: top 30s linear; }
.overview-time-marker::before { content: ""; position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; border: 2px solid var(--card); border-radius: 50%; background: var(--red); transform: translateY(-50%); }
.rundown-item { display: grid; grid-template-columns: 76px 4px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 83px; padding: 13px 18px; cursor: pointer; transition: .18s ease; }
.rundown-item + .rundown-item { border-top: 1px solid #ebe9e5; }
.rundown-item:hover { background: #faf9f7; }
.rundown-time strong { display: block; font-family: "DM Mono", monospace; font-size: 12px; font-weight: 500; }
.rundown-time small { color: var(--soft); font-family: "DM Mono", monospace; font-size: 8px; }
.rundown-bar { width: 8px; height: 43px; border-radius: 6px; }
.rundown-copy { min-width: 0; }
.rundown-copy h3 { overflow: hidden; margin: 0 0 7px; font-size: 12px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.rundown-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 9px; }
.rundown-meta span { display: flex; align-items: center; gap: 4px; }
.rundown-meta svg { width: 11px; }
.meal-rundown-marker { background: #fffaf2; }
.meal-rundown-marker:not([data-action]) { cursor: default; }
.meal-rundown-marker .rundown-bar { background: var(--gold); }
.meal-marker-badge { padding: 5px 8px; border: 1px solid #ead9bb; border-radius: 8px; color: #8b641f; background: white; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.schedule-point-rundown { background: color-mix(in srgb, var(--red), white 97%); }
.schedule-point-rundown:not(.editable) { cursor: default; }
.schedule-point-badge { padding: 5px 8px; border: 1px solid #f1b9bd; border-radius: 8px; color: #a52630; background: white; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.crew-stack { display: flex; justify-content: flex-end; padding-left: 8px; }
.crew-stack img, .crew-stack .open-avatar { width: 36px; height: 36px; margin-left: -8px; border: 2px solid white; border-radius: 50%; object-fit: cover; }
.open-avatar { display: grid; place-items: center; color: var(--red); background: #fff0f1; font-size: 13px; font-weight: 700; }
.open-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 9px; padding: 5px 8px; border-radius: 8px; color: #a52630; background: #feedef; font-size: 8px; font-weight: 800; white-space: nowrap; }

.coverage-card { padding: 20px; }
.coverage-ring { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 16px; margin: 14px 0 18px; }
.ring { --value: 85%; position: relative; display: grid; width: 88px; height: 88px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) var(--value), #eceae6 0); }
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: white; }
.ring span { position: relative; z-index: 1; font-family: "DM Mono", monospace; font-size: 17px; }
.coverage-copy strong { display: block; font-size: 12px; }
.coverage-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.progress-row { margin-top: 10px; }
.progress-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 8px; }
.progress-track { overflow: hidden; height: 5px; border-radius: 5px; background: #eceae6; }
.progress-track i { display: block; height: 100%; border-radius: 5px; }

.attention-card { padding: 19px; border-color: #f2cdd0; background: linear-gradient(135deg, #fff8f8, #fff); }
.attention-head { display: flex; align-items: flex-start; gap: 10px; }
.attention-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--red); background: #fee7e9; }
.attention-icon svg { width: 16px; }
.attention-head h3 { margin: 1px 0 4px; font-size: 12px; }
.attention-head p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.attention-list { display: grid; gap: 9px; margin: 15px 0; }
.attention-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #f3e2e4; font-size: 9px; }
.attention-row strong { font-size: 9px; }
.attention-row span { color: var(--muted); }

.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px 0; }
.activity-item + .activity-item { border-top: 1px solid #eceae6; }
.activity-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.activity-copy { min-width: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.activity-copy strong { color: var(--ink); }
.activity-copy span { display: block; color: var(--ink); font-weight: 700; }
.activity-copy small { display: block; margin-top: 2px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; }
.alert-link { width: 100%; padding: 12px 8px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; transition: background .18s ease, transform .18s ease; }
.alert-link + .alert-link { border-top: 1px solid #eceae6; border-radius: 0; }
.alert-link:hover { background: #f8f6f3; transform: translateX(2px); }
.alert-link > svg { width: 16px; color: var(--muted); }
.activity-time { color: var(--soft); font-family: "DM Mono", monospace; font-size: 8px; white-space: nowrap; }

.date-controller { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.date-navigation { display: flex; align-items: center; gap: 8px; }
.date-navigation h2 { min-width: 210px; margin: 0 6px; font-size: 22px; letter-spacing: -.045em; }
.date-navigation h2 small { display: block; margin-top: 2px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.meal-time-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -5px 0 22px; padding: 13px 15px; border-color: #eadfce; background: #fffaf2; }
.meal-time-heading { display: flex; min-width: 210px; align-items: center; gap: 10px; }
.meal-time-heading strong { display: block; font-size: 10px; }
.meal-time-heading small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.meal-time-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #9a681a; background: #f8e8c9; }
.meal-time-icon svg { width: 16px; }
.meal-time-items { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.meal-time-item { display: flex; min-height: 36px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #ead9bb; border-radius: 9px; color: var(--muted); background: white; font-size: 8px; }
.meal-time-item strong { color: var(--ink); font-family: "DM Mono", monospace; font-size: 8px; font-weight: 500; }
button.meal-time-item { cursor: pointer; }
button.meal-time-item:hover { border-color: #c79a50; background: #fffdf8; }
.meal-time-item svg { width: 12px; color: #9a681a; }
.settings-meal-days { display: grid; gap: 14px; }
.settings-meal-day { overflow: hidden; }
.settings-meal-day > header { display: flex; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line); background: #faf9f7; }
.settings-day-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #9a681a; background: #f8e8c9; }
.settings-day-icon svg { width: 18px; }
.settings-meal-day h3 { margin: 0; font-size: 14px; letter-spacing: -.025em; }
.settings-meal-day header p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.settings-meal-list { display: grid; }
.settings-meal-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 67px; padding: 12px 19px; }
.settings-meal-row + .settings-meal-row { border-top: 1px solid var(--line); }
.settings-meal-row > div { display: flex; min-width: 0; flex-direction: column; }
.settings-meal-row > div strong { font-size: 12px; }
.settings-meal-row > div span { margin-top: 3px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.settings-meal-row .meal-time-icon { width: 36px; height: 36px; }
.settings-meal-row .button { min-width: 150px; }
.view-switcher { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.view-switcher button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.view-switcher button.active { color: white; background: var(--ink); }
.day-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .65fr); gap: 22px; }
.timeline { position: relative; overflow: hidden; min-height: 670px; padding: 16px 16px 16px 74px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.timeline-hours { position: absolute; inset: 16px 0 16px 0; pointer-events: none; }
.timeline-hour { position: absolute; left: 0; right: 0; height: 1px; border-top: 1px solid #edeae6; }
.timeline-hour span { position: absolute; left: 17px; top: -7px; color: var(--soft); font-family: "DM Mono", monospace; font-size: 8px; }
.timeline-events { position: relative; height: 638px; }
.timeline-event { position: absolute; left: 0; right: 0; overflow: hidden; min-height: 64px; padding: 13px 15px 12px 18px; border: 1px solid color-mix(in srgb, var(--event-color), white 68%); border-left: 8px solid var(--event-color); border-radius: 11px; background: color-mix(in srgb, var(--event-color), white 94%); cursor: pointer; transition: .18s ease; }
.timeline-event:hover { z-index: 3; transform: translateX(3px); box-shadow: var(--shadow-sm); }
.timeline-event h3 { margin: 0 0 7px; font-size: 12px; letter-spacing: -.025em; }
.timeline-event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; color: var(--muted); font-size: 8px; }
.timeline-event-meta span { display: flex; align-items: center; gap: 4px; }
.timeline-event-meta svg { width: 10px; }
.timeline-event .crew-stack { position: absolute; top: 12px; right: 12px; }
.timeline-now { position: absolute; z-index: 2; left: 58px; right: 0; height: 1px; background: var(--red); }
.timeline-now::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.rota-board { overflow: hidden; }
.rota-scroll { max-height: 720px; overflow-y: auto; }
.rota-board-header { padding: 18px; border-bottom: 1px solid var(--line); }
.rota-board-header h3 { margin: 0; font-size: 13px; }
.rota-board-header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.rota-event { padding: 15px 17px; }
.rota-event + .rota-event { border-top: 1px solid var(--line); }
.rota-event-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.rota-event-head strong { max-width: 180px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rota-event-head span { color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; }
.role-person { display: grid; grid-template-columns: minmax(70px, .85fr) minmax(0, 1.15fr); align-items: center; gap: 9px; min-height: 32px; font-size: 9px; }
.role-person > span:first-child { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.person-chip { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; background: #f3f1ee; font-weight: 700; }
.person-chip img { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.person-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-chip.open { color: #a52630; background: #feedef; }

.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; cursor: pointer; font-size: 9px; font-weight: 700; text-transform: capitalize; }
.filter-chip.active { color: white; border-color: var(--ink); background: var(--ink); }
.search-field { position: relative; min-width: 220px; }
.search-field svg { position: absolute; left: 11px; top: 50%; width: 14px; color: var(--soft); transform: translateY(-50%); }
.search-field input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: white; font-size: 10px; }
.search-field input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(117,87,255,.1); }

.schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.schedule-card { position: relative; overflow: hidden; padding: 19px; cursor: pointer; }
.schedule-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: var(--event-color); }
.schedule-card.past-shift { opacity: .64; filter: grayscale(.28) saturate(.58); }
.schedule-card.past-shift:hover { opacity: .76; }
.schedule-card-top { display: flex; justify-content: space-between; gap: 12px; }
.schedule-date { display: flex; width: 44px; flex: 0 0 auto; flex-direction: column; align-items: center; padding: 6px 5px; border-radius: 10px; background: #f1efeb; }
.schedule-date strong { font-family: "DM Mono", monospace; font-size: 16px; font-weight: 500; }
.schedule-date span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.schedule-status { align-self: flex-start; }
.schedule-card h3 { margin: 16px 0 6px; font-size: 14px; letter-spacing: -.035em; }
.schedule-card > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.schedule-card .event-facts { display: grid; gap: 7px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.event-facts span { display: flex; align-items: center; gap: 6px; }
.event-facts svg { width: 12px; }
.schedule-role { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 13px; border-top: 1px solid #ebe8e3; }
.schedule-role > span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.schedule-role strong { font-size: 10px; }
.schedule-card-actions { display: flex; gap: 7px; margin-top: 14px; }
.schedule-card-actions .button { flex: 1; min-height: 34px; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; font-size: 8px; font-weight: 800; text-transform: capitalize; }
.status-pill.live { color: #a52630; background: #fee7e9; }
.status-pill.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); animation: blink 1.3s infinite; }
.status-pill.upcoming, .status-pill.confirmed { color: #157b67; background: #e4f8f3; }
.status-pill.scheduled, .status-pill.complete { color: #2f699a; background: #e7f2ff; }
.status-pill.draft { color: #695887; background: #eeeafd; }
.status-pill.open { color: #a76d00; background: #fff5dc; }
.status-pill.accepted { color: #157b67; background: #e4f8f3; }
@keyframes blink { 50% { opacity: .35; } }

.shift-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; padding: 25px; margin-bottom: 22px; color: white; background: linear-gradient(120deg, #252130, #17151d); }
.shift-hero h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.05em; }
.shift-hero p { max-width: 500px; margin: 0; color: #aaa4b2; font-size: 10px; line-height: 1.55; }
.shift-hero-stats { display: flex; align-items: center; justify-content: flex-end; gap: 26px; }
.shift-hero-stats div { text-align: center; }
.shift-hero-stats strong { display: block; font-family: "DM Mono", monospace; font-size: 22px; font-weight: 500; }
.shift-hero-stats span { color: #8f8997; font-size: 8px; text-transform: uppercase; }
.shift-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shift-card { padding: 18px; }
.shift-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.role-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--role-color); background: color-mix(in srgb, var(--role-color), white 87%); }
.role-icon svg { width: 17px; }
.shift-date { color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; text-align: right; }
.shift-card h3 { margin: 15px 0 4px; font-size: 14px; letter-spacing: -.03em; }
.shift-card h4 { margin: 0; color: var(--role-color); font-size: 10px; }
.shift-details { display: grid; gap: 8px; margin: 15px 0 17px; color: var(--muted); font-size: 9px; }
.shift-details span { display: flex; align-items: center; gap: 6px; }
.shift-details svg { width: 12px; }
.shift-details .inline-avatar { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.shift-card .button { width: 100%; }
.pickup-approval { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.pickup-approval-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pickup-approval-head strong { font-size: 10px; }
.pickup-approval-head span { color: var(--muted); font-size: 8px; font-weight: 700; }
.pickup-approval-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.pickup-approval-actions select { width: 100%; min-width: 0; min-height: 39px; padding: 0 38px 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background-color: var(--card); font-size: 10px; font-weight: 700; }
.pickup-approval-actions .button { width: auto; min-width: 72px; padding: 0 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.messages-intro { margin-bottom: 16px; }
.push-notice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 18px; padding: 15px 17px; }
.push-notice.enabled { border-color: color-mix(in srgb, var(--green), white 60%); }
.push-notice-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; color: var(--red); background: color-mix(in srgb, var(--red), transparent 90%); }
.push-notice.enabled .push-notice-icon { color: var(--green); background: color-mix(in srgb, var(--green), transparent 88%); }
.push-notice-icon svg { width: 18px; }
.push-notice strong { display: block; font-size: 11px; }
.push-notice p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.messages-layout { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 15px; min-height: 620px; }
.message-sidebar { max-height: 680px; overflow-y: auto; padding: 10px; }
.message-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 9px 7px; }
.message-sidebar-head.people { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 17px; }
.message-sidebar-head h3 { margin: 0; font-size: 10px; }
.message-sidebar-head span { color: var(--muted); font: 500 9px "DM Mono", monospace; }
.message-sidebar-empty { margin: 5px 9px 12px; color: var(--muted); font-size: 9px; }
.message-thread-list { display: grid; }
.message-thread { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: 11px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.message-thread:hover, .message-thread.active { background: #f1efec; }
.message-thread > img, .channel-avatar { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border: 1px solid white; border-radius: 50%; object-fit: cover; color: white; background: linear-gradient(145deg, var(--red), #a3222a); font-size: 15px; font-weight: 800; }
.channel-avatar { background: linear-gradient(145deg, var(--purple), #46319d); }
.channel-avatar.large { width: 43px; height: 43px; font-size: 18px; }
.message-thread > span:nth-child(2) { min-width: 0; }
.message-thread strong, .message-thread small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-thread strong { font-size: 9px; }
.message-thread small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.message-thread > b { display: grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: 9px; color: white; background: var(--red); font-size: 7px; }
.message-thread > svg { width: 16px; height: 16px; color: var(--muted); }
.messages-inbox { width: min(900px, 100%); margin: 0 auto; padding: 12px; }
.message-inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 11px 10px; }
.message-inbox-heading.direct { margin-top: 11px; padding-top: 20px; border-top: 1px solid var(--line); }
.message-inbox-heading h3, .message-inbox-heading p { margin: 0; }
.message-inbox-heading h3 { font-size: 12px; }
.message-inbox-heading p { margin-top: 3px; color: var(--muted); font-size: 8px; }
.message-inbox-heading > span { display: grid; min-width: 28px; height: 28px; padding: 0 8px; place-items: center; border-radius: 14px; color: var(--muted); background: #f0eeeb; font: 600 8px "DM Mono", monospace; }
.message-inbox-list { display: grid; gap: 3px; }
.message-inbox-list .message-thread { min-height: 58px; padding: 10px 11px; }
.message-inbox-empty { display: grid; gap: 3px; padding: 20px 11px; color: var(--muted); }
.message-inbox-empty strong { color: var(--ink); font-size: 9px; }
.message-inbox-empty span { font-size: 8px; }
.message-conversation-page { width: min(980px, 100%); margin: 0 auto; }
.message-back { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 11px; padding: 7px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; }
.message-back:hover { color: var(--red); }
.message-back svg { width: 15px; height: 15px; }
.message-conversation-page .message-conversation { min-height: min(680px, calc(100dvh - 210px)); max-height: calc(100dvh - 190px); }
.message-conversation { display: grid; min-width: 0; max-height: 680px; grid-template-rows: auto minmax(300px, 1fr) auto; overflow: hidden; }
.message-conversation-head { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.message-conversation-head > img { width: 43px; height: 43px; flex: 0 0 auto; border: 1px solid white; border-radius: 50%; object-fit: cover; }
.message-conversation-head > div { min-width: 0; flex: 1; }
.message-conversation-head h2 { margin: 0; font-size: 15px; }
.message-conversation-head p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.message-bubbles { display: flex; min-height: 0; overflow-y: auto; flex-direction: column; gap: 8px; padding: 18px; }
.message-bubbles .empty-state { margin: auto; }
.message-bubble { max-width: min(78%, 560px); align-self: flex-start; padding: 10px 12px 8px; border-radius: 4px 14px 14px 14px; background: #f0eeeb; }
.message-bubble.mine { align-self: flex-end; border-radius: 14px 4px 14px 14px; color: white; background: var(--red); }
.message-bubble strong { display: block; margin-bottom: 4px; color: var(--purple); font-size: 7px; }
.message-bubble p { margin: 0; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble time { display: block; margin-top: 5px; color: var(--muted); font: 500 7px "DM Mono", monospace; text-align: right; }
.message-bubble.mine time { color: rgba(255,255,255,.72); }
.message-attachment { display: grid; max-width: 360px; overflow: hidden; border: 0; border-radius: 10px; color: var(--ink); background: rgba(255,255,255,.8); text-align: left; }
.message-attachment + p { margin-top: 8px; }
.message-attachment.image { width: 100%; padding: 0; cursor: pointer; }
.message-attachment img, .message-attachment video { display: block; width: 100%; max-height: 320px; object-fit: cover; background: #18161f; }
.message-attachment.video video { object-fit: contain; }
.message-attachment > span { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 7px 9px; overflow: hidden; color: var(--muted); font-size: 7px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment > span svg { width: 12px; height: 12px; flex: 0 0 auto; }
.message-bubble.mine .message-attachment { background: rgba(255,255,255,.94); }
.message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; padding: 12px; border-top: 1px solid var(--line); }
.message-composer-main { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 8px; }
.message-attach-button { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--card); cursor: pointer; }
.message-attach-button:hover { border-color: var(--red); color: var(--red); }
.message-attach-button svg { width: 18px; height: 18px; }
.message-composer textarea { width: 100%; min-width: 0; min-height: 46px; max-height: 130px; resize: vertical; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: var(--card); font: inherit; font-size: 10px; }
.message-composer textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,61,70,.09); }
.message-selected-attachment { display: grid; min-width: 0; grid-column: 1 / -1; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: #f4f2ef; }
.message-selected-attachment[hidden] { display: none; }
.message-selected-attachment > img, .message-selected-attachment > video { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #18161f; }
.message-selected-attachment > span { min-width: 0; }
.message-selected-attachment strong, .message-selected-attachment small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-selected-attachment strong { font-size: 8px; }
.message-selected-attachment small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.message-selected-attachment .icon-button { width: 33px; height: 33px; }
.message-locked { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; font-weight: 700; }
.message-locked svg { width: 14px; }
.channel-modal { max-width: 760px; }
.channel-reply-setting.full, .channel-access-group.full { grid-column: 1 / -1; }
.channel-reply-setting { display: block; cursor: pointer; }
.channel-reply-setting > input { position: absolute; opacity: 0; pointer-events: none; }
.channel-reply-setting > span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.channel-reply-setting svg { width: 19px; grid-row: 1 / span 2; color: var(--muted); }
.channel-reply-setting strong { font-size: 10px; }
.channel-reply-setting small { color: var(--muted); font-size: 8px; }
.channel-reply-setting > input:checked + span { border-color: var(--red); background: rgba(239,61,70,.06); }
.channel-reply-setting > input:checked + span svg { color: var(--red); }
.channel-access-group { min-width: 0; }
.channel-access-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.channel-access-head strong, .channel-access-head small { display: block; }
.channel-access-head strong { font-size: 9px; }
.channel-access-head small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.channel-person-grid { display: grid; max-height: 210px; overflow-y: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; }
.channel-person-option { display: grid; min-width: 0; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px; padding: 7px; border-radius: 9px; cursor: pointer; }
.channel-person-option:hover { background: #f4f2ef; }
.channel-person-option > input { accent-color: var(--red); }
.channel-person-option img { width: 29px; height: 29px; border: 1px solid white; border-radius: 50%; object-fit: cover; }
.channel-person-option span { min-width: 0; }
.channel-person-option strong, .channel-person-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-person-option strong { font-size: 8px; }
.channel-person-option small { color: var(--muted); font-size: 7px; }
.new-message-modal { max-width: 560px; }
.new-message-search { margin-bottom: 12px; }
.new-message-person-list { display: grid; max-height: min(58vh, 520px); overflow-y: auto; gap: 4px; }
.new-message-person { display: grid; width: 100%; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 11px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.new-message-person[hidden] { display: none; }
.new-message-person:hover { background: #f1efec; }
.new-message-person img { width: 40px; height: 40px; border: 1px solid white; border-radius: 50%; object-fit: cover; }
.new-message-person span { min-width: 0; }
.new-message-person strong, .new-message-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-message-person strong { font-size: 9px; }
.new-message-person small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.new-message-person > svg { width: 16px; height: 16px; color: var(--muted); }
.channel-delete-button { margin-right: auto; }
.shift-card.alert-focus { scroll-margin: 130px; animation: alertCardFocus 2.7s ease; }
@keyframes alertCardFocus {
  0%, 100% { border-color: var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.5); }
  18%, 68% { border-color: var(--red); box-shadow: 0 0 0 6px rgba(239,61,70,.16), 0 15px 35px rgba(239,61,70,.16); }
}
.empty-state { display: grid; min-height: 270px; grid-column: 1 / -1; place-items: center; align-content: center; padding: 30px; border: 1px dashed #cfcbc5; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-icon { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 12px; border-radius: 50%; color: var(--green); background: #e4f8f3; }
.empty-icon svg { width: 23px; }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 350px; margin: 0; font-size: 10px; line-height: 1.5; }

.template-grid, .venue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.template-card, .venue-card { overflow: hidden; }
.template-accent, .venue-accent { height: 5px; background: var(--card-color); }
.template-body, .venue-body { padding: 19px; }
.template-top, .venue-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.template-icon, .venue-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; color: var(--card-color); background: color-mix(in srgb, var(--card-color), white 87%); }
.template-icon svg, .venue-icon svg { width: 18px; }
.kebab { display: grid; width: 31px; height: 31px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.kebab svg { width: 14px; }
.template-card h3, .venue-card h3 { margin: 15px 0 5px; font-size: 14px; letter-spacing: -.035em; }
.template-category { color: var(--card-color); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.template-card p, .venue-card p { min-height: 31px; margin: 10px 0 15px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.venue-feedback-button { width: 100%; margin-top: 16px; }
.template-meta, .venue-meta { display: flex; gap: 15px; margin-bottom: 14px; color: var(--muted); font-size: 8px; }
.template-meta span, .venue-meta span { display: flex; align-items: center; gap: 5px; }
.template-meta svg, .venue-meta svg { width: 11px; }
.role-chips { display: flex; min-height: 47px; flex-wrap: wrap; align-content: flex-start; gap: 5px; padding-top: 13px; border-top: 1px solid #ebe8e3; }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; color: #5d5864; background: #f1efec; font-size: 7px; font-weight: 800; }
.role-chip i { width: 5px; height: 5px; border-radius: 50%; }
.template-footer { display: flex; gap: 7px; margin-top: 14px; }
.template-footer .button { flex: 1; min-height: 33px; }
.venue-facilities { display: flex; flex-wrap: wrap; gap: 5px; }
.venue-facilities span { padding: 4px 7px; border-radius: 6px; color: var(--muted); background: #f2f0ed; font-size: 7px; }

.role-library { margin-top: 24px; }
.role-library-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.role-library-item { display: flex; align-items: center; gap: 10px; padding: 13px; }
.role-library-item .role-icon { width: 32px; height: 32px; }
.role-library-item strong { display: block; font-size: 10px; }
.role-library-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }

.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.team-card { padding: 17px; }
.team-card-top { display: flex; justify-content: space-between; }
.team-photo { position: relative; display: block; width: 84px; height: 84px; flex: 0 0 auto; overflow: visible; padding: 0; border: 0; border-radius: 50%; background: none; cursor: default; }
button.team-photo { cursor: pointer; }
.team-photo img { display: block; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.team-photo-edit { position: absolute; right: 0; bottom: 1px; display: grid; width: 27px; height: 27px; place-items: center; border: 3px solid var(--card); border-radius: 50%; color: white; background: var(--red); box-shadow: 0 3px 9px rgba(24,22,31,.18); }
.team-photo-edit svg { width: 12px; }
.access-tag { align-self: flex-start; padding: 4px 7px; border-radius: 7px; color: #675792; background: #f0ecff; font-size: 7px; font-weight: 800; text-transform: capitalize; }
.team-card h3 { margin: 14px 0 3px; font-size: 13px; }
.team-card .job-title { color: var(--muted); font-size: 8px; }
.team-contact { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; }
.team-contact svg { width: 11px; }
.team-stats { display: flex; gap: 15px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eceae6; }
.team-stats div { display: flex; flex-direction: column; }
.team-stats strong { font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; }
.team-stats span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.team-login { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding: 9px 10px; border-radius: 10px; color: var(--muted); background: #f5f3f0; }
.team-login span { display: flex; min-width: 0; flex-direction: column; }
.team-login strong { overflow: hidden; color: var(--ink); font-family: "DM Mono", monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.team-login small { margin-top: 2px; color: #a52630; font-size: 8px; }
.team-login small.ready { color: #157b67; }
.team-manage { width: 100%; margin-top: 13px; }

.media-layout { display: grid; grid-template-columns: 1fr 280px; gap: 22px; }
.media-table { overflow: hidden; }
.media-row { display: grid; grid-template-columns: 38px minmax(150px, 1.25fr) minmax(120px, 1fr) 90px 90px 36px; align-items: center; gap: 12px; min-height: 63px; padding: 10px 15px; }
.media-row + .media-row { border-top: 1px solid #ebe9e5; }
.media-row.header { min-height: 39px; color: var(--muted); background: #faf9f7; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.file-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--purple); background: #f0ecff; }
.file-icon svg { width: 16px; }
.media-name { min-width: 0; }
.media-name strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.media-name span { color: var(--muted); font-size: 8px; }
.media-cell { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.media-upload-card { padding: 19px; }
.upload-zone { display: grid; min-height: 155px; place-items: center; align-content: center; padding: 20px; border: 1px dashed #c8c3cc; border-radius: 13px; color: var(--muted); background: #faf9f7; cursor: pointer; text-align: center; }
.upload-zone:hover { border-color: var(--purple); background: #f8f6ff; }
.upload-zone svg { width: 25px; margin-bottom: 9px; color: var(--purple); }
.upload-zone strong { color: var(--ink); font-size: 10px; text-transform: capitalize; }
.upload-zone span { margin-top: 4px; font-size: 8px; }
.upload-event-select { margin-top: 13px; }
.media-preview-button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--purple); background: white; cursor: pointer; }
.media-preview-button:hover { border-color: var(--purple); background: #f7f5ff; }
.media-preview-button svg { width: 14px; }
.media-preview-modal { width: min(980px, 100%); }
.media-preview-body { background: #f3f1ee; }
.media-preview-stage { display: grid; width: 100%; min-height: 360px; place-items: center; overflow: hidden; background: #18161f; }
.media-preview-stage.image-preview { padding: 20px; }
.media-preview-stage.image-preview img { display: block; max-width: 100%; max-height: min(68vh, 720px); object-fit: contain; border-radius: 8px; }
.media-preview-stage.audio-preview { align-content: center; gap: 16px; padding: 48px 30px; color: white; text-align: center; background: radial-gradient(circle at 50% 25%, rgba(239,61,70,.2), transparent 36%), #18161f; }
.media-preview-stage.audio-preview strong { max-width: 620px; font-size: 17px; overflow-wrap: anywhere; }
.media-preview-art { display: grid; width: 74px; height: 74px; place-items: center; border-radius: 24px; color: white; background: var(--red); box-shadow: 0 18px 38px rgba(239,61,70,.24); }
.media-preview-art svg { width: 32px; }
.media-preview-stage audio { width: min(620px, 100%); }
.media-preview-stage.video-preview video { display: block; width: 100%; max-height: min(68vh, 720px); background: black; }
.media-preview-stage.pdf-preview { background: #d8d5d0; }
.media-preview-stage.pdf-preview iframe { width: 100%; height: min(68vh, 760px); min-height: 520px; border: 0; background: white; }
.media-preview-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: white; }

.detail-drawer { position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); overflow-y: auto; padding: 0; background: var(--card); box-shadow: -20px 0 60px rgba(24,22,31,.18); transform: translateX(103%); transition: transform .28s cubic-bezier(.22,.8,.25,1); }
.detail-drawer.open { transform: translateX(0); }
.drawer-scrim { position: fixed; z-index: 65; inset: 0; visibility: hidden; opacity: 0; background: rgba(18,16,23,.48); transition: .25s ease; }
.drawer-scrim.open { visibility: visible; opacity: 1; }
.drawer-hero { position: relative; overflow: hidden; min-height: 175px; padding: 24px 26px; color: white; background: linear-gradient(130deg, color-mix(in srgb, var(--event-color), #111 64%), #15131b); }
.drawer-hero::after { content: ""; position: absolute; right: -80px; bottom: -100px; width: 270px; height: 270px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.025); }
.drawer-close { position: absolute; z-index: 2; right: 20px; top: 20px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: white; background: rgba(255,255,255,.08); cursor: pointer; }
.drawer-close svg { width: 16px; }
.drawer-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; color: #aaa3b3; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.drawer-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--event-color); }
.drawer-hero h2 { position: relative; z-index: 1; max-width: 340px; margin: 25px 0 13px; font-size: 25px; line-height: 1.08; letter-spacing: -.05em; }
.drawer-hero-facts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 13px; color: #aaa3b3; font-size: 9px; }
.drawer-hero-facts span { display: flex; align-items: center; gap: 5px; }
.drawer-hero-facts svg { width: 12px; }
.drawer-body { padding: 23px 26px 40px; }
.drawer-section + .drawer-section { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.drawer-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.drawer-section-head h3 { margin: 0; font-size: 12px; }
.drawer-section-head span { color: var(--muted); font-size: 8px; }
.assignment-list { display: grid; gap: 8px; }
.assignment-row { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr) auto; align-items: center; gap: 9px; min-height: 60px; padding: 7px 8px 7px 11px; border: 1px solid #e9e6e1; border-radius: 11px; }
.assignment-role { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 9px; font-weight: 700; }
.assignment-role i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.assignment-person:not(.static) { display: flex; min-width: 0; align-items: center; gap: 8px; }
.assignment-person select { width: 100%; min-width: 0; height: 46px; padding: 0 42px 0 14px; border: 1px solid #e4e0da; border-radius: 10px; outline: none; color: var(--ink); background-color: #f3f1ee; font-size: 9px; font-weight: 700; }
.assignment-select-avatar { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.assignment-person.static { display: flex; min-width: 0; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; }
.assignment-person.static img { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.assignment-person.static span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-ad { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: #f3f1ee; cursor: pointer; }
.assignment-ad.active { color: #a52630; background: #fee7e9; }
.assignment-ad svg { width: 13px; }
.drawer-notes { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.drawer-media { display: grid; gap: 8px; }
.drawer-media-row { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; background: #f6f4f1; }
.drawer-media-row .file-icon { width: 31px; height: 31px; }
.drawer-media-row strong { display: block; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-media-row span { color: var(--muted); font-size: 7px; }
.drawer-media-row a { color: var(--purple); font-size: 8px; font-weight: 700; }
.drawer-actions { display: flex; gap: 8px; margin-top: 24px; }
.drawer-actions .button { flex: 1; }
.drawer-feedback-actions { display: grid; gap: 8px; margin-top: 13px; }

.feedback-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.feedback-summary article { display: flex; min-height: 82px; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 17px 19px; }
.feedback-summary span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.feedback-summary strong { font-family: "DM Mono", monospace; font-size: 25px; font-weight: 500; }
.feedback-list { display: grid; gap: 13px; }
.feedback-card { padding: 20px; border-left: 8px solid var(--red); }
.feedback-card.reviewed { border-left-color: var(--green); opacity: .84; }
.feedback-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.feedback-person { display: flex; min-width: 0; align-items: center; gap: 10px; }
.feedback-person > img, .feedback-person > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; object-fit: cover; color: var(--muted); background: #f1efec; }
.feedback-person .feedback-initials { color: white; background: linear-gradient(135deg, var(--purple), var(--ink)); font-size: 13px; font-weight: 800; }
.feedback-person strong, .feedback-person small { display: block; }
.feedback-person strong { font-size: 12px; }
.feedback-person small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.feedback-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.feedback-category { padding: 6px 8px; border-radius: 8px; color: #5f5968; background: #f1efec; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.feedback-category.issue { color: #9f2430; background: #fff0f1; }
.feedback-category.idea { color: #5e48c7; background: #efebff; }
.feedback-category.positive { color: #16765f; background: #e7f8f3; }
.feedback-target { display: flex; align-items: center; gap: 10px; margin-top: 17px; padding: 12px; border-radius: 11px; background: #f7f5f2; }
.feedback-target > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--red); background: white; }
.feedback-target svg { width: 15px; }
.feedback-target strong, .feedback-target small { display: block; }
.feedback-target strong { font-size: 11px; }
.feedback-target small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.feedback-card > p { margin: 17px 0; color: var(--ink); font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.feedback-card > footer { display: flex; justify-content: flex-end; }

.modal-layer { position: fixed; z-index: 90; inset: 0; display: grid; visibility: hidden; overflow-x: hidden; overflow-y: auto; place-items: center; padding: 20px; opacity: 0; background: rgba(18,16,23,.5); backdrop-filter: blur(5px); transition: .2s ease; }
.modal-layer.open { visibility: visible; opacity: 1; }
.modal { width: min(540px, 100%); min-width: 0; max-width: 100%; max-height: calc(100vh - 40px); overflow-x: hidden; overflow-y: auto; border-radius: 20px; background: white; box-shadow: 0 30px 80px rgba(14,12,18,.28); transform: translateY(12px) scale(.985); transition: .22s ease; }
.modal-layer.open .modal { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.045em; }
.modal-head p { margin: 0; color: var(--muted); font-size: 9px; }
.modal-close { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.modal-close svg { width: 15px; }
.modal-body { min-width: 0; max-width: 100%; padding: 21px 24px 25px; }
.modal-body form, .modal form { min-width: 0; max-width: 100%; }
.form-grid { display: grid; min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.field { display: grid; min-width: 0; max-width: 100%; align-content: start; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #4f4a57; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select, .field textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background-color: white; font-size: 10px; }
.field select { padding-right: 42px; }
.field input[type="date"], .field input[type="time"] { min-width: 0; min-inline-size: 0; max-inline-size: 100%; height: 46px; padding-top: 0; padding-bottom: 0; line-height: 44px; }
.field input[type="date"]::-webkit-date-and-time-value,
.field input[type="time"]::-webkit-date-and-time-value { min-width: 0; height: 44px; padding: 0; line-height: 44px; text-align: left; }
.field input[type="date"]::-webkit-datetime-edit,
.field input[type="time"]::-webkit-datetime-edit { display: flex; height: 44px; align-items: center; padding: 0; }
.field textarea { min-height: 82px; padding-top: 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(117,87,255,.1); }
.field-hint { color: var(--muted); font-size: 8px; }
.form-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.form-note.full { grid-column: 1 / -1; margin: 0; }
.modal-actions { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.delete-person-button, .meeting-delete-button { margin-right: auto; }
.delete-warning { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 16px; border: 1px solid #f2c8cd; border-radius: 12px; color: #85222b; background: #fff5f5; }
.delete-warning > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: white; background: var(--danger); }
.delete-warning > span svg { width: 19px; }
.delete-warning strong { display: block; margin: 2px 0 5px; font-size: 12px; }
.delete-warning p { margin: 0; color: #7b4850; font-size: 10px; line-height: 1.55; }
.template-preview { display: flex; flex-wrap: wrap; gap: 5px; min-height: 34px; padding: 9px; border-radius: 9px; background: #f5f3f0; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 9px; }
.check-item input { width: 15px; height: 15px; accent-color: var(--purple); }
.swap-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swap-kind label { display: block; padding: 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.swap-kind input { position: absolute; opacity: 0; }
.swap-kind label:has(input:checked) { border-color: var(--purple); background: #f7f5ff; box-shadow: 0 0 0 2px rgba(117,87,255,.1); }
.swap-kind strong { display: block; font-size: 10px; }
.swap-kind span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.profile-options { display: grid; gap: 7px; }
.profile-option { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; text-align: left; }
.profile-option:hover, .profile-option.active { border-color: var(--purple); background: #f8f6ff; }
.profile-option img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.profile-option span { display: flex; flex-direction: column; }
.profile-option strong { font-size: 10px; }
.profile-option small { color: var(--muted); font-size: 8px; text-transform: capitalize; }
.profile-option svg { width: 15px; color: var(--purple); }
.account-summary { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 13px; background: #f5f3f0; }
.account-photo-button { position: relative; display: block; width: 82px; height: 82px; flex: 0 0 auto; overflow: visible; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.account-summary img { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; }
.account-photo-edit { position: absolute; right: -3px; bottom: -3px; display: grid; width: 28px; height: 28px; place-items: center; border: 3px solid #f5f3f0; border-radius: 50%; color: white; background: var(--red); }
.account-photo-edit svg { width: 13px; height: 13px; }
.account-summary > span { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.account-summary strong { font-size: 14px; }
.account-summary small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.account-photo-link { margin: 5px 0 0; padding: 0; border: 0; color: var(--red); background: none; cursor: pointer; font-size: 9px; font-weight: 800; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.mobile-settings-action { display: none !important; }
.profile-photo-editor { display: flex; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8f7f5; }
.profile-photo-editor img { width: 96px; height: 96px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.new-person-photo-placeholder { display: grid; width: 96px; height: 96px; flex: 0 0 auto; place-items: center; border: 2px dashed var(--line); border-radius: 50%; color: var(--soft); background: var(--card); }
.new-person-photo-placeholder[hidden] { display: none; }
.new-person-photo-placeholder svg { width: 30px; }
.new-person-photo-editor label.button { cursor: pointer; }
.profile-photo-editor > div { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.profile-photo-editor strong { font-size: 11px; }
.profile-photo-editor small { margin: 3px 0 9px; color: var(--muted); font-size: 8px; }
.profile-photo-editor .button { min-height: 34px; }
.forced-password .modal-close { display: none; }
.toast-region { position: fixed; z-index: 110; right: 22px; bottom: 22px; display: grid; gap: 8px; width: min(330px, calc(100vw - 30px)); }
.toast { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 12px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: white; background: #24212c; box-shadow: var(--shadow); animation: toastIn .25s ease; }
.toast-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #71dbbd; background: rgba(27,191,156,.13); }
.toast-icon.error { color: #ff8a95; background: rgba(232,72,85,.15); }
.toast-icon svg { width: 14px; }
.toast span { font-size: 9px; line-height: 1.4; }
.toast button { border: 0; color: #898390; background: none; cursor: pointer; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

.bottom-nav { display: none; }
.mobile-avatar { padding: 0; border: 0; border-radius: 50%; background: none; }
.mobile-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.member-mode .scheduler-only, body:not(.admin-mode) .admin-only { display: none !important; }
.member-mode .media-layout { grid-template-columns: minmax(0, 1fr); }

.planner-scroll { width: 100%; max-width: 100%; overflow: auto; max-height: 760px; }
.day-layout > * { min-width: 0; }
.view.day-view-shell {
  display: flex;
  height: calc(100dvh - 90px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(18px, 2vw, 28px) env(safe-area-inset-right, 0px) 24px env(safe-area-inset-left, 0px);
}
.day-view-shell .date-controller { flex: 0 0 auto; margin-bottom: 14px; padding: 0 clamp(22px, 3.4vw, 54px); }
.day-view-shell .day-layout { display: block; flex: 1 1 auto; min-height: 0; }
.day-view-shell .day-layout > section { height: 100%; min-width: 0; }
.day-view-shell .planner-scroll { height: 100%; max-height: none; border-right: 0; border-left: 0; border-radius: 0; }
.planner-grid {
  position: relative;
  display: grid;
  grid-template-columns: 60px repeat(var(--venues), minmax(148px, 1fr));
  grid-template-rows: 48px repeat(34, 44px);
  min-width: calc(60px + var(--venues) * 148px);
  isolation: isolate;
}
.planner-corner, .planner-venue, .planner-time { position: sticky; z-index: 8; display: flex; align-items: center; border-color: #e7e4df; background: #faf9f7; }
.planner-corner { z-index: 12; top: 0; left: 0; justify-content: center; border-right: 1px solid #ddd9d3; border-bottom: 1px solid #ddd9d3; color: var(--muted); font-family: "DM Mono", monospace; font-size: 7px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.planner-venue { top: 0; gap: 7px; padding: 0 10px; border-right: 1px solid #e4e1dc; border-bottom: 1px solid #ddd9d3; font-size: 9px; font-weight: 800; }
.planner-venue i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.planner-time { left: 0; justify-content: center; border-right: 1px solid #ddd9d3; border-bottom: 1px solid #ece9e5; color: var(--soft); font-family: "DM Mono", monospace; font-size: 7px; }
.planner-slot { border-right: 1px solid #efede9; border-bottom: 1px solid #efede9; background: white; }
.planner-event {
  z-index: 4;
  min-width: 0;
  margin: 2px 3px;
  overflow: hidden;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--event-color), white 52%);
  border-left: 6px solid var(--event-color);
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--event-color), white 89%);
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.planner-event:hover { z-index: 6; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.planner-event strong { display: block; overflow: hidden; font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.planner-event span { display: block; margin-top: 3px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 6px; }
.planner-event small { display: block; margin-top: 4px; color: color-mix(in srgb, var(--event-color), #111 42%); font-size: 6px; font-weight: 800; }
.planner-point {
  z-index: 7;
  display: flex;
  min-width: 0;
  height: 31px;
  align-self: start;
  align-items: center;
  gap: 7px;
  margin: 1px 4px;
  overflow: hidden;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--point-color), white 55%);
  border-left: 7px solid var(--point-color);
  border-radius: 9px;
  color: var(--ink);
  background: color-mix(in srgb, var(--point-color), white 93%);
  cursor: pointer;
  text-align: left;
  transform: translateY(var(--point-offset));
  transition: .18s ease;
}
.planner-point:hover { z-index: 9; box-shadow: var(--shadow-sm); }
.planner-point:not(.editable) { cursor: default; }
.planner-point strong { flex: 0 0 auto; font-family: "DM Mono", monospace; font-size: 8px; font-weight: 600; }
.planner-point span { min-width: 0; overflow: hidden; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.planner-meal-line { position: relative; z-index: 5; align-self: start; height: 0; border-top: 2px dashed #c88b2b; pointer-events: none; }
.planner-meal-line::after { content: ""; position: absolute; inset: -4px 0 auto; height: 6px; background: rgba(239,180,61,.09); }
.planner-meal-line span { position: absolute; z-index: 1; top: -12px; left: 9px; display: flex; height: 23px; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #d5a654; border-radius: 12px; color: #6f4a12; background: #fff5de; box-shadow: 0 2px 7px rgba(111,74,18,.11); font-family: "DM Mono", monospace; font-size: 7px; white-space: nowrap; }
.planner-meal-line span strong { font-family: "Manrope", system-ui, sans-serif; font-size: 8px; }
.search-result > svg { width: 14px; color: var(--muted); }

/* Larger, more legible application type scale */
body { font-size: 16px; }
.brand-copy small, .profile-switcher small, .nav-section-label { font-size: 10px; }
.profile-switcher strong { font-size: 12px; }
.nav-item { font-size: 14px; }
.topbar-context small { font-size: 11px; }
.topbar-context h1 { font-size: 22px; }
.button { font-size: 12px; }
.page-intro p { font-size: 14px; }
.section-header h2, .section-header h3 { font-size: 17px; }
.section-header p, .text-link { font-size: 12px; }
.signal-top, .stat-label { font-size: 11px; }
.signal-meta { font-size: 12px; }
.signal-countdown small, .stat-value small { font-size: 10px; }
.rundown-time strong { font-size: 14px; }
.rundown-time small { font-size: 10px; }
.rundown-copy h3 { font-size: 14px; }
.rundown-meta { font-size: 11px; }
.open-pill { font-size: 10px; }
.date-navigation h2 { font-size: 24px; }
.date-navigation h2 small { font-size: 11px; }
.meal-time-heading strong { font-size: 12px; }
.meal-time-heading small { font-size: 10px; }
.meal-time-item, .meal-time-item strong { font-size: 10px; }
.filter-chip, .search-field input { font-size: 11px; }
.schedule-card h3, .shift-card h3, .template-card h3, .venue-card h3 { font-size: 16px; }
.schedule-card > p, .schedule-card .event-facts, .shift-details, .template-card p, .venue-card p { font-size: 11px; }
.schedule-role > span, .status-pill, .shift-date, .template-category, .template-meta, .venue-meta { font-size: 10px; }
.schedule-role strong, .shift-card h4 { font-size: 12px; }
.shift-hero p { font-size: 12px; }
.shift-hero-stats span { font-size: 10px; }
.role-chip, .venue-facilities span, .access-tag, .team-stats span { font-size: 9px; }
.role-library-item strong { font-size: 12px; }
.role-library-item span, .team-card .job-title, .team-contact { font-size: 10px; }
.team-card h3 { font-size: 15px; }
.team-stats strong { font-size: 13px; }
.media-row.header { font-size: 9px; }
.media-name strong, .media-cell, .upload-zone strong { font-size: 11px; }
.media-name span, .upload-zone span { font-size: 10px; }
.drawer-label, .drawer-section-head span { font-size: 10px; }
.drawer-hero-facts, .assignment-role, .assignment-person select, .assignment-person.static { font-size: 11px; }
.drawer-section-head h3 { font-size: 14px; }
.drawer-notes { font-size: 12px; }
.drawer-media-row strong, .drawer-media-row a { font-size: 10px; }
.drawer-media-row span { font-size: 9px; }
.modal-head p, .field label, .field-hint, .check-item, .swap-kind span, .profile-option small, .toast span { font-size: 10px; }
.field input, .field select, .field textarea, .swap-kind strong, .profile-option strong { font-size: 12px; }

/* Day Schedule gets extra room for readable planning */
.day-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, .78fr); }
.planner-scroll, .rota-scroll { max-height: 800px; }
.planner-grid {
  grid-template-columns: 68px repeat(var(--venues), minmax(176px, 1fr));
  grid-template-rows: 56px repeat(34, 52px);
  min-width: calc(68px + var(--venues) * 176px);
}
.planner-corner { font-size: 9px; }
.planner-venue { font-size: 12px; }
.planner-time { font-size: 9px; }
.planner-event { padding: 8px 9px; }
.planner-event strong { font-size: 11px; line-height: 1.3; }
.planner-event span { font-size: 9px; }
.planner-event small { font-size: 8px; }
.rota-board-header h3 { font-size: 16px; }
.rota-board-header p { font-size: 11px; }
.rota-event { padding: 17px 18px; }
.rota-event-head strong { max-width: 220px; font-size: 12px; }
.rota-event-head span { font-size: 10px; }
.role-person { min-height: 38px; font-size: 11px; }
.person-chip { padding: 6px 8px; }
.person-chip img { width: 30px; height: 30px; }

/* Full application dark theme */
html[data-theme="dark"] {
  --ink: #f6f3fa;
  --ink-2: #ece7f1;
  --ink-3: #d8d1df;
  --paper: #111015;
  --paper-2: #17151d;
  --card: #1d1a23;
  --line: #3b3542;
  --muted: #b7afbf;
  --soft: #918999;
  --shadow: 0 16px 40px rgba(0,0,0,.28);
  --shadow-sm: 0 8px 24px rgba(0,0,0,.22);
  color-scheme: dark;
}
html[data-theme="dark"] .topbar { border-bottom-color: rgba(59,53,66,.88); background: rgba(17,16,21,.9); }
html[data-theme="dark"] .card { box-shadow: 0 1px 0 rgba(255,255,255,.025); }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .kebab,
html[data-theme="dark"] .media-preview-button,
html[data-theme="dark"] .media-preview-actions,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .pickup-approval-actions select,
html[data-theme="dark"] .profile-option,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .view-switcher { color: var(--ink); background-color: var(--card); }
html[data-theme="dark"] .rundown-item:hover,
html[data-theme="dark"] .media-row.header,
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .planner-corner,
html[data-theme="dark"] .planner-venue,
html[data-theme="dark"] .planner-time { background: #211e28; }
html[data-theme="dark"] .person-chip,
html[data-theme="dark"] .schedule-date,
html[data-theme="dark"] .role-chip,
html[data-theme="dark"] .venue-facilities span,
html[data-theme="dark"] .assignment-person select,
html[data-theme="dark"] .assignment-ad,
html[data-theme="dark"] .drawer-media-row,
html[data-theme="dark"] .template-preview { color: var(--ink); background-color: #29252f; }
html[data-theme="dark"] .team-login,
html[data-theme="dark"] .account-summary,
html[data-theme="dark"] .profile-photo-editor { background: #29252f; }
html[data-theme="dark"] .account-photo-edit { border-color: #29252f; }
html[data-theme="dark"] .team-login small { color: #ffabb1; }
html[data-theme="dark"] .team-login small.ready { color: #69dfc1; }
html[data-theme="dark"] .auth-screen { color: white; background: var(--red); }
html[data-theme="dark"] .auth-screen .field label { color: white; }
html[data-theme="dark"] .auth-screen .field input { color: #18161f; background: white; }
html[data-theme="dark"] .auth-message { color: white; background: rgba(108,15,22,.22); }
html[data-theme="dark"] .auth-error { color: #8f1f28; background: white; }
html[data-theme="dark"] .rundown-item + .rundown-item,
html[data-theme="dark"] .activity-item + .activity-item,
html[data-theme="dark"] .timeline-hour,
html[data-theme="dark"] .schedule-role,
html[data-theme="dark"] .role-chips,
html[data-theme="dark"] .team-stats,
html[data-theme="dark"] .media-row + .media-row,
html[data-theme="dark"] .assignment-row,
html[data-theme="dark"] .assignment-person select,
html[data-theme="dark"] .planner-corner,
html[data-theme="dark"] .planner-venue,
html[data-theme="dark"] .planner-time,
html[data-theme="dark"] .planner-slot { border-color: var(--line); }
html[data-theme="dark"] .planner-slot { background: #1b1820; }
html[data-theme="dark"] .crew-stack img,
html[data-theme="dark"] .crew-stack .open-avatar,
html[data-theme="dark"] .ring { background: conic-gradient(var(--green) var(--value), var(--paper-2) 0); }
html[data-theme="dark"] .ring::after { background: var(--card); }
html[data-theme="dark"] .progress-track { background: var(--paper-2); }
html[data-theme="dark"] .button-dark,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .view-switcher button.active { color: white; border-color: #4a4352; background: #38323f; }
html[data-theme="dark"] .button-danger { color: #ffabb1; border-color: rgba(239,61,70,.38); background: rgba(239,61,70,.12); }
html[data-theme="dark"] .delete-warning { color: #ffabb1; border-color: rgba(239,61,70,.38); background: rgba(239,61,70,.1); }
html[data-theme="dark"] .delete-warning p { color: #d7a4aa; }
html[data-theme="dark"] .feedback-person > span,
html[data-theme="dark"] .feedback-category,
html[data-theme="dark"] .feedback-target { background: #29252f; }
html[data-theme="dark"] .feedback-target > span { background: #211e28; }
html[data-theme="dark"] .feedback-category.issue { color: #ffabb1; background: rgba(239,61,70,.14); }
html[data-theme="dark"] .feedback-category.idea { color: #b8aaff; background: rgba(117,87,255,.16); }
html[data-theme="dark"] .feedback-category.positive { color: #69dfc1; background: rgba(27,191,156,.14); }
html[data-theme="dark"] .open-avatar,
html[data-theme="dark"] .open-pill,
html[data-theme="dark"] .person-chip.open,
html[data-theme="dark"] .assignment-ad.active { color: #ffabb1; background: rgba(239,61,70,.15); }
html[data-theme="dark"] .status-pill.live { color: #ffabb1; background: rgba(239,61,70,.16); }
html[data-theme="dark"] .status-pill.upcoming,
html[data-theme="dark"] .status-pill.confirmed,
html[data-theme="dark"] .status-pill.accepted { color: #69dfc1; background: rgba(27,191,156,.14); }
html[data-theme="dark"] .status-pill.scheduled,
html[data-theme="dark"] .status-pill.complete { color: #9acbff; background: rgba(69,152,255,.15); }
html[data-theme="dark"] .status-pill.draft { color: #c2b5ff; background: rgba(117,87,255,.17); }
html[data-theme="dark"] .status-pill.open { color: #ffd27a; background: rgba(239,180,61,.14); }
html[data-theme="dark"] .attention-card { border-color: rgba(239,61,70,.34); background: linear-gradient(135deg, rgba(239,61,70,.1), var(--card)); }
html[data-theme="dark"] .attention-icon { color: #ff969e; background: rgba(239,61,70,.15); }
html[data-theme="dark"] .alert-link + .alert-link { border-color: var(--line); }
html[data-theme="dark"] .alert-link:hover { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .attention-row { border-color: rgba(239,61,70,.2); }
html[data-theme="dark"] .meal-time-strip { border-color: rgba(239,180,61,.3); background: rgba(239,180,61,.075); }
html[data-theme="dark"] .meal-rundown-marker { background: rgba(239,180,61,.075); }
html[data-theme="dark"] .meal-marker-badge { color: #ffd27a; border-color: rgba(239,180,61,.28); background: #28231c; }
html[data-theme="dark"] .schedule-point-rundown { background: rgba(239,61,70,.055); }
html[data-theme="dark"] .schedule-point-badge { color: #ffabb1; border-color: rgba(239,61,70,.3); background: #2d1d23; }
html[data-theme="dark"] .meal-time-icon { color: #ffd27a; background: rgba(239,180,61,.15); }
html[data-theme="dark"] .meal-time-item { color: var(--muted); border-color: rgba(239,180,61,.28); background: #28231c; }
html[data-theme="dark"] button.meal-time-item:hover { border-color: #9c7838; background: #30291e; }
html[data-theme="dark"] .meal-time-item svg { color: #ffd27a; }
html[data-theme="dark"] .settings-meal-day > header { background: #211e27; }
html[data-theme="dark"] .settings-day-icon { color: #ffd27a; background: rgba(239,180,61,.15); }
html[data-theme="dark"] .empty-state { border-color: #514a59; }
html[data-theme="dark"] .empty-icon { color: #69dfc1; background: rgba(27,191,156,.14); }
html[data-theme="dark"] .role-icon { background: color-mix(in srgb, var(--role-color), #211e28 80%); }
html[data-theme="dark"] .template-icon,
html[data-theme="dark"] .venue-icon { background: color-mix(in srgb, var(--card-color), #211e28 80%); }
html[data-theme="dark"] .file-icon,
html[data-theme="dark"] .access-tag { color: #b9a9ff; background: rgba(117,87,255,.17); }
html[data-theme="dark"] .timeline-event { border-color: color-mix(in srgb, var(--event-color), #29252f 62%); background: color-mix(in srgb, var(--event-color), #211e28 86%); }
html[data-theme="dark"] .planner-event { border-color: color-mix(in srgb, var(--event-color), #29252f 58%); color: var(--ink); background: color-mix(in srgb, var(--event-color), #211e28 82%); }
html[data-theme="dark"] .planner-event small { color: color-mix(in srgb, var(--event-color), white 38%); }
html[data-theme="dark"] .planner-point { border-color: color-mix(in srgb, var(--point-color), #29252f 60%); color: var(--ink); background: color-mix(in srgb, var(--point-color), #211e28 83%); }
html[data-theme="dark"] .planner-meal-line { border-color: #e0a541; }
html[data-theme="dark"] .planner-meal-line::after { background: rgba(239,180,61,.12); }
html[data-theme="dark"] .planner-meal-line span { border-color: #8c682c; color: #ffe0a5; background: #312718; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
html[data-theme="dark"] .upload-zone { border-color: #514a59; }
html[data-theme="dark"] .upload-zone:hover,
html[data-theme="dark"] .media-preview-button:hover,
html[data-theme="dark"] .profile-option:hover,
html[data-theme="dark"] .profile-option.active,
html[data-theme="dark"] .swap-kind label:has(input:checked) { background: #292432; }
html[data-theme="dark"] .media-preview-body,
html[data-theme="dark"] .media-preview-stage.pdf-preview { background: #2d2933; }
html[data-theme="dark"] .message-thread:hover,
html[data-theme="dark"] .message-thread.active,
html[data-theme="dark"] .channel-person-option:hover,
html[data-theme="dark"] .new-message-person:hover { background: #29252f; }
html[data-theme="dark"] .message-inbox-heading > span { background: #302c36; }
html[data-theme="dark"] .message-bubble { background: #302c36; }
html[data-theme="dark"] .message-bubble.mine { background: var(--red); }
html[data-theme="dark"] .message-composer textarea,
html[data-theme="dark"] .message-attach-button { border-color: var(--line); color: var(--ink); background: #211e28; }
html[data-theme="dark"] .message-selected-attachment { background: #29252f; }
html[data-theme="dark"] .channel-reply-setting > input:checked + span { border-color: var(--red); background: rgba(239,61,70,.1); }
html[data-theme="dark"] .push-notice.enabled { border-color: rgba(27,191,156,.4); }
html[data-theme="dark"] .field label { color: #c3bbc9; }
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder,
html[data-theme="dark"] .search-field input::placeholder { color: #817989; }
html[data-theme="dark"] select option { color: var(--ink); background: var(--card); }
html[data-theme="dark"] .modal { box-shadow: 0 30px 80px rgba(0,0,0,.58); }
html[data-theme="dark"] .icon-button:hover { border-color: #5a5261; }

@media (max-width: 1120px) {
  :root { --sidebar: 218px; }
  .schedule-grid, .shift-grid, .template-grid, .venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role-library-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  :root { --sidebar: 240px; }
  .sidebar { left: calc(0px - var(--sidebar)); transform: none; transition: left .25s ease; -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
  .sidebar.open { z-index: 68; left: 0; transform: none; }
  .desktop-manage-only { display: none; }
  .main-shell { margin-left: 0; padding-top: 72px; }
  .topbar { left: 0; height: 72px; padding: 0 20px; background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar-context small { display: none; }
  .topbar-context h1 { font-size: 20px; }
  .mobile-brand, .mobile-only, .mobile-avatar { display: grid; }
  .mobile-brand .brand-mark { width: 37px; height: 37px; }
  .topbar-context .icon-button { border: 0; background: transparent; }
  .topbar-actions .icon-button { display: none; }
  .topbar .scheduler-only { display: none !important; }
  .view { min-height: calc(100vh - 72px); padding: 24px 20px 96px; }
  .dashboard-layout, .day-layout, .media-layout { grid-template-columns: minmax(0, 1fr); }
  .dashboard-side { grid-template-columns: 1fr 1fr; }
  .activity-card { grid-column: 1 / -1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--line); }
  .bottom-nav { position: fixed; z-index: 45; right: 13px; bottom: max(12px, env(safe-area-inset-bottom)); left: 13px; display: flex; height: 61px; align-items: center; justify-content: space-around; padding: 4px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 19px; color: #96909d; background: #18161f; box-shadow: 0 14px 40px rgba(24,22,31,.28); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bottom-item { position: relative; display: grid; min-width: 55px; align-self: stretch; align-content: center; gap: 2px; place-items: center; border: 0; color: inherit; background: none; cursor: pointer; font-size: 9px; font-weight: 700; }
  .bottom-item svg { width: 18px; height: 18px; }
  .bottom-item .bottom-avatar { width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; object-fit: cover; }
  .bottom-item span { text-transform: capitalize; }
  .bottom-item.active { color: white; }
  .bottom-item.active::before { content: ""; position: absolute; bottom: -5px; width: 18px; height: 2px; border-radius: 2px 2px 0 0; background: var(--red); }
  .bottom-action { display: grid; width: 43px; height: 43px; margin: 0; place-items: center; border: 4px solid var(--paper); border-radius: 50%; color: white; background: var(--red); box-shadow: 0 7px 18px rgba(239,61,70,.32); }
  .bottom-action svg { width: 19px; }
  .media-layout > aside { order: -1; }
  .mobile-settings-action { display: inline-flex !important; grid-column: 1 / -1; }
  .drawer-scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }

  html.standalone body { min-height: 100dvh; overscroll-behavior-y: none; }
  html.standalone .main-shell { padding-top: calc(72px + env(safe-area-inset-top)); }
  html.standalone .topbar {
    height: calc(72px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }
  html.standalone .view {
    min-height: calc(100dvh - 72px - env(safe-area-inset-top));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
  }
  html.standalone .sidebar {
    padding-top: calc(28px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
  }
  html.standalone .bottom-nav {
    right: max(13px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(13px, env(safe-area-inset-left));
  }
}

@media (max-width: 640px) {
  .auth-screen { align-items: start; padding-top: max(28px, calc(env(safe-area-inset-top) + 18px)); padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px)); }
  .auth-card { padding: 20px 8px; }
  .auth-brand { margin-bottom: 38px; }
  .auth-brand img { width: min(180px, 54vw); }
  .account-actions { grid-template-columns: 1fr; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  .assignment-person select { font-size: 13px !important; }
  .topbar { padding: 0 15px; }
  .view { padding: 20px 15px 92px; }
  html.standalone .topbar { padding-top: env(safe-area-inset-top); padding-right: max(15px, env(safe-area-inset-right)); padding-left: max(15px, env(safe-area-inset-left)); }
  html.standalone .view { padding-right: max(15px, env(safe-area-inset-right)); padding-bottom: calc(92px + env(safe-area-inset-bottom)); padding-left: max(15px, env(safe-area-inset-left)); }
  html.standalone .drawer-hero { padding-top: calc(23px + env(safe-area-inset-top)); }
  html.standalone .drawer-close { top: calc(20px + env(safe-area-inset-top)); }
  html.standalone .drawer-body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  html.standalone .modal-body { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  html.standalone .toast-region { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .page-intro { display: block; margin-bottom: 20px; }
  .page-intro h2 { font-size: 30px; }
  .page-intro p { font-size: 12px; }
  .page-actions { margin-top: 15px; }
  .push-notice { grid-template-columns: auto minmax(0, 1fr); }
  .push-notice .button { grid-column: 1 / -1; width: 100%; }
  .messages-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .message-sidebar { max-height: 245px; }
  .message-conversation { min-height: 540px; max-height: none; }
  .message-conversation-head { align-items: flex-start; flex-wrap: wrap; }
  .message-conversation-head .button { width: 100%; }
  .message-bubbles { min-height: 330px; padding: 14px; }
  .message-bubble { max-width: 88%; }
  .message-composer { grid-template-columns: minmax(0, 1fr); }
  .message-composer .button { width: 100%; }
  .channel-person-grid { grid-template-columns: minmax(0, 1fr); }
  .signal-card { min-height: 170px; padding: 21px; }
  .signal-content { display: block; margin-top: 22px; }
  .signal-content h2 { font-size: 24px; }
  .signal-countdown { margin-top: 16px; text-align: left; }
  .signal-countdown strong { font-size: 17px; }
  .happening-card { min-height: 0; padding: 18px 20px; }
  .happening-list { margin-top: 11px; }
  .happening-item { padding: 12px 0; }
  .happening-item h2 { font-size: 18px; }
  .schedule-card-actions { flex-wrap: wrap; }
  .schedule-card-actions .button[data-action="shift-feedback"] { order: 3; flex-basis: 100%; }
  .feedback-summary { gap: 7px; }
  .feedback-summary article { min-height: 75px; align-items: flex-start; flex-direction: column; padding: 12px; }
  .feedback-summary strong { font-size: 21px; }
  .feedback-card { padding: 16px; }
  .feedback-card > header { align-items: flex-start; flex-direction: column; }
  .feedback-tags { justify-content: flex-start; }
  .feedback-card > footer .button { width: 100%; }
  .stat-item { padding: 15px; }
  .stat-value strong { font-size: 18px; }
  .rundown-item { grid-template-columns: 57px 3px minmax(0, 1fr); gap: 10px; min-height: 77px; padding: 11px 12px; }
  .rundown-item > .crew-stack, .rundown-item > .rundown-crew { display: none; }
  .rundown-meta span:nth-child(2) { display: none; }
  .dashboard-side { grid-template-columns: 1fr; }
  .activity-card { grid-column: auto; }
  .date-controller { display: block; }
  .date-navigation { justify-content: space-between; }
  .date-navigation h2 { min-width: 0; text-align: center; font-size: 20px; }
  .section-header-actions { align-items: flex-end; flex-direction: column; }
  .section-header-actions .button { min-height: 36px; }
  .meal-time-strip { align-items: stretch; flex-direction: column; gap: 10px; }
  .meal-time-heading { min-width: 0; }
  .meal-time-items { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .meal-time-item { flex: 0 0 auto; }
  .settings-meal-row { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
  .settings-meal-row .button { grid-column: 1 / -1; width: 100%; }
  .view-switcher { display: none; }
  .timeline { min-height: 620px; padding-left: 58px; }
  .timeline-event .crew-stack { display: none; }
  .timeline-event { padding-right: 9px; }
  .timeline-event h3 { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .timeline-now { left: 48px; }
  .planner-scroll { border-radius: 15px; }
  .planner-grid { grid-template-columns: 64px repeat(var(--venues), 168px); min-width: calc(64px + var(--venues) * 168px); }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .filter-chip { flex: 0 0 auto; }
  .search-field { min-width: 0; }
  .schedule-grid, .shift-grid, .template-grid, .venue-grid, .team-grid, .role-library-grid { grid-template-columns: 1fr; }
  .shift-hero { grid-template-columns: 1fr; padding: 21px; }
  .shift-hero-stats { justify-content: flex-start; }
  .role-library-grid { gap: 7px; }
  .media-row { grid-template-columns: 38px minmax(0, 1fr) 36px; }
  .media-row > :nth-child(3), .media-row > :nth-child(4), .media-row > :nth-child(5) { display: none; }
  .media-row.header { display: none; }
  .media-preview-stage { min-height: 280px; }
  .media-preview-stage.pdf-preview iframe { height: 58vh; min-height: 380px; }
  .media-preview-actions { align-items: stretch; flex-direction: column; }
  .media-preview-actions .button { width: 100%; }
  .detail-drawer { width: 100%; }
  .drawer-hero { min-height: 185px; padding: 23px 20px; }
  .drawer-body { padding: 20px 17px 90px; }
  .assignment-row { grid-template-columns: minmax(75px, .7fr) minmax(0, 1.3fr) auto; padding-left: 8px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .field.full { grid-column: auto; }
  .modal-layer { align-items: end; padding: 0; }
  .modal { width: 100%; max-width: 100vw; max-height: 92vh; border-radius: 21px 21px 0 0; }
  .modal-head, .modal-body { padding-right: 18px; padding-left: 18px; }
  .modal form, .modal .form-grid, .modal .field { width: 100%; overflow-x: hidden; }
  .modal .field input, .modal .field select, .modal .field textarea { width: 100%; min-width: 0; max-width: 100%; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; }
  .modal .field input[type="date"], .modal .field input[type="time"] { -webkit-appearance: none; appearance: none; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .toast-region { right: 15px; bottom: 86px; }
}

@media (max-width: 860px) {
  .view.day-view-shell {
    height: calc(100dvh - 72px);
    padding-top: 14px;
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: max(83px, calc(71px + env(safe-area-inset-bottom, 0px)));
    padding-left: env(safe-area-inset-left, 0px);
  }
  html.standalone .view.day-view-shell { height: calc(100dvh - 72px - env(safe-area-inset-top, 0px)); }
  .day-view-shell .date-controller { margin-bottom: 12px; padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 640px) {
  .day-view-shell .date-controller { padding-right: 15px; padding-left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.profile-switcher img,
.mobile-avatar img,
.nav-item .nav-avatar,
.bottom-item .bottom-avatar,
.crew-stack img,
.person-chip img,
.shift-details .inline-avatar,
.team-photo img,
.feedback-person > img,
.assignment-select-avatar,
.assignment-person.static img,
.profile-option img,
.account-summary img,
.profile-photo-editor img,
.activity-item img { border: 1px solid white; }
