/* GIH - Outlets Cover Report
   Highlight colours mirror the workbook conditional formatting:
   departure #FF7575, remarks #FFFF85, arrival theme9/tint .6, banding theme0/tint -.15 */
:root{
  --bg:#f4f5f7; --panel:#fff; --ink:#1b1f24; --ink-soft:#5b6572; --line:#dbe0e6;
  --accent:#0f5c5c; --accent-ink:#fff;
  --dep:#ff7575; --arr:#c5e0b4; --rem:#ffff85; --miss:#ffe0e6; --band:#f2f3f5;
  --radius:6px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{
  background:var(--bg); color:var(--ink);
  font:13px/1.45 "Segoe UI",system-ui,-apple-system,sans-serif;
  display:flex; flex-direction:column;
}

/* ---------- top bar ---------- */
.topbar{
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  padding:10px 18px; background:var(--accent); color:var(--accent-ink);
}
.brand{display:flex; align-items:center; gap:11px}
.mark{
  font-weight:700; letter-spacing:.5px; background:rgba(255,255,255,.16);
  padding:7px 10px; border-radius:var(--radius);
}
.brand-text{display:flex; flex-direction:column; line-height:1.25}
.brand-text strong{font-size:14px}
.muted{opacity:.7; font-size:11px}
.topbar-controls{display:flex; align-items:center; gap:12px; margin-left:auto; flex-wrap:wrap}
.field{display:flex; flex-direction:column; gap:2px; font-size:10px; text-transform:uppercase; letter-spacing:.6px; opacity:.85}
.field input{
  font:inherit; font-size:13px; text-transform:none; letter-spacing:0;
  padding:4px 7px; border:1px solid rgba(255,255,255,.35); border-radius:var(--radius);
  background:rgba(255,255,255,.12); color:#fff;
}
.field input::-webkit-calendar-picker-indicator{filter:invert(1)}
.stat{display:flex; flex-direction:column; align-items:center; line-height:1.1; min-width:44px}
.stat span{font-size:17px; font-weight:600}
.stat small{font-size:9px; text-transform:uppercase; letter-spacing:.7px; opacity:.75}

/* Connection / role badge: green shared, amber admin, grey local-only. */
.conn{
  display:flex; align-items:center; gap:7px; padding:4px 6px 4px 9px;
  border:1px solid rgba(255,255,255,.35); border-radius:20px; font-size:11px;
}
.conn-dot{width:8px; height:8px; border-radius:50%; background:#9aa5a5; flex:none}
.conn.shared .conn-dot{background:#5ee08a}
.conn.admin .conn-dot{background:#ffc95e}
.conn.local .conn-dot{background:#d9dede}
.conn-label{text-transform:uppercase; letter-spacing:.6px; font-weight:600; white-space:nowrap}
.conn-btn{
  font:inherit; font-size:11px; padding:2px 9px; border-radius:14px; cursor:pointer;
  border:1px solid rgba(255,255,255,.4); background:rgba(255,255,255,.14); color:#fff;
}
.conn-btn:hover{background:rgba(255,255,255,.28)}

.btn{
  font:inherit; padding:6px 12px; border-radius:var(--radius); cursor:pointer;
  border:1px solid transparent; background:#fff; color:var(--accent); font-weight:600;
}
.btn:hover{background:#eef4f4}
.btn.ghost{background:transparent; color:#fff; border-color:rgba(255,255,255,.4)}
.btn.ghost:hover{background:rgba(255,255,255,.14)}
.btn.ghost.danger:hover{background:#b3261e; border-color:#b3261e}

/* ---------- tabs ---------- */
.tabs{
  display:flex; gap:2px; padding:0 12px; background:#e7eaee;
  border-bottom:1px solid var(--line); overflow-x:auto;
}
.tab{
  font:inherit; border:0; background:transparent; cursor:pointer; white-space:nowrap;
  padding:9px 14px; color:var(--ink-soft); border-bottom:3px solid transparent;
}
.tab:hover{color:var(--ink)}
.tab.active{color:var(--accent); border-bottom-color:var(--accent); font-weight:600; background:var(--panel)}
.tab .badge{
  display:inline-block; margin-left:7px; min-width:18px; padding:1px 5px;
  background:var(--accent); color:#fff; border-radius:9px; font-size:10px; font-weight:600;
}
.tab:not(.active) .badge{background:#b8c0c9}
.tab .badge.zero{display:none}

/* ---------- panes ---------- */
main{flex:1; min-height:0; display:flex; overflow:hidden}
.pane{flex:1; display:flex; flex-direction:column; min-width:0; padding:14px 18px; gap:10px}
.pane-head{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.pane-head h1{font-size:17px; margin:0; font-weight:600}
.filters{display:flex; gap:8px; margin-left:auto; flex-wrap:wrap}
.filters input,.filters select{
  font:inherit; padding:5px 9px; border:1px solid var(--line);
  border-radius:var(--radius); background:#fff; color:var(--ink);
}
.filters input[type=search],.filters #roomAdd{min-width:230px}
.filters .btn{border-color:var(--line); color:var(--accent)}

/* ---------- editable cells ---------- */
.grid td.editable{padding:2px 4px}
.cell-edit{
  min-height:20px; padding:3px 5px; border-radius:3px; border:1px solid transparent;
  white-space:pre-wrap; word-break:break-word; cursor:text;
}
.cell-edit:hover{border-color:var(--line); background:rgba(255,255,255,.65)}
.cell-edit:focus{
  outline:none; border-color:var(--accent); background:#fff;
  box-shadow:0 0 0 2px rgba(15,92,92,.15);
}
.cell-edit:empty::before{content:attr(data-placeholder); color:#a8b0b8}
.c-comment .cell-edit{max-height:60px; overflow:auto}
.c-comment .cell-edit:focus{max-height:260px}

/* ---------- search-to-seat ---------- */
.seek{position:relative}
.seek input{min-width:330px}
.seek-results{
  position:absolute; z-index:40; top:calc(100% + 3px); left:0; right:0; min-width:380px;
  max-height:340px; overflow:auto; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:0 8px 24px rgba(0,0,0,.16); padding:4px;
}
.seek-item{
  display:flex; align-items:center; gap:10px; width:100%; text-align:left;
  font:inherit; font-size:12px; padding:6px 8px; border:0; border-radius:4px;
  background:transparent; cursor:pointer; color:var(--ink);
}
.seek-item:hover,.seek-item.on{background:#e8f1f1}
.seek-item.seated{opacity:.55}
.seek-room{
  font-weight:700; min-width:44px; font-variant-numeric:tabular-nums; flex:none;
}
.seek-mid{display:flex; flex-direction:column; line-height:1.3; min-width:0; flex:1}
.seek-mid strong{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.seek-sub{font-size:10.5px; color:var(--ink-soft)}
.seek-tag{
  flex:none; font-size:10px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--accent); font-weight:700;
}
.seek-item.seated .seek-tag{color:var(--ink-soft)}
.seek-empty{padding:10px; font-size:12px; color:var(--ink-soft)}

.legend{display:flex; gap:16px; font-size:11px; color:var(--ink-soft); align-items:center}
.sw{display:inline-block; width:11px; height:11px; border:1px solid rgba(0,0,0,.2); border-radius:2px; margin-right:5px; vertical-align:-1px}
.sw-dep{background:var(--dep)} .sw-arr{background:var(--arr)}
.sw-rem{background:var(--rem)} .sw-miss{background:var(--miss)}

.outlet-body{display:flex; gap:14px; flex:1; min-height:0}
.cover-sheet{flex:1; min-width:0; display:flex; flex-direction:column; gap:8px}

/* ---------- grid ---------- */
.table-wrap{
  flex:1; min-height:0; overflow:auto; background:var(--panel);
  border:1px solid var(--line); border-radius:var(--radius);
}
.grid{border-collapse:separate; border-spacing:0; width:100%; font-size:12px}
.grid th{
  position:sticky; top:0; z-index:2; text-align:left; font-weight:600;
  background:#eceff3; border-bottom:1px solid var(--line); padding:7px 8px; white-space:nowrap;
}
.grid td{border-bottom:1px solid #eceef1; padding:5px 8px; vertical-align:top}

/* Per-column "contains" filters. The label row is a fixed height so the filter
   row underneath knows exactly where to stick. */
.grid thead tr:first-child th{height:31px; top:0}
.grid .filter-row th{top:31px; padding:3px 4px; background:#e4e8ee; z-index:2}
.grid .filter-row input{
  font:inherit; font-size:11px; width:100%; min-width:0; padding:3px 6px;
  border:1px solid var(--line); border-radius:4px; background:#fff; color:var(--ink);
}
.grid .filter-row input::placeholder{color:#9aa3ad}
.grid .filter-row input:focus{outline:2px solid var(--accent); outline-offset:-1px}
.grid .filter-row input.on{border-color:var(--accent); background:#f0f7f7; font-weight:600}
.grid tbody tr.band td{background:var(--band)}
.grid tbody tr.arr td{background:var(--arr)}
.grid tbody tr.rem td{background:var(--rem)}
.grid tbody tr.dep td{background:var(--dep)}
.grid tbody tr.missing td{background:var(--miss); color:#8a2b2b}
.c-outlet{white-space:nowrap; font-weight:600; color:var(--accent)}
.dup-note{color:#b3261e; font-weight:600}
.tab-master{font-weight:600}
.grid tbody tr:hover td{box-shadow:inset 0 0 0 9999px rgba(15,92,92,.05)}

.c-room{width:76px} .c-table{width:74px} .c-rem{width:120px} .c-guest{width:200px}
.c-plan{width:76px} .c-num{width:38px; text-align:right} .c-date{width:88px}
.c-x{width:30px}
.grid td.c-num{text-align:right; font-variant-numeric:tabular-nums}
.grid td.c-room{font-weight:600; font-variant-numeric:tabular-nums}
.grid td.c-date{white-space:nowrap; font-variant-numeric:tabular-nums}
.guest-lines{white-space:pre-line}
.plan-tag{
  display:inline-block; padding:1px 6px; border-radius:3px; font-size:11px;
  font-weight:600; background:rgba(0,0,0,.07); white-space:nowrap;
}

/* comment cell: clamped, click to expand */
.comment{
  max-width:520px; color:var(--ink-soft); cursor:pointer;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.comment.open{-webkit-line-clamp:unset; display:block; white-space:pre-wrap; color:var(--ink)}
.comment:empty{cursor:default}

/* editable cells */
.grid td.edit{padding:0}
.grid td.edit input{
  font:inherit; width:100%; border:0; background:transparent; color:inherit;
  padding:5px 8px; font-variant-numeric:tabular-nums;
}
.grid td.edit input:focus{outline:2px solid var(--accent); outline-offset:-2px; background:#fff}
.rowdel{
  border:0; background:transparent; cursor:pointer; color:#b9c0c8;
  font-size:15px; line-height:1; padding:2px 5px;
}
.rowdel:hover{color:#b3261e}
.rowcount{margin:0; font-size:11px; color:var(--ink-soft)}
.empty{padding:26px; text-align:center; color:var(--ink-soft)}

/* ---------- summary ---------- */
.summary{
  width:290px; flex:none; overflow:auto; background:var(--panel);
  border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px;
}
.summary h2{font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--ink-soft); margin:0 0 8px}
.sum-block + .sum-block{margin-top:16px}
.sum-table{width:100%; border-collapse:collapse; font-size:12px}
.sum-table th{text-align:right; font-size:10px; text-transform:uppercase; letter-spacing:.5px; color:var(--ink-soft); padding:2px 4px; font-weight:600}
.sum-table th:first-child{text-align:left}
.sum-table td{padding:3px 4px; border-bottom:1px solid #f0f1f3; font-variant-numeric:tabular-nums}
.sum-table td:first-child{font-weight:600}
.sum-table td:not(:first-child){text-align:right}
.sum-table tr.zero td{color:#b2b9c1; font-weight:400}
.sum-table tr.total td{border-top:2px solid var(--line); border-bottom:0; padding-top:6px; font-weight:700}
.sum-derived td:first-child{color:var(--ink-soft); font-weight:600}
.sum-derived td:nth-child(2){text-align:left; font-weight:600}
.kpi{display:flex; gap:8px; margin-bottom:4px}
.kpi div{
  flex:1; background:#f1f5f5; border-radius:var(--radius); padding:8px;
  text-align:center; line-height:1.2;
}
.kpi strong{display:block; font-size:18px; color:var(--accent)}
.kpi small{font-size:9px; text-transform:uppercase; letter-spacing:.6px; color:var(--ink-soft)}

/* ---------- dropzone / toast ---------- */
.dropzone{
  position:fixed; inset:0; display:none; place-items:center; z-index:50;
  background:rgba(15,92,92,.82); color:#fff; font-size:20px;
}
.dropzone.on{display:grid}
.dropzone div{border:3px dashed rgba(255,255,255,.7); border-radius:14px; padding:44px 66px}
.toast{
  position:fixed; left:50%; bottom:26px; transform:translate(-50%,26px);
  background:#1b1f24; color:#fff; padding:10px 18px; border-radius:var(--radius);
  opacity:0; pointer-events:none; transition:.22s; z-index:60; max-width:70vw;
}
.toast.on{opacity:1; transform:translate(-50%,0)}
.toast.err{background:#b3261e}

/* ---------- import & template pane ---------- */
.btn.accent{background:#0b3d3d; color:#fff; border-color:#0b3d3d}
.btn.accent:hover{background:#0a4f4f}
.btn.accent:disabled{background:#9aa5a5; border-color:#9aa5a5; cursor:not-allowed}
.btn.big{padding:11px 18px; font-size:14px; width:100%}

.pane.import{overflow:auto; display:block}
.import-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:16px}
.card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 20px; margin-bottom:16px;
}
.card h1{margin:0 0 6px; font-size:15px}
.card h2{margin:0 0 10px; font-size:14px}
.card h3{margin:16px 0 7px; font-size:12px; text-transform:uppercase; letter-spacing:.7px; color:var(--ink-soft)}
.card p{margin:0 0 12px}
.card .muted{font-size:12px; opacity:.75}
.card .muted.small{font-size:11px}
.card code{background:#eef1f4; padding:1px 4px; border-radius:3px; font-size:11px}

.droptarget{
  border:2px dashed var(--line); border-radius:var(--radius); background:#fafbfc;
  padding:26px 16px; text-align:center; cursor:pointer; transition:border-color .15s, background .15s;
}
.droptarget:hover{border-color:var(--accent); background:#f2f7f7}
.droptarget-inner{display:flex; flex-direction:column; align-items:center; gap:8px}
.check{display:flex; align-items:center; gap:8px; margin-top:14px; font-size:12px; cursor:pointer}
.check input{width:15px; height:15px}

.report:empty{display:none}
.report .ok{color:#14603f}
table.kv{border-collapse:collapse; width:100%; max-width:620px}
table.kv th,table.kv td{
  text-align:left; padding:5px 10px; border-bottom:1px solid var(--line); vertical-align:top;
}
table.kv th{font-weight:500; color:var(--ink-soft); width:52%}
table.kv td{font-variant-numeric:tabular-nums; font-weight:600}

.chips{display:flex; flex-wrap:wrap; gap:6px}
.chip{
  background:#eef1f4; border:1px solid var(--line); border-radius:12px;
  padding:2px 10px; font-size:11px; font-variant-numeric:tabular-nums;
}
.chip-warn{background:#fff4d6; border-color:#e0c67a; color:#6b4a00}
ul.notes{margin:12px 0; padding-left:18px; font-size:12px; color:var(--ink-soft)}
ul.notes li{margin-bottom:5px}

/* ---------- control panel ---------- */
/* Tabs scroll horizontally, so they must not shrink. The Control Panel sits
   last behind a rule rather than pinned right, which would leave it half cut
   off at the edge of the scroller. */
.tab{flex:none}
.tab-settings{border-left:1px solid var(--line); margin-left:6px}
.pane.control{overflow:auto; display:block}
.cp-head{margin-bottom:14px}
.cp-head h1{margin:0 0 4px; font-size:17px}
.cp-head .muted{font-size:12px; max-width:70ch}

.cp-body{display:grid; grid-template-columns:210px minmax(0,1fr); gap:16px; align-items:start}
.cp-nav{
  display:flex; flex-direction:column; gap:2px; background:var(--panel);
  border:1px solid var(--line); border-radius:var(--radius); padding:6px; position:sticky; top:0;
}
.cp-nav-item{
  font:inherit; text-align:left; border:0; background:transparent; cursor:pointer;
  padding:8px 10px; border-radius:var(--radius); color:var(--ink-soft);
  display:flex; align-items:center; gap:6px;
}
.cp-nav-item:hover{background:#eef1f4; color:var(--ink)}
.cp-nav-item.active{background:var(--accent); color:#fff; font-weight:600}
.cp-dot{margin-left:auto; color:#c98a00; font-size:18px; line-height:1}
.cp-nav-item.active .cp-dot{color:#ffd98a}

.cp-panel{
  background:var(--panel); border:1px solid var(--line);
  border-radius:var(--radius); padding:18px 20px; min-width:0;
}
.cp-panel-head{display:flex; align-items:center; gap:12px; margin-bottom:12px}
.cp-panel-head h2{margin:0; font-size:15px}
.cp-panel-head .btn{margin-left:auto}
.cp-panel h3{margin:20px 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.7px; color:var(--ink-soft)}
.cp-intro{margin:0 0 16px; font-size:12px; color:var(--ink-soft); max-width:80ch}
.cp-hint{margin:6px 0 14px; font-size:11px; color:var(--ink-soft); max-width:80ch}

.btn.small{padding:5px 11px; font-size:12px}
.btn.ghost-line{background:#fff; border-color:var(--line); color:var(--ink-soft)}
.btn.ghost-line:hover{background:#eef1f4; color:var(--ink)}
.btn.danger-line{color:#b3261e; border-color:#e5b8b4}
.btn.danger-line:hover{background:#fdeceb; color:#b3261e}
.btn:disabled{opacity:.45; cursor:not-allowed}

.cp-field{display:flex; flex-direction:column; gap:3px; margin-bottom:14px; max-width:460px}
.cp-label{font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--ink-soft)}
.cp-field .cp-hint{margin:2px 0 0}
.cp-input{
  font:inherit; padding:6px 9px; border:1px solid var(--line);
  border-radius:var(--radius); background:#fff; color:var(--ink); min-width:0;
}
.cp-input:focus{outline:2px solid var(--accent); outline-offset:-1px}
input.cp-input[type=number]{width:74px}
input.cp-input[type=color]{width:44px; height:30px; padding:2px; cursor:pointer}
.cp-check{display:flex; align-items:center; gap:7px; font-size:12px; cursor:pointer; margin-bottom:6px}
.cp-check input[type=checkbox]{width:15px; height:15px; margin:0}

.cp-icon{
  font:inherit; font-size:11px; line-height:1; border:1px solid var(--line);
  background:#fff; color:var(--ink-soft); border-radius:4px;
  width:24px; height:24px; cursor:pointer; padding:0;
}
.cp-icon:hover:not(:disabled){background:#eef1f4; color:var(--ink)}
.cp-icon:disabled{opacity:.3; cursor:not-allowed}

.cp-scroll{overflow-x:auto; margin-bottom:12px}
table.cp-table{border-collapse:collapse; width:100%; font-size:12px}
table.cp-table th{
  text-align:left; font-weight:600; color:var(--ink-soft); font-size:10px;
  text-transform:uppercase; letter-spacing:.6px; padding:6px 8px;
  border-bottom:1px solid var(--line); white-space:nowrap;
}
table.cp-table td{padding:5px 8px; border-bottom:1px solid var(--line); vertical-align:middle}
table.cp-table td.cp-mid{text-align:center}
table.cp-table td.cp-mid .cp-check{justify-content:center; margin:0}
table.cp-table .cp-ord{white-space:nowrap; width:1%}
table.cp-table .cp-ord .cp-icon+.cp-icon{margin-left:2px}

.cp-list{display:flex; flex-direction:column; gap:5px; margin-bottom:12px}
.cp-list-row{display:flex; align-items:center; gap:6px}
.cp-list-row .cp-input{flex:1; max-width:260px}
.cp-num{
  width:22px; text-align:right; font-size:11px; color:var(--ink-soft);
  font-variant-numeric:tabular-nums; flex:none;
}
.cp-arrow{color:var(--ink-soft)}

.cp-rollup{position:relative}
.cp-rollup-btn{
  font:inherit; font-size:12px; padding:5px 9px; border:1px solid var(--line);
  border-radius:var(--radius); background:#fff; cursor:pointer; white-space:nowrap;
}
.cp-rollup-menu{
  display:none; position:absolute; right:0; z-index:20; margin-top:3px;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:8px 10px; box-shadow:0 6px 18px rgba(0,0,0,.13); min-width:190px;
}
.cp-rollup.open .cp-rollup-menu{display:block}

/* ---------- dhathuru ---------- */
.pane.dhathuru{overflow:auto; display:block}

.dha-card{
  background:var(--panel); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px 14px; min-width:0; margin-bottom:14px;
}
.dha-card h2{
  margin:0 0 9px; font-size:13px; display:flex; align-items:center; gap:9px;
}
.dha-tools{margin-left:auto; display:flex; gap:6px}
.dha-table th,.dha-table td{white-space:nowrap}
.dha-table .c-flt,.dha-table .c-time{min-width:86px}
.dha-table .c-agent{min-width:112px}
.dha-table .c-slot{min-width:46px; text-align:center}
.dha-table .c-num{min-width:44px; text-align:center}
.dha-table .c-room,.dha-table .c-plan{min-width:56px}
.dha-table .c-date{min-width:86px}
.dha-table .cell-edit{min-height:18px}
.dha-table .c-comment{white-space:normal; min-width:230px; max-width:420px}
.dha-table .c-guest{white-space:normal; min-width:150px}
.dha-hosts .dha-host-name{font-weight:600}
.dha-find{max-width:170px; font-size:12px; padding:4px 8px}
.dha-find-answer{display:flex; flex-wrap:wrap; gap:6px; margin:0 0 9px}
.dha-find-answer[hidden]{display:none}
.dha-find-hit{
  font-size:11px; padding:3px 10px; border-radius:12px;
  background:#e8f1f1; border:1px solid var(--accent); color:var(--accent);
}
.dha-find-none{font-size:11px; color:var(--ink-soft)}
.dha-table td.dha-hit,.dha-table td.dha-hit .cell-edit{
  background:#ffe9a8; font-weight:700; color:#6b4a00;
}
.dha-hosts tbody tr.dha-dim{opacity:.35}
.dha-count{
  background:var(--accent); color:#fff; border-radius:9px; font-size:10px;
  font-weight:600; padding:1px 7px; min-width:18px; text-align:center;
}
.dha-card .table-wrap{max-height:320px}
.dha-table{font-size:11.5px}
.dha-table tbody tr.dha-auto td{background:#f3f8f4; color:var(--ink-soft); font-style:italic}
.rowdel.keep{color:var(--accent); font-weight:700}
.dha-saved{font-size:11px}
.dha-seen{
  display:flex; flex-direction:column; gap:2px; padding:8px 10px; margin-bottom:6px;
  background:#f7f8fa; border:1px solid var(--line); border-radius:var(--radius);
  font-size:11px; color:var(--ink-soft);
}
.dha-seen strong{color:var(--ink)}

/* ---------- sign in ---------- */
.signin{
  position:fixed; inset:0; z-index:200; display:flex; align-items:center;
  justify-content:center; background:rgba(20,28,32,.45);
}
.signin[hidden]{display:none}
.signin-card{
  background:var(--panel); border-radius:8px; padding:22px 24px; width:320px;
  box-shadow:0 18px 48px rgba(0,0,0,.3);
}
.signin-card h2{margin:0 0 4px; font-size:16px}
.signin-card .muted{display:block; margin-bottom:14px; opacity:.75}
.signin-card .cp-field{max-width:none}
.signin-error{
  margin:0 0 10px; font-size:12px; color:#b3261e; font-weight:600;
}
.signin-error[hidden]{display:none}
.signin-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:6px}

/* service toggle in the header */
.svc{display:inline-flex; margin:3px 0 2px; border-radius:14px; overflow:hidden;
  border:1px solid rgba(255,255,255,.35); width:max-content}
.svc-btn{
  font:inherit; font-size:10px; letter-spacing:.7px; text-transform:uppercase;
  font-weight:700; padding:2px 12px; border:0; cursor:pointer;
  background:transparent; color:rgba(255,255,255,.75);
}
.svc-btn:hover:not(:disabled){background:rgba(255,255,255,.16); color:#fff}
.svc-btn.on{background:#fff; color:var(--accent)}
.svc-btn:disabled{cursor:not-allowed}
.svc-btn.on:disabled{opacity:.85}

.cp-rights{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:2px 14px; margin-bottom:12px;
}
.cp-rights .cp-check{margin:0}
.cp-sub{
  margin:12px 0 6px; font-size:11px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--ink-soft); font-weight:600;
}
.cp-user{border:1px solid var(--line); border-radius:var(--radius); padding:11px 13px; margin-bottom:9px}
.cp-user-head{display:flex; align-items:center; gap:8px; margin-bottom:9px; flex-wrap:wrap}
.cp-user-head strong{min-width:110px}
.cp-user-pw{max-width:190px}
.cp-users{margin-bottom:8px}

.cp-service{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px;
  padding:11px 14px; border:1px solid var(--line); border-radius:var(--radius); background:#f7f8fa;
}
.cp-service .cp-hint{margin:0; flex-basis:100%}
.cp-segmented{display:flex; border:1px solid var(--line); border-radius:20px; overflow:hidden; background:#fff}
.cp-seg{
  font:inherit; font-size:12px; padding:5px 18px; border:0; background:transparent;
  cursor:pointer; color:var(--ink-soft);
}
.cp-seg:hover{background:#eef1f4}
.cp-seg.on{background:var(--accent); color:#fff; font-weight:600}
.cp-shows-as{font-size:11px; color:var(--accent); font-weight:600; white-space:nowrap}

.cp-derived{border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px; margin-bottom:10px}
.cp-derived-head{display:flex; align-items:center; gap:6px; margin-bottom:9px}
.cp-derived-head .cp-input{flex:1; max-width:220px; font-weight:600}
.cp-derived-opts{display:flex; flex-wrap:wrap; gap:16px; margin-bottom:10px}
.cp-derived-opts .cp-check{margin:0}
.cp-buckets{display:flex; flex-wrap:wrap; gap:5px}
.cp-bucket{
  font:inherit; font-size:11px; padding:3px 9px; border-radius:12px; cursor:pointer;
  border:1px solid var(--line); background:#f7f8fa; color:var(--ink-soft);
}
.cp-bucket:hover{border-color:var(--accent)}
.cp-bucket.on{background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600}

.cp-rule{border:1px solid var(--line); border-radius:var(--radius); padding:11px 13px; margin-bottom:9px}
.cp-rule-line{display:flex; align-items:center; gap:7px; flex-wrap:wrap}
.cp-rule-word{font-size:12px; color:var(--ink-soft); white-space:nowrap}
.cp-rule-text{flex:1; min-width:150px; max-width:260px}
.cp-rule-opts{display:flex; flex-wrap:wrap; gap:18px; margin-top:9px}
.cp-rule-opts .cp-check{margin:0}
.cp-rule-hit{margin:9px 0 0; font-size:11px; color:var(--ink-soft)}
.cp-rule-hit.on{color:#14603f; font-weight:600}
.cp-rule-hit.bad{color:#b3261e; font-weight:600}
.cp-wildcards{
  margin:0 0 16px; padding:9px 12px; font-size:11.5px; line-height:1.55;
  background:#f7f8fa; border:1px solid var(--line); border-radius:var(--radius);
  max-width:80ch;
}
.cp-wildcards code{background:#e4e8ee; padding:1px 5px; border-radius:3px; font-size:11px}

.cp-colour-row{display:flex; align-items:center; gap:11px; margin-bottom:9px}
.cp-colour-text{display:flex; flex-direction:column; line-height:1.35}
.cp-colour-text strong{font-size:12px; font-weight:600}
.cp-colour-text code{font-size:11px; color:var(--ink-soft)}

.cp-locked{
  display:flex; align-items:center; gap:12px; margin-bottom:14px;
  padding:9px 14px; border-radius:var(--radius); font-size:12px;
  background:#fff4d6; border:1px solid #e0c67a; color:#6b4a00;
}
.cp-locked .btn{margin-left:auto}
.cp-bucket.locked{opacity:.55}
.cp-panel input:disabled,.cp-panel select:disabled{background:#f2f3f5; color:#8a929b}

.cp-log{max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:var(--radius)}
.cp-log-row{
  display:grid; grid-template-columns:150px 130px minmax(0,1fr); gap:10px;
  padding:5px 10px; border-bottom:1px solid var(--line); font-size:11px;
}
.cp-log-row:last-child{border-bottom:0}
.cp-log-when{color:var(--ink-soft); font-variant-numeric:tabular-nums}
.cp-log-who{color:var(--ink-soft)}
.cp-log-who.admin{color:#8a5a00; font-weight:600}
.cp-log-what{color:var(--ink)}
.cp-days{margin-bottom:8px}

.cp-buttons{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px}
.cp-json{
  background:#f7f8fa; border:1px solid var(--line); border-radius:var(--radius);
  padding:12px; font-size:11px; line-height:1.45; max-height:340px; overflow:auto; margin:0;
}

@media (max-width:820px){
  .cp-body{grid-template-columns:1fr}
  .cp-nav{flex-direction:row; flex-wrap:wrap; position:static}
}

/* ---------- print ---------- */
@media print{
  @page{size:A4 landscape; margin:9mm}
  body{background:#fff; display:block}
  .topbar,.tabs,.filters,.dropzone,.toast,.rowdel,.c-x,.conn,
  .pane.import,.pane.control,.filter-row{display:none !important}
  main{display:block; overflow:visible}
  .pane{padding:0}
  .outlet-body{display:block}
  .table-wrap{overflow:visible; border:0; max-height:none}
  .summary{width:100%; margin-top:10px; page-break-inside:avoid; border:0}
  .grid{font-size:9.5px}
  .grid th{background:#e9ecef !important; -webkit-print-color-adjust:exact; print-color-adjust:exact}
  .grid tbody tr td{-webkit-print-color-adjust:exact; print-color-adjust:exact}
  .comment{-webkit-line-clamp:3; max-width:none}
  .pane-head h1::after{content:" \2014  " attr(data-print-date); font-weight:400}
}

/* week summary on the Dhathuru */
.dha-week .dha-week-label{font-weight:600; text-align:right; white-space:nowrap}
.dha-week th.dha-today,.dha-week td.dha-today{background:#e8f1f1; font-weight:700; color:var(--accent)}
.dha-week td,.dha-week th{text-align:center; min-width:62px}

/* Dhathuru header block: the sheet's own top matter. */
.dha-head{
  display:grid; grid-template-columns:minmax(300px,auto) minmax(0,1fr); gap:14px;
  margin-bottom:14px; align-items:start;
}
.dha-head-left,.dha-head-right{
  background:var(--panel); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px 14px; min-width:0;
}
.dha-head-cols{display:flex; gap:22px; flex-wrap:wrap; margin-top:10px}
.dha-list{min-width:0}
.dha-list h3{
  margin:0 0 5px; font-size:10px; text-transform:uppercase; letter-spacing:.8px;
  color:var(--ink-soft); font-weight:700;
}
.dha-pairs{display:flex; flex-direction:column; gap:2px}
.dha-pair{display:flex; gap:12px; align-items:baseline; font-size:12px; line-height:1.5}
.dha-pair-label{color:var(--ink-soft); white-space:nowrap}
.dha-pair-value{margin-left:auto; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap}
.dha-head-date{margin:0 0 9px; font-size:15px; font-weight:600}
.dha-head-right .table-wrap{max-height:none}
.dha-head-empty{
  display:flex; flex-direction:column; gap:4px; margin-bottom:14px;
  background:var(--panel); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px 14px;
}
.dha-head-empty strong{font-size:15px}
.dha-head-empty span{font-size:12px; color:var(--ink-soft)}

@media (max-width:1000px){ .dha-head{grid-template-columns:1fr} }

/* Shown only on paper, where the tab bar and top bar are not there to say it. */
.print-only{display:none}
@media print{ .print-only{display:block} }
