/* PrismTrip base styles: tokens, app shell, cards, tables, drawer, toast. Shared by the agent panel and admin. */
:root {
  --primary: #3965fa;
  --primary-soft: #e9eaff;
  --lavender: #949cf6;
  --ink: #101010;
  --ink-2: #3d3d3d;
  --muted: #8a8a8a;
  --line: #e8e8e8;
  --surface: #f0f0f0;
  --page: #f6f6f4;
  --card: #ffffff;
  --coral: #f0885a;
  --sand: #f4c979;
  --pink: #f8a0b5;
  --green: #8ce463;
  --mint: #c5ff8b;
  --cream: #ffeba2;
  /* Status (reserved: never reused as a series colour; always shown with a label) */
  --ok: #12a150;
  --ok-soft: #e3f7ea;
  --warn: #c98a00;
  --warn-soft: #fff3d6;
  --bad: #e5484d;
  --bad-soft: #fde8e8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
  --shadow-pop: 0 20px 48px rgba(16, 16, 16, 0.14);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
/* Always keep room for the page scrollbar, so moving between short and long pages (or filtering
   a list) never shifts the layout sideways. Links to a section scroll there smoothly. */
html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.5 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
img {
  display: block;
  max-width: 100%;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  min-height: 100vh;
  padding: 20px;
  /* Width only animates while someone collapses / expands the menu (body.rail-anim), never on page load. */
}
body.rail-anim .app {
  transition: grid-template-columns 0.45s var(--ease);
}
/* The sidebar keeps its size on every screen. When the window is short, the menu scrolls
   inside the sidebar instead of squeezing the items together. */
.rail {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 22px 12px 12px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.rail__logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 8px;
  margin-bottom: 12px;
  white-space: nowrap;
}
.rail__logo img {
  height: 30px;
  width: auto;
}
.rail__role {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.rail__menu {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 4px;
  margin: 0 -6px;
  padding: 0 6px 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  /* Keep room for the scrollbar so items don't shift when a sub-menu opens. */
  scrollbar-gutter: stable;
}
.rail__menu > * {
  flex-shrink: 0;
}
.rail__label {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 10px 10px 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rail__label:first-child {
  height: 24px;
  padding-top: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease);
}
.nav:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav__chip {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--chip, var(--lavender));
  color: var(--ink);
}
.nav__chip .icon {
  width: 16px;
  height: 16px;
}
.nav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav__badge {
  margin-left: auto;
  flex: none;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  text-align: center;
}
.nav[aria-current='page'] {
  background: var(--chip, var(--lavender));
  color: var(--ink);
  font-weight: 600;
}
.nav[aria-current='page'] .nav__chip {
  background: rgba(16, 16, 16, 0.1);
}
.nav[aria-current='page'] .nav__badge {
  background: rgba(16, 16, 16, 0.14);
  color: var(--ink);
}
/* ---------- Sub-menus (grouped sidebar) ---------- */
.nav--group {
  width: 100%;
  text-align: left;
}
.nav__caret {
  width: 15px;
  height: 15px;
  flex: none;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.45);
  transition: transform 0.4s var(--ease);
}
/* In a group row the label fills the free space, so the arrow always sits at the right edge
   (open or closed, with or without a counter). */
.nav--group .nav__label {
  flex: 1;
}
.nav--group .nav__badge {
  margin-left: 0;
}
.nav--group .nav__caret {
  margin-left: 0;
}
.ngroup.is-open > .nav--group .nav__caret {
  transform: rotate(180deg);
}
/* The group's total shows only while it is closed; open, each item shows its own number. */
.ngroup.is-open > .nav--group .nav__badge--sum {
  display: none;
}
.ngroup.is-here > .nav--group {
  color: #fff;
  font-weight: 600;
}
/* Height animates open/closed (grid 0fr to 1fr). */
.nsub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.ngroup.is-open > .nsub {
  grid-template-rows: 1fr;
}
.nsub__list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 2px;
  margin-left: 23px;
  padding-left: 16px;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.ngroup.is-open .nsub__list {
  padding-block: 4px 8px;
}
.nsub__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.nsub__item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nsub__item.is-planned {
  color: rgba(255, 255, 255, 0.42);
}
/* Current page: the group's own colour, like the flat menu. */
.nsub__item[aria-current='page'] {
  background: var(--chip, var(--lavender));
  color: var(--ink);
  font-weight: 600;
}
.nsub__item[aria-current='page'] .nav__badge {
  background: rgba(16, 16, 16, 0.14);
  color: var(--ink);
}
.rail-tip.rail-tip--menu.is-on {
  pointer-events: auto;
}
.rail-tip.rail-tip--menu {
  min-width: 220px;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  white-space: normal;
}
.rail-tip__title {
  padding: 4px 10px 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rail-tip--menu .nsub__item {
  height: 36px;
}
.rail-tip--menu .nsub__item[aria-current='page'] {
  background: var(--lavender);
}

/* ---------- One-colour sidebar (agent: SIDEBAR_COLORS = 'one') ----------
   Icons sit on a soft grey tile; only the current page / open group uses the brand lavender. */
body.rail-one-color .rail .nav__chip {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
/* --rail-accent / --rail-on: the chosen colour and the text colour that reads on it. */
body.rail-one-color .rail .nav[aria-current='page'],
body.rail-one-color .rail .nsub__item[aria-current='page'],
body.rail-one-color .rail-tip--menu .nsub__item[aria-current='page'] {
  background: var(--rail-accent, var(--lavender));
  color: var(--rail-on, var(--ink));
}
body.rail-one-color .rail .nav[aria-current='page'] .nav__badge,
body.rail-one-color .rail .nsub__item[aria-current='page'] .nav__badge {
  background: color-mix(in srgb, var(--rail-on, var(--ink)) 16%, transparent);
  color: var(--rail-on, var(--ink));
}
body.rail-one-color .rail .nav[aria-current='page'] .nav__chip {
  background: color-mix(in srgb, var(--rail-on, var(--ink)) 14%, transparent);
  color: var(--rail-on, var(--ink));
}
body.rail-one-color .rail .ngroup.is-here > .nav--group .nav__chip {
  background: var(--rail-accent, var(--lavender));
  color: var(--rail-on, var(--ink));
}
body.rail-one-color .rail__role {
  background: color-mix(in srgb, var(--rail-accent, var(--lavender)) 20%, transparent);
  color: var(--rail-accent, var(--lavender));
}

/* ===== TEMPORARY design preview: sidebar colour picker (remove before development) ===== */
.color-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 8px;
  border: 1.5px dashed #cfcfcf;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.3s var(--ease);
}
.color-pick:hover,
.color-pick[aria-expanded='true'] {
  border-color: var(--ink);
}
.color-pick__dot,
.color-pick__sw {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(16, 16, 16, 0.15);
}
.menu.color-pick__menu {
  position: fixed;
  z-index: 46;
  min-width: 200px;
}
.color-pick__note {
  padding: 4px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.color-pick__menu button {
  gap: 10px;
}
.color-pick__menu button[aria-checked='true'] {
  background: var(--surface);
  font-weight: 600;
}
.color-pick__menu button[aria-checked='true']::after {
  content: '✓';
  margin-left: auto;
  color: var(--ok);
}
@media (max-width: 1240px) {
  .color-pick__text {
    display: none;
  }
  .color-pick {
    padding: 0 8px;
  }
}
/* Phones: no room in the top bar for the preview button (it made the page wider than the screen). */
@media (max-width: 640px) {
  .color-pick {
    display: none;
  }
}
/* ===== end TEMPORARY ===== */

.rail__collapse {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  height: 44px;
  margin-top: 8px;
  padding: 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.rail__collapse:hover {
  color: #fff;
}
.rail__collapse .icon {
  width: 28px;
  flex: none;
}

/* Collapsed sidebar (desktop): icons only. Names show as a tooltip on hover. */
@media (min-width: 1025px) {
  body.rail-mini .app {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  body.rail-mini .rail .nav__caret,
  body.rail-mini .rail .ngroup > .nsub,
  body.rail-mini .rail .nav__label,
  body.rail-mini .rail .nav__badge,
  body.rail-mini .rail .brand__word,
  body.rail-mini .rail .rail__role {
    display: none;
  }
  body.rail-mini .rail__logo {
    justify-content: center;
    padding: 0;
  }
  /* Group titles become a thin divider so the icons stay grouped. */
  body.rail-mini .rail__label {
    height: 17px;
    padding: 8px 14px;
  }
  body.rail-mini .rail__label span {
    display: none;
  }
  body.rail-mini .rail__label::before {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
  }
  body.rail-mini .rail__label:first-child {
    display: none;
  }
  body.rail-mini .nav {
    position: relative;
    justify-content: center;
    padding: 0;
  }
  /* Small dot: this item has something waiting (the number shows in the tooltip). */
  body.rail-mini .nav:has(.nav__badge)::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 8px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--coral);
  }
  body.rail-mini .rail__collapse {
    justify-content: center;
    padding: 0;
  }
  body.rail-mini .rail__collapse .icon {
    transform: scaleX(-1);
  }
}
.rail-tip {
  position: fixed;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-pop);
  pointer-events: none;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition:
    opacity 0.2s var(--ease),
    transform 0.25s var(--ease);
}
.rail-tip.is-on {
  opacity: 1;
  transform: translate(0, -50%);
}
.rail-tip b {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* ---------- Top bar ---------- */
.main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 12px 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
/* ☰ collapses the sidebar on desktop and slides it in on tablet / phone. */
.topbar__menu {
  display: grid;
}
/* Agent top bar: first row = search and account, second row = travel products. */
.topbar--products {
  --tb-pad: 20px;
  display: block;
  padding: 10px 12px 0 var(--tb-pad);
}
.topbar__row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}
.products {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px -12px 0 calc(var(--tb-pad) * -1);
  padding: 8px 12px 8px calc(var(--tb-pad) - 6px);
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.products::-webkit-scrollbar {
  display: none;
}
.prod {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.prod .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.prod:hover,
.prod[aria-expanded='true'] {
  background: var(--page);
  color: var(--ink);
}
.prod.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.prod.is-on .icon {
  color: var(--ink);
}
.prod .prod__caret {
  width: 14px;
  height: 14px;
  margin-left: -2px;
  transition: transform 0.3s var(--ease);
}
.prod[aria-expanded='true'] .prod__caret {
  transform: rotate(180deg);
}
.menu.prod-menu {
  position: fixed;
  z-index: 45;
  min-width: 230px;
}
.prod-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease);
}
.prod-menu__item:hover {
  background: var(--surface);
}
.prod-menu__item .icon {
  color: var(--muted);
}
.prod-menu__item em {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}
.prod-menu__item.is-soon span {
  color: var(--ink-2);
}
/* Small laptops: sidebar still open, so drop the product icons to keep all products in one line. */
@media (min-width: 1025px) and (max-width: 1240px) {
  .prod {
    padding: 0 12px;
  }
  .prod .icon:not(.prod__caret) {
    display: none;
  }
}
/* Phones: the row scrolls sideways; a soft fade at the right edge shows there is more. */
@media (max-width: 760px) {
  .products {
    mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  }
}
@media (max-width: 640px) {
  .topbar--products {
    --tb-pad: 12px;
  }
  .prod {
    padding: 0 12px;
  }
}
.search {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.search .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  outline: none;
  transition: border-color 0.3s var(--ease);
}
.search input:focus {
  border-color: var(--primary);
}
.search kbd {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: 500 11px/1.6 'Inter', sans-serif;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.icon-btn {
  position: relative;
  display: grid;
  flex-shrink: 0; /* never squeezed by long text next to it, so it stays a perfect circle */
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: background-color 0.3s var(--ease);
}
.icon-btn:hover {
  background: var(--page);
}
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--bad);
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--coral);
  color: var(--ink);
  font: 600 13px/1 'Poppins', sans-serif;
  object-fit: cover;
}
.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.user__text {
  display: flex;
  flex-direction: column;
}
.user__name {
  font-weight: 600;
  line-height: 1.2;
}
.user__sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

/* ---------- Buttons, pills, inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font: 600 14px/1 'Poppins', sans-serif;
  white-space: nowrap;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: #2952e6;
}
.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover {
  background: var(--primary);
}
.btn--ghost {
  border: 1px solid var(--line);
  background: #fff;
}
.btn--ghost:hover {
  border-color: var(--ink);
}
.btn--soft {
  background: var(--primary-soft);
  color: var(--primary);
}
.btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.btn--block {
  width: 100%;
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.pill--warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill--bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.pill--info {
  background: var(--primary-soft);
  color: var(--primary);
}
.pill--muted {
  background: var(--surface);
  color: var(--ink-2);
}
.type-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font: 500 12px/1 'Poppins', sans-serif;
}
.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
}
.seg button {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.seg button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 16, 16, 0.1);
}
.select {
  height: 42px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23101010' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  appearance: none;
  font-weight: 500;
  cursor: pointer;
}

/* ---------- Cards & page header ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page-head h1 {
  font-size: 28px;
  line-height: 1.25;
}
.page-head p {
  margin-top: 4px;
  color: var(--muted);
}
.page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}
.card__head h2 {
  font-size: 18px;
}
.card__head p {
  color: var(--muted);
  font-size: 13px;
}
.card__body {
  padding: 18px 22px 22px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font: 500 13px/1 'Poppins', sans-serif;
}
.link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}
.link:hover .icon {
  transform: translateX(3px);
}

/* ---------- Overview ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tone, var(--primary-soft));
}
.kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}
.kpi__label {
  margin-top: 18px;
  color: var(--ink-2);
  font-weight: 500;
}
.kpi__value {
  margin-top: 2px;
  font: 600 32px/1.15 'Poppins', sans-serif;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
}
.kpi__delta .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}
.kpi__foot {
  margin-top: auto;
  padding-top: 10px;
  color: var(--ink-2);
  font-size: 12px;
}
.kpi__spark {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 110px;
  height: 40px;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

/* Revenue column chart */
.chart {
  position: relative;
}
.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.chart .grid line {
  stroke: #eeeeee;
  stroke-width: 1;
}
.chart .axis text {
  fill: var(--muted);
  font: 500 11px 'Inter', sans-serif;
}
.chart .bar {
  fill: var(--primary);
  transition: opacity 0.25s var(--ease);
}
.chart .bar.is-forecast {
  fill: var(--primary-soft);
}
.chart.is-hovering .bar:not(.is-hover) {
  opacity: 0.35;
}
.chart .hit {
  fill: transparent;
  cursor: default;
}
.chart .peak-label {
  fill: var(--ink);
  font: 600 12px 'Poppins', sans-serif;
}
.tooltip {
  position: absolute;
  z-index: 5;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.2s var(--ease);
}
.tooltip.is-on {
  opacity: 1;
}
.tooltip strong {
  display: block;
  font: 600 14px/1.3 'Poppins', sans-serif;
}
.tooltip span {
  color: rgba(255, 255, 255, 0.65);
}
.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 8px;
}
.chart-meta div span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.chart-meta div strong {
  font: 600 20px/1.3 'Poppins', sans-serif;
  font-variant-numeric: tabular-nums;
}
.legend-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
}
.legend-key i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--primary);
}
.legend-key i.soft {
  background: var(--primary-soft);
}

/* Occupancy bars */
.occ {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.occ__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}
.occ__thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.occ__name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ__area {
  color: var(--muted);
  font-size: 12px;
}
.occ__track {
  position: relative;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--surface);
}
.occ__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--primary);
}
.occ__pct {
  text-align: right;
  font: 600 14px 'Poppins', sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Booking list (today) */
.bookings {
  display: flex;
  flex-direction: column;
}
.booking {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.booking:first-child {
  border-top: 0;
  padding-top: 0;
}
.booking__time {
  font: 600 14px/1.2 'Poppins', sans-serif;
  font-variant-numeric: tabular-nums;
}
.booking__time span {
  display: block;
  color: var(--muted);
  font: 400 12px 'Inter', sans-serif;
}
.booking__title {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.ws-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

/* Enquiries & reviews */
.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.enq {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}
.enq__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.enq__name {
  font-weight: 600;
}
.enq__time {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}
.enq__text {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.enq__ws {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.stars {
  display: inline-flex;
  gap: 2px;
  color: #e4c200;
}
.stars .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}
.rating-big {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
}
.rating-big strong {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font: 600 20px 'Poppins', sans-serif;
}

/* ---------- Calendar ---------- */
.cal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.cal-side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mini-cal {
  padding: 18px;
}
.mini-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mini-cal__head strong {
  font: 600 15px 'Poppins', sans-serif;
}
.mini-cal table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}
.mini-cal th {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.mini-cal td {
  padding: 2px 0;
}
.mini-cal td button {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.3s var(--ease);
}
.mini-cal td button:hover {
  background: var(--surface);
}
.mini-cal td button.is-out {
  color: #c4c4c4;
}
.mini-cal td button.has-bookings::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-50%);
}
.mini-cal td button.is-today {
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
.mini-cal td button[aria-pressed='true'] {
  background: var(--primary);
  color: #fff;
}
.mini-cal td button[aria-pressed='true']::after {
  background: #fff;
}
.day-summary {
  padding: 18px;
}
.day-summary h3 {
  font-size: 15px;
}
.day-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 14px 0 0;
}
.day-summary dt {
  color: var(--ink-2);
}
.day-summary dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
}
.legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cal-toolbar__date {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-toolbar__date strong {
  min-width: 190px;
  font: 600 16px 'Poppins', sans-serif;
  text-align: center;
}
.cal-toolbar .spacer {
  flex: 1;
}
.cal-scroll {
  overflow: auto;
  max-height: calc(100vh - 230px);
  min-height: 520px;
}
.day-grid {
  --cols: 6;
  --hour: 64px;
  display: grid;
  grid-template-columns: 64px repeat(var(--cols), minmax(150px, 1fr));
  min-width: 960px;
}
.day-grid__corner,
.day-grid__col-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.day-grid__corner {
  left: 0;
  z-index: 4;
}
.day-grid__col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-left: 1px solid var(--line);
}
.day-grid__col-head img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.day-grid__col-head strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-grid__col-head span {
  color: var(--muted);
  font-size: 12px;
}
.day-grid__hours {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}
.day-grid__hour {
  height: var(--hour);
  padding: 0 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  transform: translateY(-7px);
}
.day-grid__col {
  position: relative;
  border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% var(--hour);
}
.slot-closed {
  position: absolute;
  inset-inline: 0;
  background: repeating-linear-gradient(135deg, #f6f6f6 0 6px, #efefef 6px 12px);
}
.event {
  position: absolute;
  inset-inline: 6px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 8px 12px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ev-bg);
  color: var(--ink);
  text-align: left;
  transition:
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.event::before {
  content: '';
  position: absolute;
  inset: 6px auto 6px 5px;
  width: 3px;
  border-radius: 3px;
  background: var(--ev-bar);
}
.event:hover {
  z-index: 2;
  box-shadow: 0 8px 20px rgba(16, 16, 16, 0.12);
}
.event[aria-pressed='true'] {
  z-index: 2;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--ev-bar);
}
.event__title {
  overflow: hidden;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event__time {
  color: var(--ink-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.event__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--ev-text, var(--ink-2));
  font-size: 11px;
  font-weight: 600;
}
.event__status .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}
.event--confirmed {
  --ev-bg: var(--primary-soft);
  --ev-bar: var(--primary);
  --ev-text: var(--primary);
}
.event--pending {
  --ev-bg: var(--warn-soft);
  --ev-bar: var(--warn);
  --ev-text: var(--warn);
}
.event--checked-in {
  --ev-bg: var(--ok-soft);
  --ev-bar: var(--ok);
  --ev-text: var(--ok);
}
.now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 2px;
  background: var(--bad);
  pointer-events: none;
}
.now-line::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bad);
}
.now-line--plain::before {
  display: none;
}
.now-tag {
  position: absolute;
  right: 6px;
  z-index: 3;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  transform: translateY(-50%);
}

/* Week view */
.week-grid {
  display: grid;
  grid-template-columns: 220px repeat(7, minmax(110px, 1fr));
  min-width: 1000px;
}
.week-grid > div {
  min-height: 92px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.week-grid .wk-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 0;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.week-grid .wk-head strong {
  display: block;
  color: var(--ink);
  font: 600 18px 'Poppins', sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.week-grid .wk-head.is-today strong {
  color: var(--primary);
}
.week-grid .wk-ws {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 0;
}
.week-grid .wk-ws img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.week-grid .wk-ws strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}
.week-grid .wk-ws span {
  color: var(--muted);
  font-size: 12px;
}
.wk-chip {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ev-bg);
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-chip b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 16, 16, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.drawer {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 41;
  display: flex;
  width: min(440px, calc(100vw - 40px));
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--ease);
}
.drawer.is-open,
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.drawer.is-open {
  transform: none;
}
.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer__head h2 {
  font-size: 20px;
}
.drawer__head p {
  margin-top: 2px;
  color: var(--muted);
}
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}
.drawer__foot {
  display: flex;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}
.drawer__foot .btn {
  flex: 1;
}
.drawer__photo {
  height: 150px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 12px;
}
.drawer__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  font-weight: 500;
}
.drawer__section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.drawer__section h3 {
  margin-bottom: 12px;
  font-size: 14px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.price-row.total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font: 600 16px 'Poppins', sans-serif;
}
.guest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
}
.guest strong {
  display: block;
}
.guest span {
  color: var(--muted);
  font-size: 12px;
}
.guest .icon-btn {
  width: 36px;
  height: 36px;
  margin-left: auto;
}

/* ---------- My Workspaces ---------- */
.ws-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.tabs button span {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 20px;
}
.tabs button[aria-selected='true'] {
  background: var(--ink);
  color: #fff;
}
.tabs button[aria-selected='true'] span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.ws-toolbar .search {
  max-width: 320px;
}
.ws-toolbar .spacer {
  flex: 1;
}
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.ws-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.4s var(--ease);
  animation: rise 0.8s var(--ease) backwards;
}
.ws-card:hover {
  box-shadow: 0 14px 36px rgba(16, 16, 16, 0.08);
}
.ws-card__photo {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
}
.ws-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.ws-card:hover .ws-card__photo img {
  transform: scale(1.04);
}
.ws-card__status {
  position: absolute;
  top: 12px;
  left: 12px;
}
.ws-card__status .pill {
  background: #fff;
}
.ws-card__menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
}
.ws-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 8px 6px;
}
.ws-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ws-card__title {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.35;
}
.ws-card__area {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.ws-card__area .icon {
  width: 14px;
  height: 14px;
}
.ws-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface);
}
.ws-card__stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.ws-card__stats strong {
  font: 600 15px 'Poppins', sans-serif;
  font-variant-numeric: tabular-nums;
}
.ws-card__occ {
  margin-top: 12px;
}
.ws-card__occ .occ__track {
  margin-top: 6px;
}
.ws-card__occ-label {
  display: flex;
  justify-content: space-between;
  color: var(--ink-2);
  font-size: 12px;
}
.ws-card__foot {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ws-card__foot .btn {
  flex: 1;
}
.ws-card.is-draft .ws-card__photo img {
  filter: grayscale(0.6);
  opacity: 0.85;
}
.add-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1.5px dashed #cfcfcf;
  border-radius: var(--radius);
  color: var(--ink-2);
  text-align: center;
  transition:
    border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}
.add-card:hover {
  border-color: var(--primary);
  background: #fff;
}
.add-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.add-card strong {
  color: var(--ink);
  font: 600 16px 'Poppins', sans-serif;
}
/* List view */
.ws-table-wrap {
  /* relative: hidden screen-reader labels in the table stay inside the scroll area instead of widening the page */
  position: relative;
  overflow-x: auto;
}
.ws-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}
.ws-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ws-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.ws-table tr:last-child td {
  border-bottom: 0;
}
.ws-table tbody tr {
  transition: background-color 0.3s var(--ease);
}
.ws-table tbody tr:hover {
  background: #fafafa;
}
.ws-table__ws {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ws-table__ws img {
  width: 56px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}
.ws-table__ws strong {
  display: block;
}
.ws-table__ws span {
  color: var(--muted);
  font-size: 12px;
}
.empty {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

/* Dropdown menu */
.menu {
  position: absolute;
  z-index: 20;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  animation: drop 0.34s var(--ease);
}
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  text-align: left;
  transition: background-color 0.2s var(--ease);
}
.menu button:hover {
  background: var(--surface);
}
.menu button.danger {
  color: var(--bad);
}
.menu hr {
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid var(--line);
}

/* Form bits (Add workspace drawer) */
.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
}
.field label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.3s var(--ease);
}
.field textarea {
  height: 96px;
  padding: 12px 14px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.steps span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--surface);
}
.steps span.is-done {
  background: var(--primary);
}
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  border: 1.5px dashed #cfcfcf;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.dropzone strong {
  color: var(--ink);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Entrance motion (same unhurried feel as the public site) */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.reveal > * {
  animation: rise 0.9s var(--ease) backwards;
}
.reveal > *:nth-child(2) {
  animation-delay: 80ms;
}
.reveal > *:nth-child(3) {
  animation-delay: 160ms;
}
.reveal > *:nth-child(4) {
  animation-delay: 240ms;
}
.reveal > *:nth-child(n + 5) {
  animation-delay: 320ms;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 1024px) {
  .app {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }
  .rail {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 50;
    width: 270px;
    height: auto;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.8s var(--ease);
  }
  body.rail-open .rail {
    transform: none;
    box-shadow: 0 0 0 100vmax rgba(16, 16, 16, 0.32);
  }
  /* Collapsing to icons is a desktop feature; on tablet / phone the menu slides in instead. */
  .rail__collapse {
    display: none;
  }
  .grid-2,
  .cal-layout {
    grid-template-columns: 1fr;
  }
  .cal-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .user__text,
  .search kbd {
    display: none;
  }
}
@media (max-width: 640px) {
  .kpis,
  .grid-3,
  .cal-side {
    grid-template-columns: 1fr;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .topbar {
    padding-left: 12px;
  }
  .topbar .btn span,
  .topbar .search {
    display: none;
  }
  .tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs button {
    flex: none;
  }
  .ws-toolbar .search {
    flex: 1 1 100%;
    max-width: none;
  }
}
