﻿:root {
  --bg: #f4f0ea;
  --panel: #fffaf3;
  --dark: #22201d;
  --accent: #6a7a5a;
  --accent-2: #b18a3b;
  --muted: #7a746c;
  --ok: #4d7a5f;
  --warn: #b27a2a;
  --radius: 14px;
}
* { box-sizing: border-box; font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--dark); }
.page { min-height: 100vh; display: grid; gap: 16px; }
.auth-page { background: var(--bg); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 92vw); background: #fff; border: 1px solid #efe7db; border-radius: 18px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 14px 34px rgba(28, 25, 20, 0.12); }
.auth-head { display: grid; gap: 6px; text-align: center; }
.auth-head .logo { font-size: 20px; font-weight: 700; color: var(--dark); }
.auth-head .sub { font-size: 12px; color: var(--muted); }
.auth-brand-head { margin-bottom: 2px; }
.auth-brand-badge {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #ece3d7;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f9f5ee 100%);
}
.auth-brand-badge__logo {
  width: min(220px, 100%);
  aspect-ratio: 5 / 3;
  object-fit: contain;
  display: block;
}
.auth-brand-badge__placeholder {
  width: 92px;
  aspect-ratio: 5 / 3;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efe7db;
  color: var(--dark);
  font-size: 32px;
  font-weight: 700;
}
.auth-brand-badge__text {
  display: grid;
  gap: 4px;
  text-align: center;
}
.auth-brand-badge__text strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}
.auth-brand-badge__text span {
  font-size: 12px;
  color: var(--muted);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid #e6ddd0; }
.brand { font-weight: 700; font-size: 16px; }
.toplinks { display: inline-flex; gap: 10px; }
.toplinks a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 999px; }
.toplinks a.active { background: #efe7db; color: var(--dark); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 20px; }
.summary-grid.slim { padding: 0; }
.summary-grid.slim .summary-item { background: #f8faff; border-color: #e7e9f2; }
.list-title { font-weight: 600; color: var(--dark); }
.widget-list { display: grid; gap: 10px; }
.widget-list .list-item { background: #fff; border: 1px solid #e7e9f2; }
.summary-item { background: var(--panel); border: 1px solid #e6ddd0; border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; }
.summary-label { color: var(--muted); font-size: 12px; }
.summary-value { font-size: 20px; font-weight: 700; }
.summary-sub { color: var(--muted); font-size: 12px; }
.list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 20px 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: right; padding: 8px; border-bottom: 1px solid #efe7db; }
.invoice { background: #f6f1e9; border-radius: 12px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.invoice-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--muted); }
.invoice-items { display: grid; gap: 6px; border-top: 1px dashed #e0d6c9; padding-top: 8px; }
.invoice-item { display: flex; justify-content: space-between; font-size: 13px; }
.app {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 84px;
  --sidebar-current-width: var(--sidebar-width);
  --sidebar-transition: 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-height: 70px;
  display: grid;
  grid-template-columns: var(--sidebar-current-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr;
  min-height: 100vh;
  max-width: 100%;
  transition: grid-template-columns var(--sidebar-transition);
}
.topbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid #e6ddd0; }
.brand .logo { font-weight: 700; font-size: 18px; }
.brand .sub { color: var(--muted); font-size: 12px; }
.status { display: flex; gap: 10px; align-items: center; }
.notif { position: relative; }
.notif-btn { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; border: 1px solid #e6ddd0; background: #fff; cursor: pointer; position: relative; }
.notif-btn::-webkit-details-marker { display: none; }
.notif-btn svg { width: 18px; height: 18px; fill: #2a3242; }
.notif-badge { position: absolute; top: -6px; inset-inline-start: -6px; background: #c62828; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.notif-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(320px, 80vw); background: #fff; border: 1px solid #efe7db; border-radius: 14px; box-shadow: 0 12px 28px rgba(20, 24, 35, 0.12); padding: 10px; display: none; z-index: 100; }
.notif[open] .notif-panel { display: block; }
.notif-head { font-weight: 700; font-size: 13px; color: var(--dark); margin-bottom: 8px; }
.notif-item { border-top: 1px solid #f0e8dc; padding: 8px 0; display: grid; gap: 4px; }
.notif-item:first-of-type { border-top: none; padding-top: 0; }
.notif-item.is-unread { background: #f8fbff; border-radius: 12px; padding: 10px; margin-bottom: 6px; border: 1px solid #dce7fb; }
.notif-item.is-resolved { opacity: 0.78; }
.notif-meta,
.notif-time-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: space-between; }
.notif-title { font-weight: 600; font-size: 12.5px; color: var(--dark); }
.notif-msg { font-size: 12px; color: var(--muted); }
.notif-time { font-size: 11px; color: #9aa3b5; }
.notif-empty { font-size: 12px; color: var(--muted); padding: 6px 0; }
.notif-link { display: inline-flex; margin-top: 6px; font-size: 12px; color: var(--accent); }
.notif-inline-link { font-size: 11px; color: var(--accent); text-decoration: none; }
.notif-inline-link:hover { text-decoration: underline; }
.smart-alert-stack {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 18px;
  z-index: 2300;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 36px));
}
.smart-alert {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(28, 34, 48, 0.96);
  box-shadow: 0 16px 30px rgba(14, 18, 30, 0.28);
  border-inline-start: 4px solid #7ea7ff;
  animation: smart-alert-in 0.18s ease;
}
.smart-alert.is-warning { border-inline-start-color: #d4a754; }
.smart-alert.is-danger { border-inline-start-color: #eb7575; }
.smart-alert-title { font-size: 13px; font-weight: 700; }
.smart-alert-msg { font-size: 12px; color: rgba(255, 255, 255, 0.84); line-height: 1.7; }
.smart-alert.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.22s ease, transform 0.22s ease; }
@keyframes smart-alert-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang { display: inline-flex; gap: 6px; background: #efe7db; padding: 4px; border-radius: 999px; }
.lang a { text-decoration: none; font-size: 12px; padding: 4px 8px; border-radius: 999px; color: var(--dark); }
.lang a.active { background: #fff; }
.pill { padding: 6px 10px; border-radius: 999px; font-size: 12px; background: #ece4d7; }
.pill.ok { background: #e2f1e6; color: var(--ok); }
.pill.warn { background: #f5ead7; color: var(--warn); }
.pill.link-pill { text-decoration: none; color: var(--dark); }
.sidebar {
  grid-column: 1;
  grid-row: 2;
  width: var(--sidebar-width);
  background: #1f1c18;
  color: #f7f2ea;
  padding: calc(var(--topbar-height, 70px) + 16px) 16px 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  z-index: 220;
  transition: width var(--sidebar-transition), padding var(--sidebar-transition), box-shadow var(--sidebar-transition), opacity var(--sidebar-transition);
}
.nav-settings { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); position: sticky; bottom: 12px; background: inherit; }
.nav-settings .settings-cta { display: block; text-align: center; background: #2e2a24; color: #fff; font-weight: 600; }
.nav-settings .settings-cta:hover { background: #3a342c; }
.nav-settings .settings-cta.active { background: #d5b173; color: #1f1c18; }
.sidebar nav { display: grid; gap: 10px; }
.sidebar a { color: #d8d0c4; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.sidebar a.active { background: #2e2a24; color: #fff; }
.nav-text { flex: 1; }
.nav-badge { background: #c96b45; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.nav-soon { background: #2f2a24; color: #f7f2ea; font-size: 10px; padding: 2px 6px; border-radius: 999px; }
.nav-group summary, .nav-group > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::marker { content: ""; }
.nav-group summary::after { content: "▾"; font-size: 12px; opacity: 0.7; transition: transform 0.2s ease; }
.nav-group[open] summary::after { transform: rotate(180deg); }
.nav-group a.is-disabled { opacity: 0.6; cursor: not-allowed; }
.nav-sub { margin: 6px; background: #241f1a; border-radius: 10px; }
.nav-sub summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; background: #231f1a; font-weight: 600; font-size: 12.5px; color: #f1ede7; display: flex; align-items: center; gap: 8px; }
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub summary::after { content: "▾"; font-size: 11px; opacity: 0.7; margin-inline-start: auto; transition: transform 0.2s ease; }
.nav-sub[open] summary { background: #2f2a24; }
.nav-sub[open] summary::after { transform: rotate(180deg); }
.nav-sub-list { display: grid; gap: 6px; padding: 6px; }
.nav-sub-list a { margin: 0; padding: 8px 10px; background: #2a251f; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-sub-list a.active { background: #3a332c; color: #fff; }
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid #e6ddd0;
  background: #fff;
  color: #223048;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.sidebar-toggle:hover {
  background: #f6efe4;
  border-color: #dccbb4;
  box-shadow: 0 8px 18px rgba(20, 24, 35, 0.08);
  transform: translateY(-1px);
}
.sidebar-toggle.is-collapsed {
  background: #223048;
  border-color: #223048;
  color: #eef3ff;
}
.sidebar-toggle-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 15px;
  line-height: 1;
}
.sidebar-toggle-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sidebar-backdrop { display: none; }
.app.sidebar-collapsed {
  --sidebar-current-width: var(--sidebar-collapsed-width);
}
.app.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding-inline: 10px;
  box-shadow: 0 12px 26px rgba(12, 18, 30, 0.12);
}
.app.sidebar-collapsed.sidebar-peek .sidebar,
.app.sidebar-collapsed .sidebar:hover,
.app.sidebar-collapsed .sidebar:focus-within {
  width: var(--sidebar-width);
  padding-inline: 16px;
}

.topbar-quick { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar-quick .quick-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--dark); background: #efe7db; border: 1px solid #e6ddd0; transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.topbar-quick .quick-btn:hover { background: #f4ecdf; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20, 24, 35, 0.12); }
.topbar-quick .quick-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.topbar-quick .quick-btn.primary:hover { background: #5b6c4d; }
.topbar-quick .quick-drop { position: relative; }
.topbar-quick .quick-drop summary { list-style: none; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--dark); font-size: 12px; font-weight: 600; background: #efe7db; border: 1px solid #e6ddd0; }
.topbar-quick .quick-drop summary::-webkit-details-marker { display: none; }
.topbar-quick .quick-drop summary::after { content: "▾"; font-size: 12px; opacity: 0.8; transition: transform 0.2s ease; }
.topbar-quick .quick-drop[open] summary::after { transform: rotate(180deg); }
.topbar-quick .quick-drop-list { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 220px; background: #fffaf3; border: 1px solid #e6ddd0; border-radius: 12px; padding: 8px; box-shadow: 0 12px 24px rgba(20, 24, 35, 0.12); display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; z-index: 200; }
.topbar-quick .quick-drop[open] .quick-drop-list { display: grid; }
.topbar-quick .quick-drop-list .quick-btn { background: #f5efe6; }
.content {
  grid-column: 2;
  grid-row: 2;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-items: start;
  gap: 20px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.content.pos-page { height: calc(100vh - 70px); overflow: auto; background: #f3f6fb; }
.dashboard-page { max-width: 100%; width: 100%; margin: 0; }
.dashboard-page > section { scroll-margin-top: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.kpi { background: var(--panel); padding: 16px; border-radius: var(--radius); border: 1px solid #e6ddd0; }
.kpi-title { color: var(--muted); font-size: 12px; }
.kpi-value { font-size: 24px; font-weight: 700; margin: 6px 0; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--panel); padding: 16px; border-radius: var(--radius); border: 1px solid #e6ddd0; }
.card-title { font-weight: 700; margin-bottom: 12px; }
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.staff { padding: 10px; border-radius: 10px; font-size: 13px; }
.staff.working { background: #e2f1e6; color: var(--ok); }
.staff.idle { background: #f0efe9; color: var(--muted); }
.staff.break { background: #f5ead7; color: var(--warn); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-actions button { padding: 12px; border-radius: 12px; border: none; background: #efe7db; cursor: pointer; }
.activity { display: grid; gap: 10px; }
.activity-item { display: grid; grid-template-columns: 70px 1fr 80px; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: #f6f1e9; }
.badge { background: #e8dfd1; padding: 4px 8px; border-radius: 8px; font-size: 12px; }
.time { color: var(--muted); font-size: 12px; }
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.zone { background: var(--panel); padding: 12px; border-radius: var(--radius); border: 1px solid #e6ddd0; display: grid; gap: 8px; }
.zone-title { font-weight: 700; }
.chair { padding: 10px; border-radius: 10px; }
.chair.busy { background: #f5ead7; color: var(--warn); }
.chair.idle { background: #e2f1e6; color: var(--ok); }
.chair.clean { background: #ece9e4; color: var(--muted); }
.pos { grid-template-columns: 1.2fr 1fr; }
.pos-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item { padding: 12px; border: none; border-radius: 10px; background: #efe7db; cursor: pointer; }
.invoice { display: grid; gap: 8px; }
.invoice .row { display: flex; justify-content: space-between; }
.invoice .items { border-top: 1px dashed #e0d6c9; border-bottom: 1px dashed #e0d6c9; padding: 8px 0; }
.invoice .total { font-weight: 700; font-size: 16px; }
.pos-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.pos-actions button { padding: 12px; border-radius: 12px; border: none; background: #efe7db; cursor: pointer; }
.pos-actions .primary { background: var(--accent); color: #fff; }
.app.ltr .sidebar { grid-column: 1; }
.app.ltr .content { direction: ltr; }
.app.ltr .activity-item { grid-template-columns: 80px 1fr 70px; }
.app.ltr .staff-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; grid-template-rows: var(--topbar-height) auto; }
  .content { grid-column: 1; grid-row: 2; }
  .app.sidebar-collapsed {
    --sidebar-current-width: var(--sidebar-width);
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-row: 2;
    grid-column: 1;
    position: fixed;
    top: var(--topbar-height, 70px);
    bottom: 0;
    width: min(320px, 86vw);
    height: auto;
    overflow-y: auto;
    z-index: 300;
    transition: transform 0.25s ease;
    box-shadow: none;
    width: min(320px, 86vw);
  }
  .app.ltr .sidebar { transform: translateX(-100%); inset-inline-start: 0; }
  .app:not(.ltr) .sidebar { transform: translateX(100%); inset-inline-start: 0; }
  .app.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-height, 70px) 0 0 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 250;
  }
  .app.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-toggle { display: inline-flex; }
  .sidebar-edge-toggle { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .list-grid { grid-template-columns: 1fr; }
  .bookings-shell { grid-template-columns: 1fr; }
  .bookings-side .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-breakdown { grid-template-columns: 1fr; }
  .bookings-duo { grid-template-columns: 1fr; }
  .settings-panels { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .pro-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-grid { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sidebar-toggle {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }
  .sidebar-toggle-label {
    display: none;
  }
}
@media (max-width: 640px) {
  .bookings-side .kpi-grid { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: 1fr; }
}

.nav-groups { display: grid; gap: 10px; }
.nav-group { border-radius: 12px; background: #2a251f; padding: 6px; }
.nav-group summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 13px; color: #f1ede7; padding: 10px 12px; border-radius: 10px; background: #241f1a; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group[open] summary { background: #2f2a24; }
.nav-group > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: #d8d0c4; }
.nav-group > a.active { background: #3a332c; color: #fff; }
.nav-group > a:hover { background: #2f2a24; }

/* Dashboard modern layout */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header.compact { margin-bottom: 4px; }
.page-header h1 { margin: 0; font-size: 24px; }
.page-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.page-header-meta { display: flex; gap: 8px; }
.search-form { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.search-form input[type="search"] {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fff;
  min-width: 220px;
}
.ai-section {
  grid-column: 1 / -1;
  background: #f8faff;
  border: 1px dashed #dbe3ff;
  border-radius: 12px;
  padding: 10px 12px;
}
.page-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 6px 0 10px; width: 100%; }
.nav-pill { border: 1px solid #e6ddd0; background: #fff; color: var(--dark); padding: 6px 12px; border-radius: 999px; font-size: 12px; text-decoration: none; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; display: flex; align-items: center; justify-content: center; text-align: center; font: inherit; appearance: none; }
.nav-pill:hover { background: #f7f2ea; transform: translateY(-1px); }
.nav-pill:active { transform: translateY(0); }
.nav-pill:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(106, 122, 90, 0.18); }
.nav-pill.is-active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 20px rgba(106, 122, 90, 0.18); }
.dashboard-page .page-header { background: #fff; border: 1px solid #efe7db; border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(28, 25, 20, 0.06); width: 100%; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-grid.compact { margin-top: 4px; }
.kpi-card { position: relative; background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(28, 25, 20, 0.08); padding: 12px 14px; display: grid; gap: 6px; border: 1px solid #efe7db; min-height: 96px; }
.kpi-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(28, 25, 20, 0.12); }
.kpi-card.is-link { text-decoration: none; color: inherit; }
.kpi-link-hint { font-size: 11px; color: var(--accent); font-weight: 700; }
.kpi-icon { position: absolute; top: 10px; inset-inline-start: 12px; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; background: #f5efe6; opacity: 0.85; }
.kpi-icon svg { width: 16px; height: 16px; fill: #6a7a5a; }
.kpi-icon.kpi-revenue { background: #eef6f1; }
.kpi-icon.kpi-revenue svg { fill: #4d7a5f; }
.kpi-icon.kpi-bookings { background: #f2ecdf; }
.kpi-icon.kpi-bookings svg { fill: #b18a3b; }
.kpi-icon.kpi-sessions { background: #eef2f8; }
.kpi-icon.kpi-sessions svg { fill: #5b6d8f; }
.kpi-icon.kpi-customers { background: #f7eef2; }
.kpi-icon.kpi-customers svg { fill: #8a4b6a; }
.kpi-content { padding-inline-start: 44px; }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.kpi-sub { color: var(--muted); font-size: 11px; }

.card { background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(28, 25, 20, 0.06); border: 1px solid #efe7db; max-width: 100%; min-width: 0; }
.card.compact { padding: 12px 14px; }
.card:hover { box-shadow: 0 10px 28px rgba(28, 25, 20, 0.08); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-header.has-sub { align-items: flex-start; }
.card-title-block { display: grid; gap: 4px; }
.subtle { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.card-header h2 { margin: 0; font-size: 15px; letter-spacing: 0.2px; }
.link { text-decoration: none; color: var(--accent); font-size: 12px; }

.quick-actions { padding: 12px 14px; }
.quick-actions .card-header { margin-bottom: 8px; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qa-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #f7f3ed; text-decoration: none; color: var(--dark); font-size: 12px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.qa-btn:hover { transform: translateY(-1px); background: #efe7db; box-shadow: 0 6px 14px rgba(28, 25, 20, 0.1); }
.qa-btn.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(47, 111, 237, 0.22); }
.qa-btn.primary:hover { background: #275fd1; box-shadow: 0 12px 24px rgba(47, 111, 237, 0.28); }
.qa-btn.primary .qa-icon { background: rgba(255, 255, 255, 0.18); box-shadow: none; }
.qa-btn.primary .qa-icon svg { fill: #fff; opacity: 0.95; }
.qa-icon { width: 24px; height: 24px; border-radius: 8px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(28, 25, 20, 0.08); }
.qa-icon svg { width: 14px; height: 14px; fill: #6a7a5a; opacity: 0.9; }

.dashboard-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.dashboard-grid.compact { margin-top: 4px; }
.dashboard-page .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-page .page-header { margin-bottom: 4px; }
.settings-page .alert { margin-bottom: 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.settings-grid .card { padding: 14px; }
.settings-grid .table.compact th,
.settings-grid .table.compact td { padding: 6px 8px; font-size: 12px; }
.settings-hero { padding: 16px; display: grid; gap: 12px; }
.settings-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.settings-kpi-grid .kpi { border: 1px solid #efe7db; }
.settings-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; position: sticky; top: 74px; z-index: 3; background: #fbf7f0; padding: 10px; border: 1px solid #efe7db; border-radius: 14px; }
.settings-tab { appearance: none; border: 1px solid #e6ddd0; background: #fff; color: var(--dark); padding: 10px 12px; border-radius: 14px; display: grid; gap: 4px; text-align: right; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.settings-tab:hover { background: #f7f3ed; border-color: #ddcfbb; transform: translateY(-1px); }
.settings-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(106, 122, 90, 0.18); }
.settings-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(106, 122, 90, 0.18); }
.settings-tab-label { font-size: 13px; font-weight: 700; line-height: 1.25; }
.settings-tab-sub { font-size: 11px; color: var(--muted); line-height: 1.3; }
.settings-tab.is-active .settings-tab-sub { color: rgba(255, 255, 255, 0.85); }
.dashboard-custom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.dash-section { border: 1px solid #efe7db; border-radius: 12px; padding: 12px; background: #fff; display: grid; gap: 10px; }
.dash-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dash-section-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-head { font-weight: 700; font-size: 13px; color: var(--dark); }
.dash-list { display: grid; gap: 8px; }
.dash-item { display: grid; grid-template-columns: 18px 1fr 60px; gap: 8px; align-items: center; background: #f9f5ef; border: 1px solid #efe7db; padding: 8px 10px; border-radius: 10px; font-size: 12px; }
.dash-item input[type="checkbox"] { transform: translateY(1px); }
.dash-item-toggle { grid-template-columns: 18px 1fr auto; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.dash-item-toggle.is-enabled { background: #f6fbf8; border-color: #cfe8db; box-shadow: 0 8px 18px rgba(39, 94, 71, 0.08); }
.dash-state { min-width: 54px; text-align: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; background: #efe8db; color: #7b6c57; }
.dash-item-toggle.is-enabled .dash-state { background: #dff4ea; color: #167a57; }
.dash-order { width: 60px; padding: 6px 6px; border-radius: 8px; border: 1px solid #e6ddd0; text-align: center; background: #fff; }
.pro-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.pro-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #efe7db; text-decoration: none; color: var(--dark); font-size: 12.5px; font-weight: 600; }
.pro-btn:hover { background: #f7f3ed; }
.pro-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pro-btn.primary:hover { background: #5b6c4d; }
.settings-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.settings-panel.is-active { animation: settings-panel-in 0.18s ease; }
.feature-group { display: grid; gap: 8px; margin-top: 8px; }
.feature-group-title { font-weight: 700; font-size: 13px; color: var(--dark); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.feature-card { border: 1px solid #efe7db; border-radius: 12px; padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: #fff; }
.feature-title { font-weight: 600; font-size: 12.5px; }
.feature-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #e0d7c8; border-radius: 999px; transition: background 0.2s ease; }
.switch .slider::before { position: absolute; content: ""; height: 18px; width: 18px; inset-inline-start: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 4px 10px rgba(20, 24, 35, 0.15); transition: transform 0.2s ease; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.users-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 14px; }
.users-list { display: grid; gap: 10px; }
.user-card { border: 1px solid #efe7db; border-radius: 12px; padding: 10px; background: #fff; display: grid; gap: 8px; }
.user-main { display: grid; gap: 4px; }
.user-name { font-weight: 700; font-size: 13px; }
.user-meta { font-size: 11.5px; color: var(--muted); }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.user-actions .reset-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.user-actions input[type="password"] { border: 1px solid #e6ddd0; border-radius: 10px; padding: 6px 8px; font-size: 12px; min-width: 140px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.check-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #f7f3ed; border: 1px solid #efe7db; font-size: 12px; color: var(--dark); }
.check-pill input { accent-color: var(--accent); }
.check-pill.is-locked { background: #eef4ec; border-color: #d3e2cf; }
.check-note { font-size: 10px; color: var(--accent); font-weight: 700; }
.role-grid { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; }
.role-list { display: grid; gap: 10px; }
.role-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.role-card { border: 1px solid #efe7db; border-radius: 12px; padding: 10px; background: #faf7f2; display: grid; gap: 8px; }
.role-card.active { border-color: var(--accent); background: #f1efe9; }
.role-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.role-name { font-weight: 700; font-size: 13px; }
.role-name-link { font-weight: 700; font-size: 14px; color: var(--dark); text-decoration: none; }
.role-name-link:hover { color: var(--accent); }
.role-meta { font-size: 11px; color: var(--muted); }
.role-desc { font-size: 11.5px; color: var(--muted); }
.role-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.role-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.perm-group { border: 1px solid #efe7db; border-radius: 12px; padding: 10px; background: #fff; display: grid; gap: 6px; }
.perm-title { font-weight: 700; font-size: 12px; }
.perm-item { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.perm-item input { accent-color: var(--accent); }
.role-modal { width: min(760px, 94vw); }
.role-permissions-modal { width: min(1120px, 96vw); }
.settings-section { display: grid; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.zone-card { background: #fff; border-radius: 14px; border: 1px solid #efe7db; padding: 12px; display: grid; gap: 10px; align-content: start; align-self: start; }
.zone-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zone-title { font-weight: 700; color: var(--dark); font-size: 14px; }
.zone-sub { font-size: 12px; color: var(--muted); }
.zone-modal { width: min(720px, 94vw); }
.zone-card .table-wrap { max-height: 240px; overflow: auto; }
.zone-card .table.compact th,
.zone-card .table.compact td { padding: 6px 8px; font-size: 12px; }
.zone-card .table.compact td .dot { margin-inline-end: 6px; }
.chair-section-form { display: flex; align-items: center; gap: 6px; min-width: 170px; }
.chair-section-input {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid #e7ded0;
  background: #fffdf8;
  font-size: 12px;
}
.table-wrap { overflow-x: auto; max-width: 100%; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; table-layout: auto; }
.table th, .table td { text-align: right; padding: 7px 10px; border-bottom: 1px solid #f1e9dd; white-space: nowrap; }
.table td .text-wrap, .table th .text-wrap { white-space: normal; }
.table thead th { color: var(--muted); font-weight: 600; background: #f7f3ed; position: sticky; top: 0; z-index: 1; }
.table tbody tr:nth-child(even) { background: #faf7f2; }
.table tbody tr:hover { background: #f1e9dd; }
.muted { color: var(--muted); }
.is-hidden { display: none !important; }

.badge { background: #efe7db; color: #6a5b46; padding: 3px 8px; border-radius: 999px; font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.badge.success { background: #e6f4ea; color: #3c6b4e; }
.badge.warn { background: #f8efd8; color: #8a6a2a; }
.badge.info { background: #e7eef8; color: #45618a; }
.badge.danger { background: #f7e4e4; color: #8a4b4b; }

.activity-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.settings-panel[hidden] { display: none !important; }

@keyframes settings-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.activity-list li { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: start; padding: 8px 10px; background: #faf7f2; border-radius: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #d2c6b4; margin-top: 6px; }
.dot.success { background: #4d7a5f; }
.dot.warn { background: #b27a2a; }
.dot.info { background: #4e6fa5; }

/* POS modern layout */
.pos-page { max-width: 1200px; margin: 0 auto; font-family: "Cairo", "Tajawal", "Noto Kufi Arabic", "Segoe UI", sans-serif; }
.app.pos-full .pos-page { max-width: none; width: 100%; margin: 0; }
.pos-header { display: block; background: #ffffff; border-radius: 22px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(23, 32, 55, 0.08); border: 1px solid #e7ecf5; }
.pos-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 18px; align-items: stretch; }
.pos-title h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.pos-title p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; max-width: 620px; }
.pos-title-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pos-overview-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pos-overview-card { border: 1px solid #e8edf7; border-radius: 18px; padding: 14px 16px; background: linear-gradient(180deg, #fcfdff 0%, #f5f8fc 100%); display: grid; gap: 6px; }
.pos-overview-card span { color: #6c7690; font-size: 12px; font-weight: 700; }
.pos-overview-card strong { color: #182035; font-size: 28px; line-height: 1; }
.pos-overview-card small { color: #8b94a8; font-size: 12px; }
.pos-section { border: 1px solid #e7ecf5; background: #f9fbff; border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.pos-section-title { font-size: 13px; font-weight: 700; color: var(--dark); }
.served-section .activity-list li { background: #f8faff; }
.pos-title-top { display: flex; align-items: center; gap: 10px; }
.pos-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos-shell { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(360px, 520px); gap: 16px; align-items: start; height: calc(100vh - 220px); overflow: hidden; margin-top: 14px; }
.pos-catalog { padding: 14px 16px; border-radius: 18px; background: #ffffff; border: 1px solid #e7ecf5; box-shadow: 0 12px 28px rgba(23, 32, 55, 0.06); }
.pos-catalog { height: 100%; overflow: auto; }
.pos-panel { height: 100%; overflow: auto; border-radius: 18px; background: #ffffff; border: 1px solid #e7ecf5; box-shadow: 0 12px 28px rgba(23, 32, 55, 0.06); }
.pos-catalog-header { display: grid; gap: 10px; }
.pos-catalog-headline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 14px; align-items: center; }
.pos-catalog-headline h2 { margin: 0; font-size: 18px; }
.pos-catalog-empty { min-height: 220px; border: 1px dashed #dce3f2; border-radius: 18px; background: linear-gradient(180deg, #fbfcff 0%, #f5f8fd 100%); display: grid; place-items: center; text-align: center; gap: 8px; padding: 20px; color: #6b7487; }
.pos-catalog-empty strong { color: #182035; font-size: 18px; }
.pos-search input {
  width: 100%;
  border: 1px solid #e0e6f5;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  background: #f8faff;
}
.pos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #e2e7f3;
  background: #f7f9ff;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.chip.active { background: #eef2ff; color: #2f6fed; border-color: #dfe6ff; }
.pos-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.pos-service-card {
  border: 1px solid #e7e9f2;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
  text-align: right;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pos-service-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(32, 46, 80, 0.08); border-color: #dfe6ff; }
.pos-service-name { font-weight: 600; font-size: 13px; color: var(--dark); }
.pos-service-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-service-price { font-weight: 700; color: var(--dark); font-size: 13px; }
.pos-service-add { color: var(--accent); font-size: 11px; font-weight: 600; }

.pos-panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--topbar-height, 70px) + 14px); }
.pos-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pos-panel-head h2 { margin: 0; font-size: 17px; }
.pos-panel-meta { background: #eef2ff; color: #2f436f; padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.pos-customer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e7ecf5; background: #fff; border-radius: 14px; padding: 10px 12px; }
.pos-customer-info { display: grid; gap: 4px; }
.pos-customer-name { font-weight: 700; font-size: 14px; }
.pos-customer-meta { font-size: 12px; color: var(--muted); }
.customer-modal .pos-panel-fields { margin-top: 6px; }
.customer-modal .form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.pos-panel-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pos-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.inline-group { display: grid; grid-template-columns: 1fr 80px; gap: 6px; }
.inline-group select { border: 1px solid #e2e7f3; border-radius: 12px; padding: 10px 12px; background: #fff; font-size: 13px; }
.pos-add-custom { display: grid; grid-template-columns: 1.2fr 1fr 0.6fr auto; gap: 10px; align-items: end; background: #f8faff; border: 1px dashed #dfe6ff; border-radius: 12px; padding: 10px; }
.pos-items { background: #f8faff; border: 1px solid #e7e9f2; border-radius: 12px; padding: 12px; min-height: 260px; display: grid; gap: 10px; grid-template-columns: 1fr; flex: 1; overflow: auto; }
.pos-empty { display: grid; gap: 6px; text-align: center; color: var(--muted); padding: 16px 10px; }
.pos-empty-icon { width: 46px; height: 46px; border-radius: 14px; background: #eef2ff; display: grid; place-items: center; margin: 0 auto; }
.pos-empty-icon svg { width: 20px; height: 20px; fill: #2f6fed; }
.pos-item-row { background: #fff; border: 1px solid #e7e9f2; border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.pos-item-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pos-item-name { font-weight: 700; font-size: 14px; }
.pos-item-sub { font-size: 12px; color: var(--muted); }
.pos-item-total { font-weight: 700; font-size: 14px; }
.pos-item-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pos-item-qty { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

.pos-member-panel { display: none; border: 1px solid #e7e9f2; background: #f9fbff; border-radius: 12px; padding: 10px; gap: 8px; margin-bottom: 10px; }
.pos-member-panel.open { display: grid; }
.pos-member-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pos-member-head h3 { margin: 0; font-size: 14px; }
.pos-member-form { display: grid; gap: 8px; }

.pos-drawer { position: fixed; inset: 0; display: none; align-items: stretch; justify-content: flex-end; z-index: 50; }
.pos-drawer.open { display: flex; }
.pos-drawer-backdrop { flex: 1; background: rgba(15, 18, 28, 0.45); }
.pos-drawer-panel { width: min(420px, 95vw); background: #fff; padding: 16px; display: grid; gap: 10px; overflow: auto; }
.pos-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eef1f8; padding-bottom: 8px; }
.pos-drawer-head h3 { margin: 0; font-size: 16px; }
.pos-drawer-search input {
  width: 100%;
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  background: #f8faff;
}

.icon-btn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid #e2e7f3; background: #fff; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: #f2f5ff; color: var(--dark); }

.pos-member-list { display: grid; gap: 8px; }
.pos-member-list h4 { margin: 0; font-size: 13px; }
.table.compact th, .table.compact td { padding: 6px 8px; font-size: 12px; }

.pos-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 12px; }
.pos-stack { display: grid; gap: 12px; }
.pos-services .table-wrap { max-height: 420px; overflow: auto; border-radius: 12px; border: 1px solid #eef1f8; }
.pos-services .table thead th { position: sticky; top: 0; z-index: 1; }
.pos-invoice-list { display: grid; gap: 10px; }
.pos-invoice { background: #f8faff; border-radius: 12px; padding: 10px 12px; border: 1px solid #e7e9f2; display: grid; gap: 8px; }
.pos-invoice-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pos-invoice-meta { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.pos-invoice-id { background: #eef2ff; color: #2f436f; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.pos-invoice-customer { color: var(--dark); font-size: 13px; }
.pos-invoice-total { font-weight: 700; font-size: 13px; color: var(--dark); }
.pos-invoice-items { border-top: 1px dashed #e2e7f3; padding-top: 8px; display: grid; gap: 6px; }
.pos-invoice-item { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--dark); }

.pos-checkout .card-header { margin-bottom: 10px; }
.pos-form { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-section { grid-column: 1 / -1; border-top: 1px dashed #e6ddd0; padding-top: 8px; margin-top: 6px; }
.form-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.form-section h3 { margin: 0; font-size: 13px; color: var(--dark); }
.form-section .subtle { margin: 4px 0 0; }
.field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.field input,
.field select,
.field textarea {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
}
.pos-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; align-items: end; }
.pos-items-table { max-height: 260px; }
.pos-items-table .table thead th { background: #f2f5ff; }
.pos-summary { border-top: 1px dashed #e2e7f3; padding-top: 8px; display: grid; gap: 6px; }
.pos-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--dark); }
.pos-summary-row.total { font-size: 14px; font-weight: 700; }
.pos-total { font-size: 18px; font-weight: 700; }
.pos-change { font-size: 14px; color: var(--accent); font-weight: 600; }
.pos-actions { display: grid; gap: 8px; margin-top: 8px; }
.pos-checkout-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e7e9f2; padding: 12px 0 8px; margin-top: 8px; box-shadow: 0 -10px 24px rgba(32, 46, 80, 0.08); z-index: 4; }
.pos-checkout-bar .pos-summary { border-top: none; padding-top: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.pos-checkout-bar .pos-summary-row { font-size: 12px; }
.pos-checkout-bar .pos-summary-row.total { font-size: 14px; font-weight: 700; }
.pos-checkout-bar .pos-actions { margin-top: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* POS full-width layout */
.app.pos-full { grid-template-columns: 1fr; }
.app.pos-full .sidebar { display: none; }
.app.pos-full .topbar { grid-column: 1 / -1; }
.app.pos-full .content { grid-column: 1 / -1; }
.app.pos-full .content.pos-page { padding: 0; }
.app.pos-full .pos-shell { grid-template-columns: minmax(0, 0.9fr) minmax(0, 520px); }
.app.pos-full .pos-shell { width: 100%; max-width: none; margin: 0; }
.zone-compact-view { background: linear-gradient(180deg, #f7f1e7 0%, #f2ece2 100%); }
.app.zone-compact-shell { display: block; min-height: 100vh; }
.app.zone-compact-shell .content { grid-column: 1 / -1; grid-row: 1; padding: 18px; }
.departments-page.zone-compact-page { gap: 16px; }
.zone-compact-header { background: #fffaf3; border: 1px solid #e6ddd0; border-radius: 18px; padding: 16px 18px; }
.zone-compact-header h1 { font-size: 28px; }
.zone-compact-header p { margin-top: 4px; }
.zone-compact-page .card { box-shadow: 0 10px 24px rgba(28, 25, 20, 0.06); }
.zone-compact-page .card-header { align-items: center; }
.departments-page.zone-compact-page {
  gap: 16px;
  height: auto;
  overflow: visible;
}
.departments-page.zone-compact-page .page-header-meta {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}
.zone-compact-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.zone-compact-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.zone-compact-logout {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, #223048, #101a28);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(16, 26, 40, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.zone-compact-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 26, 40, 0.28);
}
.zone-compact-logout svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.zone-compact-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e2d4bf;
  box-shadow: 0 8px 18px rgba(28, 25, 20, 0.06);
}
.zone-compact-brand-mark {
  width: 68px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dfcfb5;
  flex-shrink: 0;
  display: block;
}
img.zone-compact-brand-mark {
  object-fit: contain;
  padding: 6px;
}
.zone-compact-brand-mark.is-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 22px;
  font-weight: 800;
  color: #233048;
  background: linear-gradient(135deg, #f8efe1, #ead7bb);
}
.zone-compact-brand-copy {
  display: grid;
  gap: 3px;
  text-align: right;
}
.zone-compact-brand-copy strong {
  font-size: 17px;
  line-height: 1.1;
  color: #182233;
}
.zone-compact-brand-copy span {
  font-size: 11px;
  color: #8b7c66;
}
.zone-promo-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 48, 72, 0.96), rgba(20, 30, 44, 0.96));
  color: #f7f2ea;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(17, 25, 38, 0.16);
  overflow: hidden;
}
.zone-promo-strip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.zone-promo-marquee {
  min-width: 0;
  overflow: hidden;
}
.zone-promo-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  animation: zonePromoMarquee 28s linear infinite;
}
.zone-promo-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8efe2;
  font-size: 13px;
  white-space: nowrap;
}
.zone-promo-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d5b173;
  box-shadow: 0 0 0 4px rgba(213, 177, 115, 0.16);
}
.zone-screensaver {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(13, 22, 36, 0.88), rgba(30, 21, 15, 0.8)),
    var(--zone-screensaver-image, linear-gradient(135deg, #24354f, #614632));
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(4px);
}
.zone-screensaver.is-visible {
  display: flex;
}
.zone-screensaver-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(213, 177, 115, 0.24), transparent 30%);
}
.zone-screensaver-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  display: grid;
  gap: 18px;
  padding: 32px 34px;
  border-radius: 28px;
  background: rgba(14, 20, 31, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  color: #f8f3ea;
  text-align: center;
}
.zone-screensaver-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0 auto;
}
.zone-screensaver-brand-mark {
  width: 5cm;
  height: 3cm;
  max-width: 72vw;
  max-height: 40vw;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: block;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}
img.zone-screensaver-brand-mark {
  object-fit: contain;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.94);
}
.zone-screensaver-brand-mark.is-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 900;
  color: #fff5e8;
  background: linear-gradient(135deg, rgba(234, 215, 187, 0.8), rgba(176, 132, 74, 0.92));
}
.zone-screensaver-brand-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.zone-screensaver-brand-copy strong {
  font-size: 24px;
  line-height: 1.1;
}
.zone-screensaver-brand-copy span {
  display: none;
}
.zone-screensaver-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4dfb8;
  font-size: 11px;
  font-weight: 800;
}
.zone-screensaver-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}
.zone-screensaver-message {
  margin: 0;
  font-size: clamp(16px, 2.4vw, 22px);
  line-height: 1.8;
  color: rgba(248, 243, 234, 0.92);
  min-height: 3.6em;
}
.zone-screensaver-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(248, 243, 234, 0.78);
  font-size: 13px;
}
.zone-screensaver-meta strong {
  font-size: 28px;
  color: #fff;
}
.departments-page.zone-compact-page .chairs-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

@keyframes zonePromoMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

@media (min-width: 768px) and (max-width: 1366px) {
  .app.zone-compact-shell {
    width: 100vw;
    min-height: 100dvh;
  }
  .app.zone-compact-shell .content {
    min-height: 100dvh;
    padding: 0;
    gap: 0;
  }
  .zone-compact-page {
    gap: 0;
    min-height: 100dvh;
  }
  .zone-compact-header {
    border-radius: 0;
    border-top: 0;
    border-inline: 0;
    padding: 20px 24px 16px;
  }
  .zone-compact-brand-mark {
    width: 74px;
    height: 58px;
  }
  .zone-screensaver-panel {
    width: min(100%, 860px);
    padding: 40px 42px;
  }
  .zone-compact-page .card {
    border-radius: 0;
    border-inline: 0;
    box-shadow: none;
  }
  .departments-page.zone-compact-page > section.card {
    min-height: calc(100dvh - 104px);
    padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
  }
  .departments-page.zone-compact-page .chairs-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 720px) {
  .zone-compact-meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .zone-promo-strip {
    grid-template-columns: 1fr;
  }
  .zone-promo-strip-badge {
    width: fit-content;
  }
  .zone-compact-actions {
    width: 100%;
    justify-content: space-between;
  }
  .zone-compact-brand {
    width: 100%;
    justify-content: space-between;
  }
  .zone-screensaver-panel {
    padding: 26px 22px;
  }
  .zone-screensaver-meta {
    flex-direction: column;
  }
}

@media (max-width: 1200px) {
  .app.pos-full .pos-shell { grid-template-columns: 1fr; }
  .pos-hero,
  .pos-catalog-headline {
    grid-template-columns: 1fr;
  }
  .pos-overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pos-panel {
    position: static;
  }
}
.btn { border: none; padding: 10px 12px; border-radius: 12px; font-size: 13px; cursor: pointer; }
.btn.primary { background: #7ccbb0; color: #fff; box-shadow: 0 10px 20px rgba(124, 203, 176, 0.3); }
.btn.primary:hover { background: #6dbda2; }
.btn.ghost { background: #f2f5ff; color: #2f436f; }
.btn.soft { background: #ffffff; border: 1px solid #e2e7f3; color: var(--dark); }
.btn.soft:hover { background: #f8faff; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { display: block; position: absolute; inset: 0; padding: 24px; background: #fff; color: #000; }
  .print-card { border: 1px solid #e0e0e0; padding: 16px; border-radius: 12px; }
  .print-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #d6d6d6; padding-bottom: 10px; margin-bottom: 10px; }
  .print-head h2 { margin: 0; font-size: 18px; }
  .print-meta { font-size: 12px; color: #333; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
  .print-table th, .print-table td { border-bottom: 1px solid #e0e0e0; padding: 6px 4px; text-align: right; }
  .print-summary { display: grid; gap: 4px; font-size: 12px; }
  .print-total { font-weight: 700; font-size: 13px; }
}
.inline-input { width: 64px; padding: 6px 8px; border-radius: 10px; border: 1px solid #e2e7f3; font-size: 12px; }
.link-danger { color: #c44949; font-size: 12px; background: none; border: none; cursor: pointer; padding: 0; }
.link-danger:hover { text-decoration: underline; }

.alert { padding: 10px 12px; border-radius: 12px; font-size: 12.5px; display: grid; gap: 4px; }
.alert-success { background: #e3f7ef; color: #0f8b5c; border: 1px solid #cdeedd; }
.alert-error { background: #ffe6e6; color: #c44949; border: 1px solid #f5c7c7; }
.alert-warning { background: #fff4de; color: #9b6716; border: 1px solid #f2dbaf; }
.alert-info { background: #eaf4ff; color: #2d5ea8; border: 1px solid #d0e2fb; }
.alert-sub { font-size: 12px; color: #2a5c44; }
.auth-help-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; margin-bottom: 8px; }
.auth-help-actions .btn { min-width: 148px; justify-content: center; text-decoration: none; }

.customers-page { max-width: 1200px; margin: 0 auto; }
.customers-page [id] { scroll-margin-top: calc(var(--topbar-height, 72px) + 20px); }
.customers-page .card.is-focused {
  border-color: rgba(92, 120, 255, 0.28);
  box-shadow: 0 14px 28px rgba(40, 58, 126, 0.1);
}
.services-page { max-width: 1200px; margin: 0 auto; }
.bookings-page { max-width: 1200px; margin: 0 auto; }
.contract-page { max-width: 1200px; margin: 0 auto; }
.services-page { display: grid; gap: 12px; }
.services-page-header {
  background: #fff;
  border: 1px solid #efe7db;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(28, 25, 20, 0.06);
}
.services-page-actions { display: flex; align-items: center; gap: 8px; }
.services-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-kpi-text {
  font-size: 24px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.services-suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.service-insight-card {
  display: grid;
  gap: 12px;
  border: 1px solid #efe7db;
}
.service-insight-card.tone-highlight {
  background: linear-gradient(135deg, #fffaf1, #f7efe1);
}
.service-insight-card.tone-action {
  background: linear-gradient(135deg, #fbf8f2, #f5f0e7);
}
.service-insight-card.tone-warning {
  background: linear-gradient(135deg, #fff8f1, #fbefe3);
}
.service-insight-card.tone-success {
  background: linear-gradient(135deg, #f7fbf7, #eef7ee);
}
.service-insight-card.tone-neutral {
  background: linear-gradient(135deg, #f9fbff, #eef4fb);
}
.service-insight-actions { display: flex; justify-content: flex-end; }
.services-table-card { display: grid; gap: 12px; }
.service-empty {
  border: 1px dashed #dcccb2;
  border-radius: 16px;
  background: #fbf7f1;
  padding: 18px;
  display: grid;
  gap: 8px;
  color: #6a5b46;
}
.service-name-cell {
  display: grid;
  gap: 3px;
  min-width: 180px;
}
.service-name-cell strong {
  color: var(--dark);
  font-size: 13px;
}
.service-modal { width: min(860px, 94vw); }
.service-modal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.service-preset-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e6ddd0;
  background: linear-gradient(135deg, #fffaf1, #f8f2e8);
}
.service-preset-head {
  display: grid;
  gap: 4px;
}
.service-preset-head h3 {
  margin: 0;
  font-size: 16px;
}
.service-preset-list {
  display: grid;
  gap: 10px;
}
.service-preset-card {
  display: grid;
  gap: 4px;
  text-align: right;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e7dcc9;
  background: rgba(255,255,255,0.92);
  color: var(--dark);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-preset-card:hover {
  transform: translateY(-1px);
  border-color: #cfb995;
  box-shadow: 0 10px 20px rgba(28, 25, 20, 0.08);
}
.service-preset-card strong {
  font-size: 14px;
}
.service-preset-card span,
.service-preset-card small {
  color: var(--muted);
}
.service-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.service-form-grid input,
.service-form-grid select {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
}
.service-form-note {
  grid-column: 1 / -1;
  border: 1px dashed #dfd2bf;
  border-radius: 14px;
  background: #f8f3eb;
  color: #6a5b46;
  padding: 12px 14px;
  font-size: 12px;
}
.service-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.departments-page { max-width: none; width: 100%; margin: 0; }
.departments-page .chairs-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dept-screen-grid { display: grid; gap: 12px; }
.dept-screen-panel { min-width: 0; }
.dept-panel-scroll { min-width: 0; }
.bookings-shell { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr); gap: 16px; align-items: start; }
.booking-alerts { display: grid; gap: 10px; margin-bottom: 12px; }
.bookings-main { display: grid; gap: 16px; }
.bookings-side { display: grid; gap: 16px; align-content: start; }
.bookings-side .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bookings-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bookings-duo .card { height: 100%; }
.calendar-launch { background: linear-gradient(135deg, #fff, #f7f2e8); border: 1px dashed #dfd2bf; }
.calendar-launch .card-header { align-items: center; }
.calendar-launch-body { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.calendar-launch-body::after { content: ""; display: block; width: 42px; height: 42px; border-radius: 14px; background: #f1e7d9; box-shadow: inset 0 0 0 1px #e6ddd0; }
#calendarLaunch,
#bookingsDuo,
#bookingsList { scroll-margin-top: 90px; }

.dept-login-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dept-card { border: 1px solid #efe7db; border-radius: 16px; padding: 12px; background: #fff; display: grid; gap: 10px; }
.dept-card input { border: 1px solid #e2e7f3; border-radius: 10px; padding: 8px 10px; font-size: 13px; background: #fff; }
.dept-name { font-weight: 700; font-size: 14px; }
.chairs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.zone-chair-sections { display: grid; gap: 18px; }
.zone-chair-section { display: grid; gap: 12px; }
.zone-chair-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee4d7;
}
.zone-chair-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #1f2a3d;
}
.zone-chair-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5efe6;
  border: 1px solid #e6ddd0;
  color: #7b6a54;
  font-size: 11px;
  font-weight: 700;
}
.chair-card { border: 1px solid #e6ddd0; border-radius: 16px; padding: 12px; background: var(--panel); display: grid; gap: 10px; cursor: pointer; position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.chair-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28, 25, 20, 0.06); }
.chair-card.busy { border-color: #deceb2; background: #fcf7ef; }
.chair-card.clean { border-color: #e6d0ab; background: #fbf7ef; }
.chair-card.idle { border-color: #d7e3d8; background: #f8fbf7; }
.chair-card.overdue { border-color: #e5caca; background: #fcf3f3; }
.chair-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.chair-head-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.chair-copy { display: grid; gap: 4px; flex: 1; min-width: 0; text-align: right; }
.chair-icon { width: 44px; height: 44px; border-radius: 14px; background: #efe7db; display: grid; place-items: center; box-shadow: inset 0 0 0 1px #e6ddd0; }
.chair-icon img { width: 24px; height: 24px; display: block; }
.chair-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; direction: rtl; }
.chair-title { font-weight: 700; flex: 1; min-width: 0; text-align: right; }
.chair-status { font-size: 12px; color: var(--muted); }
.chair-meta { font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.chair-action { font-size: 12px; color: #2f6fed; }
.chair-state-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  line-height: 1;
  flex: 0 0 14px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}
.chair-state-btn.available { background: #58a66a; border-color: #469158; }
.chair-state-btn.busy { background: #c85b5b; border-color: #b34b4b; }
.chair-state-btn.clean { background: #c79a46; border-color: #ae8538; }
.chair-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chair-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.chair-tag.staff { background: #eef2ec; border-color: #dde5da; color: #5a6b5a; }
.chair-tag.customer { background: #f7f1e8; border-color: #e7dccb; color: #7a684d; }
.chair-tag.service { background: #f3ede3; border-color: #e5d8c3; color: #7f6440; }
.chair-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chair-badge.busy { background: #efe4d1; color: #7b6036; }
.chair-badge.available { background: #e5eee6; color: #4a6650; }
.chair-badge.clean { background: #f1ede7; color: #6b6a63; }
.chair-badge.reserved { background: #f3ece2; color: #80644b; }
.chair-badge.is-overdue { background: #fce7e7; color: #b24b4b; }
.chair-timer-box { display: grid; gap: 4px; border-radius: 14px; background: #f6f1e9; padding: 10px 12px; border: 1px solid #ebe2d4; }
.chair-timer-label { font-size: 11px; color: var(--muted); }
.chair-timer { direction: ltr; font-size: 22px; font-weight: 800; letter-spacing: 0.04em; color: var(--dark); }
.chair-timer.empty { color: #9c9489; }
.chair-timer.is-overdue { color: #b24b4b; }
.chair-note { font-size: 11px; color: var(--muted); }
.live-chair-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.dept-team-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.dept-team-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 700; }
.dept-team-pill.busy { background: #f7e3e3; border-color: #ebc9c9; color: #a44747; }
.dept-team-pill.available { background: #e6f1e8; border-color: #cfded2; color: #3f6a4b; }
.dept-team-pill.break { background: #f6efe1; border-color: #e6d8bd; color: #8b6a39; }
.dept-team-pill.cleaning { background: #f5ead7; border-color: #e6d0ab; color: #8b6a39; }
.dept-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.dept-staff-card { border: 1px solid #e6ddd0; border-radius: 16px; padding: 14px; background: #fffdfa; display: grid; gap: 12px; }
.dept-staff-card.busy { background: #fcf5f4; border-color: #ead2d2; }
.dept-staff-card.available { background: #f8fbf7; border-color: #d7e3d8; }
.dept-staff-card.break { background: #fbf7ef; border-color: #e6d8bd; }
.dept-staff-card.cleaning { background: #fbf7ef; border-color: #e6d0ab; }
.dept-staff-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dept-staff-avatar { width: 56px; height: 56px; border-radius: 50%; background: #efe7db; border: 1px solid #e6ddd0; display: grid; place-items: center; overflow: hidden; color: #6a5b46; font-weight: 700; flex: 0 0 56px; }
.dept-staff-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dept-staff-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.dept-staff-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dept-staff-name { font-size: 15px; font-weight: 800; min-width: 0; }
.dept-staff-role { font-size: 12px; color: var(--muted); }
.dept-staff-state { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.dept-staff-state.busy { background: #f7e3e3; border-color: #ebc9c9; color: #a44747; }
.dept-staff-state.available { background: #e6f1e8; border-color: #cfded2; color: #3f6a4b; }
.dept-staff-state.break { background: #f6efe1; border-color: #e6d8bd; color: #8b6a39; }
.dept-staff-state.cleaning { background: #f5ead7; border-color: #e6d0ab; color: #8b6a39; }
.dept-staff-meta { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.live-map-shell { display: grid; gap: 12px; }
.live-team-panel,
.live-zones-panel { min-height: 0; display: grid; gap: 12px; }
.live-team-scroll,
.live-zones-scroll { min-height: 0; }
.live-zone-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-filter-btn {
  border: 1px solid #dfd2bf;
  background: #fbf7f1;
  color: #6a5b46;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.zone-filter-btn:hover { background: #f5eee4; border-color: #d5c4ab; }
.zone-filter-btn.is-active {
  background: #efe7db;
  border-color: #d5c4ab;
  color: #23395b;
  box-shadow: inset 0 0 0 1px rgba(35, 57, 91, 0.08);
}
.live-zone-grid.is-filtered { grid-template-columns: minmax(0, 1fr); }
.live-zone-card,
.live-chair-card { cursor: pointer; }
.live-zone-name-trigger {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.live-zone-name-trigger:hover { color: #23395b; }
.live-zone-name-trigger:focus-visible {
  outline: 2px solid rgba(35, 57, 91, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}
.live-zone-card:hover,
.live-chair-card:hover { box-shadow: 0 10px 24px rgba(28, 25, 20, 0.08); }
.live-zone-card:focus-visible,
.live-chair-card:focus-visible {
  outline: 2px solid rgba(35, 57, 91, 0.35);
  outline-offset: 2px;
}
.live-chair-summary { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.live-chair-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 104px; padding: 7px 12px; border-radius: 999px; border: 1px solid transparent; font-size: 11px; font-weight: 700; }
.live-chair-pill.neutral { background: #f4f6fb; border-color: #dde4f2; color: #44516c; }
.live-chair-pill.busy { background: #f7e3e3; border-color: #ebc9c9; color: #a44747; }
.live-chair-pill.clean { background: #f5ead7; border-color: #e6d0ab; color: #8b6a39; }
.live-chair-pill.overdue { background: #fceaea; border-color: #edc7c7; color: #b24747; }
.live-info-modal-panel { width: min(1100px, 96vw); }
.live-info-modal-grid { display: grid; gap: 14px; }
.live-info-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.live-info-kpi {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: #fbf7f1;
  border: 1px solid #ece1d2;
}
.live-info-kpi-label { font-size: 11px; color: var(--muted); }
.live-info-kpi-value { font-size: 22px; font-weight: 800; color: var(--dark); line-height: 1.1; }
.live-info-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #fffdfa;
  border: 1px solid #ece1d2;
}
.live-info-section-title { font-size: 13px; font-weight: 800; color: var(--dark); }
.live-info-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.live-info-meta-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6ebf5;
}
.live-info-meta-label { font-size: 11px; color: var(--muted); }
.live-info-meta-value { font-size: 14px; font-weight: 700; color: var(--dark); }
.live-info-list { display: grid; gap: 10px; }
.live-info-list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e6ebf5;
}
.live-info-list-title { font-size: 14px; font-weight: 800; color: var(--dark); }
.live-info-list-sub { font-size: 12px; color: var(--muted); }
.live-info-list-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.live-info-list-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fbf7f1;
  border: 1px solid #e6ddd0;
  font-size: 11px;
  color: #6a5b46;
}
.summary-grid.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dept-modal .chair-info { font-size: 12px; color: var(--muted); padding: 6px 0; grid-column: 1 / -1; }
.dept-modal .chair-delay-field { grid-column: 1 / -1; }
.reception-page { max-width: none; width: 100%; margin: 0; }
.reception-tabs-card { padding: 10px 12px; }
.reception-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.reception-tab-btn {
  border: 1px solid #dfd2bf;
  background: #fbf7f1;
  color: #6a5b46;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.reception-tab-btn:hover { background: #f5eee4; border-color: #d7c7ae; }
.reception-tab-btn.is-active { background: #efe7db; border-color: #d4c2a3; color: #23395b; }
.reception-panel[hidden] { display: none !important; }
.reception-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  grid-template-areas:
    "brief form"
    "queue form";
  gap: 12px;
  align-items: start;
}
.reception-pos-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); gap: 12px; align-items: start; }
.reception-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.reception-field-full { grid-column: 1 / -1; }
.reception-form-card,
.reception-day-brief-card,
.reception-queue-card,
.reception-side-card {
  padding: 14px;
}
.reception-form-card {
  grid-area: form;
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
}
.reception-day-brief-card { grid-area: brief; }
.reception-queue-card { grid-area: queue; min-height: 260px; }
.reception-brief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.reception-brief-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: #fbf7f1;
  border: 1px solid #ece1d2;
}
.reception-brief-label {
  font-size: 11px;
  color: var(--muted);
}
.reception-brief-value {
  font-size: 22px;
  line-height: 1.1;
  color: var(--dark);
}
.reception-form-card textarea,
.reception-form-card input,
.reception-form-card select {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
}
.reception-visit-hint {
  grid-column: 1 / -1;
  background: #f7f3ed;
  border: 1px dashed #dfd2bf;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: #6a5b46;
}
.reception-form-actions { display: flex; justify-content: flex-end; }
.reception-service-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.reception-service-summary {
  min-height: 48px;
  border: 1px dashed #d9ccb8;
  border-radius: 14px;
  background: #fcfaf6;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}
.reception-service-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #efe7db;
  border: 1px solid #dcccb2;
  color: #6a5b46;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}
.reception-services-modal-panel { width: min(900px, 94vw); }
.reception-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.reception-service-option {
  border: 1px solid #e6ddd0;
  border-radius: 16px;
  background: #fffdfa;
  padding: 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.reception-service-option:hover {
  border-color: #d7c7ae;
  background: #fbf7f1;
}
.reception-service-option.is-selected {
  border-color: #cdb48a;
  background: #f7efe2;
  box-shadow: 0 8px 20px rgba(106, 91, 70, 0.08);
}
.reception-service-option input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #6d7f58;
}
.reception-service-option-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
}
.reception-service-option-meta {
  font-size: 12px;
  color: var(--muted);
}
.reception-service-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.reception-entry-list,
.reception-launch-grid,
.reception-steps { display: grid; gap: 10px; }
.reception-queue-card > .muted,
.reception-empty-state {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed #dfd2bf;
  background: #faf6ef;
  color: #6a5b46;
  font-size: 12px;
}
.reception-empty-state strong {
  font-size: 14px;
  color: var(--dark);
}
.reception-empty-state .btn {
  width: fit-content;
}
.reception-entry,
.reception-launch-card,
.reception-step {
  border: 1px solid #e6ddd0;
  border-radius: 16px;
  background: #fffdfa;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.reception-entry.inside { background: #fbf8f2; }
.reception-entry.waiting_pos,
.reception-launch-card { background: #f8fbff; border-color: #dce4f3; }
.reception-entry.completed { background: #f7fbf7; border-color: #d8e6d8; }
.reception-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.reception-entry-badges,
.reception-entry-meta,
.reception-entry-actions,
.reception-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.reception-entry-name { font-size: 16px; font-weight: 800; color: var(--dark); }
.reception-entry-time { font-size: 12px; color: var(--muted); }
.reception-entry-meta { font-size: 12px; color: var(--muted); }
.reception-entry-note {
  font-size: 12px;
  color: #6a5b46;
  background: #f7f1e8;
  border-radius: 12px;
  padding: 8px 10px;
}
.reception-side-card { align-content: start; }
.reception-step strong { font-size: 13px; color: var(--dark); }
.reception-step span { font-size: 12px; color: var(--muted); }
.customers-grid { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 12px; }
.customers-stack { display: grid; gap: 12px; }
.legacy-page-header { display: none; }
.customers-page.is-single-focus .customers-grid { grid-template-columns: 1fr; }
.customers-page.is-single-focus .customers-stack,
.customers-page.is-single-focus .customer-automation-queue {
  width: min(100%, 960px);
}
.customers-page.customers-view-customers .customers-stack > .card:nth-child(2),
.customers-page.customers-view-customers .customers-stack > .card:nth-child(3),
.customers-page.customers-view-customers .customers-stack > .card:nth-child(4),
.customers-page.customers-view-customers .customer-automation-queue {
  display: none;
}
.customers-page.customers-view-loyalty #customers-list,
.customers-page.customers-view-loyalty .customers-stack > .card:not(:nth-child(2)):not(:nth-child(4)),
.customers-page.customers-view-loyalty .customer-automation-queue {
  display: none;
}
.customers-page.customers-view-memberships #customers-list,
.customers-page.customers-view-memberships .customers-stack > .card:not(:nth-child(3)),
.customers-page.customers-view-memberships .customer-automation-queue {
  display: none;
}
.customers-page.customers-view-notifications #customers-list,
.customers-page.customers-view-notifications .customers-stack > .card:not(:nth-child(4)) {
  display: none;
}
.field-checkbox { align-content: end; }
.field-checkbox input[type="checkbox"] { width: 18px; height: 18px; }
.customer-search input {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  min-width: 220px;
  background: #fff;
}
.customer-membership-cell { display: grid; gap: 4px; min-width: 160px; }
.customer-membership-name { font-weight: 700; font-size: 12.5px; color: var(--dark); }
.customer-membership-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.membership-plan-list,
.automation-rule-list { display: grid; gap: 10px; }
.membership-plan-card,
.automation-rule-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #efe7db;
  background: #faf7f2;
}
.membership-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.membership-plan-name { font-weight: 800; font-size: 14px; color: var(--dark); }
.membership-plan-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 11.5px; color: var(--muted); }
.rule-preview {
  font-size: 12px;
  color: #6a5b46;
  background: #fff;
  border: 1px dashed #e1d5c5;
  border-radius: 12px;
  padding: 8px 10px;
  line-height: 1.7;
}
.customer-automation-queue .card-header { margin-bottom: 10px; }
.customer-automation-queue .table-actions form { display: inline-flex; }
.message-preview-cell {
  min-width: 260px;
  max-width: 360px;
  white-space: normal;
  line-height: 1.7;
  color: #5a4d3f;
}
.booking-search input {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  min-width: 220px;
  background: #fff;
}

.calendar-card .card-header { align-items: flex-start; }
.calendar-actions { display: grid; gap: 8px; justify-items: end; }
.calendar-tabs { display: inline-flex; gap: 6px; }
.tab-btn { border: 1px solid #e2e7f3; background: #f7f9ff; color: var(--muted); padding: 6px 10px; border-radius: 10px; font-size: 12px; cursor: pointer; }
.tab-btn.active { background: #eef2ff; color: #2f6fed; border-color: #dfe6ff; }
.calendar-filters { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.calendar-filters input,
.calendar-filters select {
  border: 1px solid #e2e7f3;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}

@media (min-width: 1101px) {
  .departments-page.one-screen {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .departments-page.one-screen .page-header,
  .departments-page.one-screen .alert,
  .departments-page.one-screen .dept-kpi-grid {
    flex: 0 0 auto;
  }
  .departments-page.one-screen .dept-screen-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    align-items: stretch;
  }
  .departments-page.one-screen .dept-screen-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    padding: 14px;
  }
  .departments-page.one-screen .dept-screen-panel .card-header {
    margin-bottom: 10px;
  }
  .departments-page.one-screen .dept-panel-scroll {
    min-height: 0;
    overflow: auto;
    padding-inline-end: 4px;
  }
  .departments-page.one-screen .dept-team-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .departments-page.one-screen .dept-chairs-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    align-content: start;
  }
  .departments-page.one-screen .dept-staff-card {
    padding: 12px;
    gap: 10px;
  }
  .departments-page.one-screen .dept-staff-meta {
    font-size: 11.5px;
    gap: 4px;
  }
  .departments-page.one-screen .chair-card {
    padding: 10px;
    gap: 8px;
  }
  .departments-page.one-screen .chair-tag {
    padding: 5px 8px;
    font-size: 10.5px;
  }
  .departments-page.one-screen .chair-timer-box {
    padding: 8px 10px;
  }
  .departments-page.one-screen .chair-timer {
    font-size: 18px;
  }
  .departments-page.one-screen .chair-action {
    font-size: 11px;
  }
}

@media (max-width: 1100px) {
  .departments-page.one-screen {
    display: grid;
    height: auto;
    overflow: visible;
  }
  .departments-page.one-screen .dept-screen-grid {
    grid-template-columns: 1fr;
  }
  .departments-page.one-screen .dept-panel-scroll {
    overflow: visible;
  }
}
@media (min-width: 1101px) {
  .live-map-page {
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .live-map-page .page-header,
  .live-map-page .summary-grid {
    flex: 0 0 auto;
  }
  .live-map-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 2.2fr);
    gap: 12px;
    align-items: stretch;
  }
  .live-team-panel,
  .live-zones-panel {
    display: grid;
    min-height: 0;
    padding: 14px;
  }
  .live-team-panel {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .live-zones-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
  }
  .live-team-scroll,
  .live-zones-scroll {
    min-height: 0;
    overflow: auto;
    padding-inline-end: 4px;
  }
  .live-map-page .dept-team-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .live-map-page .live-zone-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }
  .live-map-page .live-chair-grid {
    grid-template-columns: repeat(var(--live-chair-cols, 4), minmax(0, 1fr));
    gap: 10px;
    align-content: start;
  }
  .live-map-page .live-team-panel .card-header {
    margin-bottom: 8px;
  }
  .live-map-page .live-team-panel .dept-staff-card {
    padding: 12px;
    gap: 10px;
  }
  .live-map-page .live-team-panel .dept-staff-meta {
    gap: 6px;
  }
  .live-map-page .live-team-panel .dept-staff-meta > div {
    padding: 6px 8px;
    border-radius: 10px;
    background: #f6f8fc;
    border: 1px solid #e6ebf5;
  }
  .live-map-page .live-zones-panel .card-header {
    margin-bottom: 8px;
  }
  .live-map-page .zone-card,
  .live-map-page .dept-staff-card,
  .live-map-page .chair-card {
    padding: 10px;
    gap: 6px;
  }
  .live-map-page .zone-head {
    align-items: flex-start;
  }
  .live-map-page .zone-sub,
  .live-map-page .dept-staff-meta,
  .live-map-page .chair-meta,
  .live-map-page .chair-note {
    font-size: 10.5px;
  }
  .live-map-page .chair-tag {
    padding: 4px 7px;
    font-size: 10px;
  }
  .live-map-page .chair-icon {
    width: 34px;
    height: 34px;
  }
  .live-map-page .chair-timer-box {
    padding: 6px 8px;
  }
  .live-map-page .chair-timer {
    font-size: 16px;
  }
}
@media (max-width: 1100px) {
  .live-map-page {
    height: auto;
    overflow: visible;
  }
  .live-map-shell {
    display: flex;
    flex-direction: column;
  }
  .live-zones-panel { order: 1; }
  .live-team-panel { order: 2; }
  .live-team-scroll,
  .live-zones-scroll {
    overflow: visible;
  }
  .live-chair-summary {
    justify-content: flex-start;
  }
}
.calendar-views { display: grid; }
.calendar-view { display: none; }
.calendar-view.active { display: block; }
.calendar-list { display: grid; gap: 8px; }
.calendar-item { border: 1px solid #e7e9f2; border-radius: 12px; padding: 10px; background: #fff; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.calendar-item-main { display: flex; align-items: center; gap: 10px; }
.calendar-avatars { display: inline-flex; gap: 6px; align-items: center; }
.calendar-avatar { width: 28px; height: 28px; border-radius: 50%; background: #f3eee6; border: 1px solid #e6ddd0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #6a5b46; flex: 0 0 auto; overflow: hidden; }
.calendar-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.calendar-item.conflict { border-color: #f4a3a3; background: #fff3f3; }
.calendar-item-title { font-weight: 600; font-size: 13px; }
.calendar-item-sub { font-size: 12px; color: var(--muted); }
.calendar-item-meta { display: grid; gap: 4px; font-size: 12px; color: var(--muted); text-align: left; }
.calendar-item-meta .status { font-weight: 600; color: var(--dark); }
.calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-col { border: 1px solid #e7e9f2; border-radius: 12px; padding: 8px; background: #fff; display: grid; gap: 6px; }
.calendar-col-head { font-size: 12px; color: var(--muted); }
.calendar-chip { border-radius: 10px; background: #f2f5ff; padding: 6px 8px; font-size: 12px; display: grid; gap: 2px; }
.calendar-empty { font-size: 12px; color: var(--muted); }
.calendar-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-cell { border: 1px solid #e7e9f2; border-radius: 10px; padding: 8px; min-height: 54px; background: #fff; display: grid; gap: 6px; justify-items: start; }
.calendar-cell em { font-style: normal; font-size: 11px; background: #eef2ff; color: #2f6fed; padding: 2px 6px; border-radius: 999px; }
.calendar-modal-panel { position: relative; z-index: 1; width: min(1100px, 96vw); max-height: 90vh; overflow: auto; display: grid; gap: 12px; }
.calendar-launch-body { font-size: 12px; color: var(--muted); }
.calendar-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calendar-group-list { display: grid; gap: 8px; }
.calendar-group { border: 1px solid #efe7db; border-radius: 12px; padding: 10px; background: #faf7f2; display: grid; gap: 6px; }
.calendar-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-group-info { display: flex; align-items: center; gap: 8px; }
.calendar-group-name { font-weight: 600; font-size: 13px; }
.calendar-group-meta { font-size: 12px; color: var(--muted); }
.empty-state { text-align: center; font-size: 12px; color: var(--muted); padding: 12px; }
.stat-note { margin-top: 8px; font-size: 12px; color: var(--muted); }

.staff-page { max-width: 1200px; margin: 0 auto; }
.staff-grid { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 12px; }
.staff-stack { display: grid; gap: 12px; }
.staff-modal-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.staff-modal-shell--single { grid-template-columns: minmax(0, 1fr); }
.staff-modal-topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #edf0f6;
}
.staff-modal-tabs { display: grid; gap: 8px; background: #f7f9fd; border: 1px solid #e7eaf2; border-radius: 18px; padding: 10px; }
.staff-modal-tab { border: 1px solid #e7eaf2; background: #fff; color: #24324a; border-radius: 14px; padding: 11px 12px; text-align: right; font-weight: 700; cursor: pointer; }
.staff-modal-tab.is-active { background: #111318; color: #fff; border-color: #111318; box-shadow: 0 10px 18px rgba(17, 19, 24, 0.16); }
.staff-modal-panels { display: grid; gap: 18px; }
.staff-modal-pane { display: none; gap: 14px; padding: 16px; border: 1px solid #e7eaf2; border-radius: 18px; background: #fbfcff; }
.staff-modal-pane.is-active { display: grid; }
.staff-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; align-items: start; }
.staff-pane-head { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid #edf0f6; }
.staff-pane-head h3 { margin: 0; font-size: 18px; color: #171c26; }
.staff-pane-head p { margin: 0; color: #7d8698; font-size: 12px; }
.staff-photo-preview { display: grid; place-items: center; min-height: 100%; background: linear-gradient(180deg, #f8fbff 0%, #f4f7fc 100%); border: 1px dashed #d6ddea; border-radius: 16px; padding: 12px; }
.staff-photo-preview img { width: 92px; height: 92px; object-fit: cover; border-radius: 20px; border: 1px solid #e1e7f1; box-shadow: 0 12px 20px rgba(32, 45, 74, 0.08); }
.staff-photo-fallback { width: 92px; height: 92px; border-radius: 20px; display: grid; place-items: center; background: #e9eef9; color: #223048; font-size: 32px; font-weight: 800; }
.staff-summary-card { grid-column: 1 / -1; display: grid; gap: 8px; padding: 14px 16px; background: linear-gradient(135deg, #f8fbff 0%, #f4f7fc 100%); border: 1px solid #e5ebf7; border-radius: 16px; }
.staff-summary-title { font-size: 14px; font-weight: 800; color: #182235; }
.staff-summary-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; color: #607089; font-size: 12px; }
.staff-empty-pane { grid-column: 1 / -1; border: 1px dashed #d8e0ee; border-radius: 16px; padding: 18px; text-align: center; color: #74839b; background: #fafcff; font-size: 13px; }
.staff-modal-form .field textarea { min-height: 88px; resize: vertical; }
.staff-modal-form .field input,
.staff-modal-form .field select,
.staff-modal-form .field textarea { background: #fff; }
.avatar { width: 24px; height: 24px; max-width: 24px; max-height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid #e6ddd0; background: #f3eee6; }
.avatar.placeholder { display: inline-grid; place-items: center; font-weight: 700; color: #6a5b46; }
.avatar-btn { width: 24px; height: 24px; min-width: 24px; min-height: 24px; max-width: 24px; max-height: 24px; border: none; background: transparent; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; overflow: hidden; }
.avatar-btn img { width: 24px; height: 24px; max-width: 24px; max-height: 24px; object-fit: cover; border-radius: 50%; display: block; }
.avatar-preview { margin-top: 8px; }
.avatar-preview img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #e6ddd0; }
.team-carousel { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; max-width: 100%; overflow: hidden; }
.team-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px; scrollbar-width: none; max-width: 100%; min-width: 0; }
.team-track::-webkit-scrollbar { display: none; }
.team-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #faf7f2; border: 1px solid #efe7db; }
.team-card { scroll-snap-align: start; min-width: 180px; }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; background: #efe7db; display: grid; place-items: center; overflow: hidden; color: #6a5b46; font-weight: 700; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.team-avatar .avatar-btn { width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; border-radius: 50%; overflow: hidden; }
.team-avatar .avatar-btn img { width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; border-radius: 50% !important; }
.team-info { display: grid; gap: 4px; }
.team-name { font-weight: 700; }
.team-role { color: var(--muted); font-size: 12px; }
.table td .avatar,
.table td .avatar-btn,
.table td .avatar-btn img {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
.carousel-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e6ddd0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #6a5b46; }
.carousel-btn:hover { background: #f7f3ed; }
.img-modal-panel { position: relative; z-index: 1; width: min(720px, 92vw); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(23, 32, 55, 0.18); padding: 12px; display: grid; gap: 10px; }
.img-modal-panel img { width: 100%; height: auto; border-radius: 14px; display: block; }
.img-modal-actions { display: flex; justify-content: flex-end; }
.staff-search input {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  min-width: 220px;
  background: #fff;
}

.drawer { position: fixed; inset: 0; display: none; align-items: stretch; justify-content: flex-end; z-index: 60; }
.drawer.open { display: flex; }
.drawer-backdrop { flex: 1; background: rgba(15, 18, 28, 0.45); }
.drawer-panel { width: min(520px, 95vw); background: #fff; padding: 16px; display: grid; gap: 12px; overflow: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eef1f8; padding-bottom: 8px; }
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-body { display: grid; gap: 12px; }

.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1200; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 28, 0.45); }
.modal-panel { position: relative; z-index: 1; width: min(980px, 96vw); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(23, 32, 55, 0.18); padding: 16px; display: grid; gap: 12px; }
.overdue-alert-modal {
  z-index: 2400;
}
.overdue-alert-panel {
  width: min(520px, calc(100vw - 28px));
  padding: 22px;
  gap: 18px;
  border: 1px solid #f4d2d2;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(214, 97, 97, 0.12), transparent 34%),
    linear-gradient(180deg, #fffdfd 0%, #fff7f7 100%);
}
.overdue-alert-kicker {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(196, 73, 73, 0.1);
  color: #b53b3b;
  font-size: 12px;
  font-weight: 800;
}
.overdue-alert-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
  color: #261919;
}
.overdue-alert-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: #6c4b4b;
}
.overdue-alert-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.overdue-alert-meta-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #f3dede;
}
.overdue-alert-meta-item span {
  font-size: 12px;
  color: #a16d6d;
}
.overdue-alert-meta-item strong {
  font-size: 16px;
  color: #2f2020;
}
.overdue-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.overdue-alert-actions .btn {
  min-width: 148px;
  justify-content: center;
}
.late-message textarea {
  border: 1px solid #e2e7f3;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  resize: vertical;
}

@media (max-width: 1200px) {
  .quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pos-grid { grid-template-columns: 1fr; }
  .pos-shell { grid-template-columns: 1fr; }
  .pos-shell { height: auto; overflow: visible; }
  .pos-catalog,
  .pos-panel { height: auto; overflow: visible; }
  .content.pos-page { height: auto; overflow: visible; }
  .pos-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-add-custom { grid-template-columns: 1fr 1fr; }
  .customers-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .staff-modal-shell { grid-template-columns: 1fr; }
  .staff-modal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reception-shell,
  .reception-pos-grid,
  .reception-form-grid { grid-template-columns: 1fr; }
  .reception-shell {
    grid-template-areas:
      "form"
      "brief"
      "queue";
  }
  .reception-form-card {
    position: static;
    top: auto;
  }
  .reception-brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-suggestions { grid-template-columns: 1fr; }
  .service-form-grid { grid-template-columns: 1fr; }
  .reception-service-picker { grid-template-columns: 1fr; }
  .reception-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .overdue-alert-panel {
    width: min(100%, calc(100vw - 18px));
    padding: 18px;
    border-radius: 20px;
  }
  .overdue-alert-panel h2 {
    font-size: 22px;
  }
  .overdue-alert-meta {
    grid-template-columns: 1fr;
  }
  .overdue-alert-actions {
    flex-direction: column;
  }
  .overdue-alert-actions .btn {
    width: 100%;
  }
}
@media (max-width: 700px) {
  .quick-actions-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .dashboard-page { padding: 0 6px; }
  .pos-page { padding: 0 6px; }
  .pos-services-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .pos-controls { grid-template-columns: 1fr; }
  .pos-add-custom { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .pos-add { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .kpi-card { min-height: 88px; }
  .reception-brief-grid { grid-template-columns: 1fr; }
  .services-kpi-grid { grid-template-columns: 1fr; }
  .service-kpi-text { white-space: normal; }
  .calendar-week { grid-template-columns: 1fr; }
  .calendar-month { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reception-services-grid { grid-template-columns: 1fr; }
  .team-track { grid-auto-columns: minmax(70%, 1fr); }
}

/* Modern Palette Overrides */
:root {
  --bg: #f3f4f8;
  --panel: #ffffff;
  --dark: #1f2430;
  --accent: #2f6fed;
  --accent-2: #16a3a5;
  --muted: #6f7787;
  --ok: #0f8b5c;
  --warn: #c9821f;
}

body { background: var(--bg); color: var(--dark); }
.topbar { border-bottom: 1px solid #e7e9f2; }
.pill { background: #eef2ff; color: #3b4a6b; }
.pill.ok { background: #e3f7ef; color: var(--ok); }
.pill.warn { background: #fff2d9; color: var(--warn); }

.dashboard-page .page-header,
.card,
.kpi-card {
  background: #ffffff;
  border-color: #e7e9f2;
}

.kpi-icon { background: #eef2ff; }
.kpi-icon svg { fill: #2f6fed; }
.kpi-icon.kpi-revenue { background: #e7f2ff; }
.kpi-icon.kpi-bookings { background: #e8fbf4; }
.kpi-icon.kpi-sessions { background: #fff3e0; }
.kpi-icon.kpi-customers { background: #f1edff; }

.qa-btn { background: #eef2ff; }
.qa-btn:hover { background: #dfe6ff; }
.qa-icon svg { fill: #2f6fed; }

.table thead th { background: #f2f5ff; }
.table tbody tr:nth-child(even) { background: #f8faff; }
.table tbody tr:hover { background: #eef3ff; }

.badge { background: #eef2ff; color: #2f436f; }
.badge.success { background: #e3f7ef; color: #0f8b5c; }
.badge.warn { background: #fff2d9; color: #c9821f; }
.badge.info { background: #e7f2ff; color: #2f6fed; }
.badge.danger { background: #ffe6e6; color: #c44949; }

.activity-list li { background: #f8faff; }
.dot { background: #b8c5e1; }
.dot.success { background: #0f8b5c; }
.dot.warn { background: #c9821f; }
.dot.info { background: #2f6fed; }
.dot.danger { background: #c44949; }

.sidebar { background: #161a23; }
.nav-group { background: #1d222d; }
.nav-group summary { background: #1a1f29; color: #e6ebf7; }
.nav-group[open] summary { background: #202634; }
.nav-group > a { color: #c9d1e3; }
.nav-group > a.active { background: #2a3242; }
.nav-group > a:hover { background: #222a3a; }
/* End Modern Palette Overrides */

/* CRUD Forms */
.form-card { display: grid; gap: 12px; }
.form-title { font-size: 16px; font-weight: 700; }
.form-sub { font-size: 12px; color: var(--muted); margin-top: -6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.btn.danger { background: #ffe6e6; color: #b63737; border: 1px solid #f5c7c7; }
.btn.danger:hover { background: #ffdada; }
.table-actions { display: flex; gap: 6px; }
.table .muted { color: var(--muted); font-size: 12px; }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.item-row { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 10px; align-items: end; margin-bottom: 8px; }

@media (max-width: 1024px) {
  .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-row { grid-template-columns: 1fr; }
}

/* Bridal contract */
.contract-layout { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.contract-form { gap: 12px; max-width: 1100px; margin: 0 auto; }
.contract-preview { display: grid; gap: 12px; }
.content.contract-page { gap: 14px; padding: 14px; }
.content.contract-page .page-header { gap: 10px; }
.content.contract-page .page-header.compact { margin-bottom: 0; }
.content.contract-page .page-header p { margin-top: 4px; }
.content.contract-page .kpi-grid { gap: 10px; }
.content.contract-page .kpi-grid.compact { margin-top: 0; }
.content.contract-page .card { padding: 12px 14px; }
.content.contract-page .card-header { margin-bottom: 8px; }
.content.contract-page .form-inline { margin-top: 4px; }
.contract-preview h2 { margin: 0; font-size: 20px; }
.contract-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.contract-body { display: grid; gap: 12px; font-size: 13px; line-height: 1.8; }
.contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contract-label { font-size: 12px; color: var(--muted); }
.contract-value { font-weight: 600; color: var(--dark); }
.contract-terms { white-space: pre-wrap; background: #f7f9ff; border: 1px solid #e2e7f3; border-radius: 12px; padding: 10px; }
.signature-row { display: flex; gap: 20px; justify-content: space-between; margin-top: 12px; }
.signature-box { flex: 1; border-top: 1px dashed #cbd4e5; padding-top: 8px; font-size: 12px; text-align: center; color: var(--muted); min-height: 90px; display: grid; gap: 6px; align-content: center; }
.signature-box img { max-width: 100%; max-height: 70px; object-fit: contain; display: none; margin: 0 auto; }
.signature-pads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.signature-pad { border: 1px solid #e2e7f3; border-radius: 12px; padding: 10px; background: #fff; display: grid; gap: 8px; }
.signature-title { font-size: 12px; color: var(--muted); }
.signature-pad canvas { width: 100%; height: 140px; border-radius: 10px; border: 1px dashed #cbd4e5; background: #f8faff; cursor: crosshair; }

.service-picker { display: grid; gap: 12px; margin-bottom: 10px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; padding: 10px; background: #f7f3ee; border-radius: 12px; border: 1px solid #efe6da; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid #e6ddd0; background: #fff; font-size: 13px; }
.check input { width: 16px; height: 16px; }
.service-custom .field { margin: 0; }

.inline-form { display: flex; align-items: center; gap: 8px; }
.mini-select { padding: 6px 8px; border-radius: 8px; border: 1px solid #e2e7f3; background: #fff; font-size: 12px; }
.contract-form[data-visible="0"] { display: none; }
.contract-layout[data-visible="0"] { display: none; }
.preview-modal { position: fixed; inset: 0; background: rgba(15, 20, 30, 0.55); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 2000; }
.preview-modal.open { display: flex; }
.preview-modal-card { background: #fff; border-radius: 16px; padding: 16px; max-width: 980px; width: 92%; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(15, 20, 30, 0.18); }
.preview-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.preview-modal .contract-preview .contract-body { font-size: 12px; }
.preview-modal .contract-preview .contract-grid { grid-template-columns: 1fr; }
.contract-preview-form input[readonly],
.contract-preview-form textarea[readonly] {
  background: #f8faff;
  color: var(--dark);
}
body.modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .signature-pads { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .contract-layout { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .page-header, .contract-form { display: none !important; }
  .content { padding: 0; }
  .preview-modal { position: static; display: block !important; background: transparent; padding: 0; }
  .preview-modal-card { box-shadow: none; max-height: none; overflow: visible; padding: 0; }
  .preview-modal-actions { display: none !important; }
  .contract-preview-form.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contract-preview { box-shadow: none; border: none; max-height: none; overflow: visible; position: static; }
  .contract-preview, .contract-preview * { visibility: visible !important; }
  .contract-preview { position: absolute; inset: 0; margin: 0; }
}




/* Dashboard enhancements */
.dashboard-page { display: grid; gap: 18px; }
.dashboard-onboarding-card {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid #e2e8f6;
  background:
    radial-gradient(circle at top right, rgba(47, 111, 237, 0.08), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 14px 28px rgba(23, 41, 74, 0.06);
}
.dashboard-onboarding-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.dashboard-onboarding-progress {
  min-width: 120px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(47, 111, 237, 0.08);
  color: #2d59ad;
}
.dashboard-onboarding-progress strong {
  font-size: 24px;
  line-height: 1;
}
.dashboard-onboarding-progress span {
  font-size: 11px;
  color: #5f6f8d;
}
.dashboard-onboarding-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef9;
}
.dashboard-onboarding-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fed 0%, #6a7a5a 100%);
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.22);
}
.dashboard-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.dashboard-onboarding-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e7ecf7;
  align-content: space-between;
  min-height: 210px;
  box-shadow: 0 10px 20px rgba(23, 41, 74, 0.04);
}
.dashboard-onboarding-item.is-done {
  background: linear-gradient(135deg, #f7fcfa 0%, #ffffff 100%);
  border-color: rgba(15, 139, 92, 0.18);
}
.dashboard-onboarding-item-head {
  display: grid;
  gap: 6px;
}
.dashboard-onboarding-item-head strong {
  font-size: 15px;
  color: #18243d;
}
.dashboard-onboarding-item p {
  margin: 0;
  color: #61708f;
  line-height: 1.8;
  font-size: 12px;
}
.dashboard-onboarding-state {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.08);
  color: #2d59ad;
  font-size: 11px;
  font-weight: 800;
}
.dashboard-onboarding-item.is-done .dashboard-onboarding-state {
  background: rgba(15, 139, 92, 0.12);
  color: #137a56;
}
.dashboard-onboarding-meta {
  font-size: 12px;
  color: #7b879d;
}
.dashboard-onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.dashboard-onboarding-footer .btn {
  flex: 0 0 auto;
}
.dashboard-overview-band { display: grid; gap: 14px; }
.dashboard-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid #e1e7f5;
  background:
    radial-gradient(circle at top left, rgba(47, 111, 237, 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #eef4ff 100%);
  box-shadow: 0 16px 34px rgba(23, 41, 74, 0.08);
  overflow: hidden;
}
.dashboard-hero-card::after {
  content: "";
  position: absolute;
  inset-inline-start: -60px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 163, 165, 0.12), transparent 70%);
  pointer-events: none;
}
.dashboard-hero-copy,
.dashboard-hero-tools {
  position: relative;
  z-index: 1;
}
.dashboard-hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}
.dashboard-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.10);
  color: #2f5db3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.dashboard-hero-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
}
.dashboard-hero-copy p {
  margin: 0;
  max-width: 720px;
  color: #5d6880;
  line-height: 1.8;
}
.dashboard-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-hero-badges .badge {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e0e8f8;
  box-shadow: 0 10px 20px rgba(33, 55, 96, 0.05);
}
.dashboard-hero-tools {
  display: grid;
  gap: 16px;
  align-content: space-between;
}
.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-hero-stat {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #e1e8f7;
  box-shadow: 0 12px 24px rgba(33, 55, 96, 0.06);
}
.dashboard-hero-stat-up { border-color: rgba(15, 139, 92, 0.18); }
.dashboard-hero-stat-down { border-color: rgba(196, 73, 73, 0.18); }
.dashboard-hero-stat-flat,
.dashboard-hero-stat-neutral { border-color: rgba(47, 111, 237, 0.12); }
.dashboard-hero-stat-label {
  font-size: 12px;
  color: #66758f;
  font-weight: 700;
}
.dashboard-hero-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #18243d;
  line-height: 1.2;
}
.dashboard-hero-stat-sub {
  font-size: 11px;
  color: #7c889f;
}
.dashboard-command-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
  box-shadow: 0 10px 24px rgba(23, 41, 74, 0.05);
}
.dashboard-command-copy {
  display: grid;
  gap: 4px;
}
.dashboard-command-title {
  font-size: 13px;
  font-weight: 800;
  color: #18243d;
}
.dashboard-command-note {
  font-size: 12px;
  color: var(--muted);
}
.dashboard-filter-nav {
  margin: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.dashboard-surface {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
  box-shadow: 0 12px 24px rgba(23, 41, 74, 0.05);
}
.dashboard-surface-head,
.dashboard-stage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
}
.dashboard-widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; align-items: start; }
.dashboard-widgets.compact { gap: 12px; }
.widget { min-width: 0; display: flex; }
.widget.span-12 { grid-column: span 12; }
.widget.span-8 { grid-column: span 8; }
.widget.span-6 { grid-column: span 6; }
.widget.span-4 { grid-column: span 4; }
.widget > .widget-card { width: 100%; height: 100%; display: grid; align-content: start; }
.widget-card .card-header { align-items: center; }

.dashboard-page .kpi-grid { align-items: stretch; }
.dashboard-page .kpi-card { height: 100%; }
.kpi-card.is-loading .kpi-value { min-height: 24px; }
.kpi-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.kpi-meta.up { color: #2e7d5d; }
.kpi-meta.down { color: #b24b4b; }
.kpi-meta.flat { color: #7a746c; }
.kpi-meta.neutral { color: #8a8277; }
.kpi-delta { background: #f5efe6; border-radius: 999px; padding: 3px 8px; font-weight: 600; }

.skeleton-line { display: inline-block; width: 70%; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #f0e8dc 0%, #fff 50%, #f0e8dc 100%); background-size: 200% 100%; animation: shimmer 1.6s infinite; }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: stretch; }
.qa-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid #e6ddd0; background: #fff; text-decoration: none; color: var(--dark); transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; height: 100%; }
.qa-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(28, 25, 20, 0.12); }
.qa-card.primary { background: linear-gradient(135deg, #6a7a5a, #879a74); color: #fff; border-color: transparent; }
.qa-card.primary .qa-icon { background: rgba(255, 255, 255, 0.2); }
.qa-card.is-disabled { opacity: 0.6; cursor: not-allowed; }
.qa-icon { width: 34px; height: 34px; border-radius: 12px; background: #f5efe6; display: grid; place-items: center; }
.qa-icon svg { width: 18px; height: 18px; fill: currentColor; }
.qa-label { font-weight: 600; font-size: 13px; }
.qa-soon { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 10px; background: #f3e6d3; color: #7a5b38; padding: 2px 6px; border-radius: 999px; }

.activity-list.rich { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.activity-item { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px; background: #faf7f2; border-radius: 12px; }
.activity-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f0ede7; color: #6a7a5a; }
.activity-icon svg { width: 16px; height: 16px; fill: currentColor; }
.activity-icon.success { background: #e3f7ef; color: #0f8b5c; }
.activity-icon.warn { background: #fff2d9; color: #c9821f; }
.activity-icon.danger { background: #ffe6e6; color: #c44949; }
.activity-body { display: grid; gap: 4px; }
.activity-title { font-weight: 700; font-size: 13px; }
.activity-desc { font-size: 12px; color: var(--muted); }
.activity-user { font-size: 11px; color: #5b6d5b; }
.activity-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }

.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.inline-actions .btn { padding: 6px 8px; }

.time-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f3eee7; font-size: 11px; color: #6a5b46; }

.dashboard-page .table tr.is-late { background: #fff5e7; }
.dashboard-page .table tr.is-active { background: #eef6ff; }
.dashboard-page .table tr.is-confirmed { background: #f2f7f0; }
.dashboard-page .table tr.is-pending { background: #fbf5e8; }
.dashboard-page .table tr.is-cancelled { background: #fff1f1; }

.summary-grid.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; }
.calendar-next { margin-top: 12px; display: grid; gap: 8px; }
.calendar-next-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 12px; background: #f7f3ed; }
.calendar-next-title { font-weight: 600; }
.calendar-next-time { font-size: 12px; color: var(--muted); }
.calendar-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.filter-field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.filter-field select { border: 1px solid #e2e7f3; border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 12px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 12px; background: #faf7f2; }
.list-title { font-weight: 600; font-size: 13px; }
.list-meta { display: flex; align-items: center; gap: 8px; }
.amount { font-weight: 700; font-size: 12.5px; }
.empty-state { color: var(--muted); font-size: 12px; padding: 10px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-item { display: grid; gap: 8px; }
.rank-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-title { font-weight: 600; font-size: 13px; }
.rank-sub { font-size: 12px; color: var(--muted); }
.rank-bar { height: 8px; background: #f0e8dc; border-radius: 999px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, #6a7a5a, #b18a3b); }

.card-actions { display: inline-flex; align-items: center; gap: 8px; }
.card-actions .btn.active { background: #efe7db; }
.dashboard-empty-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dashboard-empty-copy { display: grid; gap: 4px; }
.dashboard-empty-copy h2 { margin: 0; font-size: 18px; }
.dashboard-empty-copy p { margin: 0; color: var(--muted); }
.dashboard-customize-panel { width: min(1100px, 96vw); gap: 16px; }
.dashboard-customize-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-customize-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dashboard-customize-form { display: grid; gap: 14px; }
.dashboard-custom-grid-modal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-layout-field { max-width: 240px; }

@media (max-width: 1100px) {
  .service-modal-layout { grid-template-columns: 1fr; }
  .dashboard-onboarding-head {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-hero-card { grid-template-columns: 1fr; }
  .dashboard-command-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-filter-nav { justify-content: flex-start; }
  .widget.span-8,
  .widget.span-6,
  .widget.span-4 { grid-column: span 12; }
  .calendar-filters { grid-template-columns: 1fr; }
  .summary-grid.mini { grid-template-columns: 1fr; }
  .dashboard-custom-grid-modal { grid-template-columns: 1fr; }
  .dashboard-empty-state { flex-direction: column; align-items: stretch; }
}

@media (max-width: 760px) {
  .dashboard-hero-card {
    padding: 18px;
    border-radius: 20px;
  }
  .dashboard-hero-actions,
  .dashboard-surface-head,
  .dashboard-stage-head {
    justify-content: flex-start;
  }
  .dashboard-hero-stats {
    grid-template-columns: 1fr;
  }
}

/* Vendors modal */
.name-with-action { display: inline-flex; align-items: center; gap: 8px; }
.name-with-action .btn { padding: 4px 8px; }
.vendor-modal { width: min(720px, 94vw); }
.product-modal-panel { width: min(1040px, 96vw); }
.product-table-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-table-thumb {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e3dbcf;
  background: #fff;
  display: grid;
  place-items: center;
}
.product-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-table-thumb.is-placeholder {
  background: #f4efe7;
  color: #7d6f60;
  font-weight: 700;
}
.product-name-stack {
  display: grid;
  gap: 2px;
}
.product-name-stack strong {
  font-size: 13px;
  color: var(--dark);
}
.product-name-stack span,
.product-name-stack small {
  color: var(--muted);
  font-size: 11px;
}
.product-size-field.is-hidden {
  display: none;
}
.product-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.product-media-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e7e0d5;
  border-radius: 16px;
  background: #fffdf9;
}
.product-media-head {
  font-weight: 700;
  color: var(--dark);
}
.product-media-preview {
  min-height: 170px;
  border-radius: 14px;
  border: 1px dashed #dbcdb7;
  background: #f8f4ee;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-media-preview.is-empty {
  color: var(--muted);
  font-size: 12px;
}
.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.product-gallery-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #e7e0d5;
  background: #fff;
}
.product-gallery-card img {
  width: 100%;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.purchase-modal { width: min(1080px, 96vw); }
.purchase-drafts-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.purchases-drafts-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dbe8ff;
  color: #244b93;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.purchase-drafts-modal {
  width: min(860px, 96vw);
}
.purchase-drafts-list {
  display: grid;
  gap: 12px;
}
.purchase-draft-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e7e0d5;
  background: #fffdf9;
}
.purchase-draft-card.is-active {
  border-color: #b8c9f4;
  box-shadow: 0 14px 28px rgba(66, 98, 172, 0.1);
}
.purchase-draft-main {
  display: grid;
  gap: 4px;
}
.purchase-draft-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}
.purchase-item-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e7e0d5;
  background: #fbfaf7;
}
.purchase-item-row-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .product-media-grid {
    grid-template-columns: 1fr;
  }
  .purchase-draft-card {
    flex-direction: column;
    align-items: stretch;
  }
  .purchase-item-row {
    grid-template-columns: 1fr;
  }
  .purchase-item-row-actions {
    justify-content: flex-start;
  }
}

/* Dashboard navigation refresh */
.dashboard-topbar {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 16px;
  position: fixed;
  top: 0;
  inset-inline: 0;
  width: 100%;
  z-index: 1210;
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(20, 24, 35, 0.08);
  padding-block: 12px;
  border-bottom: 1px solid #e9edf7;
}
.dashboard-brand-block {
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}
.dashboard-brand-block .logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.dashboard-brand-block .sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #69758d;
}
.dashboard-brand-block .sub span {
  color: #99a5bc;
}
.dashboard-topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.dashboard-topbar-actions .pill,
.dashboard-topbar-actions .pill:visited,
.dashboard-topbar-actions .link-pill,
.dashboard-topbar-actions .link-pill:visited {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f7f9ff;
  border: 1px solid #dde5f6;
  color: #20304b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.dashboard-topbar-actions .pill.ok {
  background: #e8faf1;
  border-color: #c7efdc;
  color: #157a56;
}
.dashboard-topbar-actions .topbar-user-pill {
  background: #eef3ff;
  border-color: #d7e1fb;
}
.dashboard-topbar-actions .topbar-logout-pill:hover {
  background: #eef3ff;
  border-color: #cfdaf6;
}
.dashboard-topbar-actions .notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border-color: #dde5f6;
  box-shadow: 0 6px 16px rgba(27, 42, 72, 0.06);
}
.dashboard-topbar-actions .notif-panel {
  inset-inline-end: 0;
}
.dashboard-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}
.dashboard-section-tabs > a.dashboard-section-tab,
.dashboard-section-tabs > a.dashboard-section-tab:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid #d8e1f4;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #1d2c4a;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(24, 72, 168, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.dashboard-section-tabs > a.dashboard-section-tab:hover {
  transform: translateY(-1px);
  background: #f6f9ff;
  border-color: #bfd0f3;
  box-shadow: 0 12px 22px rgba(24, 72, 168, 0.08);
}
.dashboard-section-tabs > a.dashboard-section-tab.is-active,
.dashboard-section-tabs > a.dashboard-section-tab.is-active:visited {
  background: #2f6fed;
  border-color: #2f6fed;
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 111, 237, 0.22);
}
.dashboard-section-tab-label {
  font-size: 12px;
  font-weight: 700;
}
.dashboard-section-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf3ff;
  color: #365cad;
  font-size: 11px;
  font-weight: 700;
}
.dashboard-section-tab.is-active .dashboard-section-tab-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.sidebar.dashboard-sidebar {
  gap: 14px;
}
.sidebar .sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sidebar .sidebar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef3ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex: 0 0 40px;
}
.sidebar .sidebar-brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.sidebar .sidebar-brand {
  margin-bottom: 0;
  display: grid;
  gap: 8px;
}
.sidebar .sidebar-section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.18);
  color: #e3ebff;
  font-size: 11px;
  font-weight: 700;
}
.sidebar .sidebar-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar .sidebar-panel-head {
  display: grid;
  gap: 4px;
}
.sidebar .sidebar-panel-title {
  color: #f6f8ff;
  font-size: 13px;
  font-weight: 700;
}
.sidebar .sidebar-panel-note {
  color: #95a2bc;
  font-size: 11px;
  line-height: 1.6;
}
.sidebar .sidebar-page-list,
.sidebar .sidebar-section-list {
  display: grid;
  gap: 8px;
}
.sidebar .sidebar-section-stack {
  display: grid;
  gap: 10px;
}
.sidebar .sidebar-section-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar .sidebar-section-group.active {
  background: rgba(58, 76, 118, 0.2);
  border-color: rgba(84, 132, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(84, 132, 255, 0.08);
}
.sidebar .sidebar-page-link,
.sidebar .sidebar-page-link:visited,
.sidebar .sidebar-section-link,
.sidebar .sidebar-section-link:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.sidebar .sidebar-link-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.sidebar .sidebar-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef3ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex: 0 0 34px;
}
.sidebar .sidebar-page-link,
.sidebar .sidebar-page-link:visited {
  background: rgba(255, 255, 255, 0.03);
  color: #eef3ff;
}
.sidebar .sidebar-page-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}
.sidebar .sidebar-page-link.active,
.sidebar .sidebar-page-link.active:visited {
  background: #eef3ff;
  border-color: #c8d8ff;
  color: #1a2843;
  box-shadow: 0 10px 22px rgba(15, 24, 40, 0.18);
}
.sidebar .sidebar-page-link.active .sidebar-link-icon,
.sidebar .sidebar-section-link.active .sidebar-link-icon,
.nav-settings .settings-cta.active .sidebar-link-icon {
  background: rgba(32, 48, 76, 0.1);
  border-color: rgba(32, 48, 76, 0.16);
  color: inherit;
}
.sidebar .sidebar-page-link.active .nav-badge {
  background: #20304c;
  color: #fff;
}
.sidebar .sidebar-page-link-title,
.sidebar .sidebar-section-link-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
}
.sidebar .sidebar-section-link,
.sidebar .sidebar-section-link:visited {
  background: rgba(14, 18, 26, 0.28);
  color: #d8dfed;
}
.sidebar .sidebar-section-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.sidebar .sidebar-section-link.active,
.sidebar .sidebar-section-link.active:visited {
  background: #263044;
  border-color: rgba(84, 132, 255, 0.25);
  color: #fff;
}
.sidebar .sidebar-section-link-meta {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: #d8e0f3;
}
.sidebar .sidebar-section-link.active .sidebar-section-link-meta {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sidebar .sidebar-inline-pages {
  padding-inline-start: 10px;
  border-inline-start: 2px solid rgba(149, 174, 255, 0.26);
}
.sidebar .sidebar-inline-pages .sidebar-page-link,
.sidebar .sidebar-inline-pages .sidebar-page-link:visited {
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-settings {
  display: grid;
  gap: 8px;
}
.nav-settings .settings-cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #243047;
  color: #eef3ff;
  font-weight: 700;
  border-radius: 12px;
}
.nav-settings .settings-cta:hover {
  background: #2b3954;
}
.nav-settings .settings-cta .sidebar-link-main {
  width: 100%;
}

.sidebar-edge-toggle {
  position: fixed;
  z-index: 320;
  width: 34px;
  min-height: 0;
  border: 1px solid #d8e1f4;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  box-shadow: 0 14px 28px rgba(24, 42, 72, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 18px 0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.sidebar-edge-toggle:hover {
  background: #f8fbff;
  border-color: #bfd0f3;
  box-shadow: 0 16px 30px rgba(24, 42, 72, 0.16);
  transform: translateX(-1px);
}
.sidebar-edge-toggle.is-collapsed {
  background: #223048;
  border-color: #223048;
}
.sidebar-edge-toggle-arrow {
  font-size: 20px;
  line-height: 1;
  color: #2c436d;
}
.sidebar-edge-toggle.is-collapsed .sidebar-edge-toggle-arrow {
  color: #eef3ff;
}
.sidebar-edge-toggle-rib {
  display: grid;
  gap: 8px;
}
.sidebar-edge-toggle-rib span {
  display: block;
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: rgba(44, 67, 109, 0.22);
}
.sidebar-edge-toggle.is-collapsed .sidebar-edge-toggle-rib span {
  background: rgba(238, 243, 255, 0.34);
}

.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-brand-copy,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-section-label,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-panel-head,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-section-link-name,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-page-link-title,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-section-link-meta,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .nav-badge,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .settings-cta-label {
  display: none !important;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-inline-pages {
  display: none;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-panel {
  padding: 10px 8px;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-section-group {
  padding: 8px;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-brand {
  justify-items: center;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-brand-row {
  justify-content: center;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-section-link,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-page-link,
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .settings-cta {
  justify-content: center;
  padding-inline: 0;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-link-main {
  justify-content: center;
  flex: 0 0 auto;
}
.app.sidebar-collapsed:not(.sidebar-peek) .sidebar .sidebar-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}
.nav-settings .settings-cta.active {
  background: #eef3ff;
  color: #1c2b49;
}

/* Sidebar rebuild */
.app {
  --sidebar-width: 356px;
  --sidebar-collapsed-width: 96px;
  --sidebar-rail-width: 72px;
}
.topbar .sidebar-toggle {
  display: none;
}
.dashboard-sidebar {
  width: var(--sidebar-width);
  padding: calc(var(--topbar-height, 70px) + 12px) 12px 12px;
  background: transparent;
  border-inline-end: none;
  box-shadow: none;
  overflow: visible;
  z-index: 1210;
}
.dashboard-sidebar .sidebar-surface {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-rail-width);
  min-height: calc(100vh - var(--topbar-height, 70px) - 24px);
  gap: 0;
  align-items: stretch;
  position: relative;
  z-index: 1211;
}

.modal-panel {
  z-index: 1220;
}

.services-page {
  position: relative;
}

.services-page .service-local-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: 20px;
}

.services-page .service-local-modal .modal-backdrop {
  border-radius: 24px;
}
.dashboard-sidebar .sidebar-panel-shell {
  direction: rtl;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-inline-end: none;
  border-radius: 24px 0 0 24px;
  box-shadow: 0 18px 32px rgba(18, 24, 38, 0.08);
  padding: 18px 18px 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.dashboard-sidebar .sidebar-panel-top {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f6;
}
.dashboard-sidebar .sidebar-panel-brand {
  font-size: 16px;
  font-weight: 800;
  color: #181d28;
}
.dashboard-sidebar .sidebar-panel-caption {
  font-size: 12px;
  color: #7d8698;
}
.dashboard-sidebar .sidebar-panels {
  min-height: 0;
  display: grid;
}
.dashboard-sidebar .sidebar-content-panel {
  min-height: 0;
  display: none;
  align-content: start;
  gap: 16px;
}
.dashboard-sidebar .sidebar-content-panel.is-visible {
  display: grid;
}
.dashboard-sidebar .sidebar-panel-head {
  display: grid;
  gap: 6px;
}
.dashboard-sidebar .sidebar-panel-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #171c26;
}
.dashboard-sidebar .sidebar-panel-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: #7d8698;
}
.dashboard-sidebar .sidebar-panel-links {
  display: grid;
  gap: 6px;
  align-content: start;
}
.dashboard-sidebar .sidebar-panel-link,
.dashboard-sidebar .sidebar-panel-link:visited {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.dashboard-sidebar .sidebar-panel-link:hover {
  background: #f6f8fc;
  border-color: #eceff6;
  transform: translateX(-2px);
}
.dashboard-sidebar .sidebar-panel-link.active,
.dashboard-sidebar .sidebar-panel-link.active:visited {
  background: #111318;
  color: #fff;
  border-color: #111318;
  box-shadow: 0 10px 18px rgba(17, 19, 24, 0.2);
}
.dashboard-sidebar .sidebar-panel-link.active::after {
  content: "";
  position: absolute;
  inset-inline-start: -8px;
  top: 50%;
  width: 10px;
  height: 18px;
  background: #111318;
  transform: translateY(-50%);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.dashboard-sidebar .sidebar-panel-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-sidebar .nav-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.dashboard-sidebar .sidebar-rail {
  background: linear-gradient(180deg, #0f1218 0%, #121722 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 24px 24px 0;
  box-shadow: 0 20px 34px rgba(10, 14, 24, 0.26);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  justify-items: center;
  padding: 14px 10px;
  gap: 12px;
}
.dashboard-sidebar .sidebar-rail-top,
.dashboard-sidebar .sidebar-rail-bottom,
.dashboard-sidebar .sidebar-rail-nav {
  display: grid;
  gap: 10px;
  justify-items: center;
}
.dashboard-sidebar .sidebar-rail-nav {
  align-content: start;
  width: 100%;
}
.dashboard-sidebar .sidebar-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex: 0 0 44px;
}
.dashboard-sidebar .sidebar-link-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.dashboard-sidebar .sidebar-link-icon .sidebar-icon-solid {
  fill: currentColor;
  stroke: none;
}
.dashboard-sidebar .sidebar-link-fallback {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.dashboard-sidebar .sidebar-rail-brand,
.dashboard-sidebar .sidebar-pin-toggle,
.dashboard-sidebar .sidebar-rail-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dashboard-sidebar .sidebar-rail-brand:hover,
.dashboard-sidebar .sidebar-pin-toggle:hover,
.dashboard-sidebar .sidebar-rail-link:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.dashboard-sidebar .sidebar-pin-toggle.is-collapsed .sidebar-link-icon {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f7ff;
  box-shadow: none;
}
.dashboard-sidebar .sidebar-pin-toggle:not(.is-collapsed) .sidebar-link-icon {
  background: #232938;
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.dashboard-sidebar .sidebar-rail-brand.active .sidebar-link-icon,
.dashboard-sidebar .sidebar-rail-link.active .sidebar-link-icon {
  background: linear-gradient(180deg, #6f5cff 0%, #5446ff 100%);
  border-color: rgba(126, 113, 255, 0.9);
  color: #fff;
  box-shadow: 0 12px 24px rgba(94, 81, 255, 0.28);
}
.dashboard-sidebar .sidebar-rail-link.utility.active .sidebar-link-icon {
  background: #232938;
  border-color: rgba(255, 255, 255, 0.12);
}
.dashboard-sidebar .sidebar-rail-settings {
  width: 100%;
  display: grid;
  justify-items: center;
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.app.ltr .dashboard-sidebar .sidebar-surface {
  direction: ltr;
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
}
.app.ltr .dashboard-sidebar .sidebar-panel-shell {
  direction: ltr;
  order: 2;
  border-radius: 0 24px 24px 0;
  border-inline-start: none;
  border-inline-end: 1px solid #e7eaf2;
}
.app.ltr .dashboard-sidebar .sidebar-rail {
  order: 1;
  border-radius: 24px 0 0 24px;
}
.app.ltr .dashboard-sidebar .sidebar-panel-link.active::after {
  inset-inline-start: auto;
  inset-inline-end: -8px;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
}
.app.sidebar-collapsed .dashboard-sidebar {
  width: var(--sidebar-collapsed-width);
}
.app.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar {
  padding-inline: 12px;
}
.app.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar:hover,
.app.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar:focus-within {
  width: var(--sidebar-collapsed-width);
  padding-inline: 12px;
}
.app.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar .sidebar-panel-shell {
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
}
.app.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar .sidebar-surface {
  grid-template-columns: 0 var(--sidebar-rail-width);
}
.app.ltr.sidebar-collapsed:not(.sidebar-peek) .dashboard-sidebar .sidebar-surface {
  grid-template-columns: var(--sidebar-rail-width) 0;
}
.app.sidebar-collapsed.sidebar-peek .dashboard-sidebar {
  width: var(--sidebar-width);
  padding-inline: 12px;
}

@media (max-width: 1100px) {
  .topbar .sidebar-toggle {
    display: inline-flex;
  }
  .dashboard-sidebar {
    width: min(372px, 92vw);
    height: calc(100vh - var(--topbar-height, 70px));
    top: var(--topbar-height, 70px);
    padding: 12px;
  }
  .dashboard-sidebar .sidebar-surface {
    min-height: 100%;
  }
  .dashboard-sidebar .sidebar-panel-shell {
    padding: 16px;
  }
  .dashboard-sidebar .sidebar-panel-title {
    font-size: 20px;
  }
}
.system-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}
.system-map-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: calc(var(--topbar-height, 70px) + 24px);
}
.system-map-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.system-map-link {
  display: grid;
  gap: 6px;
  text-decoration: none;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfcff;
  color: var(--dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 100%;
}
.system-map-link:hover {
  transform: translateY(-2px);
  border-color: #c9d8fb;
  box-shadow: 0 12px 24px rgba(47, 111, 237, 0.08);
}
.system-map-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.system-map-link-title {
  font-size: 14px;
  font-weight: 700;
}
.system-map-link-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.notification-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.notifications-list {
  display: grid;
  gap: 12px;
}
.notification-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.notification-card.is-unread {
  border-color: #d8e3fb;
  box-shadow: 0 14px 28px rgba(47, 111, 237, 0.08);
}
.notification-card.is-resolved {
  opacity: 0.86;
}
.notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.notification-copy,
.notification-meta,
.notification-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.notification-copy {
  display: grid;
  gap: 8px;
}
.notification-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}
.notification-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.notification-empty-card {
  text-align: center;
  justify-items: center;
}

@media (max-width: 900px) {
  .notification-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .notification-head {
    flex-direction: column;
  }
  .smart-alert-stack {
    inset-inline-start: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
  }
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}
.accounts-main-stack,
.accounts-side,
.account-binding-grid,
.account-helper-list {
  display: grid;
  gap: 12px;
}
.accounts-tree-root,
.account-tree-children {
  display: grid;
  gap: 12px;
}
.account-tree-children {
  margin-top: 12px;
  padding-inline-start: 18px;
  border-inline-start: 2px solid #efe4d5;
}
.account-tree-item {
  border: 1px solid #ece3d6;
  border-radius: 16px;
  padding: 14px;
  background: #fffdf8;
  box-shadow: 0 8px 20px rgba(28, 25, 20, 0.05);
}
.account-tree-item.level-1 {
  background: linear-gradient(135deg, #fffdf9 0%, #f8f4ec 100%);
}
.account-tree-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.account-tree-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.account-tree-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-tree-line h3 {
  margin: 0;
  font-size: 16px;
}
.account-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf2ff;
  border: 1px solid #dbe5ff;
  color: #32466f;
  font-size: 12px;
  font-weight: 700;
}
.account-tree-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-type-pill.type-asset {
  background: #e6f1ea;
  color: #2f6c51;
}
.account-type-pill.type-liability {
  background: #f9e8e8;
  color: #9a4949;
}
.account-type-pill.type-equity {
  background: #efe8ff;
  color: #5d4e8a;
}
.account-type-pill.type-revenue {
  background: #e8f5f0;
  color: #1f6d57;
}
.account-type-pill.type-expense {
  background: #fff1e3;
  color: #9b6230;
}
.account-binding-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #ece3d6;
  background: #fffdf8;
}
.account-binding-row.is-linked {
  border-color: #d7e6dc;
  background: linear-gradient(180deg, #fdfefd 0%, #f5faf7 100%);
}
.account-binding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.account-helper-list .helper-item {
  border: 1px solid #ece3d6;
  border-radius: 14px;
  padding: 12px;
  background: #fffdf9;
}
.account-checks .account-check-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .dashboard-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .dashboard-section-tabs {
    order: 3;
    flex: 1 1 100%;
  }
  .system-map-grid {
    grid-template-columns: 1fr;
  }
  .accounts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard-topbar {
    padding-inline: 16px;
  }
  .dashboard-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-section-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .account-tree-head,
  .account-binding-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .chair-section-form,
  .zone-chair-section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .account-checks .account-check-list {
    flex-direction: column;
    align-items: flex-start;
  }
}

.website-content {
  display: grid;
  gap: 18px;
}
.website-admin-grid {
  display: grid;
  gap: 18px;
}
.website-preview-card {
  overflow: hidden;
}
.website-preview-shell {
  --website-primary: #3b6ff5;
  --website-accent: #f3b25b;
  --website-surface: #f7f9ff;
  --website-text: #132238;
  border: 1px solid #e6eaf6;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--website-surface) 100%);
  box-shadow: 0 24px 48px rgba(34, 55, 109, 0.08);
}
.website-preview-cover {
  min-height: 88px;
  background: linear-gradient(135deg, var(--website-primary) 0%, var(--website-accent) 100%);
  background-size: cover;
  background-position: center;
}
.website-preview-body {
  display: grid;
  gap: 18px;
  padding: 22px;
  color: var(--website-text);
}
.website-preview-brand,
.website-preview-hero,
.website-preview-meta,
.website-preview-actions,
.website-preview-gallery,
.website-swatch-colors,
.website-split-grid,
.website-media-grid,
.website-card-list,
.website-mini-card,
.website-mini-card-content {
  display: flex;
}
.website-preview-brand,
.website-preview-hero {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.website-preview-logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(26, 41, 83, 0.14);
}
.website-preview-logo.is-placeholder {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.92);
}
.website-preview-name {
  font-size: 26px;
  font-weight: 800;
}
.website-preview-tagline,
.website-preview-hero p,
.website-preview-meta,
.website-mini-card-content .subtle {
  color: #66718a;
}
.website-preview-hero h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.35;
}
.website-preview-hero p {
  margin: 0;
  max-width: 540px;
}
.website-preview-actions {
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.website-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}
.website-preview-btn.primary {
  background: var(--website-primary);
  color: #fff;
}
.website-preview-btn.secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--website-text);
  border: 1px solid rgba(19, 34, 56, 0.08);
}
.website-preview-hero-image {
  width: min(280px, 32vw);
  min-width: 180px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(33, 46, 89, 0.16);
}
.website-preview-meta,
.website-preview-chips,
.website-preview-gallery {
  gap: 10px;
  flex-wrap: wrap;
}
.website-preview-meta span,
.website-preview-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(19, 34, 56, 0.08);
}
.website-preview-gallery img,
.website-media-preview,
.website-mini-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.website-preview-gallery img {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(33, 46, 89, 0.12);
}
.website-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.website-swatch {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e4e9f5;
  background: #fff;
  text-align: start;
}
.website-swatch.is-active {
  border-color: #9eb7ff;
  box-shadow: 0 16px 28px rgba(59, 111, 245, 0.12);
}
.website-swatch-colors {
  gap: 8px;
}
.website-swatch-colors i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(19, 34, 56, 0.06);
}
.website-media-grid,
.website-split-grid {
  gap: 16px;
  flex-wrap: wrap;
}
.website-media-field,
.website-card-list {
  flex: 1 1 280px;
}
.website-media-field {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e8e3d8;
  border-radius: 18px;
  background: #fffdf9;
}
.website-media-head,
.website-mini-card-title {
  font-weight: 700;
  color: #1d273c;
}
.website-media-preview {
  height: 140px;
  border-radius: 16px;
}
.settings-logo-preview-card {
  display: grid;
  place-items: center;
  width: min(100%, 340px);
  min-height: 180px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed #dccdb7;
  background:
    linear-gradient(45deg, rgba(247, 242, 233, 0.92) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(247, 242, 233, 0.92) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(247, 242, 233, 0.92) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(247, 242, 233, 0.92) 75%),
    #fff;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.settings-logo-preview {
  width: 100%;
  max-width: 280px;
  max-height: 132px;
  object-fit: contain;
  display: block;
}
.settings-logo-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 24px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.website-card-list {
  flex-direction: column;
  gap: 12px;
}
.website-mini-card {
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e8edf6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.website-mini-card-media {
  width: 110px;
  min-width: 110px;
  height: 110px;
  border-radius: 18px;
  overflow: hidden;
  background: #eef3ff;
}
.website-mini-card-content {
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 900px) {
  .website-preview-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .website-preview-hero-image {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .website-mini-card {
    flex-direction: column;
  }
  .website-mini-card-media {
    width: 100%;
    min-width: 0;
    height: 180px;
  }
}

.auth-portal-card,
.customer-portal-card,
.employee-home-card {
  width: min(100%, 1080px);
}

.auth-portal-card--compact {
  width: min(100%, 560px);
  padding: 28px 28px 32px;
  border-radius: 32px;
}

.auth-brand-head {
  margin-bottom: 18px;
}

.auth-brand-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #e8e3d8;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffefc 0%, #fff8f0 100%);
}

.auth-brand-badge__logo,
.auth-brand-badge__placeholder {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  flex: 0 0 auto;
}

.auth-brand-badge__logo {
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #efe5d5;
  padding: 10px;
}

.auth-brand-badge__placeholder {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: #14315b;
  background: linear-gradient(135deg, #eef4ff 0%, #fff4e5 100%);
}

.auth-brand-badge__text {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.auth-brand-badge__text strong {
  font-size: 1.3rem;
  color: #14233b;
}

.auth-brand-badge__text span {
  color: #6d7890;
}

.portal-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.portal-auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: start;
}

.portal-auth-panel {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #e8edf6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 24px 50px rgba(17, 29, 52, 0.07);
}

.portal-unified-form {
  margin-top: 12px;
}

.portal-unified-form--compact {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.portal-login-icon-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.portal-login-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  color: #d9ac6d;
  background: linear-gradient(180deg, #fffaf3 0%, #fff6eb 100%);
  border: 1px solid #f0dfc4;
}

.portal-login-icon svg {
  width: 42px;
  height: 42px;
}

.portal-login-head {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  margin-bottom: 14px;
}

.portal-login-head h1 {
  margin: 0;
  color: #3b2f24;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.portal-login-head p {
  margin: 0;
  color: #8a94aa;
  font-weight: 700;
}

.portal-login-logo-row {
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.portal-login-logo {
  width: min(100%, 180px);
  max-height: 90px;
  object-fit: contain;
}

.portal-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7a8499;
}

.portal-inline-link {
  color: #d2a15e;
  font-weight: 700;
  text-decoration: none;
}

.portal-submit-btn {
  width: 100%;
  min-height: 56px;
  justify-content: center;
  font-size: 1.05rem;
}

.mobile-portal-page .auth-shell {
  padding: 28px;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-nav__item {
  display: grid;
  gap: 4px;
  justify-items: center;
  color: #68758f;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
}

.mobile-bottom-nav__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #f4f7ff;
  color: #315fd7;
  font-size: 1rem;
}

.mobile-bottom-nav__badge {
  position: absolute;
  top: -6px;
  inset-inline-end: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4f63;
  color: #fff;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(239, 79, 99, 0.24);
}

.mobile-bottom-nav__item.is-active .mobile-bottom-nav__icon,
.mobile-bottom-nav__item:hover .mobile-bottom-nav__icon {
  background: linear-gradient(135deg, #3b6ff5 0%, #6d91ff 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(59, 111, 245, 0.22);
}

.mobile-bottom-nav__item.is-active {
  color: #243b77;
}

.portal-auth-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.portal-auth-hint {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid #e8edf6;
  background: #fbfcff;
}

.portal-auth-hint strong {
  color: #14233b;
}

.portal-auth-hint p {
  margin: 0;
  color: #5f6c85;
  line-height: 1.8;
}

.portal-option-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid #e8edf6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 24px 50px rgba(17, 29, 52, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-option-card:hover {
  transform: translateY(-2px);
  border-color: #cfdaf6;
  box-shadow: 0 28px 56px rgba(17, 29, 52, 0.11);
}

.portal-option-card h2 {
  margin: 0;
  color: #14233b;
}

.portal-option-card p {
  margin: 0;
  color: #5f6c85;
  line-height: 1.8;
}

.portal-option-card--employee {
  background:
    radial-gradient(circle at top right, rgba(59, 111, 245, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.portal-option-card--customer {
  background:
    radial-gradient(circle at top left, rgba(243, 178, 91, 0.16), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
}

.portal-option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(59, 111, 245, 0.1);
  color: #244fbf;
  font-weight: 700;
}

.portal-option-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-option-list li {
  position: relative;
  padding-inline-start: 18px;
  color: #51607b;
}

.portal-option-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b6ff5;
}

.portal-smart-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: 26px;
  border: 1px solid #e8edf6;
  background:
    radial-gradient(circle at top right, rgba(59, 111, 245, 0.12), transparent 30%),
    radial-gradient(circle at bottom left, rgba(243, 178, 91, 0.16), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.portal-smart-copy {
  display: grid;
  gap: 10px;
}

.portal-smart-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(59, 111, 245, 0.1);
  color: #244fbf;
  font-weight: 700;
}

.portal-smart-copy h1 {
  margin: 0;
  color: #14233b;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.portal-smart-copy p {
  margin: 0;
  color: #5f6c85;
  line-height: 1.9;
}

.portal-smart-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-smart-stat {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #e7edf7;
  background: rgba(255, 255, 255, 0.82);
}

.portal-smart-stat strong {
  color: #14233b;
  font-size: 1.5rem;
}

.portal-smart-stat span {
  color: #65728b;
}

.portal-help-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.portal-help-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid #e8edf6;
  background: #fbfcff;
}

.portal-help-card strong {
  color: #14233b;
}

.portal-help-card p {
  margin: 0;
  color: #5f6c85;
  line-height: 1.8;
}

.portal-help-actions {
  margin-top: 18px;
  justify-content: center;
}

.portal-switcher {
  display: flex;
  gap: 10px;
  margin: 6px 0 18px;
}

.portal-dashboard {
  display: grid;
  gap: 22px;
}

.portal-desktop-nav,
.portal-desktop-stack {
  display: none;
}

.portal-mobile-views {
  display: block;
}

.portal-desktop-nav {
  position: sticky;
  top: 16px;
  z-index: 8;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid #e7ecf7;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 32px rgba(17, 29, 52, 0.08);
  backdrop-filter: blur(12px);
}

.portal-desktop-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #2f4268;
  background: #f7f9ff;
  border: 1px solid #e7ecf7;
  font-weight: 800;
  cursor: pointer;
}

.portal-desktop-nav__item:hover {
  background: #eef3ff;
}

.portal-desktop-nav__item.is-active {
  background: linear-gradient(135deg, #2f6fed 0%, #4b7cf4 100%);
  border-color: #2f6fed;
  color: #fff;
  box-shadow: 0 14px 26px rgba(47, 111, 237, 0.18);
}

.portal-desktop-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #df4454;
  color: #fff;
  font-size: 11px;
}

.portal-desktop-stack {
  display: grid;
  gap: 24px;
}

.portal-desktop-section {
  display: none;
  gap: 14px;
}

.portal-desktop-section.is-active {
  display: grid;
}

.portal-desktop-section__head {
  display: grid;
  gap: 6px;
}

.portal-desktop-section__head h2 {
  margin: 0;
  color: #14233b;
  font-size: 1.4rem;
}

.portal-dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.portal-dashboard-head h1 {
  margin: 0 0 8px;
  color: #14233b;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.portal-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.portal-settings-card {
  background:
    radial-gradient(circle at top right, rgba(59, 111, 245, 0.1), transparent 28%),
    radial-gradient(circle at bottom left, rgba(243, 178, 91, 0.14), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.portal-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-settings-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid #e8edf6;
  background: rgba(255, 255, 255, 0.88);
}

.portal-settings-item strong {
  color: #14233b;
}

.portal-settings-item span {
  color: #315fd7;
  font-weight: 800;
}

.portal-settings-item small {
  color: #6a7892;
}

.portal-settings-actions {
  margin-top: 18px;
}

.btn.danger {
  background: #ef5b6f;
  color: #fff;
  border-color: #ef5b6f;
}

.btn.danger:hover {
  background: #e1465d;
  border-color: #e1465d;
}

.customer-membership-card {
  display: grid;
  gap: 16px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 18px 16px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(244, 179, 86, 0.35), transparent 34%),
    linear-gradient(135deg, #14317d 0%, #2651ca 48%, #4f7df4 72%, #f0ae54 100%);
  box-shadow: 0 30px 52px rgba(35, 71, 187, 0.24);
  overflow: hidden;
  position: relative;
}

.customer-card-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.customer-card-side {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid #e8edf6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  height: fit-content;
}

.customer-card-side__block {
  display: grid;
  gap: 6px;
}

.customer-card-side__label {
  font-size: 11px;
  font-weight: 800;
  color: #6d7b96;
}

.customer-card-side__block strong {
  font-size: 1.2rem;
  color: #14233b;
}

.customer-card-side__block small {
  color: #66748f;
}

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

.customer-card-side__item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #f8faff;
  border: 1px solid #e7edf7;
}

.customer-card-side__item span {
  font-size: 11px;
  color: #6c7892;
}

.customer-card-side__item strong {
  font-size: 14px;
  color: #2146b7;
}

.customer-card-side__note {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff7ec;
  border: 1px solid #f4e2c5;
  color: #8b6d3f;
  line-height: 1.9;
  font-size: 12px;
}

.customer-card-side__actions {
  display: grid;
  gap: 10px;
}

.customer-card-side__actions .btn {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

.customer-membership-card__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 12px;
}

.customer-membership-card__chip-wrap {
  display: inline-flex;
  align-items: flex-start;
}

.customer-membership-card__chip {
  display: inline-block;
  width: 46px;
  height: 34px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 223, 160, 0.95) 0%, rgba(219, 168, 88, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 10px 16px rgba(12, 20, 45, 0.18);
  position: relative;
}

.customer-membership-card__chip::before,
.customer-membership-card__chip::after {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  inset-inline-end: 12px;
  height: 1px;
  background: rgba(109, 70, 12, 0.28);
}

.customer-membership-card__chip::before {
  top: 13px;
}

.customer-membership-card__chip::after {
  bottom: 13px;
}

.customer-membership-card__identity {
  display: grid;
  gap: 6px;
}

.customer-membership-card__identity-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-membership-card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.7);
}

.customer-membership-card__mini-tier {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.customer-membership-card__identity strong {
  font-size: 1.2rem;
  line-height: 1.2;
}

.customer-membership-card__identity small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.customer-membership-card__salon-name {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.96);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.customer-membership-card__brand {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.customer-membership-card__brand-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.customer-membership-card__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 16px rgba(14, 20, 44, 0.14);
}

.customer-membership-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.customer-membership-card__brand-mark {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}

.customer-membership-card__brand-mark i {
  position: absolute;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.customer-membership-card__brand-mark i:last-child {
  inset-inline-start: 14px;
  background: rgba(255, 196, 116, 0.95);
  mix-blend-mode: screen;
}

.customer-membership-card__tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.customer-membership-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-membership-card__meta-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.customer-membership-card__meta-item span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.74);
}

.customer-membership-card__meta-item strong {
  font-size: 13px;
  color: #fff;
}

.customer-barcode-block {
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.customer-barcode-svg {
  width: 100%;
  height: auto;
  display: block;
}

.customer-membership-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.customer-membership-card__footer-meta {
  display: grid;
  gap: 4px;
}

.customer-membership-card__footer-meta--align-end {
  text-align: end;
}

.customer-membership-card__footer span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
}

.customer-membership-card__footer strong {
  font-size: 12px;
  letter-spacing: 1.1px;
  color: #fff;
}

.customer-card-tier {
  color: #2347bb;
}

.portal-message-list {
  display: grid;
  gap: 12px;
}

.portal-message-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e7ecf6;
  background: #fbfcff;
}

.portal-message-item strong {
  color: #152540;
}

.portal-message-item p,
.portal-message-item span {
  margin: 0;
  color: #5f6c85;
}

@media (min-width: 901px) {
  .mobile-portal-page .auth-shell {
    padding: 34px;
    align-items: start;
  }

  .mobile-portal-page .auth-card.customer-portal-card,
  .mobile-portal-page .auth-card.employee-home-card {
    width: min(1180px, 100%);
    padding: 30px 34px 34px;
    border-radius: 32px;
  }

  .portal-dashboard {
    gap: 26px;
  }

  .portal-desktop-nav {
    display: grid;
  }

  .portal-desktop-stack {
    display: grid;
  }

  .portal-mobile-views,
  .mobile-bottom-nav {
    display: none !important;
  }

  .portal-dashboard-head {
    align-items: center;
  }

  .portal-dashboard-head h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
  }

  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-grid--single {
    grid-template-columns: minmax(0, 840px);
    justify-content: center;
  }

  .portal-grid--single > .card {
    width: 100%;
  }

  .portal-grid--single#customer-card,
  #customer-card.portal-grid--single {
    grid-template-columns: minmax(0, 1080px);
  }

  .customer-membership-card {
    max-width: 500px;
    padding: 20px 20px 18px;
    gap: 16px;
  }

  .customer-membership-card__top {
    grid-template-columns: auto 1fr auto;
  }

  .customer-membership-card__identity strong {
    font-size: 1.35rem;
  }

  .customer-membership-card__meta {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .customer-barcode-block {
    padding: 14px 16px;
  }

  .customer-membership-card__footer strong {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .portal-desktop-nav,
  .portal-desktop-stack {
    display: none !important;
  }

  .portal-mobile-views {
    display: block;
  }

  .customer-card-layout {
    grid-template-columns: 1fr;
  }

  .customer-card-side {
    padding: 16px;
  }

  .customer-card-side__grid {
    grid-template-columns: 1fr 1fr;
  }

  .customer-card-side__actions {
    grid-template-columns: 1fr;
  }

  .customer-membership-card {
    padding: 18px;
    border-radius: 24px;
    max-width: none;
  }
  .customer-membership-card__top,
  .customer-membership-card__footer {
    grid-template-columns: 1fr;
    display: grid;
  }
  .customer-membership-card__top {
    grid-template-columns: 1fr;
  }
  .customer-membership-card__brand {
    justify-items: start;
  }
  .customer-membership-card__brand-head {
    justify-content: flex-start;
  }
  .customer-membership-card__meta {
    grid-template-columns: 1fr 1fr;
  }
  .portal-auth-layout,
  .portal-options-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-smart-intro,
  .portal-dashboard-head {
    flex-direction: column;
  }

  .portal-smart-intro,
  .portal-help-strip {
    grid-template-columns: 1fr;
  }

  .portal-smart-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .pos-overview-cards {
    grid-template-columns: 1fr;
  }
  .staff-modal-topnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .staff-form-grid {
    grid-template-columns: 1fr !important;
  }

  .customer-card-side__grid {
    grid-template-columns: 1fr;
  }

  .mobile-portal-page .auth-shell {
    padding: 20px 20px 110px;
  }

  .auth-portal-card--compact {
    padding: 22px 18px 26px;
    border-radius: 26px;
  }

  .portal-smart-stats {
    grid-template-columns: 1fr;
  }

  .portal-form-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-bottom-nav {
    position: fixed;
    inset-inline: 12px;
    bottom: 12px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px;
    border-radius: 24px;
    border: 1px solid rgba(222, 229, 243, 0.95);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(17, 29, 52, 0.16);
    backdrop-filter: blur(16px);
  }

  .mobile-portal-page .auth-card.employee-home-card,
  .mobile-portal-page .auth-card.customer-portal-card {
    width: min(100%, 100%);
    border-radius: 28px;
    padding: 18px;
  }

  .mobile-portal-page .kpi-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-portal-page .table-wrap {
    border-radius: 18px;
    border: 1px solid #ecf0f8;
    background: #fff;
  }

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

.reviews-page {
  display: grid;
  gap: 18px;
}

.reviews-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
}

.reviews-hero-copy h1 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1.1;
}

.reviews-hero-copy p:last-child {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.reviews-export-btn {
  min-width: 120px;
}

.reviews-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(260px, 1.15fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.reviews-panel,
.reviews-metric-card,
.reviews-filters-card,
.reviews-list-card {
  border-radius: 28px;
}

.reviews-panel {
  padding: 24px;
  min-height: 320px;
}

.reviews-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.reviews-panel-head h2,
.reviews-list-head h2,
.reviews-empty-state h3 {
  margin: 0;
  font-size: 28px;
}

.reviews-panel-head span,
.reviews-list-head p,
.reviews-list-meta {
  color: var(--muted);
  font-size: 14px;
}

.reviews-chart {
  height: calc(100% - 54px);
}

.reviews-activity-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  min-height: 220px;
}

.reviews-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.reviews-bar-label-top,
.reviews-bar-label,
.reviews-distribution-count,
.reviews-stars {
  font-size: 12px;
  color: var(--muted);
}

.reviews-bar {
  width: 100%;
  max-width: 44px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #8bb8ff 0%, #5f7bff 60%, #263248 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.reviews-distribution-list {
  display: grid;
  gap: 16px;
}

.reviews-distribution-row {
  display: grid;
  grid-template-columns: 54px 1fr 42px;
  gap: 12px;
  align-items: center;
}

.reviews-distribution-track {
  position: relative;
  height: 14px;
  background: rgba(90, 120, 190, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.reviews-distribution-track span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5f7bff 0%, #8bb8ff 60%, #d9b27b 100%);
}

.reviews-metric-stack {
  display: grid;
  gap: 18px;
}

.reviews-metric-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
}

.reviews-metric-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(245,247,255,0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.reviews-metric-icon.star { color: #9a7548; }
.reviews-metric-icon.comment { color: #4e78ff; }
.reviews-metric-icon.trend { color: #17a56f; }

.reviews-metric-content {
  display: grid;
  gap: 4px;
}

.reviews-metric-content span,
.reviews-metric-content small {
  color: var(--muted);
}

.reviews-metric-content strong {
  font-size: 42px;
  line-height: 1;
}

.reviews-empty-chart,
.reviews-empty-state {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  gap: 10px;
}

.reviews-empty-chart-icon,
.reviews-empty-state-icon {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: rgba(90, 120, 190, 0.06);
  display: grid;
  place-items: center;
  font-size: 34px;
}

.reviews-filters-card,
.reviews-list-card {
  padding: 20px 24px;
}

.reviews-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.reviews-filter-search input,
.reviews-filter-selects select {
  width: 100%;
}

.reviews-filter-selects {
  display: flex;
  gap: 12px;
  align-items: center;
}

.reviews-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.reviews-list-head p {
  margin: 6px 0 0;
}

.reviews-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reviews-review-card {
  border: 1px solid rgba(92, 108, 156, 0.12);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(249,250,255,0.9) 100%);
  display: grid;
  gap: 14px;
}

.reviews-review-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.reviews-review-person {
  display: grid;
  gap: 4px;
}

.reviews-review-person strong {
  font-size: 18px;
}

.reviews-review-person span {
  color: var(--muted);
  font-size: 13px;
}

.reviews-review-rating {
  font-size: 18px;
  letter-spacing: 2px;
  color: #b38145;
}

.reviews-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reviews-review-text {
  margin: 0;
  color: #3b4763;
  line-height: 1.7;
}

@media (max-width: 1280px) {
  .reviews-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reviews-metric-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .reviews-hero {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .reviews-dashboard-grid,
  .reviews-list-grid,
  .reviews-metric-stack {
    grid-template-columns: 1fr;
  }

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

  .reviews-filter-selects {
    flex-wrap: wrap;
  }
}

.pos-terminal {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 10px;
  min-height: 100%;
}

.pos-terminal-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 22px rgba(28, 36, 58, 0.05);
}

.pos-terminal-top--compact {
  grid-template-columns: auto 1fr auto;
  min-height: 78px;
}

.pos-terminal-actions,
.pos-terminal-status,
.pos-terminal-customer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pos-terminal-actions--compact {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.pos-terminal-actions--compact .btn {
  display: inline-flex;
  flex: 0 0 auto;
}

.btn-sm {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.btn.danger-ghost {
  border-color: rgba(255, 87, 87, 0.22);
  color: #d84343;
  background: #fff8f8;
}

.pos-terminal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-terminal-brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.pos-terminal-brand span {
  color: #7f6e63;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pos-terminal-brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #523722 0%, #2f2118 100%);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 10px 18px rgba(62, 38, 20, 0.18);
}

.pos-terminal-status .subtle {
  font-size: 12px;
}

.pos-terminal-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 2.35fr);
  gap: 0;
  min-height: min(920px, calc(100vh - 220px));
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid #ebedf6;
  background: #fff;
  box-shadow: 0 14px 32px rgba(20, 28, 48, 0.06);
  align-items: stretch;
}

.pos-terminal-catalog,
.pos-terminal-invoice {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.pos-terminal-catalog {
  border-inline-end: 1px solid #eceef6;
  padding: 14px 14px 16px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}

.pos-terminal-catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.pos-terminal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eff1f7;
}

.pos-terminal-tab {
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 10px 8px;
  color: #a0a7b7;
  font-weight: 700;
  cursor: pointer;
}

.pos-terminal-tab.active {
  color: #2f2118;
  box-shadow: inset 0 -3px 0 #5a3d2a;
}

.pos-terminal-tab:disabled {
  cursor: default;
  opacity: 0.8;
}

.pos-terminal-chips {
  justify-content: flex-start;
}

.pos-terminal-services {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  overflow: auto;
  min-height: 0;
  padding-inline-end: 6px;
}

.pos-terminal-service-card {
  text-align: right;
  min-height: 114px;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 12px;
}

.pos-terminal-service-thumb {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff7ef 0%, #f7ecdf 100%);
  color: #6a4b36;
  font-size: 20px;
}

.pos-terminal-service-card .service-name {
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.pos-terminal-service-card .service-meta {
  font-size: 12px;
  flex-wrap: wrap;
}

.pos-terminal-invoice {
  padding: 16px 18px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  min-height: 0;
}

.pos-terminal-invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f8;
}

.pos-terminal-invoice-head h2 {
  margin: 0;
  font-size: 32px;
}

.pos-terminal-form {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "stats stats"
    "customer customer"
    "items items"
    "manual payment"
    "bottom bottom";
  gap: 14px;
}

.pos-terminal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  display: none;
}

.pos-terminal-stat {
  border: 1px solid #edf0f8;
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  display: grid;
  gap: 6px;
}

.pos-terminal-stat span {
  color: #8c93a4;
  font-size: 12px;
}

.pos-terminal-stat strong {
  font-size: 34px;
  line-height: 1;
  color: #111c33;
}

.pos-terminal-customer-bar {
  margin: 0;
  background: #fff;
}

.pos-terminal-stats { grid-area: stats; }
.pos-terminal-customer-bar { grid-area: customer; }

.pos-terminal-items-section {
  grid-area: items;
  min-height: 0;
}

.pos-terminal-items-section .pos-items {
  min-height: 0;
  height: 100%;
  max-height: 220px;
  background: #fff;
  border-style: dashed;
}

.pos-terminal-manual-section,
.pos-terminal-payment-section {
  background: #fbfcff;
  padding: 10px 12px;
}

.pos-terminal-manual-section { grid-area: manual; }
.pos-terminal-payment-section { grid-area: payment; }

.pos-terminal-bottom {
  grid-area: bottom;
  position: sticky;
  bottom: 0;
  margin-inline: -18px;
  padding: 12px 18px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,255,0.98) 100%);
  border-top: 1px solid #eceff7;
  backdrop-filter: blur(8px);
}

.pos-terminal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, 0.9fr);
  gap: 12px;
  padding-bottom: 10px;
}

.pos-terminal-summary .pos-summary-row {
  padding: 12px 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed #e4e8f2;
  display: grid;
  gap: 8px;
}

.pos-terminal-summary .pos-summary-row.total {
  background: #fcf8f4;
  border-style: solid;
  border-color: #ead8c7;
}

.pos-terminal-bottom .pos-terminal-actions {
  display: grid;
  gap: 10px;
}

.pos-terminal-pay-btn {
  min-height: 54px;
  border: none;
  border-radius: 18px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #b48ef8 0%, #8fa5f3 100%);
  box-shadow: 0 18px 30px rgba(143, 165, 243, 0.22);
}

.pos-terminal-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pos-terminal-actions-grid .btn {
  min-height: 48px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  justify-content: center;
}

.btn.success-soft { background: #8ccdbd; color: #fff; }
.btn.danger-soft { background: #cf2020; color: #fff; }
.btn.sand-soft { background: #df9d7c; color: #fff; }
.btn.primary-soft { background: #8ea4e8; color: #fff; }
.btn.teal-soft { background: #1ba56b; color: #fff; }
.btn.slate-soft { background: #4a5568; color: #fff; }
.btn.violet-soft { background: #7f35ef; color: #fff; }
.btn.blue-soft { background: #1786c9; color: #fff; text-decoration: none; }

@media (min-width: 1600px) {
  .pos-terminal-workspace {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 2.45fr);
  }
}

@media (max-width: 1599px) {
  .pos-terminal-workspace {
    grid-template-columns: minmax(250px, 0.8fr) minmax(0, 2.2fr);
  }

  .pos-terminal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-terminal-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1366px) {
  .pos-terminal-workspace {
    grid-template-columns: minmax(240px, 0.78fr) minmax(0, 2fr);
  }

  .pos-terminal-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stats"
      "customer"
      "items"
      "manual"
      "payment"
      "bottom";
  }

  .pos-terminal-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .content.pos-page {
    height: auto;
    overflow: visible;
  }

  .pos-terminal {
    min-height: auto;
  }

  .pos-terminal-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pos-terminal-catalog {
    border-inline-end: none;
    border-bottom: 1px solid #eceef6;
  }

  .pos-terminal-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stats"
      "customer"
      "items"
      "manual"
      "payment"
      "bottom";
  }

  .pos-terminal-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pos-terminal-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .pos-terminal-top {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .pos-terminal-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pos-terminal-catalog {
    border-inline-end: none;
    border-bottom: 1px solid #eceef6;
    padding: 14px 14px 18px;
  }

  .pos-terminal-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stats"
      "customer"
      "items"
      "manual"
      "payment"
      "bottom";
  }

  .pos-terminal-stats,
  .pos-terminal-summary,
  .pos-terminal-actions-grid {
    grid-template-columns: 1fr;
  }
}
