/* ============================================================
   栈住 · 素白 (Porcelain Gray-White · Apple Liquid Glass)  next.css
   Premium gray-white · thick translucent glass · full-screen 房态
   ============================================================ */

@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }

:root {
  color-scheme: light;

  /* ---- ink ---- */
  --ink: #16181b;
  --text: rgba(22, 24, 27, 0.80);
  --sub: rgba(22, 24, 27, 0.56);
  --muted: rgba(22, 24, 27, 0.40);
  --faint: rgba(22, 24, 27, 0.24);
  --hair: rgba(22, 24, 27, 0.09);

  /* ---- single warm accent (from 身份信息), used sparingly ---- */
  --accent: #b0793a;
  --accent-deep: #855a1e;
  --accent-soft: rgba(176, 121, 58, 0.14);

  /* ---- graphite fill (occupied / primary action) ---- */
  --graphite: linear-gradient(158deg, #2c2f34, #16181b 78%);
  --graphite-ink: #f3f2ee;

  /* ---- refined status palette (gray-white world) ---- */
  --arrive: #6f8aa8;   --arrive-deep: #3f5670;  --arrive-fill: rgba(150, 176, 202, 0.20);
  --clean:  #8c9088;   --clean-deep:  #5b5f58;
  --repair: #b0563f;   --repair-deep: #8a3d2b;  --repair-fill: rgba(176, 86, 63, 0.15);
  --calm:   #6d8b74;   --calm-deep:   #45663c;  --calm-fill: rgba(120, 156, 128, 0.16);
  --action-blue: linear-gradient(155deg, #718ba7, #49647f);
  --action-green: linear-gradient(155deg, #789681, #4f7059);
  --action-warm: linear-gradient(155deg, #c49a64, #9a6b35);

  /* ---- glass (login-panel recipe: translucent + thick) ---- */
  --glass-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.16));
  --glass-bg-thick: linear-gradient(150deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.20));
  --glass-rim: rgba(255, 255, 255, 0.74);
  --blur: blur(17px) saturate(1.6) brightness(1.05);       /* mobile-tuned: 12-20px */
  --blur-lite: blur(13px) saturate(1.5) brightness(1.04);

  /* thick-glass shadow stack: big drop + top lit edge + bottom wall + inner rim */
  --lift:
    0 34px 78px -30px rgba(20, 26, 34, 0.34),
    0 3px 10px -4px rgba(20, 26, 34, 0.08),
    inset 0 1.6px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -22px 42px -26px rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  --lift-sm:
    0 14px 26px -16px rgba(20, 26, 34, 0.30),
    inset 0 1.2px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --disp: -apple-system, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --num: ui-rounded, "SF Pro Display", -apple-system, "Segoe UI", "PingFang SC", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.72, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);

  --shell: 480px;
  --pad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.44;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(60% 44% at 84% -8%, rgba(206, 216, 228, 0.55), transparent 60%),
    radial-gradient(52% 40% at -6% 6%, rgba(255, 255, 255, 0.72), transparent 62%),
    radial-gradient(64% 50% at 50% 116%, rgba(214, 220, 226, 0.42), transparent 64%),
    linear-gradient(180deg, #fafbfc 0%, #f4f5f7 55%, #eef0f2 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---- ambient neutral light ---- */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.5; will-change: transform; }
.orb-a { width: 48vw; height: 48vw; left: -12vw; top: -8vh;
  background: radial-gradient(circle at 40% 40%, rgba(212, 222, 234, 0.62), transparent 68%); animation: drift1 30s var(--ease) infinite; }
.orb-b { width: 42vw; height: 42vw; right: -14vw; top: 20vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6), transparent 68%); animation: drift2 36s var(--ease) infinite; }
.orb-c { width: 54vw; height: 54vw; left: 16vw; bottom: -22vh;
  background: radial-gradient(circle at 50% 50%, rgba(224, 214, 202, 0.34), transparent 70%); animation: drift1 44s var(--ease) infinite reverse; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(5vw, 4vh) scale(1.1); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vw, 3vh) scale(1.06); } }

/* ============================================================ shell */
.app {
  position: relative; z-index: 1;
  max-width: var(--shell); margin: 0 auto;
  min-height: 100dvh; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--pad) calc(90px + var(--safe-b));
}
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.crown {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 15px 7px 8px; border-radius: 999px; border: 0;
  background: var(--glass-bg); backdrop-filter: var(--blur-lite); -webkit-backdrop-filter: var(--blur-lite);
  box-shadow: var(--lift-sm); color: var(--ink); cursor: pointer; transition: transform 0.2s var(--ease);
}
.crown:active { transform: scale(0.97); }
.crown .seal {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--disp); font-weight: 800; font-size: 15px; color: var(--graphite-ink); background: var(--graphite);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 4px 10px -5px rgba(20,26,34,0.7);
}
.crown b { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.crown .chev { color: var(--muted); }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--glass-bg); backdrop-filter: var(--blur-lite); -webkit-backdrop-filter: var(--blur-lite);
  box-shadow: var(--lift-sm); color: var(--ink); cursor: pointer; transition: transform 0.2s var(--ease);
}
.icon-btn:active { transform: scale(0.92) rotate(-8deg); }
.icon-btn svg { width: 19px; height: 19px; }

/* marquee band (身份信息 flavor) */
.ticker { position: relative; height: 26px; margin: 4px 0 12px; overflow: hidden;
  border-block: 1px solid var(--hair); display: flex; align-items: center; white-space: nowrap; }
.ticker span { display: inline-block; padding-left: 100%;
  font-family: var(--disp); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  animation: marquee 40s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 100vw)); } }

.eyebrow { font-family: var(--disp); font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.headline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 3px 0 0; }
.headline h1 { margin: 0; font-size: 27px; font-weight: 680; letter-spacing: -0.035em; color: var(--ink); }
.headline .count { font-family: var(--num); font-size: 12.5px; font-weight: 600; color: var(--muted); font-feature-settings: "tnum"; }

/* ============================================================ glass primitive */
/* Base card: NO live blur (used many times per screen) — opaque-enough translucent bg so it
   reads well with or without backdrop-filter. Only the few "hero" surfaces below get real blur. */
.glass {
  position: relative; border-radius: 26px;
  background: linear-gradient(150deg, rgba(255,255,255,0.68), rgba(255,255,255,0.5));
  border: 1px solid var(--glass-rim);
  box-shadow: var(--lift); isolation: isolate;
}
.glass::after {  /* specular streak */
  content: ""; position: absolute; inset: 1px 1px auto 1px; height: 42%;
  border-radius: 25px 25px 60% 60% / 25px 25px 26px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
  opacity: 0.6; pointer-events: none; z-index: -1;
}

/* ============================================================ TODAY */
.stack { display: flex; flex-direction: column; gap: 13px; }

.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }

/* HERO — extra-thick translucent glass */
.hero {
  padding: 22px 22px 19px; border-radius: 30px;
  background: var(--glass-bg-thick);
  border: 1px solid rgba(255,255,255,0.82);
  backdrop-filter: blur(34px) saturate(1.7) brightness(1.06); -webkit-backdrop-filter: blur(34px) saturate(1.7) brightness(1.06);
  box-shadow:
    0 44px 96px -34px rgba(20,26,34,0.40),
    0 5px 16px -6px rgba(20,26,34,0.10),
    inset 0 2.2px 0 rgba(255,255,255,1),
    inset 0 -1px 1px rgba(255,255,255,0.6),
    inset 0 -30px 56px -30px rgba(255,255,255,0.62),
    inset 0 0 0 1.2px rgba(255,255,255,0.22),
    inset 0 -3px 8px -3px rgba(20,26,34,0.05);
}
.hero-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.gauge { position: relative; width: 122px; height: 122px; flex: 0 0 auto; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .track { fill: none; stroke: rgba(22,24,27,0.10); stroke-width: 11; }
.gauge .fill { fill: none; stroke: url(#inkArc); stroke-width: 11; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s var(--ease); filter: drop-shadow(0 2px 5px rgba(20,26,34,0.28)); }
.gauge .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge .center b { font-family: var(--num); font-size: 34px; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); line-height: 1; font-feature-settings: "tnum"; white-space: nowrap; }
.gauge .center b i { font-size: 16px; font-style: normal; font-weight: 600; opacity: 0.55; }
.gauge .center > span { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--sub); letter-spacing: 0.04em; }

.hero-money { min-width: 0; }
.hero-money .lab { font-size: 12px; font-weight: 600; color: var(--sub); letter-spacing: 0.02em; }
.hero-money .amt { font-family: var(--num); font-size: 40px; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); line-height: 1.02; margin: 2px 0 7px; font-feature-settings: "tnum"; }
.hero-money .amt i { font-size: 20px; font-style: normal; font-weight: 600; color: var(--muted); margin-right: 2px; }
.hero-money .live { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; color: var(--calm-deep); }
.hero-money .live.wait { color: var(--accent-deep); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--calm); animation: pulse 2.6s var(--ease) infinite; }
.live.wait .dot-live { background: var(--accent); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 currentColor; } 55% { box-shadow: 0 0 0 7px transparent; } }

/* KPI chips */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.kpi { padding: 14px 8px 12px; border-radius: 20px; text-align: center; display: grid; gap: 4px; }
.kpi b { font-family: var(--num); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; font-feature-settings: "tnum"; }
.kpi span { font-size: 11px; font-weight: 600; color: var(--sub); white-space: nowrap; }
.kpi i.tag { width: 7px; height: 7px; border-radius: 50%; margin: 0 auto; }
.tag.t-arrive { background: var(--arrive); } .tag.t-stay { background: var(--ink); }
.tag.t-depart { background: var(--accent); } .tag.t-vacant { background: var(--calm); }

/* today flow */
.panel { padding: 16px; border-radius: 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
.panel-head .t { display: flex; flex-direction: column; gap: 2px; }
.panel-head h2 { margin: 0; font-size: 18px; font-weight: 660; letter-spacing: -0.02em; color: var(--ink); }
.link-btn { border: 0; background: none; color: var(--ink); font-weight: 650; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; padding: 4px 2px; }
.link-btn svg { width: 15px; height: 15px; }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.flow-item { padding: 14px 12px; border-radius: 18px; display: grid; gap: 4px; min-width: 0; border: 1px solid var(--hair); background: rgba(255,255,255,0.34); }
.flow-item span { font-size: 11px; font-weight: 700; color: var(--sub); }
.flow-item b { font-family: var(--num); font-size: 27px; font-weight: 700; color: var(--ink); line-height: 1; font-feature-settings: "tnum"; }
.flow-item em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-item.warn { background: var(--repair-fill); } .flow-item.warn span { color: var(--repair-deep); }
.flow-item.info { background: var(--arrive-fill); } .flow-item.info span { color: var(--arrive-deep); }
.flow-item.ok { background: var(--calm-fill); } .flow-item.ok span { color: var(--calm-deep); }

/* quick actions (fill space, útil) */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1px; }
.quick-btn { position: relative; isolation: isolate; overflow: hidden; min-height: 58px; border: 0; border-radius: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 650; font-size: 14.5px;
  background: var(--glass-bg); backdrop-filter: var(--blur-lite); -webkit-backdrop-filter: var(--blur-lite); color: var(--ink); box-shadow: var(--lift-sm); transition: transform 0.16s var(--ease); }
.quick-btn:active { transform: scale(0.97); }
.quick-btn svg { width: 19px; height: 19px; }
.quick-btn.dark { color: var(--graphite-ink); background: var(--graphite); box-shadow: 0 16px 30px -16px rgba(20,26,34,0.7), inset 0 1px 0 rgba(255,255,255,0.14); }
.quick-btn.dark::before, .pill-btn.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; z-index: -1;
  background: conic-gradient(from var(--ang), rgba(255,255,255,0) 0deg, rgba(255,255,255,0) 72%, rgba(255,255,255,0.5) 88%, rgba(255,255,255,0.95) 96%, rgba(255,255,255,0) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 3.6s linear infinite; }

.alert-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--repair-fill); color: var(--repair-deep); font-weight: 700; font-size: 13px; box-shadow: var(--lift-sm);
  backdrop-filter: var(--blur-lite); -webkit-backdrop-filter: var(--blur-lite); }
.alert-pill .dot-live { background: var(--repair); }
.alert-pill:active { transform: scale(0.97); }

/* ============================================================ ROOMS — full-screen grid */
.rooms-view { flex: 1; display: flex; flex-direction: column; gap: 11px; min-height: 0; }
.date-rail { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 20px; }
.date-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.date-days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; min-width: 44px; padding: 7px 6px; border-radius: 14px; border: 1px solid transparent; background: none; display: grid; gap: 2px; justify-items: center; cursor: pointer; scroll-snap-align: center; transition: all 0.2s var(--ease); }
.day span { font-size: 10.5px; font-weight: 650; color: var(--muted); }
.day b { font-family: var(--num); font-size: 15px; font-weight: 650; color: var(--sub); font-feature-settings: "tnum"; line-height: 1; }
.day.on { background: rgba(22,24,27,0.06); border-color: var(--hair); box-shadow: var(--lift-sm); }
.day.on span { color: var(--ink); } .day.on b { color: var(--ink); }
.day.today b::after { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin: 3px auto 0; }
.today-btn { flex: 0 0 auto; padding: 7px 12px; border-radius: 13px; border: 0; background: rgba(255,255,255,0.5); color: var(--ink); font-weight: 700; font-size: 12px; cursor: pointer; box-shadow: var(--lift-sm); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0 4px; }
.leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sub); }
.leg i { width: 11px; height: 11px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5); }
.leg b { font-family: var(--num); color: var(--ink); font-feature-settings: "tnum"; font-weight: 700; }
.leg.g-vacant i { background: rgba(255,255,255,0.7); box-shadow: inset 0 0 0 1.5px var(--muted); }
.leg.g-stay i { background: var(--graphite); }
.leg.g-arrive i { background: var(--arrive-fill); box-shadow: inset 0 0 0 1.5px var(--arrive); }
.leg.g-clean i { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.6) 0 3px, rgba(140,144,136,0.4) 3px 6px); }
.leg.g-repair i { background: var(--repair-fill); box-shadow: inset 0 0 0 1.5px var(--repair); }

.board { flex: 1; min-height: 0; padding: 12px; border-radius: 26px; display: flex; }
.room-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 8px; min-height: 0; }
.room {
  position: relative; overflow: hidden; border: 0; cursor: pointer; text-align: left;
  border-radius: 17px; padding: 10px 12px; display: grid; align-content: space-between; gap: 4px;
  background: var(--glaze, rgba(255,255,255,0.5)); backdrop-filter: var(--blur-lite); -webkit-backdrop-filter: var(--blur-lite);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px -14px rgba(20,26,34,0.4), inset 0 0 0 1px var(--glaze-rim, rgba(255,255,255,0.5));
  color: var(--glaze-ink, var(--ink));
  animation: roomrise 0.5s var(--ease) both; animation-delay: calc(var(--i,0) * 22ms);
}
.room:active { transform: scale(0.96); }
@keyframes roomrise { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.room .rno { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.room .rno b { font-family: var(--num); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-feature-settings: "tnum"; }
.room .rno small { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.78; }
.room .note { font-size: 11px; font-weight: 600; opacity: 0.9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .meta { font-size: 9.5px; font-weight: 600; opacity: 0.58; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room.dy::before { content: "抖"; position: absolute; top: 7px; right: 7px; width: 14px; height: 14px; border-radius: 5px; background: var(--repair); color: #fff; font-size: 8px; font-weight: 800; display: grid; place-items: center; }
.room.empty { background: rgba(255,255,255,0.24); box-shadow: inset 0 0 0 1px rgba(22,24,27,0.07); color: var(--faint); cursor: default; }
.room.empty:active { transform: none; }
.room.empty .rno b { color: var(--faint); }

/* glaze tones — gray-white world */
.room.g-vacant { --glaze: linear-gradient(155deg, rgba(255,255,255,0.72), rgba(255,255,255,0.42)); --glaze-rim: rgba(255,255,255,0.66); --glaze-ink: var(--sub); }
.room.g-stay { --glaze: var(--graphite); --glaze-rim: rgba(255,255,255,0.14); --glaze-ink: var(--graphite-ink); }
.room.g-arrive { --glaze: linear-gradient(155deg, rgba(196,214,234,0.6), rgba(150,176,202,0.34)); --glaze-rim: rgba(111,138,168,0.5); --glaze-ink: var(--arrive-deep); }
.room.g-clean { --glaze: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 7px, rgba(190,194,190,0.34) 7px 14px); --glaze-rim: rgba(140,144,136,0.44); --glaze-ink: var(--clean-deep); }
.room.g-repair { --glaze: linear-gradient(155deg, rgba(222,168,152,0.5), rgba(176,86,63,0.3)); --glaze-rim: rgba(176,86,63,0.5); --glaze-ink: var(--repair-deep); }
.room.g-soft { --glaze: linear-gradient(155deg, rgba(255,255,255,0.55), rgba(226,228,228,0.32)); --glaze-rim: rgba(160,164,160,0.4); --glaze-ink: var(--muted); }
.room.g-stay .rno small, .room.g-stay .note, .room.g-stay .meta { opacity: 0.82; }

.board-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.board-foot b { font-family: var(--num); color: var(--ink); font-feature-settings: "tnum"; }

/* ============================================================ ORDERS */
.seg { display: flex; gap: 4px; padding: 5px; border-radius: 18px; }
.seg button { flex: 1; min-width: 0; border: 0; padding: 8px 6px; border-radius: 13px; background: none; color: var(--sub); font-weight: 650; font-size: 12.5px; cursor: pointer; transition: all 0.2s var(--ease); white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--arrive-fill); color: var(--arrive-deep); box-shadow: inset 0 0 0 1px rgba(111,138,168,0.2), 0 8px 18px -14px rgba(63,86,112,0.45); }
.order-card { padding: 15px; border-radius: 20px; display: grid; gap: 9px; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sp-vacant { background: rgba(22,24,27,0.06); color: var(--sub); }
.sp-stay { background: var(--calm-fill); color: var(--calm-deep); }
.sp-arrive { background: var(--arrive-fill); color: var(--arrive-deep); }
.sp-depart { background: var(--accent-soft); color: var(--accent-deep); }
.sp-repair { background: var(--repair-fill); color: var(--repair-deep); }
.sp-soft { background: rgba(22,24,27,0.05); color: var(--muted); }
.order-no { font-family: var(--num); font-size: 12.5px; font-weight: 600; color: var(--muted); font-feature-settings: "tnum"; }
.order-body b { font-size: 15px; font-weight: 660; color: var(--ink); }
.order-body p { margin: 3px 0 0; font-size: 12.5px; color: var(--sub); }
.order-body .amt { font-family: var(--num); font-weight: 700; color: var(--ink); font-feature-settings: "tnum"; }
.order-acts { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { position: relative; isolation: isolate; overflow: hidden; border: 0; padding: 8px 15px; border-radius: 999px; font-weight: 650; font-size: 12.5px; cursor: pointer; background: rgba(255,255,255,0.55); color: var(--ink); box-shadow: var(--lift-sm); transition: transform 0.16s var(--ease); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chip svg { width: 15px; height: 15px; flex: 0 0 auto; }
.chip:active { transform: scale(0.95); }
.chip.primary { background: var(--action-blue); color: #fff; box-shadow: 0 12px 22px -12px rgba(63,86,112,0.7), inset 0 1px 0 rgba(255,255,255,0.22); }
.chip.action-complete { background: var(--action-green); color: #fff; }
.chip.action-extend { background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(176,121,58,0.16); }

/* ============================================================ generic */
.pill-btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  background: var(--action-blue); color: #fff; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 14px 26px -12px rgba(63,86,112,0.7), inset 0 1px 0 rgba(255,255,255,0.2); transition: transform 0.16s var(--ease); }
.pill-btn:active { transform: scale(0.96); }
.pill-btn svg { width: 17px; height: 17px; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .big { font-size: 38px; margin-bottom: 8px; opacity: 0.5; }
.empty-state p { margin: 0; font-size: 13.5px; }

/* ============================================================ tab bar */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 30;
  width: min(calc(100% - 24px), calc(var(--shell) - 24px));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 7px; border-radius: 26px;
  background: var(--glass-bg-thick); backdrop-filter: blur(34px) saturate(1.7); -webkit-backdrop-filter: blur(34px) saturate(1.7);
  border: 1px solid var(--glass-rim);
  box-shadow: 0 22px 44px -18px rgba(20,26,34,0.42), inset 0 1.6px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,0.16);
}
.tab { position: relative; border: 0; background: none; cursor: pointer; padding: 8px 2px; display: grid; justify-items: center; gap: 3px; color: var(--muted); transition: color 0.24s var(--ease); z-index: 1; }
.tab svg { width: 22px; height: 22px; transition: transform 0.28s var(--spring); }
.tab span { font-size: 10.5px; font-weight: 650; }
.tab.on { color: var(--ink); }
.tab.on svg { transform: translateY(-1px) scale(1.08); }
.tab-ind { position: absolute; z-index: 0; top: 7px; bottom: 7px; border-radius: 19px;
  background: rgba(22,24,27,0.06); box-shadow: inset 0 1px 1px rgba(255,255,255,0.7), inset 0 0 0 1px rgba(255,255,255,0.3);
  transition: left 0.4s var(--spring), width 0.4s var(--spring); pointer-events: none; }

/* ============================================================ sheets & modals */
.sheet-layer, .modal-layer { position: fixed; inset: 0; display: none; }
.modal-layer { z-index: 50; }
.sheet-layer { z-index: 70; }   /* pickers/sheets ALWAYS sit above modals (opened from inside them) */
.sheet-layer.open, .modal-layer.open { display: block; }
body.locked { overflow: hidden; }
.scrim { position: absolute; inset: 0; background: rgba(30,36,42,0.26); backdrop-filter: blur(7px) saturate(1.2); -webkit-backdrop-filter: blur(7px) saturate(1.2); animation: fade 0.28s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--shell); margin: 0 auto;
  border-radius: 30px 30px 0 0; padding: 10px 18px calc(24px + var(--safe-b));
  background: var(--glass-bg-thick); backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  box-shadow: 0 -24px 54px -20px rgba(20,26,34,0.42), inset 0 1.6px 0 rgba(255,255,255,1); animation: sheetUp 0.42s var(--spring); }
@keyframes sheetUp { from { transform: translateY(102%); } to { transform: none; } }
.grab { width: 40px; height: 5px; border-radius: 999px; background: rgba(22,24,27,0.14); margin: 4px auto 14px; }
.sheet h3 { margin: 0 0 12px; font-size: 18px; font-weight: 660; color: var(--ink); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 0; background: none; padding: 13px 6px; border-radius: 14px; cursor: pointer; color: var(--text); font-size: 15px; font-weight: 550; }
.opt:active { background: rgba(22,24,27,0.05); }
.opt.sel { color: var(--ink); font-weight: 700; }
.opt .ck { color: var(--ink); }

.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(calc(100% - 32px), 440px); max-height: 88dvh; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 28px; padding: 0;
  background: linear-gradient(150deg, rgba(255,255,255,0.5), rgba(255,255,255,0.22));
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  box-shadow: 0 34px 74px -24px rgba(20,26,34,0.5), inset 0 1.8px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,0.2); animation: pop 0.36s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translate(-50%,-46%) scale(0.94); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 21px; font-weight: 680; letter-spacing: -0.02em; color: var(--ink); }
.modal-head .sub { font-size: 12.5px; color: var(--sub); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.x-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,0.5); color: var(--muted); cursor: pointer; box-shadow: var(--lift-sm); flex: 0 0 auto; }
.x-btn:active { transform: scale(0.92); }
.dock { display: flex; flex-wrap: wrap; gap: 8px; }

.stay-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px; border-radius: 15px; background: rgba(255,255,255,0.4); border: 1px solid var(--hair); margin-bottom: 8px; }
.stay-row .st { width: 8px; height: 34px; border-radius: 4px; }
.stay-row b { font-size: 14px; font-weight: 660; color: var(--ink); display: block; }
.stay-row p { margin: 2px 0 0; font-size: 12px; color: var(--sub); }
.stay-row .amt { font-family: var(--num); font-weight: 700; color: var(--ink); font-feature-settings: "tnum"; white-space: nowrap; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top,0px) + 14px); transform: translateX(-50%); z-index: 90;
  padding: 11px 20px; border-radius: 999px; background: rgba(22,24,27,0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: #f3f2ee; font-weight: 600; font-size: 13.5px; animation: toastIn 0.3s var(--spring); max-width: calc(100% - 40px); box-shadow: 0 20px 40px -18px rgba(20,26,34,0.6); }
.toast.err { background: rgba(138,61,43,0.92); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%,-14px); } to { opacity: 1; transform: translateX(-50%); } }

.skeleton { border-radius: 24px; background: linear-gradient(100deg, rgba(255,255,255,0.4) 30%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0.4) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.boot { display: grid; gap: 12px; }
.boot .skeleton:nth-child(1) { height: 170px; } .boot .skeleton:nth-child(2) { height: 78px; } .boot .skeleton:nth-child(3) { height: 300px; }

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1;
  background:
    radial-gradient(58% 42% at 72% 12%, rgba(148,158,174,0.55), transparent 60%),
    radial-gradient(52% 40% at 16% 86%, rgba(176,184,196,0.5), transparent 62%),
    linear-gradient(160deg, #d2d6dc 0%, #e4e7eb 55%, #d6dade 100%); }
.login-card { width: min(100%, 360px); padding: 32px 28px 28px;
  background: linear-gradient(150deg, rgba(255,255,255,0.5), rgba(255,255,255,0.2));
  border: 1px solid rgba(255,255,255,0.72); border-radius: 26px;
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  box-shadow: 0 40px 80px -30px rgba(20,26,34,0.45), inset 0 1.8px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,0.2); }
.login-card .seal-lg { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: var(--disp); font-weight: 800; font-size: 24px; color: var(--graphite-ink); background: var(--graphite); box-shadow: inset 0 1px 2px rgba(255,255,255,0.25), 0 10px 22px -10px rgba(20,26,34,0.7); margin-bottom: 18px; }
.login-card h1 { margin: 0 0 4px; font-size: 25px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.login-card .tip { font-size: 12.5px; color: var(--sub); margin-bottom: 22px; }
.fld { margin-bottom: 12px; }
.fld label { font-size: 11.5px; font-weight: 650; color: var(--sub); display: block; margin-bottom: 6px; letter-spacing: 0.02em; }
.fld input { width: 100%; border: 1px solid rgba(255,255,255,0.6); border-radius: 14px; padding: 13px 15px; background: rgba(255,255,255,0.42); font-size: 15px; color: var(--ink); outline: none; box-shadow: inset 0 1px 3px rgba(22,24,27,0.05); transition: border-color 0.2s var(--ease); }
.fld input:focus { border-color: rgba(22,24,27,0.4); background: rgba(255,255,255,0.66); }
.login-card .pill-btn { width: 100%; justify-content: center; margin-top: 8px; padding: 15px; font-size: 15px; }
.login-card { text-align: center; padding-top: 36px;
  background: linear-gradient(150deg, rgba(255,255,255,0.5), rgba(255,255,255,0.2)) !important;
  backdrop-filter: blur(32px) saturate(1.8) !important; -webkit-backdrop-filter: blur(32px) saturate(1.8) !important;
  box-shadow: 0 40px 90px -30px rgba(30,40,55,0.55), inset 0 2px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,0.28); }
.login-card .seal-lg { width: 74px; height: 74px; border-radius: 22px; margin: 0 auto 18px; object-fit: cover;
  box-shadow: 0 14px 30px -10px rgba(20,26,34,0.45), inset 0 0 0 1px rgba(255,255,255,0.7), 0 0 0 6px rgba(255,255,255,0.28); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 6px; }
.login-brand h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.login-brand span { font-family: var(--disp); font-size: 9.5px; font-weight: 700; letter-spacing: 0.26em; color: var(--muted); }
.login-card .tip { margin-bottom: 24px; }
.login-card .fld { text-align: left; }
.login-err { text-align: center; color: var(--repair-deep); font-size: 12.5px; font-weight: 600; margin: -2px 0 12px; }

/* password show/hide eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.pw-eye:active { transform: translateY(-50%) scale(0.9); }
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye.on { color: var(--ink); }

/* rainbow gradient running-light around the whole login card border */
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2.5px; z-index: 2; pointer-events: none;
  background: conic-gradient(from var(--ang), #ff5f8f, #ff9e6b, #ffd166, #7bd88f, #6fc3e8, #7aa2f7, #b78ff0, #e88fd0, #ff5f8f);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
  opacity: 0.9;
}

.count-up { font-variant-numeric: tabular-nums; }

@media (min-width: 481px) { .room-grid { gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.08s !important; }
  .orb, .ticker span { animation: none; }
  .ticker span { padding-left: 0; }
}
*:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

/* ============================================================ forms & custom controls */
.form-grid { display: grid; gap: 11px; margin-top: 4px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-lab { font-size: 11.5px; font-weight: 650; color: var(--sub); letter-spacing: 0.02em; }
.fld-lab em { font-style: normal; color: var(--muted); font-weight: 500; }
.tinput, .tarea { width: 100%; border: 1px solid var(--hair); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,0.62); font-size: 15px; color: var(--ink); outline: none; font-family: inherit; transition: border-color 0.18s var(--ease), background 0.18s var(--ease); }
.tinput:focus, .tarea:focus { border-color: rgba(22,24,27,0.4); background: rgba(255,255,255,0.82); }
.tarea { min-height: 96px; resize: vertical; line-height: 1.6; margin-top: 2px; }
.tarea-lg { min-height: 220px; }
.order-search { margin: 2px 0 0; }
.mini-hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.fin-range { display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; align-items: end; }
.fin-range .chip.primary { min-height: 46px; padding: 0 16px; }
.cf-extra { display: none; margin-top: 8px; }
.cf-extra.show { display: block; }
.cfield { display: block; }
.field-btn { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 8px; justify-content: space-between; border: 1px solid var(--hair); border-radius: 14px; padding: 11px 14px; background: rgba(255,255,255,0.62); color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; text-align: left; }
.field-btn:active { transform: scale(0.99); }
.field-btn .fv { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-btn .fv.empty { color: var(--muted); }
.field-btn .ci { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.stepper-field { display: flex; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--hair); border-radius: 14px; background: rgba(255,255,255,0.62); overflow: hidden; }
.stepper button { width: 46px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--ink); cursor: pointer; }
.stepper button:active { background: rgba(22,24,27,0.06); }
.stepper .sv { min-width: 46px; text-align: center; font-family: var(--num); font-weight: 700; font-size: 17px; font-feature-settings: "tnum"; }

.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 550; color: var(--text); cursor: pointer; padding: 6px 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ink); }
.scope-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.chk-pill { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 13px; border: 1px solid var(--hair); background: rgba(255,255,255,0.5); font-size: 12.5px; font-weight: 600; color: var(--sub); cursor: pointer; }
.chk-pill input { width: 15px; height: 15px; accent-color: var(--ink); }
.chk-pill:has(input:checked) { background: rgba(255,255,255,0.92); color: var(--ink); border-color: rgba(22,24,27,0.28); }
.radio-seg { display: flex; gap: 5px; padding: 5px; border-radius: 16px; background: rgba(22,24,27,0.05); margin-bottom: 12px; }
.radio-seg button { flex: 1; min-width: 0; border: 0; padding: 9px 4px; border-radius: 12px; background: none; color: var(--sub); font-weight: 650; font-size: 12.5px; cursor: pointer; white-space: nowrap; text-align: center; }
.radio-seg button.on { background: var(--arrive-fill); color: var(--arrive-deep); box-shadow: inset 0 0 0 1px rgba(111,138,168,0.22); }

/* sheet option list + calendar */
.opt-list { display: grid; gap: 2px; max-height: 56dvh; overflow-y: auto; }
.opt small { color: var(--muted); font-weight: 500; }
.opt.dis { opacity: 0.4; }
.sheet h3 small { font-size: 11px; color: var(--muted); font-weight: 500; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.cal-head b { font-size: 16px; font-weight: 660; color: var(--ink); }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair); background: rgba(255,255,255,0.6); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.cal-nav svg { width: 18px; height: 18px; }
.cal-nav .rot { transform: rotate(90deg); }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding-bottom: 6px; }
.cal-d { aspect-ratio: 1; border: 0; border-radius: 12px; background: rgba(255,255,255,0.42); color: var(--text); font-size: 14px; font-weight: 550; cursor: pointer; font-family: var(--num); font-feature-settings: "tnum"; }
.cal-d.dim { background: none; cursor: default; }
.cal-d.today { box-shadow: inset 0 0 0 1.5px var(--muted); }
.cal-d.sel { background: var(--action-blue); color: #fff; }

/* ============================================================ settings */
.manage-list { display: grid; gap: 10px; margin-top: 14px; }
.mini-card { padding: 13px; border-radius: 18px; background: rgba(255,255,255,0.5); border: 1px solid var(--hair); display: grid; gap: 10px; }
.mini-card.off { opacity: 0.6; }
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mini-card .chip { justify-self: start; }
.ro-field { padding: 11px 14px; border-radius: 14px; background: rgba(22,24,27,0.05); color: var(--muted); font-size: 14px; font-weight: 600; }
.sub-details { margin-top: 12px; border-top: 1px solid var(--hair); padding-top: 10px; }
.sub-details summary { font-size: 13px; font-weight: 650; color: var(--ink); cursor: pointer; list-style: none; }
.sub-details summary::-webkit-details-marker { display: none; }
.chips-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag-chip { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,0.55); border: 1px solid var(--hair); font-size: 12.5px; color: var(--sub); }
.tag-chip b { color: var(--ink); font-weight: 640; }

.check-list { display: grid; gap: 6px; margin-top: 14px; }
.check-item { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 13px; background: rgba(255,255,255,0.45); border: 1px solid var(--hair); }
.check-item i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(22,24,27,0.08); color: transparent; }
.check-item i svg { width: 14px; height: 14px; }
.check-item.ok i { background: var(--graphite); color: var(--graphite-ink); }
.check-item span { font-weight: 600; color: var(--ink); font-size: 13px; }
.check-item em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.cap-card { padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.5); border: 1px solid var(--hair); display: grid; gap: 5px; }
.cap-top { display: flex; }
.cap-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(22,24,27,0.06); color: var(--muted); }
.cap-tag.req { background: var(--accent-soft); color: var(--accent-deep); }
.cap-card b { font-size: 13.5px; color: var(--ink); font-weight: 640; }
.cap-card p { margin: 0; font-size: 11px; color: var(--sub); line-height: 1.4; }
.cap-card code { font-size: 10px; color: var(--muted); background: rgba(22,24,27,0.04); padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.cap-card .chip { margin-top: 4px; justify-self: start; padding: 6px 12px; font-size: 12px; }
.job-list { display: grid; gap: 7px; margin-top: 12px; }
.job-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 13px; background: rgba(255,255,255,0.45); border: 1px solid var(--hair); }
.job-row .jr-main { flex: 1; min-width: 0; }
.job-row b { font-size: 12.5px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.jr-err { margin: 2px 0 0; font-size: 11px; color: var(--repair-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row em { font-style: normal; font-size: 11px; color: var(--muted); font-family: var(--num); }

.price-scroll { overflow-x: auto; margin-top: 10px; border-radius: 14px; border: 1px solid var(--hair); }
.price-grid { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.price-grid th, .price-grid td { padding: 8px 10px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--hair); font-family: var(--num); font-feature-settings: "tnum"; color: var(--text); }
.price-grid th { background: rgba(22,24,27,0.04); font-weight: 650; color: var(--sub); }
.price-grid .rt-name { font-family: var(--sans); font-weight: 640; color: var(--ink); text-align: left; position: sticky; left: 0; background: rgba(250,251,252,0.97); }

.audit-list { display: grid; gap: 7px; margin-top: 12px; }
.audit-row { padding: 10px 12px; border-radius: 13px; background: rgba(255,255,255,0.45); border: 1px solid var(--hair); }
.audit-row b { font-size: 13.5px; color: var(--ink); font-weight: 640; }
.audit-row p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

.ai-out { font-size: 14px; line-height: 1.72; color: var(--text); background: rgba(255,255,255,0.42); border: 1px solid var(--hair); border-radius: 16px; padding: 15px 16px; max-height: 54dvh; overflow-y: auto; }
.ai-out .ai-h { margin: 16px 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.ai-out .ai-h:first-child { margin-top: 0; }
.ai-out .ai-p { margin: 0 0 7px; font-size: 14px; line-height: 1.74; color: var(--text); }
.ai-out .ai-gap { height: 5px; }
.ai-ctx { margin-top: 8px; font-size: 11.5px; color: var(--muted); text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.paste-box { margin-bottom: 2px; }
.paste-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.paste-divider::before, .paste-divider::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.kv > div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.45); border: 1px solid var(--hair); }
.kv span { font-size: 11px; color: var(--muted); display: block; }
.kv b { font-size: 14.5px; font-weight: 640; color: var(--ink); }
a.chip { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
a.chip.primary { color: var(--graphite-ink); }

/* room-detail guest view */
.dial-btn { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px;
  background: rgba(255,255,255,0.62); color: var(--ink); font-weight: 650; font-size: 14px; cursor: pointer; box-shadow: var(--lift-sm); margin-bottom: 14px; }
.dial-btn svg { width: 18px; height: 18px; color: var(--accent-deep); }
.dial-btn:active { transform: scale(0.98); }
.guest-hero { padding: 16px 18px; border-radius: 20px; margin-bottom: 14px;
  background: linear-gradient(155deg, rgba(255,255,255,0.62), rgba(255,255,255,0.4)); border: 1px solid var(--hair); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.gh-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; }
.gh-sub { font-size: 13px; font-weight: 600; color: var(--sub); margin-top: 5px; }
.gh-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 15px; }
.gh-meta span { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }
.gh-meta b { font-size: 15.5px; font-weight: 640; color: var(--ink); font-variant-numeric: tabular-nums; }
.stay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip.big { min-height: 52px; border-radius: 16px; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* logo seal (from app icon) */
img.seal { object-fit: cover; background: #fff; border: 0; }
.login-card img.seal-lg { object-fit: cover; background: #fff; }
.install-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.install-card .ic-text h2 { margin: 0; font-size: 18px; font-weight: 660; color: var(--ink); }
.install-card .ic-text p { margin: 4px 0 0; font-size: 12px; color: var(--sub); max-width: 210px; }
.install-card .pill-btn { flex: 0 0 auto; }

/* ============================================================ MOBILE GLASS OPTIMIZATION
   Real backdrop-filter only on the few "hero" floating surfaces; everything else uses a
   solid-enough translucent bg. Radii kept 13-20px. Animated tiles never blur. */
.hero { backdrop-filter: blur(18px) saturate(1.7) brightness(1.06); -webkit-backdrop-filter: blur(18px) saturate(1.7) brightness(1.06); }
.tabbar { backdrop-filter: blur(18px) saturate(1.7); -webkit-backdrop-filter: blur(18px) saturate(1.7); }
.sheet, .modal { backdrop-filter: blur(20px) saturate(1.7); -webkit-backdrop-filter: blur(20px) saturate(1.7); will-change: transform; }
.board { background: linear-gradient(150deg, rgba(255,255,255,0.5), rgba(255,255,255,0.28)); backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6); }
.date-rail { backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); }
.room, .quick-btn { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }  /* animated / repeated → no live blur */
.quick-btn { background: rgba(255,255,255,0.64); }
.quick-btn.dark { background: var(--graphite); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero { background: linear-gradient(150deg, rgba(250,251,252,0.95), rgba(244,245,247,0.9)); }
  .tabbar, .sheet, .modal, .login-card { background: rgba(250,251,252,0.97); }
  .board, .date-rail, .crown, .icon-btn, .toast { background: rgba(250,251,252,0.95); }
}

/* modal: fixed head + scrollable body + sticky submit (always reachable) */
.modal-head { padding: 20px 20px 14px; margin-bottom: 0; flex: 0 0 auto; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 20px 20px; }
.modal-body form { display: flex; flex-direction: column; }
.modal-body form > button[type="submit"] { position: sticky; bottom: 0; margin-top: 14px;
  box-shadow: 0 -18px 18px -6px rgba(250,251,252,0.94), 0 14px 26px -12px rgba(20,26,34,0.7), inset 0 1px 0 rgba(255,255,255,0.14); }

/* ============================================================ responsive operator layout */
* { letter-spacing: 0 !important; }
.orb { display: none; }

.icon-btn { width: 44px; height: 44px; }
.x-btn { width: 44px; height: 44px; }
.seg button, .chip, .today-btn { min-height: 44px; }
.day { min-height: 52px; }
.tab { min-height: 56px; }
.room-grid { grid-auto-rows: minmax(88px, 1fr); }
.room .rno small { font-size: 12px; }
.room .note { font-size: 12px; }
.room .meta { font-size: 12px; }
.room.dy::before { width: 18px; height: 18px; font-size: 10px; }
.fld-lab, .mini-hint { font-size: 12px; }
.order-no { max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-list, .settings-body { display: grid; gap: 13px; min-width: 0; }
.panel, .price-scroll { min-width: 0; max-width: 100%; }
.settings-body > .install-card { margin-bottom: 0; }

.order-more { position: relative; }
.order-more[open] { flex: 1 0 100%; }
.order-more > summary { list-style: none; user-select: none; }
.order-more > summary::-webkit-details-marker { display: none; }
.order-more-menu {
  position: static; min-width: 0; margin-top: 8px; padding: 7px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 6px;
  border: 1px solid var(--glass-rim); border-radius: 16px;
  background: rgb(250,251,252); box-shadow: var(--lift-sm);
}
.order-more-menu .chip { width: 100%; justify-content: center; box-shadow: none; background: rgba(255,255,255,0.9); }
.chip.danger { color: var(--repair-deep); background: var(--repair-fill); }

.editor-block {
  margin-top: 12px; padding: 0 12px; border: 1px solid var(--hair);
  border-radius: 16px; background: rgba(255,255,255,0.36);
}
.editor-block > summary {
  min-height: 48px; display: flex; align-items: center; gap: 8px;
  color: var(--ink); font-size: 13.5px; font-weight: 680; cursor: pointer; list-style: none;
}
.editor-block > summary::-webkit-details-marker,
.entity-editor > summary::-webkit-details-marker,
.advanced-diagnostics > summary::-webkit-details-marker { display: none; }
.editor-block > summary svg { width: 18px; height: 18px; }
.editor-block > .form-grid, .editor-block > .audit-list { padding: 4px 0 14px; }

.entity-editor {
  border: 1px solid var(--hair); border-radius: 16px;
  background: rgba(255,255,255,0.44); overflow: hidden;
}
.entity-editor.off { opacity: 0.62; }
.entity-editor > summary {
  min-height: 60px; padding: 10px 13px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
}
.entity-editor > summary span { min-width: 0; display: grid; gap: 2px; }
.entity-editor > summary b { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-editor > summary small { color: var(--sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-editor > summary em { color: var(--muted); font-size: 12px; font-style: normal; flex: 0 0 auto; }
.entity-editor[open] > summary { border-bottom: 1px solid var(--hair); }
.entity-editor .mini-card { border: 0; border-radius: 0; background: transparent; }

.entity-row {
  min-height: 58px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 12px; border: 1px solid var(--hair);
  border-radius: 15px; background: rgba(255,255,255,0.44);
}
.entity-row div { min-width: 0; }
.entity-row b { color: var(--ink); font-size: 14px; }
.entity-row p { margin: 2px 0 0; color: var(--sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-row > span { color: var(--muted); font-size: 12px; }

.channel-health { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.health-item {
  min-height: 68px; padding: 11px; display: grid; grid-template-columns: 24px 1fr;
  align-items: center; gap: 9px; border: 1px solid var(--hair); border-radius: 15px;
  background: rgba(255,255,255,0.42);
}
.health-item > i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: rgba(22,24,27,0.07); color: transparent; }
.health-item > i svg { width: 15px; height: 15px; }
.health-item.ok > i { background: var(--graphite); color: var(--graphite-ink); }
.health-item.warn { background: var(--repair-fill); }
.health-item.warn > i { background: rgba(176,86,63,0.2); }
.health-item b { color: var(--ink); font-size: 13px; }
.health-item p { margin: 2px 0 0; color: var(--sub); font-size: 12px; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

.advanced-diagnostics { padding: 0; overflow: hidden; }
.advanced-diagnostics > summary {
  min-height: 68px; padding: 14px 17px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
}
.advanced-diagnostics > summary span { display: grid; gap: 2px; }
.advanced-diagnostics > summary b { color: var(--ink); font-size: 15px; }
.advanced-diagnostics > summary small { color: var(--sub); font-size: 12px; }
.advanced-diagnostics > summary svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.advanced-diagnostics[open] > summary svg { transform: rotate(180deg); }
.diagnostic-body { padding: 0 16px 16px; border-top: 1px solid var(--hair); }
.diagnostic-meta { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; padding: 13px 0; }
.diagnostic-meta span { color: var(--sub); font-size: 12px; }
.diagnostic-meta b { color: var(--ink); font-size: 12px; }
.diagnostic-title { margin: 18px 0 8px; }
.eyebrow { font-size: 12px; }
.radio-seg button, .chk-pill { min-height: 44px; }
.cap-card p { font-size: 12px; }
.cap-card code { font-size: 11px; }
.day span, .tab span, .flow-item em, .kv span, .audit-row p, .job-row em { font-size: 12px; }
.cap-tag { font-size: 11px; }
.quick-btn.action-create, .pill-btn.action-create {
  background: var(--action-blue); color: #fff;
  box-shadow: 0 16px 30px -16px rgba(63,86,112,0.72), inset 0 1px 0 rgba(255,255,255,0.22);
}
.desktop-operations { display: none; }
.operation-list { display: grid; gap: 7px; }
.operation-row {
  width: 100%; min-height: 58px; padding: 8px 10px; display: grid;
  grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px;
  border: 1px solid var(--hair); border-radius: 14px; background: rgba(255,255,255,.4);
  color: var(--text); text-align: left; cursor: pointer;
}
.operation-row div { min-width: 0; display: grid; gap: 2px; }
.operation-row b { color: var(--ink); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-row small { color: var(--sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-row em { color: var(--ink); font-family: var(--num); font-size: 13px; font-weight: 700; font-style: normal; }
.operation-empty { min-height: 70px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.reminder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.reminder-grid button {
  min-height: 68px; padding: 11px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; border: 1px solid var(--hair);
  border-radius: 15px; background: rgba(255,255,255,.42); color: var(--text); cursor: pointer;
}
.reminder-grid button.warn { background: var(--accent-soft); border-color: rgba(176,121,58,.18); }
.reminder-grid span { color: var(--sub); font-size: 12px; font-weight: 650; }
.reminder-grid b { color: var(--ink); font-family: var(--num); font-size: 24px; }
.nav-spacer, .nav-status { display: none; }
.desktop-tab { display: none; }
.mobile-tab { display: grid; }

.management-body { display: grid; gap: 13px; min-width: 0; }
.management-hub { display: grid; gap: 12px; }
.management-link {
  width: 100%; min-height: 82px; padding: 16px; border: 1px solid var(--glass-rim);
  border-radius: 18px; cursor: pointer; text-align: left; color: var(--ink);
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 13px;
}
.management-link > i {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  color: #4f6f8e; background: rgba(103,133,163,0.13);
}
.management-link > i svg { width: 22px; height: 22px; }
.management-link > span { min-width: 0; display: grid; gap: 3px; }
.management-link b { font-size: 15px; }
.management-link small { color: var(--sub); font-size: 12px; line-height: 1.45; }
.management-arrow { width: 18px; height: 18px; color: var(--muted); }

@media (max-width: 479px) {
  :root { --pad: 14px; }
  .app { padding-bottom: calc(96px + var(--safe-b)); }
  .headline h1 { font-size: 26px; }
  .hero { padding: 18px; }
  .gauge { width: 112px; height: 112px; }
  .hero-money .amt { font-size: 36px; }
  .kpi { min-height: 84px; }
  .kpi span, .flow-item span { font-size: 12px; }
  .order-body p { font-size: 13px; }
  .order-acts { gap: 8px; }
  .channel-health { grid-template-columns: 1fr; }
  .cap-grid, .scope-grid { grid-template-columns: 1fr 1fr; }
  .fin-range { grid-template-columns: 1fr 1fr; }
  .fin-range .chip { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
  :root { --shell: 1280px; --pad: 24px; }
  .app {
    width: 100%; max-width: 1280px;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 24px 30px 146px;
  }
  .topbar { margin-bottom: 18px; }
  .tabbar {
    left: 18px; top: 84px; bottom: 18px; transform: none;
    width: 108px; display: flex; flex-direction: column; gap: 4px; padding: 7px;
    border-radius: 24px;
  }
  .desktop-tab { display: grid; }
  .mobile-tab { display: none; }
  .tab.manage-start { margin-top: 10px; }
  .tab.manage-start::before {
    content: ""; position: absolute; left: 10px; right: 10px; top: -7px;
    height: 1px; background: var(--hair);
  }
  .tab {
    grid-template-columns: 26px 1fr; align-items: center; justify-items: start;
    gap: 9px; padding: 10px 12px; width: 100%; min-height: 54px;
  }
  .tab span { font-size: 13px; }
  .tab-ind {
    left: 7px; right: 7px; width: auto; top: 7px; bottom: auto;
    transition: top .35s var(--spring), height .35s var(--spring);
  }
  .nav-spacer { display: block; flex: 1; min-height: 16px; }
  .nav-status {
    display: grid; grid-template-columns: 8px 1fr; align-items: center; gap: 8px;
    padding: 11px 8px; border-top: 1px solid var(--hair);
  }
  .nav-status div { min-width: 0; display: grid; gap: 1px; }
  .nav-status b, .nav-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-status b { color: var(--ink); font-size: 11px; }
  .nav-status small { color: var(--muted); font-size: 10px; }
  .nav-signal { width: 8px; height: 8px; border-radius: 50%; background: var(--calm); box-shadow: 0 0 0 4px var(--calm-fill); }
  .nav-signal.warn { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .sheet { max-width: 600px; border-radius: 30px 30px 0 0; }
  .modal { width: min(calc(100% - 64px), 680px); }
  .rooms-view { min-height: calc(100dvh - 100px); }
  .room-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(104px, 1fr); }
  .room { padding: 13px 14px; }
  .room .rno b { font-size: 24px; }
  .settings-stack {
    display: grid; grid-template-columns: 150px minmax(0, 1fr);
    align-items: start; gap: 16px;
  }
  .settings-head { grid-column: 1 / -1; }
  .settings-nav {
    grid-column: 1; display: grid; position: sticky; top: 18px;
    padding: 7px; border-radius: 20px;
  }
  .settings-nav button { text-align: left; padding-inline: 14px; }
  .settings-body { grid-column: 2; }
  .management-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-health { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-manage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-manage-grid .entity-editor[open] { grid-column: 1 / -1; }
  .order-list { grid-template-columns: 1fr; }
  .desktop-operations { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); gap: 15px; }
}

@media (min-width: 1024px) {
  .today-stack {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: stretch; gap: 15px;
  }
  .today-stack .today-head { grid-column: 1 / -1; }
  .today-stack > .hero { grid-column: 1; }
  .today-stack > .kpis { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .today-stack > .panel { grid-column: 1; }
  .today-stack > .quick { grid-column: 2; margin: 0; }
  .today-stack .desktop-operations { grid-column: 1 / -1; }
  .orders-stack {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
    align-items: start; gap: 13px;
  }
  .orders-head { grid-column: 1 / -1; }
  .order-filters { grid-column: 1; }
  .order-search { grid-column: 2; margin: 0; min-height: 54px; }
  .order-list { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .room-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1320px) {
  .tabbar { left: calc((100vw - 1280px) / 2 + 18px); }
}
