@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@600;700&display=swap');

:root{
  --bg:#0a090d;
  --bg-2:#120f17;
  --ink:#f7f2e7;
  --ink-soft:#d3cabc;
  --muted:#aa9f90;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);
  --surface:rgba(22,18,26,.86);
  --surface-2:rgba(30,24,35,.88);
  --surface-3:rgba(16,13,20,.72);
  --shadow:0 24px 60px rgba(0,0,0,.32);
  --gold-1:#f5e2ae;
  --gold-2:#d5a75a;
  --gold-3:#8f6128;
  --gold-glow:rgba(213,167,90,.25);
  --cyan:#6cd9ff;
  --cyan-soft:rgba(108,217,255,.15);
  --danger:#ff616f;
  --ok:#53d89c;
  --warn:#ffd27b;
  --radius-xl:20px;
  --radius-lg:16px;
  --radius-md:12px;
}

*{box-sizing:border-box}

html, body{
  min-height:100%;
}

body{
  margin:0;
  color:var(--ink);
  font-family:"Manrope", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background:#0d0b11;
  letter-spacing:.01em;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  color-scheme: dark;
}

body::before,
body::after{
  display:none;
}

body.login-locked{
  overflow:hidden;
}

body.plan-dragging{
  overflow:hidden;
  overscroll-behavior:none;
}

body.role-standard .owner-only{
  display:none !important;
}

.hidden{
  display:none !important;
}

.topbar,
.wrap,
.login-overlay,
.homescreen-prompt{
  position:relative;
  z-index:1;
}

:focus-visible{
  outline:2px solid rgba(108,217,255,.8);
  outline-offset:2px;
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  border-radius:8px;
  padding:2px 6px;
}

.login-overlay{
  position:fixed;
  inset:0;
  z-index:40;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(108,217,255,.12), transparent 42%),
    radial-gradient(circle at 84% 16%, rgba(245,226,174,.14), transparent 46%),
    rgba(5,5,8,.76);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.login-card{
  background-color:#17131d;
  width:min(560px, 100%);
  border-radius:24px;
  padding:18px;
  border:1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(19,15,24,.93);
  box-shadow:
    0 30px 70px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.06);
  animation: riseIn .3s ease both;
}

.login-title{
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:33px;
  font-weight:700;
  line-height:1;
  letter-spacing:.01em;
}

.login-subtitle{
  color:var(--ink-soft);
  font-size:13px;
  margin-top:7px;
}

.login-form{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.login-form .btn{
  width:100%;
}

.login-account-sections{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.login-account-section{
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.015);
}

.login-account-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.login-account-btn{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  color:var(--ink);
  font:inherit;
  border-radius:12px;
  padding:9px 10px;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  transition:transform .14s ease, border-color .14s ease, background-color .14s ease;
}

.login-account-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(108,217,255,.4);
  background:rgba(108,217,255,.08);
}

.login-account-btn.active{
  border-color:rgba(245,226,174,.45);
  background:rgba(245,226,174,.10);
  box-shadow:0 0 0 1px rgba(245,226,174,.12) inset;
}

.login-account-name{
  font-weight:700;
}

.login-account-role{
  font-size:11px;
  color:var(--muted);
}

.login-selected-row{
  margin-top:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.012);
}

.login-selected-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}

.password-change-card{
  width:min(520px, 100%);
}

.password-change-card .login-owner-form{
  grid-template-columns:1fr;
  margin-top:14px;
}

.password-change-card .login-owner-form .btn{
  width:100%;
}

#account-password-form .btn{
  grid-column:1 / -1;
}

#account-password-message{
  margin-top:8px;
}

.login-recent-wrap{
  margin-top:14px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.015);
}

.login-recent-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.login-name-chip{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.03);
  color:var(--ink);
  cursor:pointer;
  transition:transform .14s ease, border-color .14s ease, background-color .14s ease;
}

.login-name-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(108,217,255,.45);
  background:rgba(108,217,255,.08);
}

.login-owner-btn{
  position:absolute;
  top:14px;
  right:14px;
  border:1px solid rgba(245,226,174,.24);
  background:rgba(245,226,174,.08);
  color:#f1d89d;
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:700;
  letter-spacing:.02em;
  transition:background-color .14s ease, border-color .14s ease, transform .14s ease;
}

.login-owner-btn:hover,
.login-owner-btn.active{
  background:rgba(245,226,174,.14);
  border-color:rgba(245,226,174,.42);
  transform:translateY(-1px);
}

.login-owner-panel{
  margin-top:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(245,226,174,.14);
  background:
    linear-gradient(180deg, rgba(245,226,174,.05), rgba(245,226,174,.02));
}

.login-owner-panel strong{
  color:#f1d89d;
}

.login-owner-form{
  margin-top:8px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
}

.login-owner-form .btn{
  min-width:148px;
}

.login-owner-actions{
  margin-top:8px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.homescreen-prompt{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:25;
  width:min(420px, calc(100vw - 24px));
}

.homescreen-prompt-card{
  background-color:#17131d;
  position:relative;
  border-radius:18px;
  padding:14px;
  border:1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 100% 0%, rgba(245,226,174,.10), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(19,15,24,.94);
  box-shadow:var(--shadow);
  animation: riseIn .28s ease both;
}

.homescreen-close{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:var(--ink-soft);
  cursor:pointer;
  font-size:16px;
  line-height:1;
}

.homescreen-kicker{
  color:#f1d89d;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:700;
}

.homescreen-title{
  margin-top:4px;
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:25px;
  line-height:1.05;
}

.homescreen-copy{
  margin-top:8px;
  color:var(--ink-soft);
  font-size:13px;
  line-height:1.45;
  padding-right:18px;
}

.homescreen-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  margin:10px auto 0;
  width:min(1180px, calc(100vw - 16px));
  border-radius:22px;
  padding:12px 14px;
  background-color:rgba(14,12,18,.92);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    rgba(14,12,18,.78);
  border:1px solid rgba(255,255,255,.1);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topbar::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  top:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(245,226,174,.42), transparent);
}

.topbar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
}

.logo{
  width:50px;
  height:50px;
  border-radius:16px;
  position:relative;
  display:grid;
  place-items:center;
  border:1px solid rgba(245,226,174,.36);
  background:
    radial-gradient(circle at 26% 20%, rgba(255,255,255,.24), transparent 52%),
    linear-gradient(145deg, var(--gold-1), var(--gold-2) 46%, var(--gold-3));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -10px 18px rgba(47,28,8,.26),
    0 10px 18px rgba(0,0,0,.22);
}

.logo::after{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:11px;
  border:1px solid rgba(45,25,6,.20);
}

.logo-mark{
  position:absolute;
  left:10px;
  top:7px;
  font-size:22px;
  font-weight:800;
  line-height:1;
  color:#2a1b08;
  text-shadow:0 1px 0 rgba(255,255,255,.22);
}

.logo-tag{
  position:absolute;
  right:7px;
  bottom:6px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  color:#2f1f09;
  text-shadow:0 1px 0 rgba(255,255,255,.22);
}

.title{
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:28px;
  line-height:.95;
  font-weight:700;
  letter-spacing:.02em;
}

.subtitle{
  color:var(--muted);
  font-size:12px;
  margin-top:3px;
}

.session-controls{
  display:flex;
  align-items:center;
  gap:8px;
}

.mobile-menu-btn{
  display:none;
  min-width:auto;
  padding:10px 12px;
  white-space:nowrap;
}

.mobile-menu-icon{
  position:relative;
  display:inline-block;
  width:14px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  box-shadow:0 0 0 1px rgba(0,0,0,.02);
}

.mobile-menu-icon::before,
.mobile-menu-icon::after{
  content:"";
  position:absolute;
  left:0;
  width:14px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  transition:transform .14s ease, top .14s ease, opacity .14s ease;
}

.mobile-menu-icon::before{ top:-5px; }
.mobile-menu-icon::after{ top:5px; }

.topbar.menu-open .mobile-menu-icon{
  background:transparent;
}

.topbar.menu-open .mobile-menu-icon::before{
  top:0;
  transform:rotate(45deg);
}

.topbar.menu-open .mobile-menu-icon::after{
  top:0;
  transform:rotate(-45deg);
}

.mobile-menu-label{
  line-height:1;
}

.session-chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:var(--ink-soft);
  font-size:12px;
  white-space:nowrap;
}

.session-chip.owner{
  color:#f1d89d;
  border-color:rgba(245,226,174,.22);
  background:rgba(245,226,174,.08);
}

.tabs{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.tab{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1 1 120px;
  border-radius:999px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  color:var(--ink-soft);
  cursor:pointer;
  font-weight:600;
  transition:transform .14s ease, border-color .14s ease, background-color .14s ease, color .14s ease;
}

.tab:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.14);
  color:var(--ink);
}

.tab.active{
  color:#1b1206;
  border-color:rgba(245,226,174,.5);
  background:
    linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.12)),
    linear-gradient(145deg, var(--gold-1), var(--gold-2) 54%, var(--gold-3));
  box-shadow:0 6px 14px rgba(213,167,90,.22);
}

.wrap{
  width:min(1180px, calc(100vw - 16px));
  margin:10px auto 24px;
  padding:0 0 10px;
}

.view{
  animation:fadeIn .18s ease both;
}

.panel{
  background-color:rgba(17,14,22,.92);
  margin-bottom:12px;
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    rgba(17,14,22,.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 10px 24px rgba(0,0,0,.14);
}

.panel-title{
  font-family:"Cormorant Garamond", Georgia, serif;
  font-size:22px;
  line-height:1;
  font-weight:700;
  letter-spacing:.01em;
  margin-bottom:10px;
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.grid textarea{
  grid-column:1 / -1;
  min-height:82px;
  resize:vertical;
}

input, select, textarea{
  width:100%;
  padding:12px 13px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.005)),
    rgba(10,9,13,.7);
  color:var(--ink);
  font:inherit;
  transition:border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

input::placeholder,
textarea::placeholder{
  color:#938a7f;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(108,217,255,.42);
  box-shadow:0 0 0 4px rgba(108,217,255,.08);
  outline:none;
}

.search{
  max-width:360px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.03);
  color:var(--ink);
  cursor:pointer;
  text-decoration:none;
  font-weight:600;
  transition:transform .14s ease, border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.05);
}

.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}

.btn.primary{
  color:#181006;
  border-color:rgba(245,226,174,.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,.44), rgba(255,255,255,.12)),
    linear-gradient(145deg, var(--gold-1), var(--gold-2) 56%, var(--gold-3));
  box-shadow:0 8px 18px rgba(213,167,90,.18);
}

.btn.primary:hover{
  border-color:rgba(245,226,174,.56);
  box-shadow:0 10px 22px rgba(213,167,90,.24);
}

.btn.danger{
  color:#ffdce0;
  background:rgba(255,97,111,.10);
  border-color:rgba(255,97,111,.34);
}

.btn.danger:hover{
  background:rgba(255,97,111,.14);
  border-color:rgba(255,97,111,.44);
}

.cards{
  display:grid;
  gap:10px;
}

.card{
  background-color:rgba(12,10,16,.82);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  padding:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.006)),
    rgba(12,10,16,.62);
  transition:transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.card:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.13);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
}

.card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.09);
  color:var(--muted);
  background:rgba(255,255,255,.015);
  font-size:12px;
  white-space:nowrap;
}

.badge.ok{
  border-color:rgba(83,216,156,.32);
  color:var(--ok);
  background:rgba(83,216,156,.08);
}

.badge.warn{
  border-color:rgba(255,210,123,.32);
  color:var(--warn);
  background:rgba(255,210,123,.08);
}

.badge.danger{
  border-color:rgba(255,97,111,.30);
  color:var(--danger);
  background:rgba(255,97,111,.08);
}

.small{
  color:var(--ink-soft);
  font-size:12px;
  margin-top:6px;
}

.small.tight{
  margin-top:0;
}

.muted{
  color:var(--muted);
}

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

.check-row{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.015);
  color:var(--ink);
}

.check-row input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#d5a75a;
}

.check-row.compact{
  padding:10px;
}

.grid .check-row{
  grid-column:1 / -1;
}

.danger-text{
  color:var(--danger) !important;
}

.admin-user-card.inactive{
  opacity:.84;
}

.admin-user-heading{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-user-top-badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.admin-user-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr 160px 140px 1fr;
  gap:8px;
  margin-top:10px;
}

.admin-user-grid .check-row{
  min-height:46px;
}

.admin-user-grid .admin-user-display{
  grid-column:span 2;
}

.admin-user-grid .admin-user-must-change{
  grid-column:span 2;
}

.kpis{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.kpi{
  background-color:rgba(12,10,16,.78);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  padding:12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245,226,174,.06), transparent 48%),
    rgba(12,10,16,.55);
}

.kpi-label{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.kpi-val{
  font-size:24px;
  font-weight:800;
  margin-top:6px;
}

.plan-controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}

.plan-quick-editor-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:0 0 12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(213,167,90,.16);
  background:
    linear-gradient(180deg, rgba(245,226,174,.04), rgba(245,226,174,.01)),
    rgba(255,255,255,.015);
}

.plan-quick-editor-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.plan-quick-editor-actions .btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
}

#plan-quick-editor-state{
  margin-left:auto;
}

.plan-wrap{
  background-color:rgba(22,18,26,.86);
  width:100%;
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(22,18,26,.86);
  box-shadow:none;
}

.plan-wrap.editing{
  overflow:hidden;
  touch-action:none;
  overscroll-behavior:contain;
}

.plan-stage{
  position:relative;
  width:min(980px, 100%);
  margin:0 auto;
  background:transparent;
}

.plan-stage.editing{
  touch-action:none;
}

.plan-underlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
}

.plan-room-underlay{
  fill:rgba(255,255,255,.97);
  stroke:none;
}

.plan-stage img{
  width:100%;
  height:auto;
  display:block;
  position:relative;
  z-index:1;
  filter:contrast(1.02) saturate(.95) brightness(1.03);
}

.plan-stage svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  touch-action:manipulation;
}

.plan-overlay{
  z-index:2;
}

.plan-stage.editing .plan-overlay{
  touch-action:none;
}

.room-shape{
  fill: rgba(108,217,255,.07);
  stroke: rgba(108,217,255,.52);
  stroke-width: 2;
  transition: fill .12s ease, stroke .12s ease;
}

.room-shape.has-pending:not(.selected){
  stroke: rgba(255,97,111,.38);
  fill: rgba(255,97,111,.035);
}

.room-shape:hover{
  fill: rgba(108,217,255,.14);
  cursor:pointer;
}

.room-shape.selected{
  fill: rgba(83,216,156,.16);
  stroke: rgba(83,216,156,.82);
}

.room-alert{
  cursor:pointer;
}

.room-alert-dot{
  fill: #ff4d5b;
  stroke: rgba(255,255,255,.9);
  stroke-width: .55;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.room-alert.selected .room-alert-dot{
  fill:#ff6170;
  stroke:rgba(83,216,156,.95);
}

.room-alert-text{
  fill:#fff;
  font-size:3.1px;
  font-weight:800;
  pointer-events:none;
  user-select:none;
}

.room-jobs{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.06);
}

.room-jobs .panel-title{
  margin-bottom:0;
}

.room-jobs-summary{
  margin:0 0 8px;
}

.room-jobs-list{
  display:grid;
  gap:10px;
}

.room-job-card{
  background-color:rgba(12,10,16,.82);
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  padding:10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.006)),
    rgba(12,10,16,.58);
}

.room-job-card-button{
  display:block;
  width:100%;
  color:inherit;
  text-align:left;
  font:inherit;
  cursor:pointer;
  transition:border-color .14s ease, background-color .14s ease, transform .14s ease;
}

.room-job-card-button:hover{
  transform:translateY(-1px);
  border-color:rgba(108,217,255,.34);
  background:rgba(108,217,255,.05);
}

.room-job-card-button:focus-visible{
  outline:2px solid rgba(108,217,255,.64);
  outline-offset:2px;
}

.room-job-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.room-job-title{
  font-weight:700;
}

.room-job-empty{
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.10);
  padding:10px 12px;
  background:rgba(255,255,255,.015);
}

.mail-status-line{
  margin-top:4px;
}

.plan-room-editor{
  margin-top:10px;
}

.plan-editor-shell{
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.006)),
    rgba(11,10,14,.55);
  padding:12px;
}

.plan-editor-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.plan-editor-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-top:10px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(255,255,255,.015);
  position:sticky;
  top:8px;
  z-index:3;
}

.plan-editor-actions .btn{
  padding:9px 11px;
}

.plan-editor-actions .btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
}

.plan-editor-state{
  margin-left:auto;
  min-width:180px;
}

.plan-editor-title{
  font-weight:800;
  letter-spacing:.01em;
}

.plan-visual-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:999px;
  padding:8px 10px;
  background:rgba(255,255,255,.02);
  color:var(--ink-soft);
  white-space:nowrap;
}

.plan-visual-toggle input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#d5a75a;
}

.plan-editor-tools{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.plan-editor-tools .btn{
  padding:9px 11px;
}

.plan-editor-grid{
  margin-top:10px;
}

.plan-editor-grid input[readonly]{
  color:var(--muted);
  border-style:dashed;
}

.plan-polygon-input{
  grid-column:1 / -1;
  min-height:150px;
  resize:vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:12px;
  line-height:1.45;
  white-space:pre;
}

.room-visual-editor{
  pointer-events:none;
}

.room-edit-outline{
  fill:rgba(108,217,255,.04);
  stroke:rgba(108,217,255,.92);
  stroke-width:0.55;
  stroke-dasharray:1.6 1.2;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));
  pointer-events:auto;
  cursor:grab;
}

.room-vertex-handle,
.room-move-handle,
.room-edit-outline,
.room-move-label{
  pointer-events:auto;
  cursor:grab;
  touch-action:none;
  transition:transform .08s ease;
}

.room-vertex-handle{
  fill:#0f0c12;
  stroke:#6cd9ff;
  stroke-width:.55;
}

.room-move-handle{
  fill:#d5a75a;
  stroke:rgba(255,255,255,.85);
  stroke-width:.45;
}

.room-move-label{
  fill:#221507;
  font-size:2.8px;
  font-weight:800;
  user-select:none;
  -webkit-user-select:none;
}

.room-vertex-handle:hover,
.room-move-handle:hover{
  filter:drop-shadow(0 0 4px rgba(108,217,255,.32));
}

.room-vertex-handle:active,
.room-move-handle:active{
  cursor:grabbing;
}

.mail-card{
  overflow:hidden;
}

.mail-summary-btn{
  width:100%;
  border:none;
  background:transparent;
  color:inherit;
  text-align:left;
  padding:0;
  margin:0;
  cursor:pointer;
}

.mail-summary-btn:hover .mail-expand-chip{
  border-color:rgba(108,217,255,.30);
  color:var(--ink);
}

.mail-summary-btn:focus-visible{
  outline:2px solid rgba(108,217,255,.65);
  outline-offset:3px;
  border-radius:10px;
}

.mail-summary-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mail-expand-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  color:var(--ink-soft);
  font-size:12px;
  font-weight:700;
}

.mail-card.open .mail-expand-chip{
  border-color:rgba(245,226,174,.24);
  background:rgba(245,226,174,.06);
  color:#f1d89d;
}

.mail-preview{
  margin-top:8px;
}

.mail-open-hint{
  margin-top:8px;
}

.mail-body-full{
  margin-top:10px;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.015);
  color:var(--ink);
  font-size:13px;
  line-height:1.5;
  white-space:pre-wrap;
  word-break:break-word;
}

.comments-wrap{
  margin-top:10px;
  border-top:1px solid rgba(255,255,255,.05);
  padding-top:10px;
}

.comments-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}

.comments-title{
  font-size:11px;
  color:var(--muted);
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.comments-actions{
  display:flex;
  gap:8px;
  align-items:center;
}

.comments-list{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.comment-item{
  background-color:rgba(255,255,255,.035);
  border-radius:12px;
  border:1px solid rgba(255,255,255,.07);
  padding:9px 10px;
  background:rgba(255,255,255,.015);
}

.comment-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.comment-author{
  font-weight:700;
  font-size:12px;
}

.comment-author.owner{
  color:#f1d89d;
}

.comment-time{
  color:var(--muted);
  font-size:11px;
}

.comment-body{
  margin-top:6px;
  color:var(--ink);
  font-size:13px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
}

.comment-form{
  margin-top:8px;
  display:grid;
  gap:8px;
}

.comment-form textarea{
  min-height:72px;
  resize:vertical;
}

.comment-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}

.comment-empty{
  color:var(--muted);
  font-size:12px;
}

.comment-toggle{
  padding:8px 10px;
  font-size:12px;
  border-radius:12px;
}

button,
input,
select,
textarea{
  -webkit-appearance:none;
  appearance:none;
}

select{
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(245,226,174,.9) 50%),
    linear-gradient(135deg, rgba(245,226,174,.9) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:34px;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  .login-overlay{
    background:rgba(5,5,8,.94);
  }

  .topbar{
    background:rgba(14,12,18,.95);
  }
}

@keyframes riseIn{
  from{
    opacity:0;
    transform:translateY(8px) scale(.995);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@keyframes fadeIn{
  from{opacity:.82}
  to{opacity:1}
}

@media (max-width:980px){
  .topbar,
  .wrap{
    width:calc(100vw - 12px);
  }

  .topbar{
    margin-top:6px;
    border-radius:18px;
  }
}

@media (max-width:720px){
  body::before,
  body::after{
    display:none;
  }

  .topbar-head{
    align-items:center;
    flex-direction:row;
    gap:8px;
  }

  .session-controls{
    margin-left:auto;
    width:auto;
    justify-content:flex-end;
    gap:6px;
    flex-wrap:nowrap;
    min-width:0;
  }

  .session-chip{
    max-width:36vw;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobile-menu-btn{
    display:inline-flex;
  }

  .tabs{
    display:none;
    width:100%;
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid rgba(255,255,255,.08);
    gap:8px;
    grid-template-columns:1fr;
  }

  .topbar.menu-open .tabs{
    display:grid;
  }

  .tab{
    flex:none;
    width:100%;
    padding:11px 12px;
    justify-content:flex-start;
  }

  .brand{
    min-width:0;
    gap:10px;
  }

  .brand > div:last-child{
    min-width:0;
  }

  .title{
    font-size:24px;
  }

  .subtitle{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:46vw;
  }

  #session-switch-btn{
    padding:10px 12px;
  }

  .panel{
    border-radius:16px;
    padding:12px;
  }

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

  .search{
    max-width:100%;
  }

  .kpis{
    grid-template-columns:1fr;
  }

  .row{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .plan-editor-header{
    flex-direction:column;
    align-items:stretch;
  }

  .plan-visual-toggle{
    width:100%;
    justify-content:center;
  }

  .plan-editor-actions{
    align-items:stretch;
  }

  .plan-editor-actions .btn{
    flex:1 1 calc(50% - 8px);
  }

  .plan-editor-state{
    margin-left:0;
    width:100%;
    min-width:0;
  }

  .plan-quick-editor-actions .btn{
    flex:1 1 calc(50% - 8px);
  }

  .plan-quick-editor-buttons{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .plan-quick-editor-buttons .btn{
    width:100%;
  }

  #plan-quick-editor-state{
    margin-left:0;
    width:100%;
  }

  .plan-editor-tools .btn{
    flex:1 1 calc(50% - 8px);
  }

  .room-jobs .row{
    align-items:stretch;
  }

  #room-jobs-open-work{
    width:100%;
  }

  .comment-row{
    flex-direction:column;
    align-items:stretch;
  }

  .admin-user-top-badges{
    justify-content:flex-start;
  }

  .admin-user-grid{
    grid-template-columns:1fr;
  }

  .admin-user-grid .admin-user-display,
  .admin-user-grid .admin-user-must-change{
    grid-column:auto;
  }

  .login-overlay{
    padding:14px;
  }

  .login-title{
    font-size:29px;
  }

  .login-form,
  .login-owner-form{
    grid-template-columns:1fr;
  }

  .login-account-list{
    display:grid;
    grid-template-columns:1fr;
  }

  .login-account-btn{
    width:100%;
    justify-content:space-between;
  }

  .login-form .btn,
  .login-owner-form .btn{
    width:100%;
  }

  .login-owner-actions{
    justify-content:stretch;
  }

  .login-owner-actions .btn{
    width:100%;
  }

  .login-owner-btn{
    position:static;
    justify-self:end;
    margin-bottom:10px;
  }

  .homescreen-prompt{
    left:8px;
    right:8px;
    bottom:8px;
    width:auto;
  }

  .homescreen-prompt-card{
    border-radius:16px;
    padding:12px;
  }

  .homescreen-title{
    font-size:22px;
  }

  .homescreen-actions .btn{
    flex:1 1 100%;
  }
}

@media (max-width:420px){
  .session-chip{
    display:none;
  }

  .subtitle{
    max-width:40vw;
  }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}
