:root {
  --ink: #18302d;
  --ink-soft: #223b37;
  --sand: #f7f1e8;
  --card: rgba(247, 241, 232, 0.07);
  --stroke: rgba(230, 219, 205, 0.12);
  --accent: #b8d5c1;
  --accent-2: #d8bea4;
  --muted: #b5c3ba;
  --success: #9ecdb0;
  --warn: #e7c99a;
  --alert: #d79a84;
  --shadow: 0 20px 50px rgba(9, 23, 22, 0.28);
  --radius: 18px;
  --glow: radial-gradient(circle at 18% 12%, rgba(184, 213, 193, 0.18), transparent 28%),
           radial-gradient(circle at 82% 0%, rgba(216, 190, 164, 0.14), transparent 34%),
           radial-gradient(circle at 60% 82%, rgba(194, 219, 201, 0.12), transparent 36%);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(13, 33, 31, 0.84), rgba(36, 55, 44, 0.88)),
    var(--ink);
  color: var(--sand);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  position: relative;
  overflow-x: hidden;
}

.backdrop-pattern {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(247, 241, 232, 0.02) 0%, transparent 40%),
              linear-gradient(45deg, rgba(184, 213, 193, 0.04) 0%, transparent 50%),
              var(--glow);
  filter: blur(0px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

body.auth-lock {
  overflow: hidden;
}

body.auth-lock .app-shell {
  filter: blur(8px);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

.side-nav {
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(247, 241, 232, 0.08), rgba(247, 241, 232, 0.03));
  border-right: 1px solid var(--stroke);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-menu-toggle,
.mobile-nav-backdrop {
  display: none;
}

.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(247, 241, 232, 0.06);
  color: var(--sand);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.mobile-nav-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.mobile-nav-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #22312d;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-name .label {
  font-family: "Sora", "Manrope", system-ui, sans-serif;
  font-size: 18px;
}

.brand-name small {
  color: var(--muted);
}

nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--sand);
  background: transparent;
  border: 1px solid transparent;
  transition: 0.25s ease;
}

.nav-item:hover {
  background: rgba(247, 241, 232, 0.05);
  border-color: var(--stroke);
}

.nav-item.active {
  background: rgba(184, 213, 193, 0.1);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(13, 27, 24, 0.22);
}

.pill {
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  background: rgba(247, 241, 232, 0.05);
}

.pill.secondary {
  background: rgba(184, 213, 193, 0.08);
  border-color: rgba(184, 213, 193, 0.2);
}

.pill.ghost {
  background: transparent;
}

.support {
  margin-top: auto;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.support .ghost {
  width: 100%;
  justify-content: center;
}

.main {
  padding: 28px 30px 32px;
  display: grid;
  gap: 24px;
}

.shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--stroke);
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(90deg, rgba(22, 46, 45, 0.94), rgba(43, 58, 39, 0.9)),
    rgba(247, 241, 232, 0.04);
  box-shadow: 0 14px 32px rgba(9, 23, 22, 0.18);
  backdrop-filter: blur(18px);
}

.shell-heading {
  display: grid;
  gap: 2px;
}

.shell-heading h1 {
  font-size: 24px;
}

.shell-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.spa-view-root {
  display: grid;
  gap: 24px;
}

.app-view {
  display: none;
  gap: 24px;
  align-content: start;
}

.app-view.active {
  display: grid;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: grid;
  place-items: center;
  color: #22312d;
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", "Manrope", system-ui, sans-serif;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.two-columns {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

.card.ghost {
  border-style: dashed;
  background: transparent;
}

.clients-page-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.clients-form-card {
  position: sticky;
  top: 28px;
}

.clients-standalone-form {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

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

.directory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-inline input {
  min-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sand);
}

.sparkline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
  height: 54px;
  align-items: end;
}

.sparkline span {
  display: block;
  background: linear-gradient(180deg, var(--accent), rgba(158, 219, 212, 0.08));
  border-radius: 8px;
}

.progress {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  margin-top: 10px;
}

.progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand);
  border: 1px solid var(--stroke);
  font-size: 13px;
}

.chip.success {
  border-color: rgba(119, 221, 156, 0.6);
  color: #c4f1d5;
}

.chip.warn {
  border-color: rgba(246, 207, 101, 0.7);
  color: #f6e2b2;
}

.chip.alert {
  border-color: rgba(245, 139, 108, 0.7);
  color: #f5c5b6;
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  margin-left: 8px;
}

.button-row,
.topbar-actions button,
.ghost,
.primary {
  border: 1px solid var(--stroke);
  background: rgba(247, 241, 232, 0.05);
  color: var(--sand);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 600;
}

.ghost.small {
  padding: 6px 10px;
  font-size: 13px;
}

.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: none;
  color: #23322e;
}

.ghost:hover,
.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.calendar {
  background: rgba(247, 241, 232, 0.03);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  overflow: hidden;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

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

.slot {
  padding: 12px;
  border: 1px dashed var(--stroke);
  border-radius: 14px;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.02);
}

.slot.filled {
  border-style: solid;
  border-color: rgba(158, 219, 212, 0.5);
  background: rgba(158, 219, 212, 0.06);
  cursor: pointer;
}

.slot.long {
  grid-column: span 2;
}

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

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(247, 241, 232, 0.03);
}

.title-sm {
  margin: 0;
  font-weight: 700;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.table th,
.table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

.table th {
  color: var(--muted);
  letter-spacing: 0.04em;
  font-size: 12px;
}

.timeline {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid var(--stroke);
}

.dot.success {
  background: var(--success);
}

.dot.warn {
  background: var(--warn);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--stroke);
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.view-switch {
  display: flex;
  gap: 6px;
}

.view-switch .active {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-switch {
  display: flex;
  gap: 6px;
}

.calendar-grid-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.month-cell {
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.02);
}

.month-cell .eyebrow {
  margin-bottom: 2px;
}

.badge-small {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  font-size: 11px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.week-col {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px;
  background: rgba(247, 241, 232, 0.03);
  min-height: 120px;
}

.week-col .slot {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 6px;
  margin-top: 6px;
  background: rgba(255,255,255,0.04);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.year-card {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
}

.year-card h4 {
  margin: 0 0 6px;
}

.calendar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.calendar-overlay.open {
  display: flex;
}

.calendar-modal {
  background: #1a302d;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  width: min(1200px, 95vw);
  max-height: 90vh;
  padding: 16px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.gcal-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.spa-calendar-shell {
  align-items: start;
}

.gcal-side {
  background: rgba(247, 241, 232, 0.03);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
}

.gcal-month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#mini-month-label {
  font-weight: 700;
}

#mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.mini-cell {
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
}

.mini-cell.today {
  border-color: var(--accent);
  color: var(--accent);
}

.mini-cell.selected {
  background: rgba(158, 219, 212, 0.12);
  border-color: var(--accent);
}

.gcal-filters {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sand);
  font-size: 14px;
}

.dot.legend {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot.legend.web { background: var(--accent); }
.dot.legend.whatsapp { background: var(--warn); }
.dot.legend.recepcion { background: var(--muted); }

.gcal-main {
  background: rgba(247, 241, 232, 0.03);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
}

.gcal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gcal-toolbar .left,
.gcal-toolbar .right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gcal-grid-google {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 10px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
}

.gcal-cell {
  min-height: 110px;
  border-right: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  padding: 6px;
  position: relative;
  background: rgba(16, 30, 28, 0.36);
  cursor: pointer;
  transition: background 0.18s ease, outline-color 0.18s ease;
}

.gcal-cell:hover {
  background: rgba(158, 219, 212, 0.07);
  outline: 1px solid rgba(184, 213, 193, 0.38);
}

.gcal-cell.has-events {
  background: rgba(16, 38, 34, 0.58);
}

.gcal-cell:nth-child(7n) {
  border-right: none;
}

.gcal-cell .date {
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}

.gcal-cell.today {
  background: rgba(158, 219, 212, 0.08);
  outline: 1px solid var(--accent);
}

.gcal-event {
  margin-top: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid transparent;
  color: #0b1415;
  background: var(--accent);
  cursor: pointer;
}

.gcal-event:hover,
.slot.filled:hover,
.agenda-clickable-row:hover {
  filter: brightness(1.08);
}

.gcal-event.channel-WhatsApp { background: var(--warn); color: #0b1415; }
.gcal-event.channel-Web { background: var(--accent); }
.gcal-event.channel-Recepcion,
.gcal-event.channel-Recepción {
  background: var(--muted);
  color: #0b1415;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

#agenda-detail-drawer {
  z-index: 21;
}

#appointment-drawer {
  z-index: 24;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background:
    linear-gradient(135deg, rgba(11, 20, 21, 0.96), rgba(31, 53, 48, 0.94)),
    var(--glow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.login-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.login-panel {
  width: min(940px, 100%);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(247, 241, 232, 0.1), rgba(247, 241, 232, 0.04)),
    #1a302d;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.login-overlay.open .login-panel {
  transform: translateY(0);
}

.login-brand {
  display: grid;
  gap: 18px;
  align-content: center;
}

.login-brand .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.login-brand h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
}

.login-brand .hint {
  max-width: 430px;
  font-size: 16px;
  line-height: 1.6;
}

.login-content {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(11, 20, 21, 0.34);
  padding: 18px;
}

.login-head {
  position: static;
  background: transparent;
}

.login-content .drawer-form {
  border-top-color: rgba(230, 219, 205, 0.16);
}

.drawer {
  width: 480px;
  max-width: 92vw;
  background: #1a302d;
  border-left: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow-y: auto;
  transform: translateX(18px);
  transition: transform 0.2s ease;
}

.agenda-detail-drawer {
  width: 520px;
}

.drawer-overlay.open .drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: #1a302d;
  padding-bottom: 10px;
  z-index: 1;
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-actions input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sand);
  width: 180px;
}

.drawer-body {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.agenda-detail-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.agenda-detail-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 12px;
}

.agenda-detail-card.selected {
  border-color: rgba(184, 213, 193, 0.42);
}

.agenda-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.agenda-detail-list {
  display: grid;
  gap: 8px;
}

.agenda-slots {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.availability-slot {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px;
  background: rgba(184, 213, 193, 0.08);
  color: var(--sand);
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.availability-slot.free {
  border-color: rgba(184, 213, 193, 0.38);
}

.availability-slot.busy {
  background: rgba(231, 201, 154, 0.14);
  border-color: rgba(231, 201, 154, 0.42);
}

.availability-slot:hover {
  transform: translateY(-1px);
}

.availability-slot small {
  color: var(--muted);
  line-height: 1.3;
}

.agenda-booking-row {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px;
  background: rgba(247, 241, 232, 0.03);
  color: var(--sand);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.agenda-booking-row.active {
  border-color: var(--accent);
  background: rgba(184, 213, 193, 0.1);
}

.agenda-booking-row span:first-child {
  display: grid;
  gap: 2px;
}

.agenda-booking-row small {
  color: var(--muted);
}

.drawer-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.drawer-form {
  border-top: 1px solid var(--stroke);
  margin-top: 10px;
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.form-row label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sand);
  padding: 8px 10px;
  font-family: inherit;
}

.form-row select,
.service-recipe-form select {
  color: var(--sand);
  background-color: #263f38;
}

.form-row select option,
.service-recipe-form select option {
  color: #162522;
  background: #f7f1e8;
}

.form-row select option:checked,
.service-recipe-form select option:checked {
  color: #0f1f21;
  background: #b8d5c1;
}

.form-row textarea {
  resize: vertical;
}

.form-error {
  color: #f58b6c;
  background: rgba(245, 139, 108, 0.1);
  border: 1px solid rgba(245, 139, 108, 0.4);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.client-list {
  display: grid;
  gap: 10px;
}

.client-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 10px;
}

.client-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.client-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.client-secondary .actions {
  display: flex;
  gap: 6px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tags .chip {
  padding: 4px 8px;
  font-size: 12px;
}

.empty-state {
  text-align: center;
  border: 1px dashed var(--stroke);
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.services-page-grid {
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
}

.pos-page-grid {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pos-cart,
.pos-catalog,
.pos-history {
  display: grid;
  gap: 10px;
}

.pos-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px auto 38px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(247, 241, 232, 0.03);
}

.pos-cart-row input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sand);
}

.pos-total-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.pos-total-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.pos-total-box strong {
  color: var(--sand);
}

.pos-total-box .grand {
  padding-top: 8px;
  border-top: 1px solid var(--stroke);
  color: var(--sand);
  font-size: 18px;
}

.pos-catalog {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pos-catalog.compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.pos-catalog-item {
  width: 100%;
  min-height: 82px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(247, 241, 232, 0.035);
  color: var(--sand);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.pos-catalog-item:hover {
  border-color: rgba(184, 213, 193, 0.42);
  transform: translateY(-1px);
}

.pos-catalog-item span {
  display: grid;
  gap: 4px;
}

.pos-catalog-item small {
  color: var(--muted);
}

.pos-catalog-item b {
  white-space: nowrap;
  color: var(--accent);
}

.pos-catalog-item.is-low {
  border-color: rgba(245, 139, 108, 0.44);
}

.pos-history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.service-list,
.inventory-list {
  display: grid;
  gap: 10px;
}

.service-card,
.inventory-card {
  background: rgba(255, 255, 255, 0.035);
}

.service-recipe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-recipe-form,
.inventory-adjust-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 150px) auto;
  gap: 8px;
  align-items: center;
}

.inventory-adjust-form {
  grid-template-columns: minmax(120px, 150px) minmax(150px, 1fr) auto;
}

.service-recipe-form input,
.service-recipe-form select,
.inventory-adjust-form input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sand);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.toast {
  background: #0f1f21;
  border: 1px solid var(--stroke);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(119, 221, 156, 0.6);
}

.toast.info {
  border-color: rgba(158, 219, 212, 0.6);
}

.toast.alert {
  border-color: rgba(245, 139, 108, 0.6);
}

.ghost.icon-only {
  padding: 6px 10px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 80px 1fr;
  }

  .side-nav {
    padding: 20px 14px;
    align-items: center;
  }

  .brand-name,
  nav a span:nth-child(2),
  .support,
  .pill,
  .pill.secondary,
  .pill.ghost {
    display: none;
  }

  nav {
    width: 100%;
  }

  .nav-item {
    justify-content: center;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .clients-page-grid {
    grid-template-columns: 1fr;
  }

  .services-page-grid {
    grid-template-columns: 1fr;
  }

  .pos-page-grid {
    grid-template-columns: 1fr;
  }

  .clients-form-card {
    position: static;
  }

  .service-recipe-form,
  .inventory-adjust-form,
  .pos-cart-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    background: #0b1415;
  }

  .login-overlay {
    align-items: start;
    overflow-y: auto;
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 22px;
    border-radius: 18px;
  }

  .login-brand .brand-mark {
    width: 52px;
    height: 52px;
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: sticky;
    top: 0;
    z-index: 25;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--stroke);
    background: rgba(18, 36, 33, 0.92);
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 23;
    display: block;
    background: rgba(7, 14, 15, 0.54);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .side-nav nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 24;
    width: min(84vw, 320px);
    height: 100vh;
    padding: 88px 18px 22px;
    align-content: start;
    background:
      linear-gradient(180deg, rgba(24, 48, 45, 0.98), rgba(13, 28, 27, 0.98)),
      #18302d;
    border-right: 1px solid var(--stroke);
    box-shadow: 24px 0 50px rgba(0, 0, 0, 0.28);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  body.mobile-nav-open .side-nav nav {
    transform: translateX(0);
  }

  .side-nav .nav-item {
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    font-size: 16px;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .main {
    padding: 18px 16px 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .shell-header {
    padding: 16px;
  }

  .shell-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .slot.long {
    grid-column: span 1;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .drawer {
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-top: 1px solid var(--stroke);
  }

  .search-inline input {
    min-width: 100%;
    width: 100%;
  }
}
