/* ============================================================
   NiXel Booking — Admin design system
   All rules scoped under .nixel-app so WP admin chrome is untouched.
   ============================================================ */

.nixel-app {
    --nx-bg:        #f5f6fc;
    --nx-card:      #ffffff;
    --nx-ink:       #191b2e;
    --nx-muted:     #6b7192;
    --nx-faint:     #9aa0bd;
    --nx-line:      #e9ebf5;
    --nx-brand1:    #6d5efc;
    --nx-brand2:    #4f8bff;
    --nx-brand-ink: #4b3fd6;
    --nx-brand-soft:#eef0ff;
    --nx-danger:    #e5484d;
    --nx-danger-soft:#fdecec;
    --nx-ok:        #16a34a;
    --nx-ok-soft:   #e7f6ec;
    --nx-warn:      #d98a00;
    --nx-warn-soft: #fbf1dc;
    --nx-radius:    18px;
    --nx-radius-sm: 11px;
    --nx-shadow:    0 12px 34px rgba(28,30,74,.09), 0 2px 6px rgba(28,30,74,.05);
    --nx-shadow-sm: 0 4px 14px rgba(28,30,74,.07);

    max-width: 1180px;
    margin: 18px 20px 60px 2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    color: var(--nx-ink);
}
.nixel-app * { box-sizing: border-box; }

/* ---------- Hero ---------- */
.nx-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--nx-radius);
    padding: 30px 34px;
    color: #fff;
    background: linear-gradient(120deg, #6d5efc 0%, #5f7cff 48%, #38bdf8 100%);
    box-shadow: var(--nx-shadow);
    margin-bottom: 26px;
}
/* Decorative circles must NEVER intercept clicks (they overlap the top-right
   corner where buttons like "Sign out" live) — pointer-events:none is load-bearing. */
.nx-hero::after {
    content: "";
    position: absolute; right: -60px; top: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,.12);
    pointer-events: none;
}
.nx-hero::before {
    content: "";
    position: absolute; right: 70px; bottom: -110px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
/* Keep real hero content (buttons, links) above the decorations. */
.nx-hero > * { position: relative; z-index: 1; }
.nx-hero h1 {
    color: #fff; font-size: 27px; font-weight: 800; margin: 0 0 6px;
    letter-spacing: -.4px; padding: 0;
}
.nx-hero p { margin: 0; color: rgba(255,255,255,.86); font-size: 14px; max-width: 620px; }
.nx-hero .nx-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
    background: rgba(255,255,255,.18); padding: 5px 11px; border-radius: 40px; margin-bottom: 14px;
}

/* ---------- Stat row ---------- */
.nx-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.nx-stat {
    flex: 1; min-width: 170px; background: var(--nx-card); border: 1px solid var(--nx-line);
    border-radius: var(--nx-radius-sm); padding: 18px 20px; box-shadow: var(--nx-shadow-sm);
}
.nx-stat .n { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.nx-stat .l { font-size: 12.5px; color: var(--nx-muted); margin-top: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.nx-stat .ic { float: right; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--nx-brand-soft); }

/* ---------- Cards ---------- */
.nx-card {
    background: var(--nx-card); border: 1px solid var(--nx-line);
    border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); padding: 26px 28px; margin-bottom: 26px;
}
.nx-card > h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.nx-card > .sub { margin: 0 0 22px; color: var(--nx-muted); font-size: 13.5px; }
.nx-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.nx-section-head h2 { margin: 0; font-size: 18px; font-weight: 700; }

/* ---------- Business grid ---------- */
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.nx-biz {
    position: relative; background: var(--nx-card); border: 1px solid var(--nx-line);
    border-radius: var(--nx-radius); padding: 20px 20px 16px; box-shadow: var(--nx-shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.nx-biz:hover { transform: translateY(-3px); box-shadow: var(--nx-shadow); border-color: #d9ddf2; }
.nx-biz-top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.nx-avatar {
    width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.5px;
    background: linear-gradient(135deg, #6d5efc, #38bdf8);
}
.nx-biz-name { font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.nx-biz-slug { color: var(--nx-faint); font-size: 12px; margin-top: 2px; }
.nx-biz-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.nx-chip {
    font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 30px;
    background: #f1f2f9; color: #565c81;
}
.nx-shortcode {
    display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
    background: #f6f7fc; border: 1px dashed #d5d9ee; color: #5a5f82; border-radius: 9px;
    padding: 8px 11px; margin-bottom: 15px; overflow-x: auto; white-space: nowrap;
}
.nx-biz-actions { display: flex; gap: 8px; }

/* ---------- Badges ---------- */
.nx-badge { font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 30px; display: inline-flex; align-items: center; gap: 5px; }
.nx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nx-badge.ok     { background: var(--nx-ok-soft); color: var(--nx-ok); }
.nx-badge.paused { background: var(--nx-warn-soft); color: var(--nx-warn); }
/* Per-status colours — Confirmed and Completed used to share one green and were
   impossible to tell apart at a glance. Each lifecycle state now owns a hue. */
.nx-badge.st-pending   { background: var(--nx-warn-soft); color: var(--nx-warn); }
.nx-badge.st-confirmed { background: var(--nx-ok-soft);   color: var(--nx-ok); }
.nx-badge.st-seated    { background: #e6f0ff;             color: #1d63d1; }
.nx-badge.st-completed { background: #ece9fd;             color: #5b45d6; }
.nx-badge.st-cancelled { background: var(--nx-danger-soft); color: var(--nx-danger); }
.nx-badge.st-noshow    { background: #eceef3;             color: #6b7280; }
.nx-badge.st-waiting   { background: #d8f3ee;             color: #0f766e; }

/* count pill on the Waitlist dashboard tab */
.nx-tabcount { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
    margin-left: 2px; border-radius: 20px; background: #0f766e; color: #fff; font-size: 11px; font-weight: 700; }
.nx-btn-primary .nx-tabcount { background: rgba(255,255,255,.28); }
/* FIFO position badge in the waitlist */
.nx-queue-pos { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
    background: #d8f3ee; color: #0b6b60; font-weight: 800; font-size: 14px; }

/* ---- Walk-in QR / link card ---- */
.nx-wk-qrcard { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nx-wk-qrbox { flex: none; background: #fff; border: 1px solid var(--nx-line); border-radius: 14px; padding: 8px; box-shadow: var(--nx-shadow-sm); }
.nx-wk-qrbox img { display: block; border-radius: 8px; }
.nx-wk-qrbody { flex: 1 1 300px; }
.nx-wk-qrbody h2 { margin: 0 0 4px; }
.nx-wk-linkrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.nx-copied { color: var(--nx-ok); font-size: 12.5px; font-weight: 700; }

/* ---------- Buttons ---------- */
.nixel-app .nx-btn {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 10px;
    border: 1px solid var(--nx-line); background: #fff; color: var(--nx-ink);
    text-decoration: none; line-height: 1.2; transition: all .15s ease;
}
/* Every :hover keeps an explicit colour so button text never washes out under a
   theme/WP `a:hover` override (front-end especially). */
.nixel-app .nx-btn:hover { border-color: #c8cdea; background: #fafbff; color: var(--nx-ink); }
.nixel-app .nx-btn-primary {
    border: 0; color: #fff;
    background: linear-gradient(120deg, #6d5efc, #4f8bff);
    box-shadow: 0 8px 18px rgba(97,88,255,.32);
}
.nixel-app .nx-btn-primary, .nixel-app .nx-btn-primary:hover, .nixel-app .nx-btn-primary:focus { color: #fff; }
.nixel-app .nx-btn-primary:hover { background: linear-gradient(120deg, #5b4ef0, #3f7df5); }
/* The "★ Request review" / "★ Add review link" labels are the longest in the
   actions column. Smaller text + tight letter-spacing lets them sit comfortably
   inside the button without crowding the edges. The .nx-btn-sm compound selector
   is needed to beat .nx-btn-sm's own `padding` shorthand (it loads later). */
.nixel-app .nx-btn-review { color: #b8860b; border-color: #f0d78a; background: #fff; }
.nixel-app .nx-btn-sm.nx-btn-review { font-size: 11px; letter-spacing: 0; padding-left: 14px; padding-right: 14px; }
.nixel-app .nx-btn-review:hover { background: #fdf6e3; border-color: #e6c86a; color: #966d09; }
/* "Mark completed" — matches the violet Completed badge so the action and the
   resulting status read as the same thing. */
.nixel-app .nx-btn-done { color: #5b45d6; border-color: #d6cffb; background: #fff; }
.nixel-app .nx-btn-done:hover { background: #ece9fd; border-color: #c4b9f7; color: #4a36bd; }
.nixel-app .nx-btn-danger { color: var(--nx-danger); border-color: #f3d3d4; background: #fff; }
.nixel-app .nx-btn-danger:hover { background: var(--nx-danger-soft); border-color: #ecbfc0; color: var(--nx-danger); }
/* "Assign / Edit table" — seated-blue, matches the seated badge + email tiles */
.nixel-app .nx-btn-seat { color: #1d63d1; border-color: #cfe0ff; background: #fff; }
.nixel-app .nx-btn-seat:hover { background: #eef4ff; border-color: #b6d0ff; color: #14509e; }

/* ---- Assigned-table chip (shown under the status badge) ---- */
.nx-table-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
    color: #14509e; background: #eef4ff; border: 1px solid #cfe0ff; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }

/* ---- Walk-in identifier tag — separates QR walk-ins from online bookings ---- */
.nx-walkin-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .4px; color: #0f766e; background: #d8f3ee; border: 1px solid #a9e3d8;
    padding: 2px 8px; border-radius: 20px; white-space: nowrap; vertical-align: middle; }

/* ---- Captcha widget spacing (Turnstile) ---- */
.nx-captcha { margin: 4px 0 14px; }

/* ---- Table-assignment popup ---- */
.nx-tmodal { position: fixed; inset: 0; z-index: 2147483601; display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15,18,45,.55); backdrop-filter: blur(3px); text-align: left; }
.nx-tmodal.on { display: flex; }
.nx-tmodal-box { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 18px;
    padding: 22px 22px 20px; box-shadow: 0 30px 80px rgba(15,18,45,.4); max-height: 90vh; overflow-y: auto; }
.nx-tmodal-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 8px;
    background: none; font-size: 22px; line-height: 1; color: #b0b6cc; cursor: pointer; display: flex; align-items: center; justify-content: center; }
/* explicit dark chip + white glyph on hover — the theme's own button:hover
   background would otherwise sit behind a dark glyph and hide it. */
.nx-tmodal-x:hover, .nx-tmodal-x:focus { color: #fff; background: #6a7089; }
.nx-tmodal-head .eyebrow { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #1d63d1; font-weight: 700; }
.nx-tmodal-head h3 { margin: 5px 0 2px; font-size: 18px; color: var(--nx-ink); }
.nx-tmodal-head .sub { margin: 0 0 14px; font-size: 12.5px; color: var(--nx-muted); }
.nx-tlabel { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--nx-muted); margin: 12px 0 6px; }
.nx-tgrid { display: flex; flex-wrap: wrap; gap: 7px; }
.nx-tpick { display: inline-flex; flex-direction: column; align-items: center; min-width: 52px; padding: 7px 10px;
    border: 1.5px solid #e2e5f2; border-radius: 11px; background: #fbfbfe; cursor: pointer; font-family: inherit; line-height: 1.1; }
.nx-tpick .t { font-size: 15px; font-weight: 700; color: var(--nx-ink); }
.nx-tpick .s { font-size: 10px; color: #9aa0bd; margin-top: 2px; }
.nx-tpick:hover { border-color: #b6d0ff; background: #f4f8ff; }
.nx-tpick.picked { border-color: #1d63d1; background: #e6f0ff; box-shadow: 0 0 0 1px #1d63d1 inset; }
.nx-tpick.picked .t { color: #14509e; }
.nx-tpick.busy { position: relative; }
.nx-tpick.busy::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #d98a00; }
.nx-tpick.busy .t { color: #9aa0bd; }
.nixel-app .nx-tinput { width: 100%; padding: 11px 13px; border: 1.5px solid #dfe2ef; border-radius: 11px; font-size: 15px; color: var(--nx-ink); background: #fbfbfe; }
.nixel-app .nx-tinput:focus { border-color: #1d63d1; outline: none; background: #fff; }
.nx-thint { margin: 6px 0 0; font-size: 12px; color: var(--nx-muted); }
.nx-twarn { margin: 10px 0 0; padding: 8px 11px; border-radius: 9px; background: #fbf1dc; color: #7a5200; font-size: 12.5px; border: 1px solid #f0dca6; }
.nx-tcheck { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--nx-ink); }
.nx-tactions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.nixel-app .nx-btn-white { background: #fff; border: 0; color: var(--nx-brand-ink); font-weight: 700; box-shadow: 0 6px 16px rgba(20,22,60,.16); }
.nixel-app .nx-btn-white:hover { background: #fff; color: var(--nx-brand-ink); transform: translateY(-1px); }
.nixel-app .nx-btn-lg { padding: 12px 22px; font-size: 14.5px; }
.nixel-app .nx-btn-sm { padding: 7px 12px; font-size: 12.5px; }

/* ---------- Forms ---------- */
.nx-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 22px; }
.nx-field { display: flex; flex-direction: column; gap: 7px; }
.nx-field.full { grid-column: 1 / -1; }
.nx-field label { font-size: 13px; font-weight: 600; color: #3a3f5c; }
/* .hint was scoped to .nx-field only, so a bare <p class="hint"> — which
   several screens use for explanatory copy — rendered at full body size and
   read as a paragraph of prose rather than a quiet note. */
.nixel-app .hint { font-size: 12px; color: var(--nx-faint); font-weight: 400; }
.nixel-app p.hint { font-size: 13px; line-height: 1.55; margin: 0; }
.nx-field .hint { font-size: 12px; color: var(--nx-faint); font-weight: 400; }
.nixel-app .nx-field input[type=text],
.nixel-app .nx-field input[type=email],
.nixel-app .nx-field input[type=password],
.nixel-app .nx-field input[type=tel],
.nixel-app .nx-field input[type=number],
.nixel-app .nx-field input[type=time],
.nixel-app .nx-field input[type=date],
.nixel-app .nx-field input[type=url],
.nixel-app .nx-field input[type=search],
.nixel-app .nx-field select,
.nixel-app .nx-field textarea {
    width: 100%; padding: 11px 13px; border: 1.5px solid #e2e5f2; border-radius: 11px;
    background: #fbfbfe; font-size: 14px; color: var(--nx-ink); box-shadow: none; min-height: 0;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; line-height: 1.3;
}
.nixel-app .nx-field select { height: auto; }
.nixel-app .nx-field input:focus,
.nixel-app .nx-field select:focus,
.nixel-app .nx-field textarea:focus {
    outline: none; border-color: var(--nx-brand1); background: #fff;
    box-shadow: 0 0 0 4px rgba(109,94,252,.14);
}
.nx-field textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; resize: vertical; }
/* selected text stays white on the brand highlight (black was unreadable) */
.nixel-app ::selection { background: var(--nx-brand1); color: #fff; }
.nixel-app ::-moz-selection { background: var(--nx-brand1); color: #fff; }

/* toggle */
.nx-toggle { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #3a3f5c; }
.nx-toggle input { position: absolute; opacity: 0; }
.nx-toggle .track { width: 42px; height: 24px; border-radius: 40px; background: #d6d9ec; position: relative; transition: background .18s ease; flex: none; }
.nx-toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s ease; }
.nx-toggle input:checked + .track { background: linear-gradient(120deg, #6d5efc, #4f8bff); }
.nx-toggle input:checked + .track::after { transform: translateX(18px); }

.nx-form-actions { margin-top: 24px; display: flex; gap: 10px; align-items: center; }

/* ---------- Notices ---------- */
.nx-notice { border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; font-size: 14px; display: flex; align-items: center; gap: 11px; box-shadow: var(--nx-shadow-sm); }
.nx-notice.ok  { background: var(--nx-ok-soft); color: #14612e; border: 1px solid #c6e9d2; }
.nx-notice.err { background: var(--nx-danger-soft); color: #a3282b; border: 1px solid #f2cdce; }
/* "worth knowing", not "something is broken" — used for abuse counters. */
.nx-notice.warn { background: var(--nx-warn-soft); color: #8a5a00; border: 1px solid #f0dcae; }
.nx-notice > span:first-child { flex: 0 0 auto; }
.nx-notice > span:last-child { flex: 1 1 auto; }
.nx-notice .em { font-weight: 700; }
.nx-notice code { background: rgba(0,0,0,.06); padding: 2px 8px; border-radius: 6px; font-size: 13px; }

/* ---------- Empty state ---------- */
.nx-empty { text-align: center; padding: 46px 20px; color: var(--nx-muted); }
.nx-empty .big { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 16px; display: grid; place-items: center; font-size: 28px; background: var(--nx-brand-soft); }
.nx-empty h3 { margin: 0 0 6px; color: var(--nx-ink); font-size: 17px; }
.nx-empty p { margin: 0; font-size: 13.5px; }

/* ---------- Editor layout ---------- */
.nx-back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--nx-muted); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.nx-back:hover { color: var(--nx-brand-ink); }
.nx-danger-zone { border: 1.5px solid #f3d3d4; border-radius: var(--nx-radius); padding: 22px 26px; background: #fffafa; }
.nx-danger-zone h2 { color: var(--nx-danger); margin: 0 0 4px; font-size: 16px; }
.nx-danger-zone .sub { color: #b26; opacity: .8; font-size: 13px; margin: 0 0 16px; }

/* weekday hours rows */
.nx-hours { display: flex; flex-direction: column; gap: 10px; }
.nx-hour-row { display: grid; grid-template-columns: 46px 84px 1fr; gap: 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fff; }
.nx-hour-row.closed { background: #f7f8fc; }
.nx-hour-row .wd { font-weight: 700; font-size: 13.5px; color: #3a3f5c; padding-top: 7px; }
.nx-day-toggle { gap: 0 !important; padding-top: 5px; }
.nx-day-toggle .track { margin: 0; }
.nx-day-body { display: flex; flex-direction: column; gap: 8px; }
.nx-sessions { display: flex; flex-direction: column; gap: 8px; }
.nx-session { display: flex; align-items: center; gap: 10px; }
.nx-session .to { color: var(--nx-muted); font-size: 13px; }
.nixel-app .nx-session select { min-width: 122px; padding: 9px 11px; border: 1.5px solid #e2e5f2; border-radius: 10px; background: #fbfbfe; font-size: 13.5px; }
.nixel-app .nx-session-remove { border: 0; background: #f1f2f9; color: #8a90ad; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 10px; line-height: 1; }
.nixel-app .nx-session-remove:hover { background: #fde8e8; color: #c0392b; }
.nx-session:only-child .nx-session-remove { visibility: hidden; }
.nixel-app .nx-add-session { align-self: flex-start; background: none; border: 1px dashed #cfd4ea; color: var(--nx-brand-ink); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.nixel-app .nx-add-session:hover { background: var(--nx-brand-soft); }
.nx-closed-tag { display: none; color: var(--nx-faint); font-size: 13px; font-weight: 600; padding-top: 7px; }
.nx-hour-row.closed .nx-sessions, .nx-hour-row.closed .nx-add-session { display: none; }
.nx-hour-row.closed .nx-closed-tag { display: inline-block; }

/* inline add + chips */
.nx-inline-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.nixel-app .nx-inline-add input, .nixel-app .nx-inline-add select { padding: 10px 12px; border: 1.5px solid #e2e5f2; border-radius: 10px; background: #fbfbfe; font-size: 14px; color: var(--nx-ink); }
.nixel-app .nx-inline-add input:focus, .nixel-app .nx-inline-add select:focus { outline: none; border-color: var(--nx-brand1); box-shadow: 0 0 0 4px rgba(109,94,252,.14); }
.nx-chip-list { display: flex; flex-wrap: wrap; gap: 9px; min-height: 10px; }
.nx-chip2 { display: inline-flex; align-items: center; gap: 9px; background: var(--nx-brand-soft); color: var(--nx-brand-ink); font-weight: 600; font-size: 13px; padding: 7px 8px 7px 14px; border-radius: 30px; }
.nixel-app .nx-chip-x { border: 0; background: rgba(75,63,214,.14); color: var(--nx-brand-ink); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 10px; line-height: 1; display: grid; place-items: center; padding: 0; }
.nixel-app .nx-chip-x:hover { background: rgba(75,63,214,.28); }
.nx-chip-empty { color: var(--nx-faint); font-size: 13px; font-style: italic; }

/* simple data table */
.nixel-app .nx-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--nx-muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--nx-line); }
.nixel-app .nx-table td { padding: 12px; border-bottom: 1px solid var(--nx-line); font-size: 14px; vertical-align: middle; }
/* keep the final row's rule visible (it was being clipped by the scroll box) */
.nixel-app .nx-table tr:last-child td { border-bottom: 1px solid var(--nx-line); }
.nx-table-scroll { overflow-x: auto; padding-bottom: 2px; }
.nixel-app .nx-mini-input { width: 100%; max-width: 260px; padding: 8px 10px; border: 1.5px solid #e2e5f2; border-radius: 9px; background: #fbfbfe; font-size: 13px; color: var(--nx-ink); }

/* Image upload live previews */
.nx-img-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.nx-img-preview:not(:empty) { margin-top: 10px; }
.nx-img-preview img { height: 76px; max-width: 200px; width: auto; object-fit: contain; border-radius: 10px; background: #f6f7fc; padding: 4px; box-shadow: var(--nx-shadow-sm); }

/* Template picker */
.nx-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px; }
.nx-tpl { cursor: pointer; text-align: center; }
.nx-tpl input { position: absolute; opacity: 0; }
.nx-tpl .sw { display: block; height: 58px; box-shadow: 0 4px 12px rgba(28,30,74,.16); transition: transform .14s ease, outline .14s ease; outline: 3px solid transparent; outline-offset: 3px; }
.nx-tpl:hover .sw { transform: translateY(-2px); }
.nx-tpl input:checked + .sw { outline-color: var(--nx-brand1); }
.nx-tpl .lb { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #3a3f5c; }

/* ---------- Bookings table: column balance + stacked actions ---------- */
/* Fixed px on the tight columns so buttons/refs never wrap; Guest absorbs the
   slack. The table scrolls inside .nx-table-scroll on narrow screens. */
.nx-bookings-table { table-layout: fixed; }
.nx-bookings-table .c-when    { width: 132px; }
.nx-bookings-table .c-guest   { width: auto; min-width: 140px; }
.nx-bookings-table .c-party   { width: 144px; }  /* holds 4 stacked lines */
.nx-bookings-table .c-contact { width: 200px; }
.nx-bookings-table .c-ref     { width: 122px; }  /* refs never wrap */
.nx-bookings-table .c-status  { width: 112px; }
.nx-bookings-table .c-actions { width: 156px; }  /* fits a full-width button */
.nx-bookings-table th.c-actions, .nx-bookings-table th.c-status { white-space: nowrap; }
.nx-bookings-table td.c-ref code { white-space: nowrap; font-size: 12.5px; }
.nx-bookings-table td.c-party { white-space: nowrap; }

/* Actions stack vertically; display:contents lets the <form>'s buttons join
   the same column flow as the View/Edit links. */
/* Keep the cell a NORMAL table-cell (NOT display:flex): a flex td sizes to its
   button stack instead of stretching to the row height, so its bottom border
   landed at a different Y than the other columns' — the "row lines don't match"
   bug. As a plain cell it stretches to the row height and every column's divider
   aligns. Buttons stack as full-width blocks with margins instead of flex-gap. */
.nixel-app td.nx-actions-cell { vertical-align: top; padding: 12px 10px 4px; }
.nixel-app td.nx-actions-cell > form { display: contents !important; }
.nixel-app td.nx-actions-cell .nx-btn {
    display: flex; width: 100%; box-sizing: border-box; justify-content: center;
    padding: 7px 10px; font-size: 12px; gap: 5px; margin-bottom: 8px;
    white-space: nowrap;      /* keep "✓ Confirm" on one line */
    line-height: 1.25; text-decoration: none;
}

/* Booking detail view */
/* stretch (not start) so both cards match the taller one's height; the cards
   already share equal 1fr widths. The cards' own margin-bottom is moved to the
   grid so the spacing below (to the action bar) is preserved, not collapsed. */
.nx-view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; margin-bottom: 26px; }
.nx-view-grid > .nx-card { margin-bottom: 0; }
@media (max-width: 780px) { .nx-view-grid { grid-template-columns: 1fr; } }
.nx-bookings-table td { vertical-align: top; }

/* icon-labelled detail list */
.nx-dlist { display: flex; flex-direction: column; }
.nx-drow { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-bottom: 1px solid #f0f2f8; }
.nx-drow:last-child { border-bottom: 0; }
.nx-dlabel { display: flex; align-items: center; gap: 9px; width: 150px; flex: none; color: #8a94a6; font-size: 13px; font-weight: 600; }
.nx-dicon { width: 30px; height: 30px; border-radius: 9px; background: var(--nx-brand-soft); display: grid; place-items: center; font-size: 14px; }
.nx-dval { font-size: 14.5px; font-weight: 600; color: var(--nx-ink); padding-top: 4px; word-break: break-word; }
.nx-dval a { color: var(--nx-brand-ink); text-decoration: none; }

/* party at-a-glance band */
.nx-party-band { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.nx-party-total { background: linear-gradient(135deg, #6d5efc, #4f8bff); color: #fff; border-radius: 16px; padding: 18px 26px; text-align: center; min-width: 120px; box-shadow: 0 10px 24px rgba(97,88,255,.28); }
.nx-party-total .n { font-size: 40px; font-weight: 800; line-height: 1; }
.nx-party-total .l { font-size: 12px; margin-top: 6px; opacity: .9; text-transform: uppercase; letter-spacing: .6px; }
.nx-party-split { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.nx-pchip { display: flex; align-items: center; gap: 12px; background: #f7f8fc; border: 1px solid var(--nx-line); border-radius: 13px; padding: 14px 20px; }
.nx-pchip .ic { font-size: 24px; }
.nx-pchip .pn { font-size: 22px; font-weight: 800; line-height: 1; color: var(--nx-ink); }
.nx-pchip .pl { font-size: 11.5px; color: var(--nx-muted); margin-top: 4px; font-weight: 600; }
.nx-view-hero h1 { margin-top: 4px; }

/* Front-end account + dashboard — full-bleed out of the theme's narrow column.
   NOTE: 100vw INCLUDES the scrollbar while the content box does not, so this
   overflows by the scrollbar width unless we clip it. overflow-x:hidden is
   load-bearing here (inner content is capped at 1180px, so nothing is lost). */
/* Break out of the theme's content cap SYMMETRICALLY.
   The old rule set only margin-left (from a 100vw/50vw calculation) and left
   the inherited 20px margin-right in place, so the whole dashboard sat 50px to
   the right of centre — visible as a page title that would not line up with
   the card under it. `width:auto` plus equal auto margins needs no viewport
   arithmetic and cannot drift: 100vw counts the scrollbar, the content box
   does not, and that difference was the drift. */
.nixel-front { width: auto; margin-left: auto; margin-right: auto; padding: 26px 24px 40px; box-sizing: border-box; max-width: none; overflow-x: hidden; }
.nixel-front > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
/* A row wrapper for inline links (e.g. "← Back"): auto margins only centre
   BLOCK boxes, so an inline-flex link placed directly here would escape to the
   far left of the full-bleed container. Keep such links inside this wrapper. */
.nx-backrow { display: block; }
.nixel-front > .nx-back { display: flex; max-width: 1180px; } /* safety net if one is ever unwrapped */
.nx-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .nx-account-grid { grid-template-columns: 1fr; } }
.nx-guest .nx-field { margin-bottom: 14px; }
.nx-guest-card { border-top: 1px solid var(--nx-line); padding-top: 16px; }
.nx-guest-card .g-when { color: var(--nx-muted); font-size: 13px; margin: 4px 0 14px; }
.nx-guest-card .g-lbl { display: block; font-size: 13px; font-weight: 600; color: #3a3f5c; margin-bottom: 6px; }
.nixel-app .nx-guest input[type=datetime-local] { width: 100%; padding: 11px 13px; border: 1.5px solid #e2e5f2; border-radius: 11px; background: #fbfbfe; font-size: 14px; }
.g-result.err { color: var(--nx-danger); font-size: 14px; }
.nx-guest-ok { background: var(--nx-ok-soft); color: #14612e; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }

/* ---------- Branded confirm modal (replaces native confirm()) ---------- */
.nx-modal { position: fixed; inset: 0; background: rgba(15,18,45,.55); backdrop-filter: blur(3px); z-index: 2147483600; display: none; align-items: center; justify-content: center; padding: 20px; }
.nx-modal.on { display: flex; animation: nxFade .16s ease; }
@keyframes nxFade { from { opacity: 0; } to { opacity: 1; } }
.nx-modal-box { background: #fff; border-radius: 18px; padding: 30px 30px 24px; max-width: 430px; width: 100%; text-align: center;
    box-shadow: 0 24px 70px rgba(15,18,45,.32); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: nxPop .18s cubic-bezier(.2,.9,.3,1.2); }
@keyframes nxPop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-modal-icon { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
    font-size: 26px; font-weight: 800; color: #6d5efc; background: #eef0ff; }
.nx-modal-icon.danger { color: #e5484d; background: #fdecec; }
.nx-modal-title { margin: 0 0 8px; font-size: 19px; font-weight: 800; color: #191b2e; }
.nx-modal-msg { margin: 0 0 24px; font-size: 14.5px; line-height: 1.55; color: #6b7192; }
.nx-modal-actions { display: flex; gap: 10px; justify-content: center; }
.nx-modal-actions .nx-btn { min-width: 120px; justify-content: center; cursor: pointer;
    display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; padding: 11px 18px; border-radius: 10px;
    border: 1px solid #e9ebf5; background: #fff; color: #191b2e; text-decoration: none; }
.nx-modal-actions .nx-btn-primary { border: 0; color: #fff; background: linear-gradient(120deg,#6d5efc,#4f8bff); }
.nx-modal-actions .nx-btn-danger { border: 0; color: #fff; background: linear-gradient(120deg,#e5484d,#f0705a); }
@media (max-width: 480px) { .nx-modal-actions { flex-direction: column-reverse; } .nx-modal-actions .nx-btn { width: 100%; } }

/* ---------- Table toolbar: search + sortable headers ---------- */
.nx-tbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.nixel-app .nx-tsearch { flex: 1; min-width: 220px; max-width: 380px; padding: 10px 14px; border: 1.5px solid #e2e5f2;
    border-radius: 10px; background: #fbfbfe; font-size: 14px; color: var(--nx-ink); }
.nixel-app .nx-tsearch:focus { outline: none; border-color: var(--nx-brand1); box-shadow: 0 0 0 4px rgba(109,94,252,.14); }
.nx-tcount { font-size: 12.5px; color: var(--nx-faint); font-weight: 600; }
.nixel-app th.nx-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.nixel-app th.nx-sortable::after { content: "↕"; opacity: .3; margin-left: 6px; font-size: 11px; }
.nixel-app th.nx-sortable:hover::after { opacity: .65; }
.nixel-app th.nx-sortable.sorted { color: var(--nx-brand-ink); }
.nixel-app th.nx-sortable[data-dir="asc"]::after { content: "▲"; opacity: 1; }
.nixel-app th.nx-sortable[data-dir="desc"]::after { content: "▼"; opacity: 1; }

.nx-divider { height: 1px; background: var(--nx-line); margin: 26px 0; border: 0; }

/* ---------- Help & user guide ---------- */
.nx-help-searchrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nixel-app .nx-help-searchrow .nx-tsearch { flex: 1; min-width: 240px; max-width: 460px; }
.nx-help-tocgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.nx-help-tocgrid a { display: block; padding: 9px 13px; border: 1px solid var(--nx-line); border-radius: 10px;
    background: #fbfbfe; color: var(--nx-brand-ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.nx-help-tocgrid a:hover { background: var(--nx-brand-soft); border-color: #cfd4ee; }
.nx-help-sec { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: var(--nx-radius);
    box-shadow: var(--nx-shadow); padding: 24px 28px; margin-bottom: 22px; scroll-margin-top: 20px; }
.nx-help-sec > h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; letter-spacing: -.2px; color: var(--nx-ink);
    padding-bottom: 10px; border-bottom: 2px solid var(--nx-line); }
.nx-help-sec h4 { margin: 18px 0 6px; font-size: 14px; color: #3a3566; }
.nx-help-sec p { margin: 0 0 10px; font-size: 14px; line-height: 1.65; color: #41485f; }
.nx-help-sec ul, .nx-help-sec ol { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.65; color: #41485f; }
.nx-help-sec li { margin-bottom: 5px; }
.nx-help-sec table.nx-table { margin: 6px 0 14px; }
.nx-help-sec .nx-notice { margin: 14px 0; }
.nx-help-sec code { background: #f1f2f9; padding: 2px 7px; border-radius: 5px; font-size: 12.5px; color: var(--nx-brand-ink); }
/* worked example callout */
.nx-help-ex { border-left: 3px solid var(--nx-brand1); background: #f7f8ff; border-radius: 0 8px 8px 0;
    padding: 12px 16px; margin: 14px 0; font-size: 13.5px; line-height: 1.6; color: #41485f; }
.nx-help-pre { background: #1e2030; color: #e6e8f2; padding: 12px 15px; border-radius: 9px; font-size: 12.5px;
    line-height: 1.6; overflow-x: auto; margin: 0 0 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media print {
    /* printing the guide: drop the chrome, keep the content */
    .nx-hero, .nx-help-top, .nx-help-toc, .nixel-front > div:first-child, .nx-btn { display: none !important; }
    .nx-help-sec { box-shadow: none; border: 0; padding: 0 0 14px; page-break-inside: avoid; }
}
.nixel-app a.nx-link-muted { color: var(--nx-muted); font-size: 13px; font-weight: 600; text-decoration: none; align-self: center; }
.nixel-app a.nx-link-muted:hover { color: var(--nx-brand-ink); text-decoration: underline; }

/* ---------- List: serial column, refresh, pagination ---------- */
.nixel-app .nx-tbar .nx-refresh { margin-left: auto; flex: none; }
.nixel-app th.c-serial, .nixel-app td.nx-serial { width: 46px; color: var(--nx-muted); font-weight: 700; font-size: 12.5px; text-align: right; padding-right: 14px; }
.nx-bookings-table th.c-serial, .nx-bookings-table td.nx-serial { width: 46px; }
.nx-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.nx-pager-size { font-size: 12.5px; color: var(--nx-muted); font-weight: 600; }
.nixel-app .nx-psize { padding: 6px 8px; border: 1.5px solid #e2e5f2; border-radius: 8px; background: #fbfbfe; font-size: 12.5px; color: var(--nx-ink); margin-left: 4px; }
.nx-pager-nav { display: flex; align-items: center; gap: 10px; }
.nx-pinfo { font-size: 12.5px; color: var(--nx-muted); font-weight: 600; min-width: 100px; text-align: center; }
.nixel-app .nx-pager .nx-btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 820px) {
    /* serial reads as a labelled row in the stacked card view */
    .nixel-app table.nx-table td.nx-serial { text-align: left; padding-right: 0; }
    .nx-pager { justify-content: center; }
}

/* ============================================================
   Mobile / tablet — applies to EVERY NiXel screen
   ============================================================ */
@media (max-width: 900px) {
    .nixel-app { margin: 12px 10px 40px; }
    /* Drop the full-bleed trick on phones — the theme column is already ~full
       width there, and 100vw only reintroduces scrollbar overflow. */
    .nixel-front { width: auto; margin-left: 0; margin-right: 0; padding: 16px 14px 32px; }
    .nixel-front > * { max-width: none; }
    .nx-card { padding: 20px 18px; border-radius: 14px; }
    .nx-hero { padding: 22px 20px !important; border-radius: 14px; }
    .nx-hero h1 { font-size: 21px !important; }
    .nx-hero p { font-size: 13.5px; }
    .nx-form-grid { grid-template-columns: 1fr; gap: 14px; }
    .nx-view-grid, .nx-account-grid { grid-template-columns: 1fr; }
    .nx-stats { flex-direction: column; }
    .nx-grid { grid-template-columns: 1fr; }
    /* stacked, readable detail rows */
    .nx-drow { flex-direction: column; gap: 6px; }
    .nx-dlabel { width: auto; }
    .nx-dval { padding-top: 0; }
    /* hours editor stacks so selects never overflow */
    .nx-hour-row { grid-template-columns: 44px 1fr; row-gap: 10px; }
    .nx-hour-row .wd { padding-top: 6px; }
    .nx-day-body { grid-column: 1 / -1; }
    /* keep "open to close" on ONE line: min-width:120px forced the close select
       onto its own row and orphaned the "to", which read as two separate fields */
    .nx-session { flex-wrap: nowrap; gap: 7px; }
    .nixel-app .nx-session select { flex: 1 1 0; min-width: 0; width: 100%; padding: 9px 6px 9px 9px; font-size: 13px; }
    .nx-session .to { flex: none; font-size: 12px; }
    .nixel-app .nx-session-remove { flex: none; }
    .nx-inline-add { flex-direction: column; align-items: stretch; }
    .nixel-app .nx-inline-add input, .nixel-app .nx-inline-add select { width: 100%; }
    /* party band + buttons wrap cleanly */
    .nx-party-band { flex-direction: column; align-items: stretch; gap: 14px; }
    .nx-party-split { flex-direction: column; }
    .nx-pchip { justify-content: flex-start; }
    .nx-form-actions { flex-direction: column; align-items: stretch; }
    .nixel-app .nx-form-actions .nx-btn { justify-content: center; width: 100%; }
    .nx-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .nixel-app .nx-mini-input { max-width: none; }
}
@media (max-width: 560px) {
    .nx-hero h1 { font-size: 19px !important; }
    .nx-tpl-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .nx-btn { font-size: 13px; padding: 9px 13px; }
}

/* ============================================================
   Phones: turn wide data tables into stacked cards.
   Every <td> carries data-label, which becomes its row label —
   no more sideways scrolling to read a booking.
   ============================================================ */
@media (max-width: 820px) {
    .nx-table-scroll { overflow-x: visible; }
    /* border:0 — the theme's own table/cell borders otherwise draw stray rules
       around the cards once rows stop behaving like table rows. */
    .nixel-app table.nx-table { min-width: 0 !important; width: 100% !important; table-layout: auto !important; border-collapse: separate; border-spacing: 0; border: 0 !important; background: transparent; }
    .nixel-app table.nx-table tbody, .nixel-app table.nx-table tfoot { display: block; border: 0 !important; }
    .nixel-app table.nx-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* a11y-hidden, sort still available via toolbar */
    .nixel-app table.nx-table tr { display: block; border: 1px solid var(--nx-line); border-radius: 14px; padding: 6px 14px; margin-bottom: 14px; background: #fff; box-shadow: var(--nx-shadow-sm); }
    /* Label ABOVE value — side-by-side is far too cramped at 375px and clips
       long values like emails. */
    .nixel-app table.nx-table td {
        display: block; width: auto !important; max-width: 100%; box-sizing: border-box;
        padding: 10px 0;
        /* theme puts border-right on every td — it draws a stray vertical rule
           down the card once cells become blocks */
        border: 0 !important; border-bottom: 1px solid #f2f4fa !important;
        text-align: left !important; white-space: normal !important;
        overflow-wrap: anywhere; word-break: normal;
    }
    /* beats the desktop `tr:last-child td` rule that keeps the final rule visible */
    .nixel-app table.nx-table tr td:last-child,
    .nixel-app table.nx-table tr:last-child td:last-child { border-bottom: 0 !important; }
    .nixel-app table.nx-table td::before {
        content: attr(data-label); display: block; margin-bottom: 4px;
        font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--nx-muted);
    }
    .nixel-app table.nx-table td:not([data-label])::before { content: none; }
    /* long emails/URLs wrap on word boundaries, never one-char-per-line */
    .nixel-app table.nx-table td a { overflow-wrap: anywhere; word-break: normal !important; }
    .nixel-app table.nx-table td.c-party { white-space: normal !important; }
    /* actions: full-width buttons in their own block, no label column */
    .nixel-app td.nx-actions-cell { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
    .nixel-app td.nx-actions-cell::before { content: ""; display: none; }
    .nixel-app td.nx-actions-cell .nx-btn { width: auto; flex: 1 1 auto; min-width: 96px; }
    /* search toolbar stacks */
    .nx-tbar { flex-direction: column; align-items: stretch; }
    .nixel-app .nx-tsearch { max-width: none; width: 100%; }
}
.nx-sub-h { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--nx-ink); }
.nx-sub-p { font-size: 12.5px; color: var(--nx-muted); margin: 0 0 14px; }

/* Assigned-unit chip on the front desk — the room number is the thing a
   receptionist scans for, so it reads at a glance rather than as small print. */
.nx-unit-chip{
  display:inline-block;padding:6px 14px;border-radius:8px;
  background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;
  font-weight:700;font-size:.95rem;letter-spacing:.02em;font-variant-numeric:tabular-nums;
}

/* ---------- front-desk rows ---------- */
.nx-bookings-table td,.nx-table td{vertical-align:middle;}
.nx-desk-actions{white-space:nowrap;}
/*
 * `> *` sets display on EVERYTHING, including elements the markup hid with the
 * [hidden] attribute — a plain class selector outranks the UA rule, so a hidden
 * block was painted in full. Exclude hidden children here, and see the global
 * guard at the end of this file.
 */
.nx-desk-actions > *:not([hidden]){display:block;}
.nx-desk-actions > * + *{margin-top:8px;}
.nx-desk-form{display:flex;gap:8px;align-items:center;flex-wrap:nowrap;}
.nx-desk-form select,.nx-desk-form input[type=text],.nx-desk-form input[type=number]{
  height:34px;padding:0 10px;border:1px solid #d6dbe3;border-radius:8px;font-size:.9rem;background:#fff;
}
.nx-desk-form input[type=number]{width:96px;text-align:right;font-variant-numeric:tabular-nums;}
.nx-desk-form select{min-width:96px;}
.nx-desk-pay{padding-top:8px;border-top:1px dashed #e3e8ef;}
/* the payment row is a separate action; keep it visually distinct from check-out */
.nx-desk-pay::before{content:"Record payment";display:block;width:100%;font-size:.7rem;
  text-transform:uppercase;letter-spacing:.05em;color:#8a94a6;margin-bottom:-2px;}
.nx-desk-pay{flex-wrap:wrap;}

/* ---------- inline edit disclosure ---------- */
.nx-edit{margin-top:14px;border:1px solid #e3e8ef;border-radius:10px;background:#fbfcfe;}
.nx-edit > summary{
  cursor:pointer;list-style:none;padding:11px 14px;font-weight:600;font-size:.9rem;color:#334155;
  display:flex;align-items:center;gap:8px;user-select:none;
}
.nx-edit > summary::-webkit-details-marker{display:none;}
.nx-edit > summary::before{content:"✎";font-size:.95rem;color:var(--nx-b1,#2563eb);}
.nx-edit > summary::after{content:"▾";margin-left:auto;color:#94a3b8;transition:transform .15s;}
.nx-edit[open] > summary::after{transform:rotate(180deg);}
.nx-edit > summary:hover{background:#f1f5f9;border-radius:10px;}
.nx-edit[open] > summary{border-bottom:1px solid #e3e8ef;border-radius:10px 10px 0 0;background:#f8fafc;}
.nx-edit > form{padding:14px;}

/* ================= Team & permissions ================= */
.nx-sub-h{font-size:.95rem;margin:22px 0 10px;color:#0f2740;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;}
.nx-sub-h .hint{font-weight:400;}

.nx-role-chip{display:inline-block;padding:5px 12px;border-radius:999px;font-size:.8rem;font-weight:700;
  background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;white-space:nowrap;}
.nx-role-manager{background:#eef2ff;border-color:#c7d2fe;color:#3730a3;}
.nx-role-frontdesk{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
.nx-role-housekeeping{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}

.nx-caps-cell{max-width:280px;}
.nx-cap-chip{display:inline-block;margin:0 4px 4px 0;padding:3px 9px;border-radius:6px;background:#f1f5f9;
  border:1px solid #e2e8f0;color:#475569;font-size:.74rem;font-weight:600;}
.nx-cap-more{background:#fff;color:#64748b;}

.nx-pill{display:inline-block;padding:4px 11px;border-radius:999px;font-size:.76rem;font-weight:700;}
.nx-pill-ok{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;}
.nx-pill-off{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;}
.nx-row-off{opacity:.62;}

/* Role picker — cards, so the choice is read rather than guessed */
.nx-role-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;}
.nx-role-card{position:relative;display:block;cursor:pointer;}
.nx-role-card input{position:absolute;opacity:0;pointer-events:none;}
.nx-role-card-body{display:block;padding:14px 16px;border:2px solid #e3e8ef;border-radius:12px;background:#fff;
  transition:border-color .15s, background .15s, box-shadow .15s;height:100%;}
.nx-role-card-body strong{display:block;font-size:.98rem;color:#0f2740;margin-bottom:4px;}
.nx-role-card-body span{display:block;font-size:.82rem;color:#64748b;line-height:1.45;}
.nx-role-card:hover .nx-role-card-body{border-color:#c7d2fe;}
.nx-role-card input:checked + .nx-role-card-body{
  border-color:var(--nx-b1,#2563eb);background:#f5f8ff;box-shadow:0 2px 10px rgba(37,99,235,.10);}
.nx-role-card input:focus-visible + .nx-role-card-body{outline:2px solid var(--nx-b1,#2563eb);outline-offset:2px;}

/* Capability grid */
.nx-cap-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;}
.nx-cap-group{border:1px solid #e3e8ef;border-radius:12px;padding:14px 16px;background:#fbfcfe;}
.nx-cap-group-h{font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:#8a94a6;font-weight:700;
  margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #eaeff5;}
.nx-cap-row{display:flex;gap:10px;align-items:flex-start;padding:7px 0;cursor:pointer;}
.nx-cap-row input{margin-top:3px;width:16px;height:16px;flex:0 0 auto;accent-color:var(--nx-b1,#2563eb);}
.nx-cap-row strong{display:block;font-size:.87rem;color:#1f2a37;font-weight:600;}
.nx-cap-row .hint{display:block;font-size:.76rem;line-height:1.4;}
.nx-cap-row:hover strong{color:var(--nx-b1,#2563eb);}

.nx-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;}

@media (max-width:640px){
  .nx-caps-cell{max-width:none;}
  .nx-role-cards,.nx-cap-groups{grid-template-columns:1fr;}
}

/* ================= Sign-in page ================= */
/* The page title is rendered by the theme, above and outside this markup, so
   it is centred from here — otherwise a left-aligned title floats beside a
   centred card. :has() covers themes that wrap the title in their own block. */
.nx-login-page{text-align:center;}
.nx-login-wrap{max-width:460px;margin:0 auto;text-align:left;}
body:has(.nx-login-page) .wp-block-post-title,
body:has(.nx-login-page) .entry-title,
body:has(.nx-login-page) .page-title{text-align:center;}

.nx-login-card{padding:32px 30px;}
.nx-login-card h2{text-align:center;margin-bottom:4px;}
.nx-login-card .sub{text-align:center;margin-bottom:22px;}
.nx-login-card .nx-form-actions{gap:14px;flex-wrap:wrap;}
.nx-login-card .nx-btn-lg{min-width:120px;}

@media (max-width:520px){
  .nx-login-wrap{max-width:none;}
  .nx-login-card{padding:24px 20px;}
  .nx-login-card .nx-form-actions{flex-direction:column;align-items:stretch;text-align:center;}
}

/* The per-member action column: one button per line, all the same width, so
   the column reads as a list of choices rather than a ragged pile. */
.nx-team-table .nx-desk-actions{min-width:150px;}
.nx-team-table .nx-desk-actions .nx-btn{display:block;width:100%;text-align:center;}
.nx-team-table .nx-desk-actions form{margin:0;}
.nx-team-table td{padding-top:14px;padding-bottom:14px;}

/* ---------- uploaded photo grid ---------- */
/* The Remove tick sat flush against the thumbnail, so it read as part of the
   image and was easy to hit by accident. Give it its own band below. */
.nx-photo-grid{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 14px;}
.nx-photo{position:relative;width:104px;text-align:center;cursor:pointer;
  border:1px solid #e3e8ef;border-radius:10px;padding:6px 6px 4px;background:#fff;
  transition:border-color .15s, box-shadow .15s;}
.nx-photo:hover{border-color:#c7d2fe;box-shadow:0 2px 8px rgba(28,30,74,.07);}
.nx-photo img{width:100%;height:74px;object-fit:cover;border-radius:7px;display:block;background:#f6f7fc;}
.nx-photo-rm{display:flex;align-items:center;justify-content:center;gap:6px;
  margin-top:10px;padding-top:8px;border-top:1px solid #f0f3f8;
  font-size:.74rem;color:#6b7192;line-height:1;}
.nx-photo-rm input{margin:0;width:14px;height:14px;accent-color:var(--nx-danger,#e5484d);flex:0 0 auto;}
.nx-photo:has(input:checked){border-color:#f3d3d4;background:#fffafa;}
.nx-photo:has(input:checked) .nx-photo-rm{color:var(--nx-danger,#e5484d);font-weight:600;}
.nx-photo-cover{position:absolute;top:10px;left:10px;padding:2px 7px;border-radius:5px;
  background:rgba(15,39,64,.78);color:#fff;font-size:.62rem;font-weight:700;letter-spacing:.03em;}

/* Early departure sits above the ordinary check-out and must not be confused
   with it — same row shape, quieter styling, its own label. */
.nx-desk-early{padding-bottom:8px;border-bottom:1px dashed #e3e8ef;flex-wrap:wrap;}
.nx-desk-early::before{content:"Leaving early";display:block;width:100%;font-size:.7rem;
  text-transform:uppercase;letter-spacing:.05em;color:#8a94a6;margin-bottom:-2px;}
.nx-desk-early select{max-width:190px;}

/* ---------- hero actions ---------- */
.nx-hero-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.nx-hero-time{opacity:.75;font-size:.86em;}
.nx-refresh{white-space:nowrap;}
@media (max-width:560px){
  .nx-hero-actions{width:100%;}
  .nx-hero-actions .nx-btn{flex:1 1 auto;text-align:center;}
}

/* ================= KPI / stat tiles =================
   .nx-kpis was used on the Calendar and Reviews screens but never actually
   existed in this stylesheet, so both rendered as a run-on stack of unstyled
   text ("Reviews0", "Average—"). One component now, used by every screen that
   shows numbers at the top — front desk, calendar, reviews. */
.nx-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
}
.nx-kpis > div{
  display:flex;flex-direction:column;gap:6px;
  padding:14px 16px;border:1px solid var(--nx-line,#e9ebf5);border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfcff);
}
.nx-kpis > div > .hint{
  font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--nx-faint,#9aa0bd);font-weight:700;line-height:1.3;
}
.nx-kpis > div > .hint em{text-transform:none;letter-spacing:0;font-style:normal;font-weight:400;display:block;}
.nx-kpis > div > strong{
  font-size:1.45rem;line-height:1.15;color:var(--nx-ink,#191b2e);
  font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.01em;
}
/* A stat row sits above the content it describes, never crammed against it. */
.nx-kpis:not(:last-child){margin-bottom:16px;}
@media (max-width:520px){
  .nx-kpis{grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:10px;}
  .nx-kpis > div{padding:12px;}
  .nx-kpis > div > strong{font-size:1.2rem;}
}

/* An explanatory aside inside a card — quieter than body copy, but not the
   12px form-field hint, which is too small to carry a paragraph of reasoning. */
.nixel-app .nx-note{
  margin:14px 0 0;padding:12px 14px;border-radius:10px;
  background:#f7f9fd;border:1px solid #eaeff7;
  font-size:13px;line-height:1.6;color:var(--nx-muted,#6b7192);
}
.nixel-app .nx-note strong{color:var(--nx-ink,#191b2e);}

/* ---------- shortcode + copy ---------- */
.nx-shortcode-row{display:flex;gap:8px;align-items:stretch;margin:10px 0;}
.nx-shortcode-row .nx-shortcode{flex:1 1 auto;margin:0;min-width:0;overflow-x:auto;white-space:nowrap;}
.nx-shortcode-row .nx-btn{flex:0 0 auto;align-self:center;}
.nx-copy-sc.is-copied{color:var(--nx-ok,#16a34a);border-color:#c6e9d2;background:var(--nx-ok-soft,#e7f6ec);}
@media (max-width:520px){
  .nx-shortcode-row{flex-direction:column;}
  .nx-shortcode-row .nx-btn{align-self:stretch;}
}

/* ---------- theme-bleed guard (front-end dashboard) ----------
   The dashboard renders inside the site's theme too, so the same rule applies:
   any state we leave unstated, the theme decides. */
.nixel-app .nx-btn, .nixel-app .nx-btn:visited{ text-decoration:none; }
.nixel-app .nx-copy-sc, .nixel-app .nx-copy-sc:hover, .nixel-app .nx-copy-sc:focus{ color:var(--nx-ink); }
.nixel-app .nx-copy-sc.is-copied, .nixel-app .nx-copy-sc.is-copied:hover{ color:var(--nx-ok,#16a34a); }
.nixel-app .nx-btn-white, .nixel-app .nx-btn-white:hover,
.nixel-app .nx-btn-white:focus, .nixel-app .nx-btn-white:active{ color:var(--nx-brand-ink); }
.nixel-app button:focus-visible,
.nixel-app a:focus-visible,
.nixel-app input:focus-visible,
.nixel-app select:focus-visible,
.nixel-app textarea:focus-visible{
  outline:2px solid var(--nx-brand1,#6d5efc);
  outline-offset:2px;
}

/* Set-a-password form: sits above the generated reset, and must not read as
   part of it — the two do different jobs. */
.nixel-app .nx-pw-set{ margin-bottom:6px; }
.nixel-app .nx-pw-set input[name="owner_new_pw"]{
  font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.02em;
}
.nixel-app .nx-pw-set + .nx-sub-h{ margin-top:22px; }

/* A list of things that did not save — one per line, so the reader can pick
   out the one that matters instead of parsing a paragraph of near-identical
   sentences. */
.nixel-app .nx-err-list{ margin:8px 0 0; padding-left:20px; }
.nixel-app .nx-err-list li{ margin:0 0 6px; line-height:1.5; }
.nixel-app .nx-err-list li:last-child{ margin-bottom:0; }

/* Cover picker on a photo tile — a radio, because exactly one can be it. */
.nx-photo-cover-pick{
  position:absolute;top:10px;left:10px;display:inline-flex;align-items:center;gap:5px;
  padding:3px 8px;border-radius:6px;background:rgba(15,39,64,.78);color:#fff;
  font-size:.64rem;font-weight:700;letter-spacing:.03em;cursor:pointer;
}
.nx-photo-cover-pick input{ margin:0;width:12px;height:12px;accent-color:#fff;cursor:pointer; }
.nx-photo:has(.nx-photo-cover-pick input:checked){ border-color:var(--nx-brand1,#6d5efc); }
.nx-photo:has(.nx-photo-cover-pick input:checked) .nx-photo-cover-pick{
  background:var(--nx-brand1,#6d5efc);
}

/* Facilities: copy bar and select-all */
.nixel-app .nx-fac-all{display:flex;gap:9px;align-items:center;margin:10px 0 4px;
  padding:9px 12px;border:1px solid #e3e8ef;border-radius:9px;background:#fbfcfe;cursor:pointer;}
.nixel-app .nx-fac-all input{width:15px;height:15px;accent-color:var(--nx-brand1,#6d5efc);}
.nixel-app .nx-fac-sec-all{display:inline-flex;gap:8px;align-items:center;cursor:pointer;}
.nixel-app .nx-fac-sec-all input{width:14px;height:14px;accent-color:var(--nx-brand1,#6d5efc);}
.nixel-app .nx-fac-copy-hl{display:inline-flex;gap:6px;align-items:center;font-size:.82rem;color:#334155;}
.nixel-app .nx-fac-copy-said{font-size:.82rem;color:var(--nx-ok,#16a34a);font-weight:600;}

/* ================================================================
   Tablet — the dashboard between phone and desktop
   ================================================================ */
@media (max-width: 1024px){
  .nixel-app .nx-form-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .nixel-app .nx-kpis{ grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); }
}
@media (max-width: 820px){
  /* Every wide table scrolls in its own box instead of stretching the page. */
  .nixel-app .nx-table-scroll,
  .nixel-app .nx-bookings-table,
  .nixel-app .nx-team-table{ display:block;overflow-x:auto;-webkit-overflow-scrolling:touch; }
  .nixel-app .nx-desk-actions{ min-width:150px; }
  .nixel-app .nx-hero{ padding:20px 18px !important; }
  .nixel-app .nx-hero h1{ font-size:1.4rem; }
}
@media (max-width: 680px){
  .nixel-app .nx-form-grid{ grid-template-columns:1fr; }
  .nixel-app .nx-card{ padding:16px 14px; }
  /* Tab strip scrolls rather than wrapping into four ragged lines. */
  .nixel-app .nx-hero + div{ overflow-x:auto;flex-wrap:nowrap !important;padding-bottom:6px; }
  .nixel-app .nx-hero + div .nx-btn{ flex:0 0 auto; }
}
.nixel-app img{ max-width:100%; height:auto; }
.nixel-app table{ max-width:100%; }

/* ---------- mobile: nothing touches the edge ---------- */
@media (max-width: 600px){
  .nixel-app.nixel-front{ padding-left:14px; padding-right:14px; }
  .nixel-app .nx-card{ padding:16px 15px; }
  .nixel-app .nx-hero{ padding:18px 16px !important; }
  .nixel-app .nx-notice{ padding:12px 14px; }
}
@media (max-width: 400px){
  .nixel-app.nixel-front{ padding-left:10px; padding-right:10px; }
  .nixel-app .nx-card{ padding:14px 12px; }
}

/* Highlights get their own select-all, separate from the facilities list. */
.nixel-app .nx-hl-box .nx-fac-all{ margin-top:0; }
.nixel-app .nx-hl-all-box{ accent-color:var(--nx-brand1,#6d5efc); }

/* ---------- dashboard dialogs ---------- */
.nixel-app .nx-modal{
  position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;
  background:rgba(10,14,25,.5);padding:4vh 4vw;
}
.nixel-app .nx-modal[hidden]{ display:none; }
.nixel-app .nx-modal-card{
  background:#fff;border-radius:16px;box-shadow:0 30px 80px rgba(15,23,42,.3);
  width:min(620px,100%);max-height:92vh;overflow:auto;
}
.nixel-app .nx-modal-top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 20px;border-bottom:1px solid var(--nx-line);position:sticky;top:0;background:#fff;
}
.nixel-app .nx-modal-x{
  border:0;background:transparent;font-size:26px;line-height:1;cursor:pointer;
  color:var(--nx-muted);padding:0 4px;
}
.nixel-app .nx-modal-x:hover{ color:var(--nx-ink); }
.nixel-app .nx-modal-body{ padding:18px 20px; }

/* Details content */
.nixel-app .nx-dd-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--nx-line);
}
.nixel-app .nx-dd-grid{ display:grid;gap:0; }
.nixel-app .nx-dd-row{
  display:flex;gap:14px;padding:9px 0;border-bottom:1px solid #f2f4f9;font-size:.92rem;
}
.nixel-app .nx-dd-row:last-child{ border-bottom:0; }
.nixel-app .nx-dd-l{ flex:0 0 148px;color:var(--nx-faint);font-weight:600;font-size:.8rem;
  text-transform:uppercase;letter-spacing:.04em;padding-top:2px; }
.nixel-app .nx-dd-v{ flex:1 1 auto;color:var(--nx-ink);min-width:0;word-break:break-word; }
.nixel-app .nx-dd-sub{
  margin:16px 0 6px;font-size:.74rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.06em;color:var(--nx-faint);
}
.nixel-app .nx-dd-foot{ margin-top:16px;padding-top:14px;border-top:1px solid var(--nx-line); }

/* Assign control */
.nixel-app .nx-assign{ display:flex;flex-direction:column;gap:6px;min-width:170px; }
.nixel-app .nx-assign-pick{ min-width:170px; }
.nixel-app .nx-assign-other[hidden]{ display:none; }
.nixel-app .nx-assign-hint{ font-size:.72rem;line-height:1.35; }
/* Moving a guest mid-stay: same shape as the assign control, one line down. */
.nixel-app .nx-desk-move{ align-items:flex-start; }
.nixel-app .nx-move-reason{ width:100%;min-width:0; }
.nixel-app .nx-desk-move .nx-assign{ min-width:180px; }
.nixel-app .nx-desk-contact{ white-space:nowrap; }
.nixel-app .nx-desk-contact-row{ display:flex;align-items:center;gap:8px;margin-top:6px; }
/* The address itself is in the dialog; the row carries a way to use it. */
.nixel-app .nx-desk-contact .nx-desk-mail{
  display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;
  border-radius:8px;border:1px solid var(--nx-line);color:var(--nx-muted);
  text-decoration:none;font-size:.95rem;flex:none;
}
.nixel-app .nx-desk-contact .nx-desk-mail:hover{
  background:#eef2ff;border-color:#c7d2fe;color:#3730a3;text-decoration:none;
}
.nixel-app .nx-mail-open{ margin-top:0; }

@media (max-width:600px){
  .nixel-app .nx-modal{ padding:0; }
  .nixel-app .nx-modal-card{ width:100%;max-width:100%;max-height:100dvh;border-radius:0; }
  .nixel-app .nx-dd-row{ flex-direction:column;gap:2px; }
  .nixel-app .nx-dd-l{ flex:none; }
}

/* The email form inside its dialog: stacked fields, actions to the right. */
.nixel-app .nx-mail-form .nx-field{ margin-bottom:12px; }
.nixel-app .nx-mail-form textarea{ resize:vertical;min-height:120px; }
.nixel-app .nx-mail-form .nx-form-actions{ display:flex;gap:10px;justify-content:flex-end;margin-top:4px; }
.nixel-app .nx-mail-form input[readonly]{ background:var(--nx-bg,#f7f8fd);color:var(--nx-muted); }


/* ============================================================
 * hidden means hidden
 *
 * `[hidden]` is only a UA rule (specificity 0,0,0), so ANY class selector that
 * sets `display` beats it — that is how a detail sheet meant to be invisible
 * ended up painted into every front-desk row. This is the backstop; nothing in
 * this product ever wants to reveal an element the markup has hidden.
 * ============================================================ */
.nixel-app [hidden]{ display:none !important; }
