﻿/* Shared Rx Desk UI refresh: clearer contrast, calmer surfaces, and responsive layouts. */
:root {
  --ui-ink: #172033;
  --ui-muted: #667085;
  --ui-line: #e5eaf1;
  --ui-paper: #ffffff;
  --ui-canvas: #f4f7fb;
  --ui-blue: #2563eb;
  --ui-blue-soft: #eff6ff;
  --ui-radius: 14px;
  --ui-shadow: 0 8px 24px rgba(20, 35, 60, .06);
}

body {
  color: var(--ui-ink);
}

/* Admin shell */
html:has(body .sidebar) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
body:has(.sidebar) {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: visible;
  align-items: stretch;
  background: var(--ui-canvas);
  color: var(--ui-ink);
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 252px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 22px 16px;
  gap: 18px;
  background: #111b2e;
  border-right: 1px solid #26334a;
  box-shadow: 8px 0 28px rgba(16, 31, 55, .08);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none !important;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar,
.nav-list::-webkit-scrollbar,
.nav-list::-webkit-scrollbar-track,
.nav-list::-webkit-scrollbar-thumb,
.nav-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.sidebar-header {
  gap: 11px;
  padding: 4px 8px 20px;
  margin: 0 0 4px;
  border-bottom-color: rgba(255,255,255,.1);
}
.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: contain;
  background: #090a0d;
}
.sidebar-header h1 {
  font-size: 1.12rem;
  letter-spacing: -.025em;
}
.nav-list { gap: 17px; }
.nav-group { display:flex; flex-direction:column; gap:5px; }
.nav-section-header { display:flex; align-items:center; min-height:0; padding:0 8px; }
.nav-section-title {
  padding:0;
  margin:4px 0 2px;
  cursor:default;
  color:#77869e;
  font-size:.64rem;
  font-weight:700;
  letter-spacing:.1em;
  line-height:1.4;
  text-transform:uppercase;
}
.nav-group-items { display:flex; flex-direction:column; gap:5px; }
.nav-item {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #aab6c8;
  font-size: .88rem;
  font-weight: 550;
  transition: background .18s ease, color .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active {
  color: #fff;
  background: rgba(76, 131, 244, .2);
  box-shadow: inset 0 0 0 1px rgba(110, 159, 255, .18);
}
.nav-item.active::before { background: #75a5ff; border-radius: 4px; }
.nav-item i { color: #91a8cc; }
.nav-item.active i { color: #a9c6ff; }
.nav-unread-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.nav-unread-count[hidden] { display: none; }
.main-content {
  flex: none;
  min-width: 0;
  min-height: 100vh;
  overflow: visible;
  width: calc(100% - 252px);
  margin-left: 252px;
  padding: 28px clamp(18px, 3vw, 42px) 40px;
  background: var(--ui-canvas);
}
.topbar {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--ui-line);
}
.page-title h2 {
  color: var(--ui-ink);
  font-size: clamp(1.55rem, 2vw, 2rem);
  letter-spacing: -.045em;
}
.page-title p { color: var(--ui-muted); }
.topbar-actions { gap: 10px; }
.refresh-btn, .logout-btn, .user-pill {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: .85rem;
  box-shadow: none;
}
.refresh-btn { background: #fff; border-color: var(--ui-line); color: #344054; }
.refresh-btn:hover { background: var(--ui-blue-soft); }
.user-pill { background: #fff; border-color: var(--ui-line); color: #344054; }
.logout-btn { background: #fff; border-color: #f2d5d5; }
.content-area {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 0;
  overflow: visible;
  gap: 20px;
  padding: 0;
}
.panel, .audit-panel, .summary-card, .metric-box, .monitor-sidebar, .monitor-content {
  border-color: var(--ui-line);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
}
.panel { background: var(--ui-paper); }
.panel-header {
  padding: 18px 22px;
  border-bottom-color: var(--ui-line);
}
.panel-header h3 { color: var(--ui-ink); font-size: 1rem; }
.panel-body { padding: 22px; }
.data-table, .audit-table, .table-scroll table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .audit-table th, .table-scroll th {
  padding: 12px 14px;
  color: #667085;
  background: #f7f9fc;
  border-bottom: 1px solid var(--ui-line);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  text-align: left;
}
.data-table td, .audit-table td, .table-scroll td {
  padding: 13px 14px;
  color: #344054;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
.data-table tbody tr:hover, .audit-table tbody tr:hover, .table-scroll tbody tr:hover {
  background: #f8fbff;
}
.field label, .field-stack label, .form-group label {
  color: #475467;
  font-size: .82rem;
  font-weight: 650;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]),
select, textarea {
  max-width: 100%;
  border-color: #d5dce7;
  border-radius: 9px;
  color: #1d2939;
}
input:focus, select:focus, textarea:focus {
  border-color: #80aaff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
button, .primary-btn, .primary-button, .btn.primary, .approve-btn, .refresh-btn {
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-btn, .primary-button, .btn.primary, .approve-btn {
  border-radius: 9px;
  box-shadow: 0 3px 8px rgba(37, 99, 235, .16);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}
.table-scroll, .audit-table-wrap { max-width: 100%; overflow-x: auto; }
.empty-state, .audit-empty { color: #667085; }

/* Public guest and invitation flows */
body:not(:has(.sidebar)) {
  --background: #f3f6fb;
  --foreground: #182338;
  --card-bg: #fff;
  --card-bg-hover: #fff;
  --card-border: #e3e9f2;
  --primary: #2563eb;
  --primary-gradient: linear-gradient(135deg, #2563eb, #1d4ed8);
  --primary-gradient-hover: linear-gradient(135deg, #1d4ed8, #1e40af);
  --primary-glow: rgba(37,99,235,.18);
  --accent-cyan: #087eaa;
  --text-muted: #667085;
  --text-subtle: #98a2b3;
  background: #f3f6fb;
  color: #182338;
}
body:not(:has(.sidebar)) .glass-card,
body:not(:has(.sidebar)) .invite-card,
body:not(:has(.sidebar)) .search-box {
  background: #fff;
  border: 1px solid #e3e9f2;
  box-shadow: 0 12px 32px rgba(24, 42, 72, .07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body:not(:has(.sidebar)) .title,
body:not(:has(.sidebar)) .section-title,
body:not(:has(.sidebar)) .guest-details h4 { color: #182338; }
body:not(:has(.sidebar)) .title {
  background: none;
  -webkit-text-fill-color: currentColor;
}
body:not(:has(.sidebar)) .input,
body:not(:has(.sidebar)) .textarea-custom {
  background: #fff;
  color: #182338;
  border-color: #d9e0eb;
}
body:not(:has(.sidebar)) .input:focus,
body:not(:has(.sidebar)) .textarea-custom:focus {
  background: #fff;
  border-color: #7ba8fb;
}
body:not(:has(.sidebar)) .search-box { padding: 5px; }
body:not(:has(.sidebar)) .search-box .input { background: transparent; }
body:not(:has(.sidebar)) .status-pending {
  background: #fff7e6;
  border-color: #ffe2a8;
  color: #9a5b00;
}
body:not(:has(.sidebar)) .status-used {
  background: #e9f8ef;
  border-color: #c5ebd1;
  color: #187344;
}
body:not(:has(.sidebar)) .modal-content {
  background: #fff;
  color: #182338;
  border-color: #e3e9f2;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
}
body:not(:has(.sidebar)) .modal-tab-btn { color: #667085; }
body:not(:has(.sidebar)) .modal-tab-btn.active { color: #fff; }
body:not(:has(.sidebar)) .toast-notification {
  background: #182338;
  border-color: #527fe0;
}
body:not(:has(.sidebar)) .ticket-card {
  background: #fff;
  color: #182338;
  border-color: #e3e9f2;
  box-shadow: 0 18px 46px rgba(24, 42, 72, .12);
}
body:not(:has(.sidebar)) .ticket-card h1,
body:not(:has(.sidebar)) .ticket-card h2,
body:not(:has(.sidebar)) .ticket-card p { color: #182338; }
body:not(:has(.sidebar)) .ticket-card .guest-details,
body:not(:has(.sidebar)) .ticket-card .guest-subtext { color: #667085; }
body:not(:has(.sidebar)) .ticket-card .brand-badge {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #dbeafe;
}
body:has(.container > .glass-card[class*="status-"]) { background: #f3f6fb; }
.container > .glass-card[class*="status-"] {
  background: #fff;
  color: #182338;
  border-color: #e3e9f2;
  box-shadow: 0 20px 55px rgba(24, 42, 72, .12);
}
.container > .glass-card[class*="status-"] h1 { color: #182338; }
.container > .glass-card[class*="status-"] p { color: #667085; }
.container > .glass-card[class*="status-"] .btn-refresh {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 5px 14px rgba(37,99,235,.2);
}
.container > .glass-card[class*="status-"] .guest-info {
  background: #f7f9fc;
  border-color: #e3e9f2;
}
.container > .glass-card[class*="status-"] .guest-info div,
.container > .glass-card[class*="status-"] .guest-info strong { color: #344054; }
.shell {
  border-color: #e3e9f2;
  box-shadow: 0 18px 55px rgba(24, 42, 72, .1);
}

/* Login page */
body:has(.login-container) {
  background: #f3f6fb;
  background-image: radial-gradient(ellipse at 12% 10%, #e5efff 0, transparent 38%), radial-gradient(ellipse at 90% 90%, #e9f4ff 0, transparent 35%);
}
.login-card {
  background: #fff;
  border-color: #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(28, 51, 88, .12);
}
.login-card:hover { box-shadow: 0 24px 70px rgba(28, 51, 88, .12); }
.login-header h1, .login-header h2 { letter-spacing: -.04em; }
.input-wrapper input { border-radius: 10px; }
.input-wrapper input::placeholder { color: #98a2b3; }

@media (max-width: 920px) {
  body:has(.sidebar) { display: flex; flex-direction: column; }
  .sidebar {
    position: relative;
    left: auto;
    bottom: auto;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 12px 14px 10px;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #26334a;
  }
  .sidebar-header { padding: 2px 4px 10px; margin: 0; }
  .brand-logo { width: 32px; height: 32px; }
  .nav-list {
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    max-height: 42vh;
    gap: 6px;
    overflow-y: auto;
    padding: 0 0 5px;
    scrollbar-width: thin;
  }
  .nav-group { display:flex; flex:0 0 auto; }
  .nav-section-header { padding-left:8px; }
  .nav-item { flex: 0 0 auto; min-height: 38px; padding: 8px 11px; font-size: .82rem; }
  .main-content { flex:1; width:100%; margin-left:0; min-height:0; padding:20px 16px 30px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .topbar-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-group-items { transition:none; }
}
@media (max-width: 640px) {
  .main-content { padding: 17px 12px 24px; }
  .topbar { margin-bottom: 18px; padding-bottom: 16px; }
  .page-title h2 { font-size: 1.55rem; }
  .topbar-actions { width: 100%; gap: 7px; }
  .topbar-actions > * { font-size: .78rem; padding: 8px 10px; }
  .user-pill { max-width: 100%; }
  .panel-header { padding: 15px 16px; }
  .panel-body { padding: 16px; }
  .data-table, .audit-table, .table-scroll table { min-width: 680px; }
  .table-scroll, .audit-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .login-card { padding: 32px 23px; }
}

/* Approval screen styled to match the compact light admin reference */
.approval-page {
  width:100%;
  max-width:1560px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:18px;
  min-width:0;
  color:#182338;
}
.approval-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:2px 2px 4px;
}
.approval-eyebrow {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#2563eb;
  font-size:.76rem;
  font-weight:700;
}
.approval-heading h1 {
  margin:6px 0 4px;
  color:#172033;
  font-size:clamp(1.5rem,2.2vw,2rem);
  letter-spacing:-.045em;
  line-height:1.2;
}
.approval-heading p { margin:0; color:#667085; font-size:.9rem; }
.approval-back {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:8px 12px;
  color:#344054;
  background:#fff;
  border:1px solid #dfe5ed;
  border-radius:7px;
  font-size:.82rem;
  font-weight:600;
  white-space:nowrap;
}
.approval-back:hover { color:#155eef; border-color:#b8cdf4; background:#f8faff; }
.approval-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.approval-stat {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:78px;
  padding:13px 16px;
  background:#fff;
  border:1px solid #e1e6ee;
  border-radius:8px;
  box-shadow:0 2px 5px rgba(16,24,40,.025);
}
.approval-stat-icon {
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#edf4ff;
  color:#2161cf;
  font-size:1rem;
}
.approval-stat.pending .approval-stat-icon { background:#fff6e5;color:#b77913; }
.approval-stat.approved .approval-stat-icon { background:#eaf7ef;color:#16804f; }
.approval-stat.rejected .approval-stat-icon { background:#fff0f0;color:#c23c46; }
.approval-stat > span:last-child { display:flex; flex-direction:column; gap:4px; min-width:0; }
.approval-stat small { color:#667085; font-size:.72rem; font-weight:600; }
.approval-stat strong { color:#182338; font-size:1.25rem; line-height:1; font-weight:700; }
.approval-page .page-header { display:none; }
.approval-page .panel {
  width:100%;
  background:#fff;
  border:1px solid #dfe5ed;
  border-radius:4px;
  box-shadow:0 2px 7px rgba(16,24,40,.025);
  overflow:visible;
}
.approval-page .panel-header {
  min-height:58px;
  padding:13px 17px;
  background:#fff;
  border-bottom:1px solid #e1e6ee;
}
.approval-page .panel-header h3 { margin:0; color:#182338; font-size:.96rem; font-weight:650; }
.approval-page .panel-header .meta { margin-top:4px; color:#667085; font-size:.76rem; }
.approval-approve-all {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 11px;
  border:1px solid #1264dc;
  border-radius:5px;
  background:#1671ed;
  color:#fff;
  font-family:inherit;
  font-size:.78rem;
  font-weight:600;
  cursor:pointer;
}
.approval-approve-all:hover { background:#0d5fcf; }
.approval-page .panel-body { padding:0; }
.approval-page .toolbar {
  display:flex;
  align-items:center;
  gap:12px;
  margin:0;
  padding:15px 17px;
  background:#f8fafc;
  border-bottom:1px solid #e3e8ef;
}
.approval-page .search-field { flex:1 1 260px; max-width:400px; }
.approval-page .search-field input {
  height:36px;
  padding:8px 11px;
  border:1px solid #d6deea;
  border-radius:5px;
  background:#fff;
  color:#243147;
  font-size:.82rem;
  box-shadow:none;
}
.approval-page .search-field input:focus { border-color:#5592f4; box-shadow:0 0 0 2px rgba(22,113,237,.12); }
.approval-page .chips { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.approval-page .chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  padding:6px 9px;
  border:1px solid #d7e0ed;
  border-radius:5px;
  background:#fff;
  color:#42526a;
  font-size:.77rem;
  font-weight:550;
  white-space:nowrap;
}
.approval-page .chip:hover { border-color:#91b5f3; background:#f4f8ff; }
.approval-page .chip.active { color:#145fc9; border-color:#80afff; background:#eaf2ff; }
.approval-page .chip .count { padding:2px 5px; border-radius:4px; background:#edf1f6; color:#526176; font-size:.69rem; }
.approval-page .chip.active .count { background:#d3e4ff; color:#145fc9; }
.approval-page .table-scroll {
  width:100%;
  overflow:auto;
  border:0;
  border-radius:0;
  -webkit-overflow-scrolling:touch;
}
.approval-page table { width:100%; min-width:820px; border-collapse:collapse; }
.approval-page thead th {
  padding:11px 13px;
  color:#59677b;
  background:#f8fafc;
  border-bottom:1px solid #dce3ec;
  text-align:left;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.015em;
}
.approval-page tbody td {
  padding:11px 13px;
  color:#344054;
  border-bottom:1px solid #e8edf3;
  font-size:.8rem;
  vertical-align:middle;
}
.approval-page tbody tr:hover td { background:#f8fbff; }
.approval-page .client-name { color:#26364d; font-size:.82rem; font-weight:650; }
.approval-page .client-sub { margin-top:3px; color:#7a8798; font-size:.73rem; }
.approval-page .badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border-radius:4px;
  font-size:.71rem;
  font-weight:600;
  white-space:nowrap;
}
.approval-page .badge i { font-size:.45rem; }
.approval-page .badge.pending { background:#fff5de; color:#94620b; }
.approval-page .badge.approved { background:#e9f7ef; color:#167548; }
.approval-page .badge.rejected { background:#fff0f0; color:#a63c42; }
.approval-page .actions { display:flex; align-items:center; gap:6px; }
.approval-page .approve-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:30px;
  padding:6px 9px;
  border:1px solid #1264dc;
  border-radius:5px;
  background:#1671ed;
  color:#fff;
  font-size:.74rem;
  font-weight:600;
  cursor:pointer;
}
.approval-page .approve-btn:hover { background:#0d5fcf; }
.approval-page details.action-menu { position:relative; }
.approval-page details summary {
  width:31px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #d9e1eb;
  border-radius:5px;
  background:#fff;
  color:#506078;
  list-style:none;
}
.approval-page details summary::-webkit-details-marker { display:none; }
.approval-page details summary:hover { background:#f0f5fc; color:#1764d5; }
.approval-page details .menu {
  z-index:20;
  top:35px;
  min-width:190px;
  padding:5px;
  border:1px solid #dfe5ed;
  border-radius:6px;
  box-shadow:0 12px 28px rgba(16,24,40,.14);
}
.approval-page .menu form,.approval-page .menu button {
  width:100%;
  display:block;
  padding:8px 9px;
  border:0;
  border-radius:4px;
  background:#fff;
  color:#344054;
  text-align:left;
  font-size:.78rem;
  font-weight:500;
  cursor:pointer;
}
.approval-page .menu form:hover,.approval-page .menu button:hover { background:#f2f6fc; color:#155eef; }
.approval-page .menu .destructive { color:#b4232f; }
.approval-page .pagination-wrap {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:0;
  padding:12px 16px;
  border-top:1px solid #e1e6ee;
}
.approval-page .records-count { color:#667085; font-size:.76rem; }
.approval-page .pagination { display:flex; gap:0; }
.approval-page .page-btn {
  min-width:31px;
  height:31px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:0 7px;
  border:1px solid #dce3ec;
  border-right:0;
  background:#fff;
  color:#1764d5;
  font-size:.76rem;
}
.approval-page .page-btn:first-child { border-radius:5px 0 0 5px; }
.approval-page .page-btn:last-child { border-right:1px solid #dce3ec; border-radius:0 5px 5px 0; }
.approval-page .page-btn.active { background:#1671ed; border-color:#1671ed; color:#fff; }
.approval-page .page-btn.disabled { opacity:.45; pointer-events:none; }
.approval-page .empty-state {
  margin:16px;
  padding:42px 18px;
  border:1px dashed #d9e1eb;
  border-radius:5px;
  background:#fbfcfe;
  color:#667085;
  text-align:center;
}
.approval-page .empty-state h3 { color:#344054; font-size:.9rem; font-weight:600; }
@media(max-width:900px) {
  .approval-page .toolbar { align-items:stretch; flex-direction:column; }
  .approval-page .search-field { flex:1 1 auto; max-width:none; }
  .approval-page .chips { overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px; }
  .approval-page .chips .chip { flex:0 0 auto; }
  .approval-page thead { display:table-header-group; }
  .approval-page tbody tr { display:table-row; margin:0; border:0; }
  .approval-page tbody td { display:table-cell; }
}
@media(max-width:640px) {
  .approval-page { gap:14px; }
  .approval-heading { align-items:flex-start; }
  .approval-heading h1 { font-size:1.42rem; }
  .approval-heading p { max-width:34ch; font-size:.82rem; }
  .approval-back { align-self:flex-start; font-size:0; }
  .approval-back i { font-size:1rem; }
  .approval-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .approval-stat { min-height:68px; padding:10px; gap:9px; }
  .approval-stat-icon { width:32px; height:32px; flex-basis:32px; font-size:.88rem; }
  .approval-stat small { font-size:.65rem; }
  .approval-stat strong { font-size:1.05rem; }
  .approval-page .panel-header { align-items:flex-start; gap:10px; }
  .approval-approve-all { font-size:.7rem; }
  .approval-page .pagination-wrap { align-items:flex-start; flex-direction:column; }
}

/* Clients directory shares the approval screen's compact admin treatment */
.registry-page {
  width:100%;
  max-width:1560px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:18px;
  min-width:0;
  color:#182338;
}
.registry-heading { padding:2px 2px 4px; }
.registry-eyebrow {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#2563eb;
  font-size:.73rem;
  font-weight:750;
  letter-spacing:.08em;
}
.registry-heading h1 {
  margin:6px 0 4px;
  color:#172033;
  font-size:clamp(1.5rem,2.2vw,2rem);
  letter-spacing:-.045em;
  line-height:1.2;
}
.registry-heading p { margin:0; color:#667085; font-size:.9rem; }
.registry-panel {
  overflow:hidden;
  border:1px solid #dfe5ed;
  border-radius:5px;
  background:#fff;
  box-shadow:0 2px 7px rgba(16,24,40,.025);
}
.registry-toolbar {
  min-height:62px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:12px 17px;
  border-bottom:1px solid #e1e6ee;
  background:#fff;
}
.registry-panel-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; }
.registry-panel-title h2 { margin:0; color:#182338; font-size:.96rem; font-weight:650; }
.registry-panel-title span { color:#7a8798; font-size:.75rem; }
.registry-page .filter-box { display:flex; align-items:center; gap:9px; }
.registry-page .filter-box::before {
  content:'Filtrar por evento';
  color:#667085;
  font-size:.75rem;
  font-weight:600;
}
.registry-page .select-field {
  min-width:260px;
  min-height:36px;
  padding:7px 30px 7px 10px;
  border:1px solid #d6deea;
  border-radius:5px;
  color:#344054;
  background:#fff;
  font-size:.8rem;
}
.registry-page .select-field:focus { border-color:#5592f4; box-shadow:0 0 0 2px rgba(22,113,237,.12); outline:0; }
.registry-page .table-wrap {
  overflow:auto;
  border:0;
  border-radius:0;
  background:#fff;
  box-shadow:none;
  -webkit-overflow-scrolling:touch;
}
.registry-page table { min-width:900px; width:100%; border-collapse:collapse; }
.registry-page th {
  padding:11px 13px;
  border-bottom:1px solid #dce3ec;
  background:#f8fafc;
  color:#59677b;
  text-align:left;
  font-size:.69rem;
  font-weight:700;
  letter-spacing:.04em;
}
.registry-page td {
  padding:11px 13px;
  border-bottom:1px solid #e8edf3;
  color:#344054;
  font-size:.8rem;
}
.registry-page tbody tr:hover td { background:#f8fbff; }
.registry-page tbody tr:last-child td { border-bottom:0; }
.registry-page .status-badge { padding:5px 8px; border-radius:4px; font-size:.7rem; font-weight:600; }
.registry-page .status-pending { background:#fff5de; color:#94620b; }
.registry-page .status-approved { background:#e9f7ef; color:#167548; }
.registry-page .status-rejected { background:#fff0f0; color:#a63c42; }
.registry-page .pagination {
  justify-content:flex-end;
  gap:0;
  margin:0;
  padding:12px 16px;
  border-top:1px solid #e1e6ee;
}
.registry-page .page-btn {
  min-width:31px;
  height:31px;
  padding:0 7px;
  border:1px solid #dce3ec;
  border-right:0;
  border-radius:0;
  color:#1764d5;
  font-size:.76rem;
}
.registry-page .page-btn:first-child { border-radius:5px 0 0 5px; }
.registry-page .page-btn:last-child { border-right:1px solid #dce3ec; border-radius:0 5px 5px 0; }
.registry-page .page-btn.active { background:#1671ed; border-color:#1671ed; }
.registry-page .empty-state {
  margin:16px;
  padding:40px 18px;
  border:1px dashed #d9e1eb;
  border-radius:5px;
  background:#fbfcfe;
  color:#667085;
}
.registry-page .empty-state h3 { margin-bottom:6px; color:#344054; font-size:.9rem; }
.registry-page .empty-state p { margin:0; color:#667085; font-size:.8rem; }
@media(max-width:700px) {
  .registry-page { gap:14px; }
  .registry-toolbar { align-items:flex-start; flex-direction:column; }
  .registry-page .filter-box { width:100%; align-items:flex-start; flex-direction:column; gap:6px; }
  .registry-page .select-field { width:100%; min-width:0; }
  .registry-page .pagination { justify-content:flex-start; flex-wrap:wrap; }
}

/* WhatsApp Web inspired receiving inbox */
html:has(body .recebimento-shell) {
  height:100%;
  min-height:0;
  overflow:hidden;
}
body:has(.recebimento-shell) {
  height:100vh;
  height:100dvh;
  min-height:0;
  overflow:hidden;
}
.main-content:has(.recebimento-shell) {
  display:flex;
  flex:1;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  min-height:0;
  overflow:hidden;
  padding:18px 22px 16px;
}
.main-content:has(.recebimento-shell) .topbar { flex:0 0 auto; margin-bottom:14px; padding-bottom:13px; }
.content-area:has(.recebimento-shell) {
  flex:1;
  min-height:0;
  overflow:hidden;
  gap:0;
}
.recebimento-shell {
  display:grid;
  grid-template-columns:minmax(285px, 340px) minmax(0, 1fr);
  width:100%;
  height:auto;
  flex:1;
  min-height:0;
  overflow:hidden;
  border:1px solid #d9e0e8;
  border-radius:8px;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,24,40,.06);
}
.recebimento-shell .conversations-panel {
  min-width:0;
  height:100%;
  background:#fff;
  border-right:1px solid #dfe4e8;
}
.recebimento-shell .sidebar-header {
  position:static;
  width:auto;
  height:auto;
  min-height:60px;
  padding:10px 14px;
  margin:0;
  justify-content:flex-start;
  border:0;
  border-bottom:1px solid #e9edef;
  border-radius:0;
  background:#f0f2f5;
  box-shadow:none;
}
.recebimento-shell .brand-row { min-width:0; }
.recebimento-shell .sidebar-actions { margin-left:auto; }
.recebimento-shell .brand-avatar {
  width:38px;
  height:38px;
  border-radius:50%;
  background:#d9fdd3;
  color:#16825d;
  font-size:.68rem;
}
.recebimento-shell .brand-meta strong { color:#202c33; font-size:.86rem; }
.recebimento-shell .brand-meta small { color:#667781; font-size:.7rem; }
.recebimento-shell .sidebar-actions { gap:6px; }
.recebimento-shell .icon-btn,
.recebimento-shell .tool-btn {
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#54656f;
}
.recebimento-shell .icon-btn:hover,
.recebimento-shell .tool-btn:hover { background:#e3e7e9; color:#26343b; }
.recebimento-shell .primary-btn {
  padding:8px 10px;
  border-radius:6px;
  background:#00a884;
  font-size:.73rem;
  box-shadow:none;
}
.recebimento-shell .primary-btn:hover { background:#008f72; }
.recebimento-shell .sidebar-search {
  padding:9px 12px;
  border:0;
  background:#fff;
}
.recebimento-shell .sidebar-search input {
  height:36px;
  padding:8px 12px;
  border:0;
  border-radius:7px;
  background:#f0f2f5;
  color:#3b4a54;
  font-size:.78rem;
}
.recebimento-shell .sidebar-search input:focus { outline:1px solid #d2d8dc; box-shadow:none; }
.recebimento-shell .filter-row {
  width:100%;
  min-width:0;
  box-sizing:border-box;
  flex-wrap:wrap;
  gap:6px;
  padding:0 12px 10px;
  overflow:visible;
  border:0;
  scrollbar-width:none;
}
.recebimento-shell .filter-row::-webkit-scrollbar { display:none; }
.recebimento-shell .chip-btn {
  flex:0 0 auto;
  padding:6px 9px;
  border:0;
  border-radius:18px;
  background:#f0f2f5;
  color:#54656f;
  font-size:.68rem;
  font-weight:550;
}
.recebimento-shell .chip-btn.active { background:#d9fdd3; color:#126b51; }
.recebimento-shell .conversation-list { gap:0; padding:0; background:#fff; }
.recebimento-shell .conversation-item {
  position:relative;
  gap:11px;
  min-height:70px;
  padding:10px 13px;
  border:0;
  border-radius:0;
  border-bottom:1px solid #f0f2f5;
  background:#fff;
}
.recebimento-shell .conversation-item::after {
  content:'';
  position:absolute;
  right:0;
  bottom:-1px;
  left:64px;
  height:1px;
  background:#f0f2f5;
}
.recebimento-shell .conversation-item:hover { background:#f5f6f6; }
.recebimento-shell .conversation-item.active { background:#f0f2f5; box-shadow:none; }
.recebimento-shell .avatar {
  width:43px;
  height:43px;
  border-radius:50%;
  background:#dfe7e9;
  color:#54656f;
  font-size:.86rem;
  font-weight:600;
}
.recebimento-shell .conversation-main { padding-bottom:2px; }
.recebimento-shell .conversation-row { align-items:flex-start; margin-bottom:5px; }
.recebimento-shell .name { flex:1 1 auto; min-width:0; color:#111b21; font-size:.82rem; font-weight:600; }
.recebimento-shell .time { flex:0 1 76px; max-width:76px; color:#667781; font-size:.62rem; line-height:1.25; text-align:right; white-space:normal; overflow-wrap:anywhere; }
.recebimento-shell .preview { flex:1 1 auto; min-width:0; color:#667781; font-size:.74rem; }
.recebimento-shell .badge { flex:0 0 auto; min-width:19px; height:19px; background:#00a884; font-size:.63rem; }
.recebimento-shell .chat-panel {
  height:100%;
  min-width:0;
  min-height:0;
  background:#efeae2;
}
.recebimento-shell .chat-header {
  position:relative;
  min-height:60px;
  padding:9px 15px;
  background:#f0f2f5;
  border-bottom:1px solid #e1e6e8;
}
.recebimento-shell .chat-user { gap:10px; min-width:0; }
.recebimento-shell .chat-user h4 { color:#111b21; font-size:.87rem; font-weight:600; }
.recebimento-shell .chat-user small { color:#667781; font-size:.7rem; }
.recebimento-shell .chat-user .avatar.large {
  width:39px!important;
  height:39px!important;
  border-radius:50%!important;
  background:#dfe7e9;
  color:#54656f;
}
.recebimento-shell .chat-actions { gap:4px; }
.recebimento-shell .assume-btn {
  padding:8px 11px;
  border:1px solid #cbd5d9;
  border-radius:6px;
  background:#fff;
  color:#41535d;
  font-size:.72rem;
  font-weight:600;
}
.recebimento-shell .assume-btn:hover { border-color:#00a884; color:#008f72; background:#f7fffc; }
.recebimento-shell .assume-btn.assumed { border-color:#b8e2d4; background:#e6f7f1; color:#08775b; }
.recebimento-shell .chat-thread {
  position:relative;
  gap:5px;
  padding:18px clamp(14px, 4vw, 54px) 12px;
  background-color:#efeae2;
  background-image:
    radial-gradient(circle at 14px 14px, rgba(80,94,90,.045) 1px, transparent 1.5px),
    radial-gradient(circle at 34px 34px, rgba(80,94,90,.035) 1px, transparent 1.5px);
  background-size:48px 48px;
  scrollbar-width:thin;
  scrollbar-color:#c5c9c7 transparent;
}
.recebimento-shell .thread-date {
  position:sticky;
  top:3px;
  z-index:2;
  margin:7px auto 10px;
  padding:5px 10px;
  border:0;
  border-radius:6px;
  background:#fff;
  color:#54656f;
  box-shadow:0 1px 1px rgba(0,0,0,.08);
  font-size:.66rem;
  font-weight:500;
}
.recebimento-shell .message-row { max-width:100%; }
.recebimento-shell .message-bubble {
  max-width:min(72%, 680px);
  padding:7px 9px 5px;
  border:0;
  border-radius:7px;
  background:#fff;
  box-shadow:0 1px 1px rgba(11,20,26,.12);
}
.recebimento-shell .message-row.incoming .message-bubble { border-top-left-radius:2px; }
.recebimento-shell .message-row.outgoing .message-bubble {
  border:0;
  border-radius:7px 7px 2px 7px;
  background:#d9fdd3;
}
.recebimento-shell .message-bubble p { color:#111b21; font-size:.83rem; line-height:1.45; }
.recebimento-shell .bubble-meta { margin-top:4px; color:#667781; font-size:.62rem; }
.recebimento-shell .composer-box {
  padding:8px 13px 10px;
  background:#f0f2f5;
  border-top:1px solid #e0e5e8;
}
.recebimento-shell .quick-replies {
  gap:6px;
  flex-wrap:nowrap;
  overflow-x:auto;
  margin:0 0 7px;
  padding-bottom:2px;
  scrollbar-width:thin;
}
.recebimento-shell .quick-reply-btn,
.recebimento-shell .catalog-btn {
  flex:0 0 auto;
  padding:5px 9px;
  border:1px solid #d7e0e3;
  border-radius:14px;
  background:#fff;
  color:#54656f;
  font-size:.66rem;
  font-weight:500;
}
.recebimento-shell .quick-reply-btn:hover,
.recebimento-shell .catalog-btn:hover { background:#e9f7f2; border-color:#abd9ca; color:#08775b; }
.recebimento-shell .composer-input-area textarea {
  display:block;
  min-height:42px;
  max-height:110px;
  padding:11px 13px;
  border:0;
  border-radius:8px;
  background:#fff;
  color:#111b21;
  font-size:.82rem;
  box-shadow:0 1px 1px rgba(11,20,26,.08);
}
.recebimento-shell .composer-input-area textarea:focus { outline:1px solid #a5d9c8; box-shadow:none; }
.recebimento-shell .composer-actions { margin-top:6px; }
.recebimento-shell .send-btn {
  min-height:34px;
  padding:7px 15px;
  border-radius:6px;
  background:#00a884;
  font-size:.78rem;
  font-weight:600;
}
.recebimento-shell .send-btn:hover { background:#008f72; }
.recebimento-shell .send-btn:disabled {
  background:#cbd5d9;
  color:#6b7b83;
  cursor:not-allowed;
  box-shadow:none;
}
.recebimento-shell .details-panel { display:none; }
.recebimento-shell.show-details { grid-template-columns:minmax(270px, 320px) minmax(0,1fr) 260px; }
.recebimento-shell.show-details .details-panel {
  display:flex;
  min-width:0;
  height:100%;
  background:#fff;
  border-left:1px solid #e1e6e8;
}
.recebimento-shell .details-header { background:#f0f2f5; border-bottom:1px solid #e1e6e8; }
.recebimento-shell .details-title { color:#202c33; font-size:.88rem; }
.recebimento-shell .contact-card,
.recebimento-shell .detail-metric { border-color:#e4e9ec; border-radius:8px; box-shadow:none; }
.chat-back-btn { display:none; }

/* WhatsApp image viewer and lightweight editor */
.image-viewer {
  position:fixed;
  inset:0;
  width:100vw;
  max-width:none;
  height:100dvh;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  background:#0b1020;
  color:#f8fafc;
  overflow:hidden;
}
.image-viewer[open] { display:flex; flex-direction:column; }
.image-viewer::backdrop { background:#0b1020; }
.image-viewer-header { display:grid; grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr); align-items:center; gap:14px; min-height:64px; padding:9px 18px; background:#111a2c; border-bottom:1px solid rgba(203,213,225,.14); }
.image-viewer-title { display:flex; align-items:center; gap:9px; min-width:0; color:#f8fafc; font-size:.88rem; }
.image-viewer-title i { color:#60a5fa; font-size:1.05rem; }
.image-viewer-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.image-viewer-zoom { padding:4px 8px; border:1px solid rgba(203,213,225,.16); border-radius:14px; color:#cbd5e1; font-size:.68rem; }
.image-viewer-tools { display:flex; align-items:center; gap:3px; padding:5px 8px; border:1px solid rgba(203,213,225,.16); border-radius:24px; background:#1e293b; }
.image-viewer-tools button,.image-viewer-close,.image-edit-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-width:34px; height:32px; padding:0 9px; border:0; border-radius:18px; background:transparent; color:#e2e8f0; cursor:pointer; }
.image-viewer-tools button:hover,.image-viewer-close:hover { background:rgba(148,163,184,.16); }
.image-tool-separator { width:1px; height:22px; margin:0 4px; background:rgba(203,213,225,.2); }
.image-viewer-actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; }
.image-edit-button { padding:0 14px; background:#1677ff; color:white; font-size:.76rem; font-weight:700; }
.image-edit-button:hover { background:#0868e8; }
.image-viewer-close { border:1px solid rgba(226,232,240,.6); font-size:.76rem; }
.image-viewer-close kbd { color:#cbd5e1; font:inherit; }
.image-viewer-stage { display:flex; flex:1; min-height:0; align-items:center; justify-content:center; overflow:auto; padding:24px; }
.image-canvas-wrap { position:relative; display:flex; flex:0 0 auto; align-items:center; justify-content:center; max-width:100%; max-height:100%; }
#imageEditorCanvas { display:block; max-width:min(90vw,1400px); max-height:calc(100dvh - 150px); object-fit:contain; border-radius:5px; box-shadow:0 15px 50px rgba(0,0,0,.3); }
.image-crop-selection { position:absolute; z-index:1; border:2px solid #fff; outline:1px solid #1677ff; background:rgba(22,119,255,.14); pointer-events:none; }
.image-editor-panel { display:flex; align-items:center; gap:20px; padding:12px 18px; background:#111a2c; border-top:1px solid rgba(203,213,225,.14); }
.image-editor-hint { flex:1; color:#cbd5e1; font-size:.76rem; }
.image-editor-panel label { display:flex; align-items:center; gap:8px; color:#e2e8f0; font-size:.75rem; white-space:nowrap; }
.image-editor-panel input[type=range] { width:110px; accent-color:#1677ff; }
.image-editor-panel label span { width:34px; color:#94a3b8; }
.image-editor-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.image-editor-actions button { min-height:34px; padding:0 12px; border:1px solid rgba(203,213,225,.3); border-radius:6px; background:transparent; color:#e2e8f0; cursor:pointer; }
.image-editor-actions .image-save-button { border-color:#1677ff; background:#1677ff; color:#fff; font-weight:650; }
@media(max-width:760px) {
  .image-viewer-header { grid-template-columns:1fr auto; gap:8px; padding:8px 10px; }
  .image-viewer-title { grid-column:1; grid-row:1; }
  .image-viewer-tools { grid-column:1/-1; grid-row:2; justify-self:center; }
  .image-viewer-actions { grid-column:2; grid-row:1; }
  .image-edit-button { width:36px; padding:0; overflow:hidden; font-size:0; }
  .image-viewer-close { width:36px; padding:0; overflow:hidden; font-size:0; }
  .image-viewer-close kbd { display:none; }
  .image-viewer-stage { padding:12px; }
  #imageEditorCanvas { max-width:94vw; max-height:calc(100dvh - 220px); }
  .image-editor-panel { flex-wrap:wrap; gap:10px; padding:10px 12px; }
  .image-editor-hint { flex-basis:100%; }
  .image-editor-panel label { flex:1 1 42%; }
  .image-editor-actions { margin-left:0; }
}
@media(max-width:1100px) {
  .recebimento-shell { grid-template-columns:280px minmax(0,1fr); }
  .recebimento-shell.show-details { grid-template-columns:260px minmax(0,1fr) 230px; }
}
@media(max-width:920px) {
  html:has(body .recebimento-shell) { overflow-y:auto; }
  body:has(.recebimento-shell) { height:auto; min-height:100dvh; overflow:auto; }
  .main-content:has(.recebimento-shell) {
    height:auto;
    min-height:calc(100dvh - 150px);
    overflow:visible;
    padding:16px;
  }
  .main-content:has(.recebimento-shell) .topbar { margin-bottom:12px; }
  .content-area:has(.recebimento-shell) { overflow:visible; }
  .recebimento-shell {
    flex:none;
    height:calc(100dvh - 255px);
    min-height:460px;
    grid-template-columns:minmax(245px, 34%) minmax(0,1fr);
  }
  .recebimento-shell.show-details { grid-template-columns:minmax(230px, 31%) minmax(0,1fr) 220px; }
}
@media(max-width:640px) {
  .main-content:has(.recebimento-shell) { padding:12px; }
  .recebimento-shell { display:block; height:calc(100dvh - 235px); min-height:420px; }
  .recebimento-shell .conversations-panel,
  .recebimento-shell .chat-panel { width:100%; height:100%; }
  .recebimento-shell .chat-panel { display:none; }
  .recebimento-shell.chat-open .conversations-panel { display:none; }
  .recebimento-shell.chat-open .chat-panel { display:flex; }
  .recebimento-shell .chat-back-btn {
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    flex:0 0 32px;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#54656f;
  }
  .recebimento-shell .chat-user { flex:1; }
  .recebimento-shell .chat-user h4 { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .recebimento-shell .chat-actions .icon-btn:first-child { display:none; }
  .recebimento-shell .chat-actions .assume-btn { padding:7px 8px; font-size:.65rem; }
  .recebimento-shell .message-bubble { max-width:88%; }
  .recebimento-shell .quick-replies { max-width:100%; }
  .recebimento-shell.show-details { grid-template-columns:1fr; }
  .recebimento-shell.show-details .details-panel { display:none; }
}

.new-conversation-dialog {
  position:fixed;
  top:50%;
  left:50%;
  right:auto;
  bottom:auto;
  transform:translate(-50%, -50%);
  margin:0;
  width:min(680px, calc(100vw - 28px));
  max-width:none;
  max-height:min(760px, calc(100dvh - 36px));
  padding:0;
  overflow:hidden;
  border:1px solid #dfe5e8;
  border-radius:12px;
  background:#fff;
  color:#111b21;
  box-shadow:0 24px 80px rgba(11,20,26,.28);
}
.new-conversation-dialog[open] { display:flex; flex-direction:column; }
.new-conversation-dialog::backdrop { background:rgba(11,20,26,.48); backdrop-filter:blur(2px); }
.template-cost-dialog {
  position:fixed;
  top:50%; left:50%; right:auto; bottom:auto;
  transform:translate(-50%,-50%);
  width:min(430px,calc(100vw - 32px));
  max-width:none;
  margin:0;
  padding:25px;
  border:1px solid #e2e8ed;
  border-radius:16px;
  background:#fff;
  color:#172033;
  box-shadow:0 24px 80px rgba(11,20,26,.3);
}
.template-cost-dialog[open] { display:flex; flex-direction:column; align-items:stretch; }
.template-cost-dialog::backdrop { background:rgba(11,20,26,.56); backdrop-filter:blur(3px); }
.template-cost-icon { width:46px; height:46px; display:grid; place-items:center; margin:0 auto 13px; border-radius:14px; background:#fff3d7; color:#a86e00; font-size:1.15rem; }
.template-cost-dialog h2 { margin:0; color:#172033; font-size:1.12rem; text-align:center; }
.template-cost-intro { margin:7px 0 16px; color:#667085; font-size:.81rem; text-align:center; }
.template-cost-notice { display:flex; flex-direction:column; gap:5px; padding:13px 14px; border:1px solid #f0d79f; border-radius:10px; background:#fff9e9; }
.template-cost-notice strong { color:#805500; font-size:.82rem; }
.template-cost-notice span { color:#705f3c; font-size:.76rem; line-height:1.5; }
.template-cost-recipient { display:flex; justify-content:space-between; gap:12px; margin-top:13px; padding:10px 2px; color:#667085; font-size:.77rem; }
.template-cost-recipient strong { max-width:65%; overflow:hidden; color:#172033; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.template-cost-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:7px; }
.template-cost-actions button { min-height:39px; padding:0 14px; border:1px solid #dbe2e8; border-radius:8px; font-size:.79rem; font-weight:650; cursor:pointer; }
.template-cost-cancel { background:#fff; color:#52606d; }
.template-cost-confirm { display:inline-flex; align-items:center; gap:8px; border-color:#008f72 !important; background:#008f72; color:#fff; }
.new-conversation-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:20px 22px 15px;
  border-bottom:1px solid #e9edef;
}
.new-conversation-header h2 { margin:0 0 5px; color:#111b21; font-size:1.08rem; font-weight:650; }
.new-conversation-header p { margin:0; color:#667781; font-size:.8rem; }
.new-conversation-close {
  width:32px;
  height:32px;
  flex:0 0 32px;
  border:0;
  border-radius:50%;
  background:#f0f2f5;
  color:#54656f;
  cursor:pointer;
}
.new-conversation-search {
  display:flex;
  align-items:center;
  gap:9px;
  margin:14px 18px 10px;
  padding:0 12px;
  min-height:39px;
  border-radius:7px;
  background:#f0f2f5;
  color:#667781;
}
.new-conversation-search input {
  width:100%;
  height:39px;
  border:0;
  outline:0;
  background:transparent;
  color:#111b21;
  font-size:.82rem;
}
.manual-recipient { margin:0 18px 10px; border:1px solid #dfe8e4; border-radius:8px; background:#fbfdfc; }
.manual-recipient summary { display:flex; align-items:center; gap:9px; min-height:40px; padding:0 12px; color:#08775b; font-size:.8rem; font-weight:650; cursor:pointer; list-style:none; }
.manual-recipient summary::-webkit-details-marker { display:none; }
.manual-recipient summary::after { content:'+'; margin-left:auto; color:#667781; font-size:1.1rem; }
.manual-recipient[open] summary::after { content:'−'; }
.manual-recipient-form { display:flex; flex-direction:column; gap:10px; padding:0 12px 12px; }
.manual-recipient-form p { margin:0; color:#667781; font-size:.72rem; }
.manual-recipient-form label { display:flex; flex-direction:column; gap:5px; color:#52636b; font-size:.7rem; font-weight:600; }
.manual-recipient-form input { width:100%; min-width:0; height:36px; padding:0 9px; border:1px solid #d8e0e4; border-radius:6px; background:#fff; color:#111b21; font:inherit; font-size:.78rem; }
.manual-recipient-form input:focus { outline:1px solid #00a884; border-color:#00a884; }
.manual-recipient-fields { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.manual-recipient-submit { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:37px; border:0; border-radius:6px; background:#00a884; color:#fff; font-size:.78rem; font-weight:650; cursor:pointer; }
.manual-recipient-submit:disabled { opacity:.6; cursor:wait; }
.registered-client-list { flex:1; min-height:0; max-height:60dvh; overflow:auto; padding:0 10px 12px; }
.registered-client-state { padding:35px 15px; color:#667781; text-align:center; font-size:.84rem; }
.registered-client-state.error { color:#b4232f; }
.registered-client-send {
  width:100%;
  min-height:66px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid #eef0f2;
  background:#fff;
  color:#111b21;
  text-align:left;
  cursor:pointer;
}
.registered-client-send:hover:not(:disabled) { background:#f5f7f7; }
.registered-client-send:disabled { cursor:not-allowed; background:#fafbfb; }
.registered-client-avatar {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  flex:0 0 40px;
  border-radius:50%;
  background:#e7f4ef;
  color:#16825d;
  font-size:.9rem;
  font-weight:650;
}
.registered-client-info { display:flex; flex:1; min-width:0; flex-direction:column; gap:4px; }
.registered-client-name { overflow:hidden; color:#202c33; font-size:.82rem; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.registered-client-meta { overflow:hidden; color:#667781; font-size:.7rem; text-overflow:ellipsis; white-space:nowrap; }
.registered-client-status {
  padding:4px 7px;
  border-radius:12px;
  background:#fff4d6;
  color:#91620d;
  font-size:.63rem;
  white-space:nowrap;
}
.registered-client-status.approved { background:#e5f6ed; color:#167548; }
.registered-client-status.rejected { background:#fff0f0; color:#a63c42; }
.registered-client-send-icon { margin-left:4px; color:#00a884; font-size:.9rem; }
.registered-client-disabled-reason { color:#a14141; font-size:.65rem; white-space:nowrap; }
.registered-client-send.sending { opacity:.6; }
@media(max-width:640px) {
  .new-conversation-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); }
  .new-conversation-header { padding:16px 15px 13px; }
  .registered-client-send { gap:8px; padding:9px 7px; }
  .registered-client-status { display:none; }
  .registered-client-disabled-reason { max-width:100px; overflow:hidden; text-overflow:ellipsis; }
}




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

/* Dedicated layout for event client management and approvals */
.clients-page {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  color: #172033;
}
.clients-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 4px 2px 2px;
}
.clients-heading h1 {
  margin: 8px 0 5px;
  color: #172033;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.045em;
  font-weight: 760;
}
.clients-heading p { margin: 0; color: #667085; font-size: .94rem; }
.clients-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3569c8;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.clients-heading-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.clients-page .btn-back {
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 10px;
  color: #475467;
  background: #fff;
  border-color: #e2e8f0;
  font-size: .86rem;
}
.clients-page .btn-back:hover { color:#1d4ed8; transform:translateY(-1px); }
.clients-page .btn {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: .86rem;
  white-space: nowrap;
}
.clients-page .btn-primary {
  background: #2563eb;
  box-shadow: 0 5px 12px rgba(37,99,235,.18);
}
.clients-page .btn-primary:hover { background:#1d4ed8; transform:translateY(-1px); }
.clients-page .btn-success {
  background: #13865b;
  box-shadow: 0 5px 12px rgba(19,134,91,.15);
}
.clients-page .btn-success:hover { background:#0f704b; transform:translateY(-1px); }
.clients-page .stats-header-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.clients-page .stat-box {
  min-width: 0;
  min-height: 106px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(18,38,63,.035);
  backdrop-filter: none;
}
.clients-page .stat-box::before { width:3px; opacity:.8; }
.clients-page .stat-box > div:last-child { display:flex; flex-direction:column; gap:6px; min-width:0; }
.clients-page .stat-icon {
  width: 42px;
  height: 42px;
  display:grid;
  place-items:center;
  flex:0 0 42px;
  border-radius:12px;
  background:#eff6ff;
  color:#2563eb;
  font-size:1.15rem;
}
.clients-page .stat-box.pending .stat-icon { color:#b77913; background:#fff7e6; }
.clients-page .stat-box.approved .stat-icon { color:#13865b; background:#eaf7f0; }
.clients-page .stat-box.rejected .stat-icon { color:#c44949; background:#fff0f0; }
.clients-page .stat-box .title {
  color:#667085;
  font-size:.72rem;
  line-height:1.3;
  font-weight:700;
  letter-spacing:.045em;
}
.clients-page .stat-box .value {
  color:#172033;
  font-size:1.6rem;
  line-height:1;
  font-weight:750;
}
.clients-page .glass-panel {
  flex: initial;
  min-height: 0;
  overflow: hidden;
  border:1px solid #e5eaf1;
  border-radius:15px;
  background:#fff;
  box-shadow:0 5px 18px rgba(18,38,63,.045);
}
.clients-page .toolbar {
  padding:18px 20px 14px;
  background:#fff;
  border:0;
  gap:14px;
}
.clients-page .search-wrap {
  flex:1 1 340px;
  max-width:540px;
}
.clients-page .search-wrap input {
  height:44px;
  padding:10px 14px 10px 42px;
  border:1px solid #dce3ed;
  border-radius:10px;
  background:#fbfcfe;
  box-shadow:none;
  font-size:.88rem;
}
.clients-page .search-wrap input:focus {
  border-color:#78a3f5;
  background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}
.clients-page .search-wrap i { left:14px; color:#7b8798; }
.clients-page .toolbar-actions { gap:9px; }
.clients-page .filter-chips {
  align-items:center;
  gap:8px;
  padding:0 20px 16px;
  background:#fff;
  border-bottom:1px solid #e9edf3;
}
.clients-page .filter-chip {
  gap:7px;
  padding:7px 11px;
  border:1px solid #e5eaf1;
  border-radius:9px;
  background:#fff;
  box-shadow:none;
  color:#596579;
  font-size:.8rem;
  font-weight:650;
  transition:background .16s ease, border-color .16s ease, color .16s ease;
}
.clients-page .filter-chip:hover { transform:none; background:#f8faff; border-color:#cbd8ef; }
.clients-page .filter-chip .count {
  padding:2px 6px;
  background:#f0f2f6;
  color:#667085;
  font-size:.7rem;
}
.clients-page .filter-chip.active.all { background:#eff5ff; border-color:#cfe0ff; color:#2458aa; }
.clients-page .filter-chip.active.pending { background:#fff7e6; border-color:#f7dfa9; color:#95610c; }
.clients-page .filter-chip.active.approved { background:#eaf7f0; border-color:#c9ead8; color:#14734e; }
.clients-page .filter-chip.active.rejected { background:#fff0f0; border-color:#f3d0d0; color:#aa3939; }
.clients-page .filter-chip.active .count { background:rgba(255,255,255,.78); color:inherit; }
.clients-page .table-container { overflow:auto; min-height:0; }
.clients-page table {
  width:100%;
  min-width:900px;
  border-collapse:collapse;
  border-spacing:0;
}
.clients-page thead th {
  position:sticky;
  top:0;
  z-index:1;
  padding:12px 18px;
  background:#f8fafc;
  border-bottom:1px solid #e7ebf1;
  color:#737f91;
  text-align:left;
  font-size:.69rem;
  line-height:1.3;
  font-weight:750;
  letter-spacing:.075em;
}
.clients-page tbody td {
  padding:10px 16px;
  border-bottom:1px solid #eff2f6;
  color:#344054;
  font-size:.85rem;
  vertical-align:middle;
}
.clients-page tbody tr:last-child td { border-bottom:0; }
.clients-page tbody tr:hover td { background:#fbfcff; }
.clients-page .client-info { gap:11px; }
.clients-page .client-avatar {
  width:40px; height:40px; border-radius:11px;
  background:#eff5ff; color:#326ac5; font-size:1rem;
}
.clients-page .client-details { gap:3px; min-width:0; }
.clients-page .client-name { color:#202b3e; font-size:.88rem; font-weight:700; }
.clients-page .client-sub { color:#7a8595; font-size:.75rem; }
.clients-page .contact-info { gap:5px; font-size:.78rem; overflow-wrap:anywhere; }
.clients-page .contact-info span { gap:7px; color:#606d80; }
.clients-page .contact-info i { width:13px; color:#98a2b3; text-align:center; }
.clients-page .contact-empty { color:#98a2b3; }
.clients-page .pill { padding:5px 9px; font-size:.72rem; font-weight:700; }
.clients-page .pill.pending { background:#fff6df; color:#93600b; }
.clients-page .pill.approved { background:#e8f6ee; color:#14734e; }
.clients-page .pill.rejected { background:#fff0f0; color:#a83c3c; }
.clients-page .row-actions { justify-content:flex-end; gap:5px; }
.clients-page .btn-action-icon {
  width:32px; height:32px;
  border:1px solid #e7ebf1;
  border-radius:9px;
  background:#fff;
  color:#697586;
}
.clients-page .btn-action-icon:hover { transform:translateY(-1px); }
.clients-page .btn-action-icon.approve:hover { background:#eaf7f0; color:#14734e; border-color:#c9ead8; }
.clients-page .btn-action-icon.reject:hover,
.clients-page .btn-action-icon.destructive:hover { background:#fff0f0; color:#b23e3e; border-color:#f0d0d0; }
.clients-page .btn-action-icon.edit:hover { background:#eff5ff; color:#2458aa; border-color:#cfddf4; }
.clients-page .btn-action-icon.copy-client-link:hover { background:#f5f3ff; color:#6747b5; border-color:#dfd7f5; }
.clients-page .pagination-bar {
  padding:13px 18px;
  border-top:1px solid #edf0f4;
  background:#fff;
}
.clients-page .page-info { color:#717d8f; font-size:.78rem; font-weight:550; }
.clients-page .pagination { gap:5px; }
.clients-page .page-link {
  width:32px; height:32px;
  border-radius:8px;
  border-color:#e3e8ef;
  color:#526074;
  font-size:.8rem;
}
.clients-page .page-link.active { background:#2563eb; color:#fff; border-color:#2563eb; box-shadow:none; }
.clients-page .page-link.disabled { pointer-events:none; opacity:.4; }
.clients-page .empty-modern { padding:56px 20px; gap:10px; }
.clients-page .empty-modern i {
  width:56px; height:56px; display:grid; place-items:center;
  border-radius:16px; background:#f1f5fb; color:#7183a0; font-size:1.55rem;
}
.clients-page .empty-modern h3 { color:#263247; font-size:1.05rem; }
.clients-page .empty-modern p { color:#778397; font-size:.86rem; }
.clients-page ~ dialog,
dialog#dialog-add-client, dialog#dialog-edit-client {
  width:min(540px, calc(100vw - 28px));
  max-height:min(780px, calc(100vh - 28px));
  border:1px solid #e4e9f0;
  border-radius:17px;
  box-shadow:0 24px 80px rgba(17,30,52,.24);
}
dialog#dialog-add-client::backdrop, dialog#dialog-edit-client::backdrop {
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(3px);
}
dialog .dialog-header { padding:19px 22px; }
dialog .dialog-header h3 { color:#202b3e; font-size:1.05rem; }
dialog .dialog-body { padding:20px 22px; }
dialog .dialog-footer { padding:14px 22px; background:#fafbfd; }
dialog .form-grid { gap:14px; }
dialog .field { min-width:0; }
dialog .field label { display:block; margin-bottom:6px; color:#475467; font-size:.8rem; font-weight:650; }
dialog .field input { width:100%; min-height:41px; padding:9px 11px; border:1px solid #d9e0e9; border-radius:9px; }
@media (max-width: 900px) {
  .clients-page .stats-header-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .clients-page { gap:15px; }
  .clients-heading { align-items:stretch; flex-direction:column; gap:13px; }
  .clients-heading h1 { font-size:1.4rem; }
  .clients-heading p { font-size:.85rem; }
  .clients-heading-actions { display:flex; flex-wrap:wrap; }
  .clients-page .btn { width:auto; }
  .clients-page .stats-header-grid { gap:9px; }
  .clients-page .stat-box { min-height:87px; padding:12px 11px; gap:9px; }
  .clients-page .stat-icon { width:34px; height:34px; flex-basis:34px; border-radius:10px; font-size:1rem; }
  .clients-page .stat-box .title { font-size:.62rem; }
  .clients-page .stat-box .value { font-size:1.35rem; }
  .clients-page .toolbar { align-items:stretch; padding:14px 13px 11px; }
  .clients-page .search-wrap { min-width:0; max-width:none; }
  .clients-page .toolbar-actions { flex-direction:row; }
  .clients-page .toolbar-actions form { flex:1; }
  .clients-page .toolbar-actions .btn { width:100%; padding-inline:10px; font-size:.76rem; }
  .clients-page .filter-chips { flex-wrap:nowrap; overflow-x:auto; padding:0 13px 13px; }
  .clients-page .filter-chip { font-size:.75rem; padding:7px 9px; }
  .clients-page .table-container { -webkit-overflow-scrolling:touch; }
  .clients-page .pagination-bar { align-items:flex-start; flex-direction:column; gap:10px; padding:12px 13px; }
  .clients-page .pagination { flex-wrap:wrap; }
  dialog .dialog-header, dialog .dialog-body { padding-inline:16px; }
  dialog .dialog-footer { padding:12px 16px; }
}

/* Shared small-screen safeguards for admin and public pages. */
@media (max-width: 920px) {
  .main-content {
    width:100%;
    margin-left:0;
  }
  .main-content > *,
  .content-area > *,
  .main-content .panel,
  .main-content .panel-body,
  .main-content .card-body {
    min-width:0;
    max-width:100%;
  }
  .topbar,
  .topbar-actions {
    flex-wrap:wrap;
  }
  .topbar-actions {
    justify-content:flex-start;
  }
  .main-content .overview-grid,
  .main-content .event-insights {
    grid-template-columns:minmax(0, 1fr);
  }
  .main-content form,
  .main-content .toolbar,
  .main-content .toolbar-actions,
  .main-content .panel-header {
    min-width:0;
    flex-wrap:wrap;
  }
  .main-content .table-wrap,
  .main-content .table-container,
  .main-content .table-scroll,
  .main-content .audit-table-wrap {
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding:16px 12px 24px;
  }
  .topbar {
    align-items:flex-start;
    gap:12px;
  }
  .page-title,
  .topbar-actions {
    width:100%;
    min-width:0;
  }
  .topbar-actions {
    gap:7px;
  }
  .topbar-actions > * {
    max-width:100%;
  }
  .main-content .stats-grid {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
  }
  .main-content .stats-grid .stat-card {
    min-width:0;
    padding:14px 12px;
  }
  .main-content .form-grid {
    grid-template-columns:minmax(0, 1fr);
  }
  .main-content .panel-header,
  .main-content .panel-body,
  .main-content .card-body {
    padding:14px;
  }
  .main-content .panel-header {
    align-items:flex-start;
  }
  .main-content .panel-header > *,
  .main-content .toolbar > *,
  .main-content .toolbar-actions > * {
    min-width:0;
    max-width:100%;
  }
  .main-content table {
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .main-content th,
  .main-content td {
    overflow-wrap:anywhere;
  }
  .main-content input:not([type=checkbox]):not([type=radio]),
  .main-content select,
  .main-content textarea {
    min-width:0;
    max-width:100%;
  }
  .main-content button,
  .main-content .btn,
  .main-content .primary-btn,
  .main-content .primary-button {
    max-width:100%;
    white-space:normal;
  }

  body:not(:has(.sidebar)) {
    min-width:320px;
  }
  body:not(:has(.sidebar)) .container {
    padding:12px;
  }
  body:not(:has(.sidebar)) .app-header {
    flex-wrap:wrap;
    gap:10px;
  }
  body:not(:has(.sidebar)) .glass-card {
    padding:16px;
  }
  body:not(:has(.sidebar)) .form-grid,
  body:not(:has(.sidebar)) .overview-grid {
    grid-template-columns:minmax(0, 1fr);
  }
  body:not(:has(.sidebar)) input,
  body:not(:has(.sidebar)) select,
  body:not(:has(.sidebar)) textarea,
  body:not(:has(.sidebar)) button {
    max-width:100%;
  }
  body:not(:has(.sidebar)) pre,
  body:not(:has(.sidebar)) code {
    overflow-wrap:anywhere;
    white-space:pre-wrap;
  }
}




