/* Admin stylesheet */
* { box-sizing: border-box; }
:root {
  --bg: #f3f4f6; --card:#fff; --text:#16231c; --muted:#66746d; --line:#e3e7e4;
  --pri:#0e4d3a; --pri2:#0b3f2f; --acc:#c9a227; --danger:#b3453a; --ok:#1f8a4c;
}
body { margin:0; font-family:'Source Sans 3',system-ui,-apple-system,'Segoe UI',sans-serif; background:var(--bg); color:var(--text); font-size:14.5px; display:flex; min-height:100vh; }
a { color: var(--pri); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; }
/* sidebar */
.aside { width: 230px; background: #0e2a20; color: #dbe8e1; display:flex; flex-direction:column; position:fixed; inset:0 auto 0 0; padding: 14px 0; }
.brand { display:flex; gap:10px; align-items:center; padding: 6px 16px 18px; }
.logo { font-size: 24px; }
.brand strong { color:#fff; display:block; }
.brand small { color:#9db4a8; font-size: 11px; }
.aside nav { flex:1; }
.aside nav a { display:flex; align-items:center; gap:10px; padding: 9px 16px; color:#cfe0d7; font-weight:500; font-size:13.5px; border-left:3px solid transparent; }
.aside nav a:hover { background:#12392b; color:#fff; }
.aside nav a.active { background:#12392b; border-left-color:var(--acc); color:#fff; }
.aside-foot { padding: 12px 16px; display:flex; flex-direction:column; gap:6px; font-size:12.5px; }
.aside-foot a { color:#9db4a8; }
.main { margin-left:230px; flex:1; padding: 26px 30px; min-width:0; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px; margin-bottom:18px; }
.card h2 { margin-top: 0; }
.row { display:flex; gap:14px; flex-wrap:wrap; }
.stat { flex:1; min-width:150px; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px 18px; }
.stat b { font-size: 24px; display:block; }
.stat span { color:var(--muted); font-size:12.5px; }
.flash { padding: 12px 16px; border-radius:8px; margin-bottom:16px; font-weight:500; }
.flash.ok { background:#e2f3e9; color:#0b4d2f; }
.flash.err { background:#fbe9e7; color:#8f2d23; }
.btn { display:inline-flex; align-items:center; gap:5px; padding:9px 15px; border-radius:30px; border:0; cursor:pointer; font-weight:600; font-size:13.5px; background:var(--pri); color:#fff; text-decoration:none; }
.btn:hover { background:var(--pri2); color:#fff; }
.btn.small { padding:6px 11px; font-size:12.5px; }
.btn.ghost { background:transparent; color:var(--pri); border:1.5px solid var(--pri); }
.btn.danger { background:#fbe9e7; color:var(--danger); }
.btn.danger-solid { background:var(--danger); color:#fff; }
.btn.danger-solid:hover { background:#8f2d23; color:#fff; }
.btn.acc { background:var(--acc); color:#fff; }
.btn-ic { background:none; border:1px solid var(--line); border-radius:8px; padding:5px 9px; cursor:pointer; color:var(--muted); }
table.tbl { width:100%; border-collapse:collapse; background:var(--card); }
table.tbl th, table.tbl td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; font-size:13.5px; }
table.tbl th { background:#f7f9f8; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.3px; }
table.tbl tr:hover td { background:#fafbfa; }
.tblwrap { overflow-x:auto; }
.badge { display:inline-block; background:#fff2cf; color:#8a6400; border-radius:30px; padding:3px 10px; font-size:12px; font-weight:700; }
.badge.ok { background:#ddf0e4; color:#0b5c33; }
.badge.bad { background:#f6deda; color:#932e20; }
.badge.info { background:#efe4ff; color:#6b2d9e; }
.badge.blue { background:#dbe7ff; color:#1d3d8f; }
.label { display:inline-block; padding:4px 9px; border-radius:20px; font-size:12px; font-weight:600; }
.l-day { background:#ddf0e4; color:#0b5c33; }
.l-package { background:#dbe7ff; color:#1d3d8f; }
.l-car { background:#fff2cf; color:#8a6400; }
form label { display:block; margin:12px 0 4px; font-weight:600; font-size:13.5px; }
form label small { font-weight:400; color:var(--muted); }
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input[type=file],select,textarea {
  width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:8px; font-family:inherit; font-size:14px; background:#fff;
}
input:focus,select:focus,textarea:focus { outline:2px solid rgba(14,77,58,.25); border-color:var(--pri); }
textarea { min-height: 100px; }
textarea.code { font-family: ui-monospace, monospace; font-size: 13px; }
.f2 { display:grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.f3 { display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; }
.f4 { display:grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.grid-main { display:grid; grid-template-columns: 2fr 1fr; gap:20px; align-items:start; }
@media (max-width:1100px){ .grid-main{grid-template-columns:1fr;} .f4{grid-template-columns:1fr 1fr;} }
.pane-tabs { display:flex; gap:6px; margin:14px 0; flex-wrap:wrap; }
.pane-tabs button { border:1px solid var(--line); background:#fff; border-radius:20px; padding:6px 13px; font-size:13px; cursor:pointer; font-weight:500; color:var(--muted); }
.pane-tabs button.active { background:var(--pri); color:#fff; border-color:var(--pri); }
.pane { display:none; }
.pane.active { display:block; }
.searchbox { display:flex; gap:8px; margin-bottom:14px; }
.searchbox input { max-width: 320px; }
.actions-line { display:flex; gap:8px; justify-content:flex-end; margin-bottom:12px; flex-wrap:wrap; }
.toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.pagination { display:flex; gap:4px; justify-content:center; margin-top:16px; }
.pagination a, .pagination span { padding:6px 11px; border:1px solid var(--line); border-radius:6px; background:#fff; font-size:13px; }
.pagination .cur { background:var(--pri); color:#fff; border-color:var(--pri); }
.chat-cols { display:grid; grid-template-columns: 280px 1fr; gap:16px; height: calc(100vh - 150px); }
.chat-list { overflow-y:auto; }
.chat-item { border:1px solid var(--line); background:#fff; border-radius:8px; padding:10px 12px; margin-bottom:8px; cursor:pointer; }
.chat-item.active { border-color:var(--pri); }
.chat-item small { color:var(--muted); display:block; }
.chat-thread { display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:10px; }
.chat-thread-head { padding:12px 16px; border-bottom:1px solid var(--line); }
.chat-msgs { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:8px; }
.cmsg { max-width:72%; padding:9px 13px; border-radius:12px; font-size:14px; white-space:pre-wrap; }
.cmsg.visitor { align-self:flex-start; background:#eef2f0; }
.cmsg.admin { align-self:flex-end; background:var(--pri); color:#fff; }
.cmsg small { display:block; opacity:.7; font-size:10.5px; }
.chat-reply { display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); }
.chat-reply input { flex:1; }
canvas.chart { width:100%; height:260px; }
.help { font-size: 12.5px; color: var(--muted); }
.mt-0 { margin-top:0; } .mb-0 { margin-bottom:0; }
.muted { color: var(--muted); }
.actions-inline { display:flex; gap:6px; flex-wrap:wrap; }
.right { text-align:right; }
/* Restore-from-backup cards */
.restore-log { background:#0e2a20; color:#cfe0d7; border-radius:8px; padding:12px 16px; font-family:ui-monospace,Consolas,monospace; font-size:12.5px; line-height:1.8; max-height:260px; overflow:auto; margin:0; }
.restore-log div { white-space:pre-wrap; word-break:break-word; }
@media (max-width:640px){ .restore-log { font-size:11.5px; } }

/* ============ Bookings experience (v32) ============ */
/* Toolbar + page header */
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:14px; flex-wrap:wrap; margin-bottom:6px; }
.page-head h1 { font-size:23px; margin:0 0 2px; letter-spacing:-.2px; }
.page-head .sub { color:var(--muted); font-size:13.5px; margin:0; }
.head-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Stat mini cards (status overview) */
.stats-strip { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin:18px 0 20px; }
.stat-mini { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:2px; text-decoration:none; transition:box-shadow .15s ease, border-color .15s ease; }
.stat-mini:hover { box-shadow:0 4px 14px rgba(14,46,32,.08); border-color:#cfd8d2; }
.stat-mini b { font-size:19px; line-height:1.1; }
.stat-mini span { color:var(--muted); font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.stat-mini .dot { width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.stat-mini .t-pending { color:#8a6400; }
.stat-mini .t-approved { color:#1d3d8f; }
.stat-mini .t-paid { color:#0b5c33; }
.stat-mini .t-change_request { color:#8a4b12; }
.stat-mini .t-cancelled { color:#932e20; }
.stat-mini .t-completed { color:#43536b; }

/* Filter / search card */
.filter-card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px 20px; margin-bottom:18px; }
.filter-grid { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.filter-field { display:flex; flex-direction:column; gap:5px; }
.filter-field label { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); margin:0; }
.filter-field input, .filter-field select { width:auto; min-width:170px; margin:0; }
.filter-field.q input { min-width:290px; }
.filter-actions { display:flex; gap:8px; align-items:center; margin-left:auto; padding-bottom:2px; }
.ico-btn { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer; font-size:15px; text-decoration:none; transition:all .15s ease; }
.ico-btn:hover { border-color:var(--pri); color:var(--pri); background:#f2f7f5; }
.ico-btn.small { width:30px; height:30px; font-size:13px; border-radius:8px; }
.btn.outline { background:#fff; color:var(--pri); border:1.5px solid var(--pri); }
.btn.outline:hover { background:var(--pri); color:#fff; }

/* List summary line */
.list-summary { font-size:12.5px; color:var(--muted); margin:0 0 10px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.list-summary b { color:var(--text); }

/* Table shell */
.list-card { background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:18px; }
.list-card .card-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:16px 20px 0; flex-wrap:wrap; }
.list-card .card-head h2 { margin:0; font-size:16px; }
table.tbl.tbl-new { border-radius:0; }
table.tbl.tbl-new th { background:#f2f6f4; color:#42554b; font-size:11px; letter-spacing:.6px; padding:12px 14px; white-space:nowrap; }
table.tbl.tbl-new td { padding:13px 14px; font-size:13.5px; }
table.tbl.tbl-new tbody tr { transition:background .12s ease; }
table.tbl.tbl-new tbody tr:hover td { background:#f6faf8; }
table.tbl.tbl-new td.num, table.tbl.tbl-new th.num { text-align:right; }
.tbl-foot { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 20px; border-top:1px solid var(--line); flex-wrap:wrap; }
.pagination-new { display:flex; gap:4px; flex-wrap:wrap; }
.pagination-new a, .pagination-new span { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px; padding:0 9px; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:13px; color:var(--muted); text-decoration:none; }
.pagination-new a:hover { border-color:var(--pri); color:var(--pri); }
.pagination-new .cur { background:var(--pri); border-color:var(--pri); color:#fff; font-weight:700; }
.pagination-new .dim { opacity:.45; pointer-events:none; }

/* Client cell + avatar */
.client-cell { display:flex; align-items:center; gap:11px; min-width:170px; }
.avatar { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,#0e4d3a,#1f8a4c); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; flex:0 0 36px; text-transform:uppercase; }
.avatar.alt { background:linear-gradient(135deg,#b8860b,#e0b83e); }
.client-cell .who b { font-size:13.5px; }
.client-cell .who small { display:block; color:var(--muted); font-size:12px; margin-top:1px; word-break:break-word; }
.phone-row { font-size:12.5px; color:var(--muted); white-space:nowrap; }

/* Booking ref pill + tour name */
.ref-pill { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; font-weight:700; color:#0b3f2f; background:#e8f2ee; border:1px solid #cfe3da; padding:3px 8px; border-radius:6px; white-space:nowrap; }
.tour-cell { min-width:170px; max-width:230px; }
.tour-cell .tname { font-weight:600; font-size:13px; line-height:1.35; display:block; }
.tour-cell small { color:var(--muted); font-size:11.5px; }
.money-main { font-weight:700; font-size:13.5px; white-space:nowrap; }
.money-sub { color:var(--muted); font-size:11.5px; white-space:nowrap; }

/* Status badges (replaces plain .badge for bookings) */
.sb { display:inline-flex; align-items:center; gap:6px; border-radius:30px; padding:5px 12px; font-size:11.5px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; line-height:1; }
.sb .dot { width:6px; height:6px; border-radius:50%; background:currentColor; display:inline-block; }
.sb-pending { background:#fdf3d7; color:#8a6400; }
.sb-approved { background:#e4ecfb; color:#1d3d8f; }
.sb-paid { background:#ddf0e4; color:#0b5c33; }
.sb-cancelled { background:#f6deda; color:#932e20; }
.sb-change_request { background:#fdeee0; color:#8a4b12; }
.sb-completed { background:#e5eaf0; color:#43536b; }

/* Row actions */
.row-actions { display:flex; gap:6px; align-items:center; }
.row-actions .btn { white-space:nowrap; }
.action-ic { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--muted); font-size:14px; text-decoration:none; transition:all .15s ease; }
.action-ic:hover { background:var(--pri); border-color:var(--pri); color:#fff; }

/* Empty state */
.empty-state { text-align:center; padding:44px 20px; color:var(--muted); }
.empty-state .big { font-size:34px; margin-bottom:6px; }
.empty-state p { margin:4px 0 12px; }

/* Mobile card for bookings/clients rows */
.mobcard { display:none; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px; }
.mobcard .mc-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.mobcard .mc-body { margin-top:10px; display:flex; flex-direction:column; gap:7px; }
.mc-row { display:flex; justify-content:space-between; gap:12px; font-size:13px; }
.mc-row .k { color:var(--muted); }
.mc-row .v { font-weight:600; text-align:right; word-break:break-word; }
.mc-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }

/* Booking detail cards */
.bk-header { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:6px 0 18px; }
.bk-headline { display:flex; flex-direction:column; gap:2px; }
.bk-headline h1 { margin:0; font-size:23px; letter-spacing:-.2px; }
.kv-table { width:100%; border-collapse:collapse; }
.kv-table td { padding:9px 12px; border-bottom:1px dashed var(--line); vertical-align:top; font-size:13.5px; }
.kv-table tr:last-child td { border-bottom:0; }
.kv-table td.k { width:190px; color:var(--muted); font-weight:600; font-size:12.5px; text-transform:uppercase; letter-spacing:.3px; padding-top:11px; }
.kv-table td.v { font-size:13.5px; }
.c-section { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px; margin-bottom:18px; }
.c-section h2 { display:flex; align-items:center; gap:9px; margin:0 0 14px; font-size:16px; }
.c-section h2 .h2-ic { width:28px; height:28px; border-radius:8px; background:#e8f2ee; color:var(--pri); display:inline-flex; align-items:center; justify-content:center; font-size:14px; }
.money-big { font-size:17px; font-weight:800; color:var(--text); }
.money-big .jod { font-weight:600; color:var(--muted); font-size:12.5px; margin-left:4px; }
.total-box { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:14px 16px; background:linear-gradient(135deg,#f2f7f5,#eef4f1); border:1px solid #dbe7e1; border-radius:10px; margin-top:10px; flex-wrap:wrap; }
.total-box .lbl { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); }
.req-box { border:1px solid var(--line); border-left:4px solid #c9a227; border-radius:10px; padding:14px 16px; margin-bottom:12px; background:#fff; }
.req-box.req-pending { border-left-color:#c9a227; }
.req-box.req-approved { border-left-color:#1f8a4c; }
.req-box.req-rejected { border-left-color:#b3453a; }
.req-head { display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap; }
.req-type { font-weight:700; font-size:13px; }
.req-meta { font-size:12.5px; color:var(--muted); }
.inv-box { border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:12px; background:#fff; }
.inv-top { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; }
.inv-top .no { font-weight:700; font-size:14px; }
.pay-line { margin-top:9px; padding-top:9px; border-top:1px dashed var(--line); font-size:12.5px; color:var(--muted); display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:center; }
.pay-approve { margin-top:12px; border-top:1px dashed var(--line); padding-top:12px; }

/* ============ Clients-first directory (v33) ============ */
.bk-client-card { background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:16px; }
.cl-head { display:flex; align-items:center; gap:14px; padding:16px 20px; flex-wrap:wrap; border-bottom:1px solid var(--line); background:linear-gradient(180deg,#fbfcfb,#f6f8f7); }
.cl-head .avatar { width:46px; height:46px; flex-basis:46px; font-size:18px; }
.cl-who { flex:1; min-width:220px; display:flex; flex-direction:column; gap:4px; }
/* Client name always occupies its own line with breathing room; chips sit
   AFTER the name with a clear gap so wording can never run into the name. */
.cl-name-line { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.cl-name { font-size:16.5px; font-weight:800; letter-spacing:-.2px; line-height:1.25; }
.cl-meta { color:var(--muted); font-size:12.5px; word-break:break-word; line-height:1.6; }
.cl-stats { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.cl-stat { background:#fff; border:1px solid var(--line); border-radius:10px; padding:6px 10px; font-size:11px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.3px; display:inline-flex; gap:5px; align-items:baseline; }
.cl-stat b { font-size:13.5px; color:var(--text); letter-spacing:0; }
.cl-stat b.ok-txt { color:#0b5c33; }
.cl-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.cl-bookings { padding:4px 0 6px; }
.cl-nobk { padding:14px 20px; font-size:13px; }
/* "Pending request" chip — spaced 10px from the name by .cl-name-line gap */
.chip { display:inline-flex; align-items:center; gap:6px; border-radius:30px; padding:4px 11px; font-size:11px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; line-height:1.2; }
.chip .dot { width:6px; height:6px; border-radius:50%; background:currentColor; display:inline-block; }
.chip-warn { background:#fdf3d7; color:#8a6400; }
.chip-org { background:#fdeee0; color:#8a4b12; }
table.tbl.tbl-inline { margin:6px 0 0; }
table.tbl.tbl-inline td { padding:10px 14px; }
table.tbl.tbl-inline thead th { background:#f4f8f6; }
@media (max-width:860px){
  .cl-head { flex-direction:column; align-items:flex-start; padding:14px 16px; }
  .cl-who { min-width:0; width:100%; }
  .cl-stats { width:100%; }
  .cl-actions { width:100%; }
  .cl-bookings { padding:0; }
  .bk-client-card { background:transparent; border:0; border-radius:0; }
  .bk-client-card .tblwrap { display:none; }
  .bk-client-card .cl-bookings .mobwrap { margin-top:2px; }
}
@media (max-width:1240px){ .stats-strip { grid-template-columns:repeat(3,1fr); } }
@media (max-width:860px){
  .bk-header { flex-direction:column; align-items:flex-start; }
  .filter-actions { margin-left:0; width:100%; }
  .filter-field input, .filter-field select { width:100%; min-width:0; }
  .filter-field.q input { width:100%; min-width:0; }
  .filter-grid { flex-direction:column; align-items:stretch; }
  table.tbl.tbl-new thead { display:none; }
  table.tbl.tbl-new tbody tr { display:none; }
  .list-card { background:transparent; border:0; }
  .list-card .card-head { padding:6px 2px 0; }
  .mobcard { display:block; }
  .stats-strip { grid-template-columns:repeat(2,1fr); gap:9px; margin:14px 0 16px; }
  .stat-mini { padding:10px 12px; }
}
@media (max-width:520px){ .stats-strip { grid-template-columns:repeat(2,1fr); } .page-head { flex-direction:column; align-items:flex-start; } }

/* ============ Bookings tidy / readability (v34) ============ */
/* Client head: roomier meta with real spacing between items */
.cl-meta { display:flex; gap:6px 16px; flex-wrap:wrap; color:#3f4d45; font-size:13px; line-height:1.55; }
.cl-meta .meta-i { display:inline-flex; align-items:center; gap:5px; word-break:break-word; }
/* Client stat chips: lighter, clearly non-interactive */
.cl-stat { background:#f7f9f8; border:1px solid #e2e8e4; border-radius:10px; padding:7px 12px; font-size:11px; color:#66746d; font-weight:600; text-transform:uppercase; letter-spacing:.35px; display:inline-flex; gap:6px; align-items:baseline; box-shadow:none; }
.cl-stat b { font-size:14px; color:#16231c; letter-spacing:0; }
.cl-stat b.ok-txt { color:#0b5c33; }
/* Nested bookings table: generous padding, readable type */
table.tbl.tbl-inline td { padding:13px 14px; font-size:13.5px; line-height:1.5; }
table.tbl.tbl-inline thead th { background:#f2f6f4; padding:11px 14px; }
table.tbl.tbl-inline tbody tr:nth-child(even) td { background:#fcfdfc; }
table.tbl.tbl-inline tbody tr:hover td { background:#f2f8f5; }
.date-cell { white-space:nowrap; }
.date-cell .date-sub { display:block; color:#3f4d45; font-size:12px; margin-top:3px; }
.persons-pill { display:inline-block; min-width:30px; text-align:center; background:#eef3f0; border:1px solid #dde5e0; color:#33463c; border-radius:8px; padding:2px 8px; font-weight:700; font-size:12.5px; }
/* YouTube video reviews cards (admin/video-reviews.php) */
.ytv-card { margin-bottom: 14px; }
.ytv-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ytv-thumb { position: relative; flex: 0 0 auto; width: 176px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background:#000; }
.ytv-thumb img { display: block; width: 176px; height: 99px; object-fit: cover; }
.ytv-thumb .rev-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.72); color: #fff; border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.ytv-noimg { width: 176px; height: 99px; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.ytv-title { flex: 1 1 340px; min-width: 260px; }
.ytv-title h3 { font-size: 16px; line-height: 1.35; }
.ytv-links { flex: 0 0 auto; }
.ytv-links .btn { margin-bottom: 4px; }
.ytv-card .f2 label { font-size: 12.5px; }
.badge-pending { background:#fff3cd; color:#856404; }
.badge-approved { background:#d4edda; color:#155724; }
.badge-rejected { background:#f8d7da; color:#721c24; }

/* coupon tag (tiny red chip under total) */
.coupon-tag { display:inline-block; margin-top:4px; background:#fdeeec; color:#a23c30; border:1px solid #f2d5d0; border-radius:6px; padding:1px 7px; font-size:10.5px; font-weight:700; letter-spacing:.2px; white-space:nowrap; }
/* invoice-paid mini tag under status */
.inv-paid-tag { display:inline-flex; align-items:center; gap:5px; margin-top:6px; color:#0b5c33; background:#e4f3ea; border-radius:20px; padding:3px 9px; font-size:10.5px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; }
.inv-paid-tag .dot { width:5px; height:5px; border-radius:50%; background:currentColor; }

/* ============================================================
   v83 — professional invoice document (admin panel)
   The document itself is styled by the shared inline sheet
   (includes/invoice_ui.php → invoice_css()) so the admin copy,
   the client copy and the PDF always look identical. These are
   only the admin-surface tweaks.
   ============================================================ */
.card .pinv-wrap { max-width: 900px; margin: 0 auto; }
.card .pinv-sheet { box-shadow: none; }
.inv-box .inv-actions .btn.small { padding: 6px 12px; font-size: 12.5px; }
@media print {
  .aside, .side, .topbar, .admin-nav, .flash, .no-print { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
}
/* booking-view detail: client identity + contacts */
.who-flex { display:flex; gap:15px; align-items:flex-start; flex-wrap:wrap; margin-bottom:14px; }
.avatar.big { width:54px; height:54px; flex-basis:54px; font-size:21px; }
.who-main { flex:1; min-width:220px; display:flex; flex-direction:column; gap:5px; }
.who-name { font-size:18px; font-weight:800; letter-spacing:-.2px; line-height:1.2; }
.who-contact { display:flex; gap:6px 18px; flex-wrap:wrap; color:#3f4d45; font-size:13.5px; }
.who-contact span { display:inline-flex; align-items:center; gap:6px; word-break:break-word; }
.money-big { font-size:18px; font-weight:800; color:var(--text); display:flex; flex-direction:column; align-items:flex-end; gap:3px; }
.money-big .currency { font-size:20px; }
.money-big .jod { font-weight:600; color:#4d5b54; font-size:12.5px; margin-left:0; }
/* kv-table readability */
.kv-table td { padding:11px 12px; font-size:14px; line-height:1.6; }
.kv-table td.k { width:200px; color:#33463c; font-size:12px; padding-top:13px; }
.kv-table td.v small { font-size:12px; }
.kv-table td { border-bottom:1px solid #edf1ee; }
/* payment summary grid (booking-view) */
.pay-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-top:4px; }
.pay-cell { background:#f8faf9; border:1px solid #e4e9e6; border-radius:12px; padding:13px 15px; display:flex; flex-direction:column; gap:3px; }
.pay-k { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.45px; color:#66746d; }
.pay-v { font-size:19px; font-weight:800; color:var(--text); }
.pay-v.ok { color:#0b5c33; }
.pay-v.dsc { color:#b3453a; font-size:14px; line-height:1.3; }
.pay-note { font-size:12px; color:#3f4d45; }
.coupon-cell { border-color:#f0d5d0; background:#fdf7f6; }
.upg-note { margin-top:13px; padding:11px 15px; background:#fdeee0; border:1px solid #f0d5b8; border-radius:10px; font-size:13px; line-height:1.5; }
/* stronger sub-header contrast */
.page-head .sub { color:#3f4d45; font-size:13.5px; }
/* money row: a touch of air between USD and JOD lines */
.money-sub { line-height:1.5; margin-top:1px; }

/* ============ Admin shell responsive (v35) ============ */
/* On very small screens the fixed 230px sidebar leaves only ~160px for the
   main content, which breaks the admin tables/cards. Convert the sidebar to
   a static top bar so the content gets the full width. Shared layout fix:
   only activates below 640px and only affects this admin shell. */
@media (max-width:640px){
  body { display:block; }
  .aside { position:static; width:auto; min-height:0; padding:8px 12px; }
  .aside .brand { padding:2px 4px 8px; }
  .aside nav { display:flex; flex-wrap:wrap; gap:2px; padding-bottom:4px; }
  .aside nav a { padding:7px 10px; font-size:13px; border-left:0; border-radius:8px; }
  .aside nav a.active { border-left:0; }
  .aside-foot { padding:6px 4px 2px; flex-direction:row; flex-wrap:wrap; gap:12px; }
  .main { margin-left:0; padding:18px 14px; }
  /* client mobile cards get breathing room */
  .mobcard { padding:14px; }
  .mc-row { gap:8px; }
  .mc-row .v { max-width:70%; }
  .filter-card { padding:14px; }
  .list-card .card-head { padding:4px 2px 0; }
  .page-head .sub { line-height:1.5; }
  /* contact icons align with their text baseline */
  .contact-cell .meta-i { align-items:center; }
}
@media (max-width:860px){
  .who-flex { flex-direction:column; }
  .money-big { align-items:flex-start; flex-direction:row; gap:8px; align-items:baseline; }
  .cl-meta { width:100%; }
}

/* ============ Clients table (v35) ============ */
/* Main content is now a tidy clients table — one row per client.
   Existing .tbl-new shell + .mobcard responsive collapse are reused. */
/* Fit the clients table inside its container with a proportional fixed
   layout; percentages below are tuned so the Actions column always keeps
   enough room for its stacked buttons at every desktop width. */
table.tbl.tbl-clients { width:100%; table-layout:fixed; }
table.tbl.tbl-clients th, table.tbl.tbl-clients td { overflow-wrap:break-word; }
table.tbl.tbl-clients th:first-child { width:22%; }
table.tbl.tbl-clients th:nth-child(2){ width:12%; }
table.tbl.tbl-clients th:nth-child(3){ width:18%; }
table.tbl.tbl-clients th:nth-child(4){ width:13%; }
table.tbl.tbl-clients th:nth-child(5){ width:12%; }
table.tbl.tbl-clients th:nth-child(6){ width:10%; }
table.tbl.tbl-clients th:nth-child(7){ width:13%; }
/* Actions column: stacked buttons, auto-width so the pill always wraps its
   text; centered in the cell, never clipped */
table.tbl.tbl-clients th:last-child, table.tbl.tbl-clients td:last-child { white-space:normal; }
table.tbl.tbl-clients td:last-child .row-actions { flex-direction:column; align-items:center; gap:5px; }
table.tbl.tbl-clients td:last-child .btn { width:auto; min-width:96px; justify-content:center; padding:5px 12px; font-size:11.5px; white-space:nowrap; box-sizing:border-box; text-align:center; }
@media (max-width:1100px){
  table.tbl.tbl-clients td:last-child .btn { min-width:82px; padding:4px 7px; font-size:11px; }
}
@media (max-width:1000px){
  table.tbl.tbl-clients td:last-child .btn { min-width:74px; padding:4px 6px; font-size:10.5px; }
  table.tbl.tbl-clients td { padding:11px 10px; }
}
@media (max-width:920px){
  table.tbl.tbl-clients td:last-child .btn { min-width:68px; padding:3px 5px; font-size:10px; }
  table.tbl.tbl-clients th:last-child, table.tbl.tbl-clients td:last-child { white-space:normal; }
}
/* ===== base cell styling for the clients table (kept tidy) ===== */
table.tbl.tbl-clients th, table.tbl.tbl-clients td { vertical-align:middle; }
table.tbl.tbl-clients td { padding:14px; }
table.tbl.tbl-clients tbody tr:nth-child(even) td { background:#fcfdfc; }
table.tbl.tbl-clients tbody tr:hover td { background:#f2f8f5; }
/* name chip space is guaranteed by .cl-name-line gap: 10px */
.cl-cell-min { min-width:150px; }
.cl-cell-min .who small.cl-mail { margin-top:2px; }
/* contact cell: phone / country stacked, never crammed */
.contact-cell { display:flex; flex-direction:column; gap:3px; font-size:13px; color:#3f4d45; line-height:1.5; }
.contact-cell .meta-i { display:inline-flex; align-items:center; gap:6px; word-break:break-word; }
/* bookings cell: count link + newest ref pills */
.bk-cell { display:flex; flex-direction:column; gap:7px; }
.bk-count { font-weight:800; font-size:13.5px; color:var(--pri); text-decoration:none; }
.bk-count:hover { text-decoration:underline; }
.bk-pills { display:flex; gap:4px; flex-wrap:wrap; align-items:center; }
.bk-pill-mini { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:10.5px; font-weight:700; color:#0b3f2f; background:#edf4f0; border:1px solid #d5e5dd; border-radius:6px; padding:2px 7px; white-space:nowrap; text-decoration:none; transition:background .12s ease, border-color .12s ease; }
.bk-pill-mini:hover { background:#0e4d3a; border-color:#0e4d3a; color:#fff; }
.more-dim { font-size:11.5px; font-weight:600; color:#66746d; text-decoration:none; }
.more-dim:hover { color:var(--pri); text-decoration:underline; }
.money-main.ok-txt { color:#0b5c33; }
/* drill-down card (bookings table of the single selected client) */
.drill-card { margin-top:2px; }
table.tbl.tbl-drill td { padding:13px 14px; }
@media (max-width:860px){
  table.tbl.tbl-clients td:last-child .row-actions { flex-direction:row; align-items:center; justify-content:flex-start; }
}
/* Contact icons sit level with their text */
.contact-cell { justify-content:center; }
.contact-cell .meta-i { display:inline-flex; align-items:center; gap:6px; line-height:1; }
@media (max-width:640px){
  .contact-cell { justify-content:flex-start; }
}

/* ============ Simplified clients table (v36) ============ */
/* Main content: one row per client with ONLY client name (+avatar),
   bookings count and an Open action. Wide Client column, centered
   Bookings count, roomy Actions column. */
table.tbl.tbl-simple { width:100%; table-layout:fixed; }
table.tbl.tbl-simple th:first-child { width:54%; }
table.tbl.tbl-simple th:nth-child(2) { width:16%; }
table.tbl.tbl-simple th:last-child  { width:30%; }
table.tbl.tbl-simple th, table.tbl.tbl-simple td { overflow-wrap:break-word; vertical-align:middle; }
table.tbl.tbl-simple td.num, table.tbl.tbl-simple th.num { text-align:center; }
table.tbl.tbl-simple td.act .row-actions { flex-direction:row; }
table.tbl.tbl-simple .client-cell .who b { line-height:1.3; }
/* count pill: clickable, links to the client's private table */
.bk-num-pill { display:inline-flex; align-items:center; justify-content:center; min-width:46px; background:#eef3f0; border:1px solid #dde5e0; color:#16231c; border-radius:30px; padding:5px 14px; font-weight:800; font-size:14px; text-decoration:none; transition:border-color .15s ease, background .15s ease, color .15s ease; }
a.bk-num-pill:hover { border-color:var(--pri); background:#e3efe9; color:#0b3f2f; }
/* Open icon-button in the Actions column */
table.tbl.tbl-simple td.act .open-client { white-space:nowrap; }
table.tbl.tbl-simple tbody tr:nth-child(even) td { background:#fcfdfc; }
table.tbl.tbl-simple tbody tr:hover td { background:#f2f8f5; }
/* small screens: keep the two numeric columns from squashing the name */
@media (max-width:1100px){
  table.tbl.tbl-simple th:first-child { width:58%; }
  table.tbl.tbl-simple th:nth-child(2) { width:42%; }
  table.tbl.tbl-simple th:last-child { width:auto; }
}
/* Mobile: the generic tbl-new collapse (max-width:860px) hides the table;
   the .mobwrap cards below take over with the same three fields. */

/* ============ Live Chat console v43 (professional layout) ============ */
/* Larger 3-pane workspace: conversations | thread | info/agents. Height uses
   calc so the console fills the viewport under the toolbar and scrolls
   internally on each pane (the page itself never scrolls while chatting). */
.chat-workspace { display:grid; grid-template-columns: 300px minmax(0,1fr) 280px; gap:16px; height: calc(100vh - 150px); min-height:480px; }
.cw-list { background:var(--card); border:1px solid var(--line); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; }
.cw-list-head { padding:12px 12px 8px; border-bottom:1px solid var(--line); }
.cw-search input { width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:20px; font-size:13px; background:#f6f8f7; }
.cw-search input:focus { background:#fff; }
.cw-list-meta { font-size:11.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.4px; margin:8px 4px 0; }
.cw-list-body { flex:1; overflow-y:auto; padding:8px; }
.cw-item { display:flex; gap:10px; padding:10px; border-radius:12px; cursor:pointer; align-items:flex-start; transition:background .12s ease; border:1px solid transparent; }
.cw-item:hover { background:#f4f7f5; }
.cw-item.active { background:#eaf3ef; border-color:#cfe3da; }
.cw-ava { flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,#0e4d3a,#1f8a4c); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; }
.cw-it-main { min-width:0; flex:1; }
.cw-it-top { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.cw-it-top b { font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cw-it-top .badge { flex:0 0 auto; }
.cw-it-sub { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.cw-it-foot { display:flex; gap:6px; font-size:11px; color:var(--muted); margin-top:3px; }
.cw-empty { text-align:center; color:var(--muted); padding:34px 18px; font-size:13px; line-height:1.6; }

/* thread */
.cw-thread { background:var(--card); border:1px solid var(--line); border-radius:14px; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.cw-thread-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:13px 18px; border-bottom:1px solid var(--line); background:#fbfcfb; }
.cw-thread-head b { font-size:15px; }
.cw-thread-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.cw-thread-actions .btn-ic { border-radius:50%; }
.cw-msgs { flex:1; overflow-y:auto; padding:20px 22px; display:flex; flex-direction:column; gap:12px; background:#f7f9f8; }
.cw-msgs .cmsg { max-width:76%; padding:11px 15px; border-radius:16px; font-size:14px; line-height:1.5; white-space:pre-wrap; word-break:break-word; box-shadow:0 1px 2px rgba(16,42,32,.06); position:relative; }
.cw-msgs .cmsg small { display:block; opacity:.75; font-size:10.5px; margin-bottom:4px; font-weight:600; }
.cw-msgs .cmsg.visitor { align-self:flex-start; background:#fff; border:1px solid var(--line); border-top-left-radius:4px; }
.cw-msgs .cmsg.admin { align-self:flex-end; background:linear-gradient(135deg,#0e4d3a,#146b4e); color:#fff; border-top-right-radius:4px; }
.cw-msgs .cmsg.admin small { color:#d8efe4; }

/* compose */
.cw-compose { border-top:1px solid var(--line); padding:12px 16px 14px; background:#fff; }
.cw-quick { display:flex; gap:6px; overflow-x:auto; padding-bottom:10px; margin-bottom:10px; border-bottom:1px dashed var(--line); }
.cw-chip { flex:0 0 auto; border:1px solid #d9e4de; background:#f3f8f5; color:#0b3f2f; border-radius:30px; padding:5px 12px; font-size:12px; cursor:pointer; font-weight:500; white-space:nowrap; transition:background .12s ease, border-color .12s ease; }
.cw-chip:hover { background:#e4efe9; border-color:#bcd6c8; }
.cw-input-row { display:flex; gap:10px; }
.cw-input-row input { flex:1; padding:12px 16px; border:1px solid var(--line); border-radius:24px; font-size:14px; }
.cw-input-row .btn { border-radius:24px; padding:10px 22px; }

/* side panel */
.cw-side { display:flex; flex-direction:column; gap:16px; overflow-y:auto; }
.cw-side-card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 16px 14px; }
.cw-side-card h3 { margin:0 0 6px; font-size:14px; display:flex; align-items:center; gap:7px; }
.cw-side-card .help { margin-top:0; }
.cc-dl { margin:4px 0 0; display:grid; grid-template-columns: 86px 1fr; gap:6px 8px; font-size:12.5px; }
.cc-dl dt { color:var(--muted); font-weight:600; text-transform:uppercase; font-size:10.5px; letter-spacing:.3px; padding-top:1px; }
.cc-dl dd { margin:0; word-break:break-word; }
.cc-dl .mono { font-family:ui-monospace,Consolas,monospace; font-size:11.5px; }
.cc-status { display:inline-flex; align-items:center; gap:5px; color:#0b5c33; background:#ddf0e4; border-radius:20px; padding:2px 9px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.cc-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.cc-dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.cc-dot.cc-live { background:#1f8a4c; box-shadow:0 0 0 3px rgba(31,138,76,.18); }
.cc-open { color:#8a6400; }
.cc-badge { display:inline-flex; align-items:center; gap:4px; background:var(--card); border:1px solid var(--line); border-radius:30px; padding:6px 14px; font-size:12.5px; font-weight:600; }
.cc-badge-me i { font-style:normal; color:var(--muted); font-weight:500; }
.cw-qlist { display:flex; flex-direction:column; gap:6px; }
.cw-qbtn { text-align:left; border:1px solid var(--line); background:#fbfcfb; border-radius:10px; padding:8px 11px; font-size:12.5px; cursor:pointer; color:var(--text); line-height:1.45; transition:border-color .12s ease, background .12s ease; }
.cw-qbtn:hover { border-color:var(--pri); background:#f0f6f3; }
.cw-agents { border-color:#d8e2dc; }
.cw-agent { border:1px solid var(--line); border-radius:10px; padding:9px 11px; margin-bottom:8px; display:flex; justify-content:space-between; align-items:center; gap:8px; background:#fff; }
.cw-agent-who { min-width:0; display:flex; flex-direction:column; gap:2px; }
.cw-agent-who b { font-size:13px; }
.cw-agent-who small { color:var(--muted); font-size:11.5px; word-break:break-word; }
.cw-agent-who .cc-astate { font-size:11px; font-weight:700; }
.cw-agent-acts { display:flex; flex-direction:column; gap:5px; flex:0 0 auto; }
.cw-agent-acts .btn { justify-content:center; min-width:76px; }

/* responsive: collapse to 2 panes then 1 pane */
@media (max-width:1180px){
  .chat-workspace { grid-template-columns: 270px minmax(0,1fr); height:auto; }
  .cw-side { order:3; grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; }
  .cw-side-card { flex:1 1 280px; }
}
@media (max-width:760px){
  .chat-workspace { grid-template-columns: 1fr; }
  .cw-list { max-height:240px; }
  .cw-thread { height:62vh; }
  .cw-side-card { flex:1 1 100%; }
}
/* Wikipedia admin manager */
.wiki-lang-block { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; background: #fbfbf9; }
.wiki-lang-block h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.wiki-lang-block .f2 { gap: 0 18px; }
.wiki-lang-block label { display: block; font-size: 12px; font-weight: 600; margin: 8px 0 4px; color: var(--muted); }
.wiki-lang-block input, .wiki-lang-block select, .wiki-lang-block textarea { width: 100%; }
.wiki-lang-block[dir="rtl"] { text-align: right; }
.inline { display: inline-flex; margin: 0; }
.check-line { display: flex; align-items: center; min-height: 40px; }
.check-line label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }

/* Reviews manager (admin) */
.rev-table { width: 100%; border-collapse: collapse; }
.rev-table th, .rev-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rev-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.rev-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.rev-badge.pending { background: #fff3cd; color: #856404; }
.rev-badge.approved { background: #d4edda; color: #155724; }
.rev-badge.rejected { background: #f8d7da; color: #721c24; }
.rev-stars-mini { color: #c9a227; letter-spacing: 1px; font-size: 13px; }
.rev-question-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.rev-qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rev-lang-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.rev-lang-labels label { font-size: 12.5px; }
.rev-lang-labels input { width: 100%; margin-top: 3px; }

/* ============================================================
   Reviews manager v54 — premium visuals
   ============================================================ */
.rva-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 12px; margin: 0 0 16px; }
.rva-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: center; }
.rva-stat b { display: block; font-size: 26px; line-height: 1.1; color: var(--ink, #17222b); }
.rva-stat span { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.rva-stat.ok b { color: #1a7f4a; }
.rva-stat.warn b { color: #a06a00; }
.rva-stat.bad b { color: #b02a2a; }
.rva-stat.priv b { color: #7a5aa8; }
.rva-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.rva-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 20px; padding: 5px 13px; font-size: 13px; font-weight: 600; text-decoration: none; transition: all .15s ease; }
.rva-chip:hover { border-color: #9db8a9; color: var(--ink, #17222b); }
.rva-chip.active { background: #14532d; border-color: #14532d; color: #fff; }
.rva-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rva-table { margin-top: 4px; }
.rva-table tr.is-private td { background: rgba(122,90,168,.05); }
.rva-who { display: flex; align-items: center; gap: 10px; }
.rva-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#14532d,#1a7f4a); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.rva-mail { font-size: 12px; }
.rva-stars { color: #c9a227; letter-spacing: 1px; font-size: 13.5px; white-space: nowrap; }
.rva-stars.is-empty { color: #ccd3d9; }
.rva-priv-pill { display: inline-block; background: #ece4f7; color: #6b4f9e; border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.rva-pkg-pill { display: inline-block; background: #e3ecf7; color: #29527e; border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.rva-edit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rva-edit .f2 label { display: block; }
.rva-edit input[disabled] { opacity: .7; }
@media (max-width: 720px) {
  .rva-table thead { display: none; }
  .rva-table, .rva-table tbody, .rva-table tr, .rva-table td { display: block; width: 100%; }
  .rva-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 12px; background: var(--card); }
  .rva-table td { border: 0; padding: 5px 6px; }
  .rva-table td:first-child { border-top: 0; }
}

/* Tour editor: review-question picker */
.rv-q-picker { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcfa; max-height: 260px; overflow-y: auto; }
.rv-q-picker .check-line { font-size: 13px; }
.rv-q-picker .check-line input { width: auto; }

/* Collapsible nav groups: Reviews + Wikipedia parents with submenus (v56/v57) */
.aside nav .nav-group { position: relative; }
.aside nav .nav-parent { display:flex; align-items:center; gap:10px; padding:9px 16px; color:#cfe0d7; font-weight:500; font-size:13.5px; border-left:3px solid transparent; cursor:pointer; }
.aside nav .nav-parent:hover { background:#12392b; color:#fff; }
.aside nav .nav-parent.active { background:#12392b; border-left-color:var(--acc); color:#fff; }
.aside nav .nav-group.active .nav-parent { background:#12392b; border-left-color:var(--acc); color:#fff; }
.nav-caret { margin-left:auto; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:20px; height:20px; border-radius:50%; background:rgba(255,255,255,.16); color:#eaf6ef; font-size:10px; line-height:1; opacity:1; transition:transform .18s ease, background .18s ease; }
.nav-group .nav-parent:hover .nav-caret { background:rgba(255,255,255,.3); }
.nav-group.open .nav-caret { transform:rotate(180deg); background:var(--acc); color:#06231a; }
.nav-sub { display:none; padding:2px 0 8px; background:#0c241b; border-bottom:1px solid #17402e; }
.nav-group.open .nav-sub { display:block; }
.aside nav .nav-sub a { padding:7px 16px 7px 44px; font-size:13px; border-left:3px solid transparent; }
.aside nav .nav-sub a:hover { background:#12392b; color:#fff; }
.aside nav .nav-sub a.active { background:#12392b; border-left-color:var(--acc); color:#fff; }
@media (max-width:640px){
  .aside nav .nav-group { display:contents; }
  .aside nav .nav-sub { padding:0 4px 4px; }
  .aside nav .nav-group.open .nav-sub { display:flex; flex-wrap:wrap; gap:2px; }
  .aside nav .nav-sub a { padding:7px 10px; font-size:13px; border-left:0; border-radius:8px; }
}

/* Video Reviews bulk actions (v63) */
.ytv-bulkbar { padding: 14px 18px; margin-bottom: 16px; border-left: 4px solid var(--acc, #c9a227); }
.ytv-bulkbar form { margin: 0; }
.ytv-bulkbar .btn { background: var(--pri); }
.ytv-selall { font-size: 13.5px; }
.ytv-rowcheck { padding: 0; margin: 0 2px 0 0; }
.ytv-rowcheck input, .ytv-selall input { accent-color: var(--pri, #0e4d3a); cursor: pointer; }
.ytv-rowcheck input { margin: 0; }
@media (max-width: 640px){
  .ytv-bulkbar .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Bookings operations console (v85) — KPI filters, sticky toolbar, chip row,
   view switch, bulk action bar, payment state pills, breadcrumbs, a11y.
   ========================================================================== */

/* ---------- Accessibility primitives ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 4000;
  background: var(--pri); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px;
  font-weight: 700; font-size: 13.5px; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.main a:focus-visible,
.main button:focus-visible,
.main input:focus-visible,
.main select:focus-visible,
.main textarea:focus-visible,
.main [tabindex]:focus-visible,
.aside a:focus-visible {
  outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 6px;
}
#main-content:focus { outline: none; }

/* ---------- Breadcrumbs ---------- */
.crumbs { margin: 0 0 10px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "\203A"; color: #9fb0c4; }
.crumbs a { color: var(--pri); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 700; }

/* ---------- KPI cards (double as filters) ---------- */
.kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px; margin: 14px 0 18px;
}
.kpi {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.kpi:hover { border-color: var(--pri); box-shadow: 0 6px 18px rgba(14,77,58,.10); transform: translateY(-1px); }
.kpi.active { border-color: var(--pri); box-shadow: inset 0 0 0 1px var(--pri); background: #f3f8f6; }
.kpi b { font-size: 20px; line-height: 1.15; letter-spacing: -.3px; display: inline-flex; align-items: center; gap: 6px; }
.kpi span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .45px; color: var(--muted); }
.kpi.ok b { color: #0b5c33; }
.kpi.warn { border-color: #f0d6ac; background: #fffaf0; }
.kpi.warn b { color: #8a4b12; }
.kpi .t-pending { color: #8a6400; }
.kpi .t-approved { color: #1d3d8f; }
.kpi .t-paid { color: #0b5c33; }
.kpi .t-change_request { color: #8a4b12; }
.kpi .t-cancelled { color: #932e20; }
.kpi .t-completed { color: #43536b; }

/* ---------- Sticky filter toolbar ---------- */
.filter-card.toolbar { position: sticky; top: 0; z-index: 900; padding: 16px 20px 14px; box-shadow: 0 6px 16px rgba(15,32,55,.05); }
.filter-card.toolbar:focus-within { box-shadow: 0 8px 22px rgba(15,32,55,.10); }

/* ---------- Active filter chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.chip-row-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef5f2; border: 1px solid #cfe3da; color: #0b3f2f;
  border-radius: 30px; padding: 5px 11px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: all .15s ease;
}
.fchip:hover { background: var(--pri); border-color: var(--pri); color: #fff; }
.fchip.clear { background: transparent; border-style: dashed; color: var(--muted); }
.fchip.clear:hover { background: #fbe9e7; border-color: #e0b4ac; color: #932e20; }

/* ---------- View switch + result line ---------- */
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.seg { display: inline-flex; background: #eef2f6; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg a { padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--pri); }
.seg a.on { background: #fff; color: var(--pri); box-shadow: 0 1px 4px rgba(15,32,55,.10); }
.resultline { margin: 0; font-size: 12.5px; color: var(--muted); }
.resultline b { color: var(--text); }

/* ---------- Bulk action bar ---------- */
.bulkbar {
  position: sticky; top: 0; z-index: 950;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #f6faf8; border: 1px solid var(--line); border-left: 4px solid var(--acc, #c9a227);
  border-radius: 14px; padding: 12px 18px; margin-bottom: 14px;
  transition: background .18s ease, box-shadow .18s ease;
}
.bulkbar.on { background: #eef7f2; border-color: #cfe3da; box-shadow: 0 6px 18px rgba(14,77,58,.10); }
.bulk-count { font-size: 13px; font-weight: 800; color: var(--pri); min-width: 96px; }
.bulk-hint { font-size: 12px; color: var(--muted); }
.bulkbar select { margin: 0; min-width: 210px; }

/* ---------- Table refinements ---------- */
.tbl-new th.pick, .tbl-new td.pick { width: 42px; text-align: center; padding-left: 12px; padding-right: 4px; }
.tbl-new input[type=checkbox].bk-check { width: 17px; height: 17px; accent-color: var(--pri); cursor: pointer; margin: 0; }
.sortlink { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sortlink:hover { color: var(--pri); text-decoration: underline; }
th[aria-sort="ascending"] .sortlink::after { content: "\25B2"; font-size: 9px; color: var(--pri); }
th[aria-sort="descending"] .sortlink::after { content: "\25BC"; font-size: 9px; color: var(--pri); }

.client-cell { display: flex; align-items: flex-start; gap: 10px; }
.cl-name { display: block; font-size: 14px; line-height: 1.3; }
.cl-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cl-sub a { color: inherit; text-decoration: none; }
.cl-sub a:hover { color: var(--pri); text-decoration: underline; }
.tag-up { background: #e4ecfb; color: #1d3d8f; border-radius: 30px; padding: 1px 8px; font-weight: 700; font-size: 11px; white-space: nowrap; }

.money-main { font-weight: 800; font-size: 14.5px; color: var(--text); }
.money-sub { font-size: 12px; color: var(--muted); }
.money-due { font-size: 12px; font-weight: 800; color: #8a4b12; }

/* Payment state pill — text + tone, never colour alone */
.pay-state {
  display: inline-block; margin-top: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 30px; background: #eef2f6; color: #43536b; white-space: nowrap;
}
.pay-state.paid { background: #ddf0e4; color: #0b5c33; }
.pay-state.partial { background: #fdf3d7; color: #8a6400; }
.pay-state.unpaid { background: #f6deda; color: #932e20; }
.pay-state.refunded { background: #efe4ff; color: #6b2d9e; }
.coupon-tag.warn { background: #fdf3d7; color: #8a6400; border-color: #f0d6ac; }
.noinv { font-size: 12px; font-style: italic; }

/* ---------- Card foot + mobile tweaks ---------- */
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 18px; border-top: 1px dashed var(--line); }
.card-foot-note { font-size: 12px; color: var(--muted); }
.mobcard .mc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mobcard .mc-top .mc-pick { display: flex; align-items: center; margin-right: 2px; }
.mobcard .mc-top { flex-wrap: wrap; }
.mobcard .mc-pick input { width: 18px; height: 18px; accent-color: var(--pri); cursor: pointer; }
.mobcard .mc-row .v .pay-state { margin-top: 0; }

@media (max-width: 1240px){ .kpi-strip { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
@media (max-width: 900px){
  .filter-card.toolbar { position: static; }
  .bulkbar { position: static; }
  .bulkbar select, .bulkbar .btn { width: 100%; }
  .bulk-hint { display: none; }
}
@media (max-width: 768px){
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi b { font-size: 18px; }
  .viewbar { flex-direction: column; align-items: stretch; }
  .seg { justify-content: center; }
  .seg a { flex: 1; text-align: center; }
}

/* ---------- Print: the list, and nothing but the list ---------- */
@media print {
  .aside, .skip-link, .crumbs, .bulkbar, .filter-card.toolbar, .mobwrap,
  .head-actions, .seg, .chip-row, .row-actions, .pagination-new, .card-foot,
  .aside-foot, .mc-actions { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  body { background: #fff; }
  .list-card, .kpi-strip { break-inside: avoid; }
  .kpi { break-inside: avoid; box-shadow: none; }
  .tblwrap { overflow: visible !important; }
  table.tbl-new { font-size: 10.5px; }
  table.tbl-new thead th { background: #f2f2f2 !important; color: #000 !important; }
  .search-box, .filter-card { display: none !important; }
}

/* ============================================================
   Nav Manager (v86) — admin/directory.php
   ============================================================ */
.nm-crumbs { font-size:13px; color:var(--muted); margin:0 0 14px; display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.nm-crumbs a { color:var(--muted); }
.nm-crumbs a:hover { color:var(--pri); }
.nm-crumbs [aria-current] { color:var(--pri); font-weight:600; }

.nm-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:10px; margin-bottom:16px; }
.nm-stat { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.nm-stat b { display:block; font-size:21px; line-height:1.15; color:var(--pri); }
.nm-stat span { font-size:12px; color:var(--muted); }

.nm-help { border-left:4px solid var(--acc); }
.nm-help summary { cursor:pointer; font-size:15px; }
.nm-help-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px 28px; margin-top:12px; }
.nm-help-grid h3 { font-size:13.5px; margin:10px 0 3px; color:var(--pri); }
.nm-help-grid p { margin:0 0 4px; font-size:13px; line-height:1.55; }
.nm-note { background:#fff8e6; border:1px solid #f0dfae; border-radius:9px; padding:11px 13px; font-size:13px; line-height:1.6; margin:12px 0 0; }

.nm-h2 { margin:22px 0 4px; }
.nm-lead { font-size:13.5px; margin:0 0 14px; }

.nm-card { background:var(--card); border:1px solid var(--line); border-radius:11px; margin-bottom:14px; overflow:hidden; }
.nm-card.nm-is-locked { border-left:4px solid var(--acc); }
.nm-card-head { display:flex; align-items:center; gap:10px; padding:11px 14px; background:#f7f9f8; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.nm-card-head h3 { margin:0; font-size:15px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.nm-drag { color:#b9c6c0; font-size:14px; }
.nm-card-btns { margin-left:auto; display:flex; align-items:center; gap:5px; }
.nm-inline { display:inline; }
.nm-nodrop { font-size:14px; opacity:.65; padding:5px 9px; }

.nm-lock { font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; font-weight:700; background:#fdf3d8; color:#8a6d16; border:1px solid #f0dfae; border-radius:20px; padding:2px 8px; }
.nm-count { font-size:11.5px; font-weight:600; background:#e8f1ec; color:var(--pri); border-radius:20px; padding:2px 8px; }
.nm-pill { font-size:11px; font-weight:600; background:#eef1f0; color:var(--muted); border-radius:20px; padding:2px 9px; }
.btn-ic-danger { color:var(--danger); border-color:#f0cdc8; }
.btn-ic-danger:hover { background:#fbe9e7; }
.btn-ic:disabled { opacity:.32; cursor:not-allowed; }
.btn-ic { min-width:34px; min-height:34px; font-size:13.5px; }
.btn-ghost { background:transparent; color:var(--pri); border:1.5px solid var(--line); }

.nm-card-body { padding:14px; margin:0; }
.nm-row { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.nm-f { display:flex; flex-direction:column; gap:4px; flex:1 1 200px; min-width:0; }
.nm-f-wide { flex:2 1 320px; }
.nm-f > span { font-size:12px; font-weight:600; color:var(--muted); }
.nm-f input { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:13.5px; background:#fff; color:var(--text); min-height:40px; }
.nm-f input:focus-visible { outline:2px solid var(--pri); outline-offset:1px; border-color:var(--pri); }
.nm-hint { font-size:12px; color:var(--muted); margin:7px 0 0; line-height:1.55; }
/* v150 — the icon / tooltip / second-line editor row in the Nav Manager. */
.nm-f textarea { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:12.5px; line-height:1.5; background:#fff; color:var(--text); resize:vertical; min-height:52px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.nm-f textarea:focus-visible { outline:2px solid var(--pri); outline-offset:1px; border-color:var(--pri); }
.nm-row-extra { margin-top:10px; }
.nm-row-extra .nm-f { flex:1 1 220px; }
.nm-row-flags { margin-top:8px; }
.nm-check { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:var(--muted); line-height:1.5; cursor:pointer; }
.nm-check input { margin:2px 0 0; width:auto; min-height:0; flex:0 0 auto; accent-color:var(--pri); }
.nm-check strong { color:var(--text); }
.nm-hint code { background:#f2f5f3; border-radius:4px; padding:1px 5px; font-size:11.5px; }
.nm-indent { margin-left:22px; }

.nm-subs { border:1px solid var(--line); border-radius:9px; padding:11px 13px 6px; margin:14px 0 0; }
.nm-subs > legend { font-size:12.5px; font-weight:700; color:var(--pri); padding:0 6px; }
.nm-sub { border-top:1px dashed var(--line); padding:11px 0 3px; }
.nm-sub:first-of-type { border-top:0; }
.nm-sub.nm-is-locked { border-left:3px solid var(--acc); padding-left:10px; margin-left:-3px; }
.nm-sub-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13.5px; }
.nm-sub-btns { margin-left:auto; display:flex; gap:5px; }
.nm-del { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; color:var(--danger); margin:7px 0 0; cursor:pointer; }
.nm-del input { min-width:17px; min-height:17px; }

.nm-card-foot { display:flex; align-items:center; gap:12px; margin-top:14px; flex-wrap:wrap; }
.nm-foot-note { font-size:12.5px; }
.nm-adder { padding:0 14px 14px; margin:0; }
.nm-adder fieldset { border:1px dashed #cfd9d4; border-radius:9px; padding:12px 13px 4px; }
.nm-adder legend { font-size:12.5px; font-weight:700; color:var(--pri); padding:0 6px; }
.nm-card-new { border-left:4px solid var(--pri); }

.nm-ref summary { cursor:pointer; font-size:14px; }
.nm-ref-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 26px; margin-top:12px; }
.nm-ref-grid h4 { margin:0 0 6px; font-size:12.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.nm-ref-list { list-style:none; margin:0; padding:0; max-height:290px; overflow:auto; }
.nm-ref-list li { font-size:12.5px; padding:3px 0; border-bottom:1px solid #f1f4f2; }
.nm-ref-list code { font-size:11.5px; background:#f2f5f3; border-radius:4px; padding:1px 5px; }
.nm-foot { font-size:12.5px; margin-top:14px; }

@media (max-width:820px) {
  .nm-help-grid, .nm-ref-grid { grid-template-columns:1fr; }
  .nm-f, .nm-f-wide { flex:1 1 100%; }
  .nm-indent { margin-left:0; }
  .nm-card-btns { margin-left:0; width:100%; }
}

/* ============================================================
   v87 — Nav Manager: unlimited-depth node tree
   Level 1 cards contain their level 2 children, which contain level 3+, so the
   whole bar reads as one indented outline. Every level uses the same card.
   ============================================================ */
#nmTree { display: block; }
.nm-node { background: var(--card); border: 1px solid var(--line); border-radius: 11px; margin: 0 0 12px; }
.nm-node.nm-is-locked { border-left: 4px solid var(--acc); }
.nm-node-head { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: #f7f9f8; border-bottom: 1px solid var(--line); flex-wrap: wrap; border-radius: 10px 10px 0 0; }
.nm-node-title { margin: 0; font-size: 15px; font-weight: 700; }
.nm-node-body { padding: 12px 13px; }
.nm-node-form { margin: 0; }
.nm-node-btns-wrap { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.nm-node-btns { display: inline-flex; gap: 5px; }
.nm-lvl { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; background: var(--pri); color: #fff; border-radius: 5px; padding: 2px 6px; flex: 0 0 auto; }
.nm-crumb { font-size: 11.5px; color: var(--muted); background: #f2f5f3; border-radius: 20px; padding: 2px 9px; }
.nm-warn { font-size: 11px; font-weight: 700; background: #fdecec; color: #a12121; border: 1px solid #f3c9c9; border-radius: 20px; padding: 2px 9px; }
.nm-pill-soft { background: #eef3f6; color: #4a6070; }
.nm-flash { animation: nmFlash 1.6s ease 1; }
@keyframes nmFlash { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px rgba(20,80,59,.35); } }

/* Nesting: each level sits inside a <details> and is indented one step. */
.nm-kids { border: 0; margin: 12px 0 0; }
.nm-kids > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--pri); padding: 5px 0; }
.nm-kids > summary:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; border-radius: 5px; }
.nm-kids-list { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid #dfe7e3; }
.nm-lv3 > .nm-node-head, .nm-lv4 > .nm-node-head, .nm-lv5 > .nm-node-head { background: #fafcfb; }
.nm-lv3, .nm-lv4, .nm-lv5 { margin-bottom: 10px; }

/* Filter / bulk controls in the tree toolbar. */
.nm-filter-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.nm-filter { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; min-height: 38px; min-width: 220px; background: #fff; color: var(--text); }
.nm-filter:focus-visible { outline: 2px solid var(--pri); outline-offset: 1px; border-color: var(--pri); }
.btn-small { padding: 7px 11px; font-size: 12.5px; min-height: 36px; }
.nm-save { flex: 0 0 auto; }
.nm-hint-sep { color: var(--muted); padding: 0 4px; }
.nm-node a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 820px) {
  .nm-kids-list { margin-left: 6px; padding-left: 8px; }
  .nm-node-btns-wrap { margin-left: 0; width: 100%; }
  .nm-filter { min-width: 0; width: 100%; }
  .nm-save { width: 100%; }
}

/* ============================================================
   v240 — Slide-show CMS: a calmer, guided layout.
   The goal is that an editor can see at a glance WHAT to click:
   one obvious primary action per group, optional fields folded away.
   ============================================================ */

.ss-head { padding-bottom: 4px; }
.ss-help { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ss-help > summary {
  cursor: pointer; padding: 9px 12px; font-weight: 600; font-size: 13px;
  color: var(--pri); list-style: none;
}
.ss-help > summary::-webkit-details-marker { display: none; }
.ss-help > summary::before { content: "？ "; }
.ss-help > p { margin: 0; padding: 0 12px 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* a card header that keeps its heading and its action on one line */
.ss-cardhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.ss-cardhead h2 { margin: 0; }
.ss-tip { font-size: 12.5px; margin: 0 0 10px; }

/* the folded groups inside the slide form */
.ss-fold {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  margin: 4px 0 10px; padding: 0;
}
.ss-fold > summary {
  cursor: pointer; padding: 11px 14px; list-style: none;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.ss-fold > summary::-webkit-details-marker { display: none; }
.ss-fold > summary::before {
  content: "▸"; color: var(--pri); font-size: 12px; transition: transform .15s ease;
  display: inline-block;
}
.ss-fold[open] > summary::before { transform: rotate(90deg); }
.ss-fold[open] > summary { border-bottom: 1px solid var(--line); }
.ss-fold-body { padding: 14px; }

/* the numbered group for the essential bit — always visible */
.ss-group {
  border: 1px solid var(--line); border-left: 4px solid var(--pri);
  border-radius: 10px; background: #fff; padding: 14px; margin: 4px 0 10px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px;
}
.ss-group > legend {
  padding: 0 8px; font-weight: 700; font-size: 13px; color: var(--pri);
  text-transform: uppercase; letter-spacing: .04em;
}
.ss-group > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.ss-group > label.span2 { grid-column: 1 / -1; }
.ss-group input[type="text"], .ss-group textarea {
  font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; width: 100%;
}
.ss-fold-body label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.ss-fold-body input[type="text"], .ss-fold-body input[type="number"],
.ss-fold-body input[type="datetime-local"], .ss-fold-body textarea {
  font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; width: 100%;
}

/* the save bar — impossible to miss */
.ss-savebar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  position: sticky; bottom: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(243,244,246,.4), var(--bg) 60%);
  padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 2px;
}

/* reuse instructions */
.ss-steps { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.ss-steps > li { margin-bottom: 14px; }
.ss-steps b { color: var(--text); }
.ss-inline-form { margin-top: 10px; }
.ss-inline-form .form-actions { grid-column: 1 / -1; }

/* state pills in the tables */
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px;
  font-weight: 700; background: #eceff1; color: var(--muted); white-space: nowrap;
}
.pill.ok { background: #e3f5ea; color: var(--ok); }

@media (max-width: 760px) {
  .ss-group { grid-template-columns: minmax(0, 1fr); }
  .ss-cardhead { align-items: stretch; }
  .ss-cardhead > .btn { width: 100%; }
  .ss-savebar { position: static; }
  .ss-savebar .btn { width: 100%; }
}

/* v260 — slide-list thumbnails.
   The table calls <img class="thumb"> but no such rule existed, so every slide's
   picture rendered as a blank box in the Slides in <slideshow> table — the row
   looked broken while the image was in fact fine (verified: all 5 slide images
   are real files, 75 KB - 404 KB). Give it a fixed 96x60 cover box so the list
   reads as a picture strip. */
.admin-table .thumb,
.admin-table img.thumb {
  display: block;
  width: 96px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0b2319;
}

/* ==== v270 additions =====================================================
   Several classes used by the admin modules (slide-show.php, toggle-cms.php)
   had NO definition anywhere in this stylesheet, so those screens rendered as
   unstyled markup — which is what read as "module errors" in the Slide-show
   panel. They are all defined here using the same tokens as the rest of the
   panel. Nothing existing is changed.
   ======================================================================== */

/* generic inline form / action row */
.inline { display: inline; }
form.inline { display: inline-block; margin: 0; }
.actions-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.span-2, .span2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }

/* form grid: a readable 2-column layout that collapses on narrow screens */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.form-grid > label { margin: 12px 0 0; }
.form-grid input[type="text"],
.form-grid input[type="number"],
.form-grid input[type="datetime-local"],
.form-grid input[type="file"],
.form-grid select,
.form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
}
.form-grid textarea { resize: vertical; min-height: 68px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.chk input[type="checkbox"] { width: auto; margin: 0; flex: 0 0 auto; }
.form-grid small, .form-grid code { font-weight: 400; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } }

/* tables that scroll rather than overflow the panel */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); }
.admin-table th, .admin-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: middle; font-size: 13.5px;
}
.admin-table th {
  background: #f7f9f8; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}

/* notices */
.alert { border-radius: 10px; padding: 12px 15px; margin: 0 0 16px; font-size: 13.5px; border: 1px solid var(--line); background: #f7f9f8; }
.alert.ok { background: #eaf7ef; border-color: #bfe3cd; color: #14562f; }
.alert.warn { background: #fdf3d7; border-color: #ecd9a0; color: #8a6400; }

/* button variants the modules ask for */
.btn-primary { background: var(--pri); color: #fff; }
.btn-primary:hover { background: var(--pri2); color: #fff; }
.btn-danger { background: #fbe9e7; color: var(--danger); }
.btn-lg { padding: 12px 22px; font-size: 14.5px; }
.btn-tiny { padding: 4px 9px; font-size: 12px; line-height: 1.3; border-radius: 7px; background: #eef3f0; color: var(--pri); }
.btn-tiny:hover { background: #dfe9e4; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #eef3f0; color: var(--pri); border: 1px solid var(--line); }

/* slide-show live preview pane */
.ss-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0b2319; min-height: 180px; }
.ss-preview * { max-width: 100%; }

/* toggle-cms preview pane — the real front-end section on a neutral canvas */
.tg-preview { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: #fbfcfb; }
