/* ── Bull Housekeeping · polished fintech UI ───────────────────────── */
:root {
  --page: #f6f7f9;
  --bg: #ffffff;
  --ink: #101223;
  --muted: #6b7080;
  --faint: #9aa0ad;
  --line: #e9eaf0;
  --line-2: #dcdee6;
  --accent: #5a3d82;
  --accent-2: #472e6b;
  --accent-deep: #241638;
  --accent-soft: #f0ebf8;
  --accent-ring: rgba(90, 61, 130, .14);
  --green: #148a48;
  --green-soft: #e7f6ee;
  --amber: #b3790f;
  --amber-soft: #fcf3de;
  --red: #cc3d2b;
  --red-soft: #fceae7;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 18, 35, .04), 0 0 0 1px var(--line);
  --shadow-md: 0 4px 16px rgba(16, 18, 35, .07), 0 0 0 1px var(--line);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  background: var(--page); color: var(--ink); min-height: 100vh; line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 650; letter-spacing: -0.022em; }
h4 { font-weight: 600; letter-spacing: -0.015em; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; letter-spacing: inherit; }
input, select, textarea {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
label {
  font-weight: 600; font-size: .72rem; display: block; margin: 16px 0 6px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}

.app { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }
.app.wide { max-width: none; padding: 0; }

.card {
  background: var(--bg); border: none; border-radius: var(--r);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px;
}
.card.flat { box-shadow: none; background: transparent; border: 1px dashed var(--line-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; border-radius: var(--r-sm);
  padding: 11px 18px; min-height: 46px; border: 1px solid transparent;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; text-align: center;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(36, 22, 56, .25); }
.btn.primary:hover { background: var(--accent-2); }
.btn.terra { background: var(--red); color: #fff; }
.btn.pink { background: var(--accent-2); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--ink); box-shadow: 0 1px 2px rgba(16,18,35,.04); }
.btn.ghost:hover { border-color: var(--faint); }
.btn.danger { background: #fff; border-color: var(--line-2); color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.block { display: flex; width: 100%; min-height: 50px; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: .84rem; border-radius: 8px; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* status pills, white, hairline, coloured dot */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 3px 10px; font-weight: 550; font-size: .76rem;
  background: #fff; border: 1px solid var(--line-2); color: var(--ink); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pill.green::before { background: var(--green); }
.pill.gold::before { background: var(--amber); }
.pill.red::before { background: var(--red); }
.pill.terra::before { background: var(--red); }
.pill.pink::before { background: var(--accent); }
.pill.grey { color: var(--muted); }
.pill.grey::before { background: var(--faint); }

/* segmented / filter control */
.seg {
  display: inline-flex; gap: 4px; padding: 4px; background: #eceef2;
  border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 18px;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border-radius: 9px; padding: 8px 18px; font-weight: 550; font-size: .84rem;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); white-space: nowrap; transition: background .15s, color .15s;
  font-variant-numeric: tabular-nums;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,18,35,.12); font-weight: 600; }

/* ── Login ── */
.login-hero { text-align: center; padding: 52px 0 32px; }
.login-hero .logo { font-size: 3rem; }
.login-hero h1 { font-size: 1.55rem; margin-top: 18px; }
.login-hero p { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.name-tile {
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  padding: 22px 10px; text-align: center; transition: transform .08s, box-shadow .15s;
  width: 100%;
}
.name-tile:active { transform: scale(.97); }
.name-tile:hover { box-shadow: var(--shadow-md); }
.name-tile .face {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.name-tile .nm { font-weight: 600; font-size: 1.02rem; }

.pin-dots { display: flex; gap: 13px; justify-content: center; margin: 24px 0; }
.pin-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--line-2); transition: background .12s; }
.pin-dot.full { background: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 292px; margin: 0 auto; }
.pin-key {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  font-size: 1.5rem; font-weight: 550; padding: 16px 0; font-variant-numeric: tabular-nums;
}
.pin-key:active { transform: scale(.96); background: var(--accent-soft); }
.pin-key.util { background: transparent; box-shadow: none; font-size: .88rem; color: var(--muted); font-weight: 550; }

/* ── Housekeeper ── */
.greet { display: flex; align-items: center; gap: 12px; padding: 8px 4px 18px; }
.greet h1 { font-size: 1.35rem; }
.greet .sub { color: var(--muted); font-size: .86rem; margin-top: 1px; }
.greet .out { margin-left: auto; color: var(--muted); font-weight: 550; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }

.teamline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.teamline .mate {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--page); border-radius: 999px;
  padding: 4px 11px; font-weight: 550; font-size: .8rem;
}
.note-line { margin-top: 12px; background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 13px; font-size: .88rem; color: var(--accent-deep); }

.area-card {
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  padding: 13px 15px; margin-bottom: 9px; text-align: left;
  transition: transform .08s, box-shadow .15s;
}
.area-card:active { transform: scale(.99); }
.area-card:hover { box-shadow: var(--shadow-md); }
.area-card .badge {
  min-width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-weight: 650; font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.area-card .badge.room { background: var(--accent-soft); color: var(--accent); }
.area-card .badge.common { background: var(--page); color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .02em; }
.area-card .meta { flex: 1; min-width: 0; }
.area-card .meta .ttl { font-weight: 600; font-size: .98rem; }
.area-card .meta .st { font-size: .8rem; color: var(--muted); margin-top: 1px; }
.area-card.done { opacity: .55; }
.area-card .tick { font-size: 1.15rem; color: var(--faint); }

.prog { height: 6px; background: #eceef2; border-radius: 999px; overflow: hidden; margin: 12px 0 4px; }
.prog > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s cubic-bezier(.4,0,.2,1); }

.check-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 13px 14px; margin-bottom: 7px; text-align: left;
  font-size: .94rem; font-weight: 500; transition: background .15s;
}
.check-item .box {
  min-width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-2);
  display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff;
  transition: all .12s; flex: none;
}
.check-item.on { background: #fbfcfd; }
.check-item.on .box { background: var(--green); border-color: var(--green); }
.check-item.on .lbl { text-decoration: line-through; color: var(--faint); }
.check-item .extra-tag { margin-left: auto; }

.banner {
  border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 12px;
  font-size: .88rem; display: flex; gap: 9px; align-items: flex-start;
}
.banner.warn { background: var(--amber-soft); color: #7c5a12; }
.banner.info { background: var(--green-soft); color: #0f5e33; }
.banner.bad { background: var(--red-soft); color: var(--red); }

.topbar { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.topbar .back { font-size: .88rem; font-weight: 600; color: var(--accent); padding: 8px 10px 8px 0; }
.topbar h2 { font-size: 1.2rem; flex: 1; }

/* ── Admin shell ── */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: none; background: #fff; border-right: 1px solid var(--line);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 4px 12px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side .brand img { width: 118px; display: block; }
.side .brand span { display: block; font-size: .72rem; font-weight: 550; color: var(--muted); margin-top: 7px; text-transform: uppercase; letter-spacing: .07em; }
.navbtn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-sm); font-weight: 550; font-size: .875rem;
  color: var(--muted); text-align: left; transition: background .12s, color .12s;
}
.navbtn:hover { background: var(--page); color: var(--ink); }
.navbtn.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.navbtn .ic { display: inline-flex; flex: none; }
.navbtn .ic svg { width: 18px; height: 18px; }
.navbtn.on .ic { color: var(--accent); }
.side .foot { margin-top: auto; }
.main { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1600px; }
.main-head { margin-bottom: 22px; }
.main-head h2 { font-size: 1.4rem; }
.main-head p { color: var(--muted); font-size: .9rem; margin-top: 3px; }

.mobbar, .scrim { display: none; }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .mobbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
  }
  .mobbar img { width: 74px; display: block; }
  .hamb {
    width: 42px; height: 42px; border-radius: 10px; border: none;
    background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
    position: relative; z-index: 70;
  }
  .hamb svg { width: 22px; height: 22px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: 268px; z-index: 60;
    transform: translateX(-103%); transition: transform .24s ease;
    box-shadow: 8px 0 30px rgba(16, 18, 35, .18); overflow-y: auto;
  }
  .side.open { transform: none; }
  .scrim {
    display: block; position: fixed; inset: 0; background: rgba(16, 18, 35, .4);
    z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .main { padding: 18px 14px 60px; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.room-chip {
  border-radius: var(--r-sm); padding: 10px 6px; text-align: center; font-weight: 600;
  background: #fff; box-shadow: var(--shadow); border: 1.5px solid transparent;
  font-size: .88rem; width: 100%; position: relative; transition: box-shadow .12s, border-color .12s;
  font-variant-numeric: tabular-nums;
}
.room-chip:hover { box-shadow: var(--shadow-md); }
.room-chip .who { display: block; font-size: .64rem; font-weight: 550; color: var(--muted); margin-top: 2px; min-height: .95em; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }

.team-box { border-left: 3px solid; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.team-box .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.team-box .hd h3 { flex: 1; font-size: 1.02rem; }
.member-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.member-pick button {
  border-radius: 999px; padding: 6px 13px; font-weight: 550; font-size: .82rem;
  background: var(--page); color: var(--muted); border: 1px solid transparent; transition: all .12s;
}
.member-pick button:hover { border-color: var(--line-2); }
.member-pick button.on { background: var(--accent); color: #fff; }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 550; font-size: .92rem; }
.list-row .s { font-size: .8rem; color: var(--muted); margin-top: 1px; }
.idx {
  width: 22px; height: 22px; border-radius: 50%; background: var(--page); color: var(--muted);
  font-size: .72rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  flex: none; font-variant-numeric: tabular-nums;
}

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.pending { background: var(--line-2); }
.dot.in_progress { background: var(--amber); }
.dot.done { background: var(--green); }
.dot.skipped { background: var(--red); }

/* defect thumbnails */
.thumb {
  width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover;
  flex: none; cursor: pointer; background: var(--page); box-shadow: inset 0 0 0 1px var(--line);
}
.thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--faint); cursor: default; }
.thumb.ph svg { width: 18px; height: 18px; }

.photo-picker {
  display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--line-2);
  border-radius: var(--r-sm); padding: 12px; background: var(--page); cursor: pointer;
  transition: border-color .15s;
}
.photo-picker:hover { border-color: var(--accent); }
.photo-picker img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.photo-picker .txt { font-weight: 550; color: var(--muted); font-size: .88rem; }

.modal-wrap {
  position: fixed; inset: 0; background: rgba(16, 18, 35, .4); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto; padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
  animation: slideup .22s cubic-bezier(.4,0,.2,1);
}
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 20px; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 1.15rem; margin-bottom: 4px; }

.celebrate {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(36, 22, 56, .96); color: #fff; animation: fadein .3s;
}
.celebrate .big { font-size: 4rem; animation: pop .5s cubic-bezier(.34,1.56,.64,1); }
.celebrate h2 { font-size: 1.6rem; margin: 12px 0 4px; }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.confetti { position: fixed; top: -20px; font-size: 1.4rem; z-index: 210; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-weight: 550; font-size: .88rem;
  padding: 10px 18px; border-radius: 999px; z-index: 300; animation: fadein .2s;
  max-width: 90vw; text-align: center; box-shadow: 0 8px 28px rgba(16,18,35,.3);
}
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .grow { flex: 1; }
.hidden { display: none !important; }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; margin: 64px auto; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── v4 additions ─────────────────────────────────────────────────── */
.assign-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.assign-bar .lbl {
  font-size: .72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; flex: none;
}
.seg .dot { width: 8px; height: 8px; }

.preview-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-deep); color: #fff; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; font-size: .86rem; font-weight: 550;
}
.preview-bar button { color: #fff; }

.step-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.step-row:last-child { border-bottom: none; }
.step-btn {
  width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; font-size: 1.05rem; font-weight: 600; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.step-btn:active { background: var(--accent-soft); border-color: var(--accent); }
.step-qty { min-width: 26px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ── v5 additions ─────────────────────────────────────────────────── */
.modal { position: relative; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--page); color: var(--muted);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: #eceef2; color: var(--ink); }
.modal h3 { padding-right: 40px; }

.info-btn {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 12px; font-weight: 700; font-style: italic;
  display: inline-flex; align-items: center; justify-content: center; font-family: Georgia, serif;
}
.info-btn:hover { background: var(--accent); color: #fff; }

.room-chip .kebab {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; color: var(--muted); font-size: 15px; font-weight: 700;
}
.room-chip .kebab:hover { background: rgba(16,18,35,.07); color: var(--ink); }

.menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 12px; border-radius: var(--r-sm); font-size: .95rem; font-weight: 550;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child { border-bottom: none; }
.menu-row:hover { background: var(--page); }
.menu-row .mi { width: 22px; text-align: center; font-size: 1rem; flex: none; }

.help-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: .93rem; line-height: 1.55; color: #3a3d4d; }
.help-row .idx { margin-top: 2px; }

.idx.pri { background: var(--accent); color: #fff; }
.area-card .idx { width: 24px; height: 24px; font-size: .78rem; }

/* v6: AI cards, SOP photos, weather, per-room minibar */
.ai-card { background: linear-gradient(135deg, #f6f1ff 0%, #eef6ff 52%, #fdf1f7 100%); border: 1px solid #e5ddf4; }
.ai-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: rgba(255,255,255,.75); border: 1px solid #e5ddf4;
  border-radius: 999px; padding: 4px 10px;
}
.sop-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; display: block; }
.sop-mini { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; display: block; }
.wx-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.wx-day { flex: 1; min-width: 66px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; }
.wx-day .d { font-size: .66rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.wx-day .i { font-size: 1.45rem; margin: 4px 0 2px; }
.wx-day .t { font-size: .82rem; font-weight: 700; }
.wx-day .r { font-size: .68rem; color: var(--muted); margin-top: 2px; }
.wx-day.warn { border-color: #e7b96a; background: #fdf7ec; }
.plan-flash {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 60;
  background: var(--accent-deep); color: #fff; border-radius: 999px; padding: 11px 20px;
  font-weight: 700; font-size: .9rem; box-shadow: 0 8px 24px rgba(36,22,56,.35);
}

/* v7: designed AI section headers, clickable weather days */
.ai-sec { margin-top: 16px; }
.ai-sec:first-child { margin-top: 0; }
.ai-head { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; padding: 5px 12px; margin-bottom: 6px; }
.ai-line { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; line-height: 1.6; padding: 4px 0; }
.ai-line .ai-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
.ai-p { font-size: .9rem; line-height: 1.7; margin: 2px 0 6px; }
button.wx-day { cursor: pointer; transition: transform .08s, box-shadow .15s; font: inherit; color: inherit; }
button.wx-day:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* v8: alerts badge */
.navbtn .nbadge { margin-left: auto; background: var(--green, #148a48); color: #fff; border-radius: 999px; font-size: .66rem; font-weight: 800; padding: 2px 7px; line-height: 1.3; }

/* v9: branded dropdowns */
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a3d82' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  font-weight: 550;
  cursor: pointer;
}
select:hover { border-color: var(--accent); }

/* v10: big green completion button */
.btn.done-big {
  background: linear-gradient(135deg, #1fa25b, #148a48);
  color: #fff; border: none;
  min-height: 62px; font-size: 1.05rem; font-weight: 800;
  border-radius: 16px; letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(20, 138, 72, .32);
  animation: doneGlow 2s ease-in-out infinite;
}
.btn.done-big:active { transform: scale(.98); }
@keyframes doneGlow {
  0%, 100% { box-shadow: 0 10px 24px rgba(20, 138, 72, .28); }
  50% { box-shadow: 0 12px 32px rgba(20, 138, 72, .5); }
}

/* v11: profile photos */
.face-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; display: block; border: 2px solid #fff; box-shadow: var(--shadow); }

/* v12: solid pills carry no status dot */
.pill.solid::before { display: none; }

/* v13: empty who-line on area chips takes no space */
.room-chip .who:empty { display: none; }

/* v14: roomier area chips so long names never touch the border */
.room-grid { grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); }
.room-chip { padding-left: 9px; padding-right: 9px; }

/* v15: green confirm button */
.btn.green { background: linear-gradient(135deg, #1fa25b, #148a48); color: #fff; border: none; box-shadow: 0 6px 16px rgba(20, 138, 72, .28); }
.btn.green:active { transform: scale(.98); }

/* v16: checklist item descriptions */
.check-item .lbl .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: 2px; line-height: 1.35; }

/* v17: inline line-icon inside buttons */
.ic-inline { display: inline-flex; }
.ic-inline svg { width: 15px; height: 15px; }

/* v18: 72 hour priority countdown */
.pill.alarm { background: #c62828; border-color: #c62828; color: #fff; font-weight: 700; animation: alarmPulse 1.4s ease-in-out infinite; }
.pill.alarm::before { display: none; }
@keyframes alarmPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); } 50% { box-shadow: 0 0 0 7px rgba(198, 40, 40, 0); } }

/* v19: roomier rota columns + branded calendar */
.grid-2.wide-gap { gap: 36px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--faint); text-transform: uppercase; padding: 6px 0; }
.cal-day { border: none; background: none; border-radius: 10px; min-height: 42px; font-size: .93rem; font-weight: 550; color: var(--ink); cursor: pointer; font-family: inherit; }
.cal-day:hover { background: var(--accent-soft); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day.sel { background: var(--accent); color: #fff; font-weight: 700; }

/* v20: minimalist clean-type tags */
.ct-tag { display: inline-block; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid; vertical-align: 1px; line-height: 1.3; }
.ct-full { color: #5a7d6b; border-color: #cfdfd6; background: #eef5f1; }
.ct-refresh { color: #2c6cb0; border-color: #cfe1f5; background: #e8f1fb; }
.ct-stay { color: #5a3d82; border-color: #e5ddf4; background: #f0ebf8; }

/* v21: breathing room after the last seg button (scroll containers swallow trailing padding) */
.seg::after { content: ''; flex: 0 0 8px; }

/* v22: date bar that behaves on phones */
.datebar { padding: 10px 14px; position: relative; display: flex; align-items: center; gap: 8px; min-height: 62px; flex-wrap: wrap; }
.datebar-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; display: flex; align-items: center; }
@media (max-width: 940px) {
  .datebar-center { position: static; transform: none; width: 100%; justify-content: center; }
  .datebar .blabel { display: none; }
}

/* v23: proper mobile pass for the admin screens */
@media (max-width: 700px) {
  .main { padding: 16px 12px 56px; }
  .main-head { margin-bottom: 16px; }
  .main-head h2 { font-size: 1.22rem; }
  .main-head p { font-size: .84rem; }
  .row { flex-wrap: wrap; row-gap: 8px; }
  .list-row { flex-wrap: wrap; row-gap: 6px; }
  .team-box { padding: 14px; }
  .team-box .hd { flex-wrap: wrap; row-gap: 6px; }
  .seg button { padding: 8px 13px; }
  input, textarea, select { font-size: 16px; }
  .grid-2 { gap: 14px; }
  .grid-2.wide-gap { gap: 20px; }
  .assign-bar { gap: 8px; }
  .datebar { padding: 10px; gap: 6px; }
  .cal-day { min-height: 38px; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); }
  h4 { font-size: .95rem; }
}

/* v24: pickable names look pickable */
.member-pick button { background: #fff; border-color: var(--line-2); color: var(--ink); }
.member-pick button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* v25: live now pulse on the board */
.live-now { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; color: #2e7d4f; background: #e7f6ee; border: 1px solid #d2eedd; border-radius: 999px; padding: 2px 10px 2px 8px; vertical-align: 1px; }
.live-now .ld { width: 7px; height: 7px; border-radius: 50%; background: #22a55b; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34,165,91,.45); opacity: 1; } 50% { box-shadow: 0 0 0 5px rgba(34,165,91,0); opacity: .7; } }

/* v26: even seg edges, trailing spacer now mirrors the left padding */
.seg { padding-right: 0; }
.seg::after { flex: 0 0 0; }

/* v27: encased note + plan-status strips on the team cards */
.ack-line { margin-top: 8px; border-radius: var(--r-sm); padding: 9px 13px; font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ack-line.ok { background: #e7f6ee; color: #148a48; }
.ack-line.wait { background: #fdf6e3; color: #7c5a12; }

/* v28: mission critical banner on Maintenance */
.crit-banner { display: flex; align-items: center; gap: 14px; cursor: pointer; background: linear-gradient(135deg, #fdecec, #fdf0e6); border: 1.5px solid #f2c4c4; border-radius: 16px; padding: 16px 20px; animation: critGlow 2s ease-in-out infinite; }
@keyframes critGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(204,61,43,.28); } 50% { box-shadow: 0 0 0 9px rgba(204,61,43,0); } }

/* ── v29: reply accordion ── */
details.reply summary { cursor: pointer; list-style: none; }
details.reply summary::-webkit-details-marker { display: none; }
details.reply summary::after { content: " ⌄"; }
details.reply[open] summary::after { content: " ⌃"; }

/* ── v30: maintenance nav alarm ── */
.nav-alarm { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-left: auto; margin-right: 7px; flex: 0 0 auto; animation: mxPulse 1.2s ease-in-out infinite; }
@keyframes mxPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(204, 61, 43, .45); opacity: 1; } 50% { box-shadow: 0 0 0 5px rgba(204, 61, 43, 0); opacity: .7; } }

/* v31: hide the default accordion marker on card summaries */
.card details summary::-webkit-details-marker { display: none; }
.card details summary::marker { content: ""; }

/* v32: accordion chevron on card summaries */
.card details summary .chev { font-size: 1rem; color: var(--muted); transition: transform .2s ease; flex: 0 0 auto; }
.card details[open] summary .chev { transform: rotate(180deg); }

/* v33: night porter tab in proper dark mode, subtle lavender undertone */
.main.night-mode { background: radial-gradient(1100px 500px at 85% -5%, rgba(146, 126, 210, .10), transparent 55%), #111116; }
.main.night-mode .main-head h2 { color: #eeecf7; }
.main.night-mode .main-head p { color: #948fa9; }
.main.night-mode .card { background: #23232f; border-color: #3a3a4c; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.main.night-mode .card strong, .main.night-mode .card h3, .main.night-mode .card .t, .main.night-mode .datebar strong { color: #eeecf7; }
.main.night-mode .card .muted, .main.night-mode .card .s, .main.night-mode .card > p, .main.night-mode .card details > p { color: #948fa9; }
.main.night-mode .list-row { border-color: #333342; }
.main.night-mode .btn.ghost { background: #2c2c3a; border-color: #434356; color: #dad7e6; box-shadow: none; }
.main.night-mode .btn.ghost:hover { border-color: #6a6580; }
.main.night-mode .btn.ghost:disabled { color: #5d5971; }
.main.night-mode .pill { background: #2c2c3a; border-color: #434356; color: #dad7e6; }
.main.night-mode .pill.grey { color: #948fa9; }
.main.night-mode .card .chev { color: #948fa9; }
.card details summary .chev svg { width: 20px; height: 20px; display: block; }

/* v34: a full night sky of stars across the night porter tab */
.main.night-mode { position: relative; }
.main.night-mode .card { position: relative; }
.main.night-mode::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 37px 43px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 133px 189px, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1.3px 1.3px at 251px 87px, rgba(230,220,255,.55), transparent 60%),
    radial-gradient(1px 1px at 311px 264px, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1.4px 1.4px at 197px 331px, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 88px 279px, rgba(230,220,255,.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 356px 151px, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 24px 137px, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1.1px 1.1px at 288px 21px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 171px 66px, rgba(230,220,255,.35), transparent 60%),
    radial-gradient(1.3px 1.3px at 63px 351px, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 398px 312px, rgba(255,255,255,.3), transparent 60%);
  background-size: 420px 380px;
  background-repeat: repeat;
}
.main.night-mode::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 111px 78px, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1.6px 1.6px at 428px 231px, rgba(230,220,255,.75), transparent 60%),
    radial-gradient(1.8px 1.8px at 296px 419px, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.5px 1.5px at 561px 121px, rgba(255,255,255,.65), transparent 60%);
  background-size: 640px 520px;
  background-repeat: repeat;
  animation: starTwinkle 3.4s ease-in-out infinite;
}
@keyframes starTwinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* v35: list rows breathe on phones, text gets the full width and actions wrap below */
@media (max-width: 700px) {
  .list-row { flex-wrap: wrap; row-gap: 8px; }
  .list-row .grow { flex: 1 1 0; min-width: calc(100% - 70px); }
  .list-row .pill { white-space: normal; }
}

/* v36: tidy phone date bar: Today pill on top, date dead centre between the arrows, pills left with the calendar bottom right */
.db-pills { display: contents; }
@media (max-width: 700px) {
  .datebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 8px; padding: 14px 12px; }
  .datebar-center { display: contents; }
  .datebar-center > strong { grid-column: 2; grid-row: 2; justify-self: center; text-align: center; white-space: normal; line-height: 1.25; }
  .datebar-center > .pill, .datebar-center > .btn { grid-column: 1 / -1; grid-row: 1; justify-self: center; margin-left: 0 !important; }
  #dPrev, #ndPrev { grid-column: 1; grid-row: 2; }
  #dNext, #ndNext { grid-column: 3; grid-row: 2; }
  .db-pills { grid-column: 1 / 3; grid-row: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .db-pills:empty { display: none; }
  #dCal { grid-column: 3; grid-row: 3; align-self: end; justify-self: end; }
  #dPrev, #dNext, #dCal, #ndPrev, #ndNext {
    min-height: 42px !important; min-width: 46px; padding: 0 12px !important;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.05rem; position: relative; z-index: 1;
  }
  .datebar > span[style*="flex:1"], .datebar #wxCheckBtn { display: none !important; }
}
.cal-ic svg { width: 18px; height: 18px; }

/* v37: pills that carry a wordmark drop the status dot */
.pill.logo::before { display: none; }

/* v38: video check rows in the plan builder, compact and tidy on phones */
.qc-plan-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.qc-plan-row .qn { flex: 1; min-width: 40%; font-size: .88rem; font-weight: 600; }
.qc-plan-row .qi { display: flex; gap: 8px; align-items: center; }
@media (max-width: 700px) {
  .qc-plan-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; gap: 6px; }
  .qc-plan-row .qn { flex: 1 1 100%; min-width: 0; font-size: .85rem; }
  .qc-plan-row .qi { width: 100%; }
  .qc-plan-row .qi select { flex: 1 1 auto !important; width: auto !important; min-height: 36px !important; font-size: .84rem !important; font-weight: 500; }
  .qc-plan-row .qi input[type="time"] { flex: 0 0 92px !important; min-height: 36px !important; font-size: .84rem !important; }
}

/* v39: on phones, skip the placeholder icon when there is no photo, real photos still show */
@media (max-width: 700px) {
  .list-row .thumb.ph { display: none; }
}

/* v40: idea rows on phones, full-width text with actions wrapping below */
@media (max-width: 700px) {
  .idea-row > .grow { flex: 1 1 100%; }
}

/* v41: AI auto-price button, gradient and glow */
.btn.ai {
  background: linear-gradient(135deg, #9a6ff0 0%, #5a3d82 55%, #3d2760 100%);
  color: #fff; border: none;
  min-height: 40px; padding: 8px 16px; font-size: .88rem; font-weight: 700;
  box-shadow: 0 4px 14px rgba(90, 61, 130, .35);
  position: relative; overflow: hidden;
}
.btn.ai::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.25), transparent);
  animation: aiSheen 2.8s ease-in-out infinite;
}
@keyframes aiSheen { 0% { left: -60%; } 55%, 100% { left: 120%; } }
.btn.ai:active { transform: scale(.97); }
.btn.ai:disabled { opacity: .7; }

/* v42: phone pass. Toolbar buttons under each tab heading share the row edge to edge
   instead of dangling at odd widths, so every screen's action row looks deliberate. */
@media (max-width: 700px) {
  #tabBody > .row.mb > .btn.small { flex: 1 1 auto; min-height: 42px; }
  #tabBody > .row.mb > .seg { flex: 1 1 100%; }
  #tabBody > .row.mb > select { flex: 1 1 auto; min-width: 0; max-width: none; }
  .main-head p { line-height: 1.45; }
}


/* v43: a phone must never scroll sideways. Anything wider than the screen
   wraps or scrolls inside its own box (like .seg), never the whole page. */
@media (max-width: 860px) {
  html, body { overflow-x: hidden; }
  .shell, .main { max-width: 100vw; overflow-x: hidden; }
  .main .card { max-width: 100%; }
}
