@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Purple+Purse&family=Montserrat:wght@400;900&display=swap");
@import url("icons.css");

/* ==========================================================================
   Esy Prints — Admin design system
   Tokens taken directly from the Figma file "esy-prints" (2MlVc9lMEvlgVv2y6QBmUO)
   ========================================================================== */

:root {
  /* Brand surfaces */
  --navy: #0f2743;
  --navy-soft: #1b3a5c;
  --sky: #a4d7ff;
  --sky-label: #dcebf6;
  --page: #f7f8fa;
  --card: #ffffff;
  --border: #e6e6e6;
  --border-soft: #eef0f3;
  --row-alt: #eef6ff;
  --search-bg: #f4f5f6;

  /* Form surfaces */
  --field-bg: #f5f6f9;
  --field-border: #e0e4ea;

  /* Ink */
  --ink: #0a0a0a;
  --ink-2: #1c1c21;
  --ink-3: #26292c;
  --muted: #545454;
  --muted-2: #636674;
  --muted-3: #4d5762;
  --muted-4: #5a5e62;
  --placeholder: #5d5f6b;

  /* Status */
  --green: #099630;
  --green-2: #0d892f;
  --green-3: #239b44;
  --green-bg: #dfffe8;
  --red: #ba1942;
  --red-bg: #fff0f4;
  --orange: #e26d12;
  --orange-bg: #fff6eb;
  --purple: #905bbb;
  --purple-bg: #fbf5ff;
  --blue: #095d9e;
  --blue-bg: #e8f4ff;
  --teal: #0e8589;
  --teal-bg: #e0feff;
  --olive: #87980a;
  --olive-bg: #f8fae6;
  --lilac: #864eb4;
  --lilac-bg: #f8effe;
  --rose: #ca4b6b;
  --amber: #c47215;
  --indigo: #2052ac;
  --violet: #7f49d3;
  --link: #0d78c9;

  /* Geometry */
  --sidebar-w: 281px;
  --topbar-h: 76px;
  --r-card: 15px;
  --r-field: 8px;
  --r-pill: 100px;

  --shadow-card: 0 1px 2px rgba(15, 39, 67, 0.04);
  --z-sidebar: 40;
  --z-topbar: 30;
  --z-overlay: 50;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 13px/1.55 "Poppins", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01" 1, "cv01" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Monochrome icon rendered from the exported Figma vector, tinted by currentColor. */
.i {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ==========================================================================
   App shell
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

/* --- Sidebar ------------------------------------------------------------ */

.sidebar {
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #fff;
  z-index: var(--z-sidebar);
}

.brand {
  display: block;
  padding: 22px 28px 18px;
  font-family: "Purple Purse", "Poppins", cursive;
  font-size: 35px;
  line-height: 1;
  background: linear-gradient(74.46deg, #66bcff 19.6%, #ffffff 95.06%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 12px;
  border-top: 1px solid rgba(229, 229, 229, 0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(164, 215, 255, 0.28) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(164, 215, 255, 0.28);
  border-radius: 3px;
}

.nav-group { margin-top: 14px; }

.nav-label {
  margin: 0 0 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sky-label);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 39px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.nav-item .i { width: 18px; height: 18px; }
.nav-item:hover { background: rgba(164, 215, 255, 0.07); }
.nav-item[aria-current="page"] {
  background: rgba(164, 215, 255, 0.1);
  color: var(--sky);
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: #0066b4;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  display: grid;
  place-items: center;
}

.sidebar-user {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px 14px 16px;
  padding: 11px;
  border-radius: 10px;
  background: rgba(164, 215, 255, 0.1);
}
.sidebar-user img {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-user b { display: block; font-size: 14px; font-weight: 500; }
.sidebar-user span { display: block; font-size: 13px; font-weight: 300; color: #d2d2d2; }

/* --- Topbar ------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 40px 0 35px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.search {
  position: relative;
  flex: 1;
  max-width: 387px;
  margin-left: auto;
}
.search input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--search-bg);
  font: 500 14px/1 "Poppins", sans-serif;
  color: var(--ink-2);
}
.search input::placeholder { color: var(--placeholder); }
.search .i {
  position: absolute;
  right: 20px; top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  color: var(--placeholder);
  pointer-events: none;
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 35px; height: 35px;
  border: 0;
  border-radius: 50%;
  background: #f4f6f6;
  color: var(--muted-2);
  cursor: pointer;
  transition: background-color 180ms ease;
}
.icon-btn:hover { background: #e7ebef; }
.icon-btn .i { width: 17px; height: 17px; }

.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user img {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar-user b { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.topbar-user span { display: block; font-size: 13px; font-weight: 300; color: var(--ink-2); }

.sidebar-toggle { display: none; }

/* --- Content ------------------------------------------------------------ */

.content {
  padding: 24px 40px 48px 35px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 39px;
  margin-bottom: 23px;
}

.back {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  color: var(--navy);
  cursor: pointer;
  background: none;
  border: 0;
}
.back .i { width: 7px; height: 12px; transform: rotate(90deg); }

.page-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.page-head .spacer { margin-left: auto; }
.page-head-actions { display: flex; align-items: center; gap: 12px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 39px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-field);
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.btn:hover { background: var(--navy-soft); }
.btn .i { width: 16px; height: 16px; }

.btn--sm { height: 35px; padding: 0 16px; }

.btn--ghost {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
}
.btn--ghost:hover { background: #f0f4f8; }

.btn--outline {
  background: #fff;
  border-color: var(--border);
  color: var(--ink);
}
.btn--outline:hover { background: var(--search-bg); }

.btn--icon {
  width: 55px;
  padding: 0;
  background: #fff;
  border-color: var(--field-border);
  color: var(--muted-3);
}
.btn--icon:hover { background: var(--field-bg); }
.btn--icon .i { width: 20px; height: 18px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card--plain { overflow: visible; }
.card__body { padding: 14px; }
.card__body--lg { padding: 24px; }

.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 6px 14px;
  background: var(--navy);
  color: #fff;
}
.card__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}
.card__head .spacer { margin-left: auto; }

.card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 180ms ease;
}
.card__action:hover { background: rgba(255, 255, 255, 0.22); }
.card__action .i { width: 10px; height: 6px; }

.grid { display: grid; gap: 32px; align-items: start; }
.grid--2 { grid-template-columns: 650fr 402fr; }
.grid--wide-left { grid-template-columns: 714fr 354fr; }
.grid--half { grid-template-columns: 574fr 500fr; }
.grid--main-aside { grid-template-columns: 844fr 240fr; }
.grid--detail { grid-template-columns: 744fr 340fr; }
.row-gap { display: grid; gap: 24px; }

/* ==========================================================================
   Stat tiles
   ========================================================================== */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 11px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tile-bg, var(--row-alt));
}
.stat__icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 7px;
  background: var(--tile-fg, var(--indigo));
  color: #fff;
}
.stat__icon .i { width: 17px; height: 17px; }
.stat__text { min-width: 0; }
.stat__label {
  display: block;
  font-size: 13px;
  line-height: 20px;
  color: #000;
}
.stat__value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: #000;
}
.stat__link {
  margin-left: auto;
  align-self: flex-start;
  color: var(--tile-fg, var(--indigo));
}
.stat__link .i { width: 14px; height: 11px; }

/* dashboard 2-column tile board */
.tile-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile-blue   { --tile-bg: #edf5fb; --tile-fg: #2052ac; }
.tile-violet { --tile-bg: #f8f3ff; --tile-fg: #7f49d3; }
.tile-green  { --tile-bg: #dfffe8; --tile-fg: #0d9131; }
.tile-rose   { --tile-bg: #fff0f4; --tile-fg: #ca4b6b; }
.tile-lilac  { --tile-bg: #fbf5ff; --tile-fg: #864eb4; }
.tile-amber  { --tile-bg: #fff6eb; --tile-fg: #c47215; }
.tile-teal   { --tile-bg: #e0feff; --tile-fg: #0e8589; }
.tile-olive  { --tile-bg: #f8fae6; --tile-fg: #87980a; }

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--border);
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 0 9px;
  border: 0;
  background: none;
  color: var(--muted-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 180ms ease;
}
.tab:hover { color: var(--navy); }
.tab[aria-selected="true"] { color: var(--navy); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: var(--navy);
}
.tab em {
  font-style: normal;
  color: var(--orange);
  font-size: 12px;
}

/* ==========================================================================
   Filters & form controls
   ========================================================================== */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.filters .spacer { margin-left: auto; }

.control {
  height: 45px;
  padding: 0 15px;
  border: 1px solid var(--field-border);
  border-radius: var(--r-field);
  background: #fff;
  font: 400 13px/1 "Poppins", sans-serif;
  color: var(--ink);
}
.control::placeholder { color: var(--muted-3); }
.control--search { width: 276px; max-width: 100%; }
.control--select { width: 203px; max-width: 100%; appearance: none; cursor: pointer; }

.select-wrap { position: relative; display: inline-block; }
.select-wrap .i {
  position: absolute;
  right: 15px; top: 50%;
  width: 12px; height: 7px;
  transform: translateY(-50%);
  color: var(--muted-3);
  pointer-events: none;
}

.field { display: block; }
.field > span:not(.phone-input):not(.i) {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--navy);
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--r-field);
  background: var(--field-bg);
  font: 300 13px/20px "Poppins", sans-serif;
  color: #000;
}
.field select { appearance: none; cursor: pointer; }
.field textarea { resize: vertical; }
.field--select { position: relative; }
.field--select .i {
  position: absolute;
  right: 15px; bottom: 18px;
  width: 12px; height: 7px;
  color: var(--muted-3);
  pointer-events: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 24px;
}
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid .span-all { grid-column: 1 / -1; }

.phone-input { display: flex; align-items: stretch; }
.phone-input .prefix {
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--field-border);
  border-right: 0;
  border-radius: var(--r-field) 0 0 var(--r-field);
  background: var(--field-bg);
  font-size: 13px;
}
.phone-input input { border-radius: 0 var(--r-field) var(--r-field) 0; }

.form-actions { display: flex; gap: 12px; margin-top: 26px; }

/* Radio / checkbox lists */
.choice-list {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--r-field);
  background: var(--field-bg);
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
}
.choice input { accent-color: var(--navy); width: 15px; height: 15px; }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 13px;
  border: 1px solid #cfe0ef;
  border-radius: var(--r-pill);
  background: #fff;
  color: #114369;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.chip:hover { border-color: #114369; }
.chip input { display: none; }
.chip .i { width: 12px; height: 12px; color: #114369; opacity: 0; }
.chip:has(input:checked) { background: #f2f8fd; border-color: #114369; }
.chip:has(input:checked) .i { opacity: 1; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: #fff;
}
.table-wrap--flush { border: 0; border-radius: 0; }

table.data {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
table.data th:first-child { padding-left: 20px; }
table.data th:last-child { padding-right: 20px; }
table.data td {
  padding: 13px 14px;
  color: #000;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-soft);
}
table.data td:first-child { padding-left: 20px; }
table.data td:last-child { padding-right: 20px; }
table.data tbody tr:nth-child(odd) { background: var(--row-alt); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .sub {
  display: block;
  color: var(--muted-3);
  font-weight: 300;
  font-size: 13px;
}
table.data .num { font-variant-numeric: tabular-nums; }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.actions { display: flex; align-items: center; gap: 10px; }
.act {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted-3);
  transition: opacity 180ms ease;
}
.act:hover { opacity: 0.65; }
.act .i { width: 18px; height: 18px; }
.act--view { color: var(--muted-3); }
.act--edit { color: var(--green-3); }
.act--delete { color: var(--red); }
.act--download { color: var(--amber); }

.mini-btn {
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease;
}
.mini-btn:hover { background: var(--field-bg); }

/* ==========================================================================
   Status text & pills
   ========================================================================== */

.status { font-size: 13px; white-space: nowrap; }
.status--confirmed, .status--approved, .status--published,
.status--visible, .status--active, .status--ready { color: var(--green); }
.status--assigned { color: var(--blue); }
.status--quality { color: var(--orange); }
.status--delivery { color: var(--purple); }
.status--cancelled, .status--failed { color: var(--red); }

.dot-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green-2); }
.dot-status::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  white-space: nowrap;
}
.pill--green  { background: var(--green-bg); color: var(--green-2); }
.pill--red    { background: var(--red-bg);   color: var(--red); }
.pill--blue   { background: var(--blue-bg);  color: var(--blue); }
.pill--orange { background: var(--orange-bg);color: var(--orange); }
.pill--purple { background: var(--purple-bg);color: var(--purple); }
.pill--teal   { background: var(--teal-bg);  color: var(--teal); }
.pill--olive  { background: var(--olive-bg); color: var(--olive); }
.pill--solid-red { background: var(--red); color: #fff; }
.pill--solid-green { background: var(--green-3); color: #fff; }
.pill--manual {
  background: #ffe9ef;
  color: var(--red);
  font-size: 11px;
  padding: 2px 9px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
}
.pagination .spacer { margin-left: auto; }
.page-btn {
  display: grid;
  place-items: center;
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border: 1px solid var(--field-border);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.page-btn:hover { background: var(--field-bg); }
.page-btn[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.page-btn .i { width: 7px; height: 11px; }
.page-btn--prev .i { transform: rotate(90deg); }
.page-btn--next .i { transform: rotate(-90deg); }
.page-gap { color: var(--muted-2); letter-spacing: 2px; }

/* ==========================================================================
   Toggle switch
   ========================================================================== */

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  position: relative;
  width: 38px; height: 20px;
  border-radius: var(--r-pill);
  background: #cfd4da;
  transition: background-color 200ms ease;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 200ms ease;
}
.switch input:checked + .track { background: var(--green-3); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ==========================================================================
   Key/value information rows (details screens)
   ========================================================================== */

.kv { display: grid; }
.kv > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 14px;
  font-size: 13px;
}
.kv > div:nth-child(odd) { background: var(--row-alt); }
.kv dt, .kv .k { color: var(--muted-4); flex: none; }
.kv dd, .kv .v { margin: 0; margin-left: auto; color: var(--ink-3); text-align: right; }

.pin-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.pin {
  padding: 2px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--field-border);
  color: var(--navy);
  font-size: 13px;
}

/* Perf tiles (SP details) */
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.perf-grid .stat { padding: 10px 12px; gap: 10px; }
.perf-grid .stat__label { white-space: nowrap; }

/* Document rows */
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.doc-row:last-child { border-bottom: 0; }
.doc-row .thumb {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 6px;
  background: var(--row-alt);
  display: grid;
  place-items: center;
  color: var(--blue);
  overflow: hidden;
}
.doc-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-row .meta { min-width: 0; }
.doc-row .meta b { display: block; font-weight: 400; font-size: 13px; }
.doc-row .meta span { display: block; font-size: 12px; font-weight: 300; color: var(--muted-4); }
.doc-row .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   Dashboard specifics
   ========================================================================== */

.legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 4px 14px 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.legend i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.chart { display: block; width: 100%; height: auto; }

.activity { display: grid; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.activity-item:last-child { border-bottom: 0; }
.activity-item .bullet {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--b-bg, var(--row-alt));
  color: var(--b-fg, var(--indigo));
}
.activity-item .bullet .i { width: 16px; height: 16px; }
.activity-item .body { min-width: 0; flex: 1; }
.activity-item .body b { display: block; font-weight: 400; font-size: 14px; }
.activity-item .body p { margin: 2px 0 0; font-size: 12px; color: var(--muted-3); }
.activity-item .when { font-size: 12px; color: var(--muted-3); white-space: nowrap; }
.amount-chip {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--green-bg);
  color: #1aa34a;
  font-size: 13px;
}

.payments { display: grid; gap: 14px; padding: 14px; }
.pay-row { display: flex; align-items: center; gap: 14px; }
.pay-row .tag {
  min-width: 118px;
  padding: 4px 12px;
  border-radius: var(--r-field);
  font-size: 14px;
}
.pay-row .meter { flex: 1; min-width: 0; }
.pay-row .meter b { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.pay-row .num { font-size: 14px; color: var(--muted); }

.bar {
  height: 8px;
  margin-top: 6px;
  border-radius: var(--r-pill);
  background: #f1f1f1;
  overflow: hidden;
}
.bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--c, var(--indigo)); }

.pipeline { display: grid; grid-template-columns: 1fr 1fr; }
.pipe-cell {
  padding: 13px 14px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--p-bg, #fff);
}
.pipe-cell:nth-child(2n) { border-right: 0; }
.pipe-cell:nth-last-child(-n+2) { border-bottom: 0; }
.pipe-cell .top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pipe-cell .top i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.pipe-cell b { display: block; margin: 6px 0 6px; font-size: 16px; font-weight: 600; }

/* ==========================================================================
   Catalogue grid
   ========================================================================== */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.cat-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.cat-card:hover { border-color: #cfd9e4; box-shadow: 0 4px 14px rgba(15, 39, 67, 0.08); }
.cat-card > img {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
}
.cat-card .info { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px 4px; }
.cat-card .info b {
  font-size: 13px;
  font-weight: 600;
  color: #0b2038;
  line-height: 1.3;
}
.cat-card .info span { display: block; font-size: 12px; color: #000; }
.cat-card .info .i { margin-left: auto; width: 12px; height: 12px; color: var(--navy); }
.cat-card .foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 12px;
}
.cat-card .foot .mini-btn { flex: 1; }

/* ==========================================================================
   Templates accordion
   ========================================================================== */

.acc { display: grid; gap: 12px; }
.acc__item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.acc__head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  background: #fff;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.acc__head .cat-tag {
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--row-alt);
  color: var(--navy);
  font-size: 13px;
}
.acc__head .count { margin-left: auto; color: #000; }
.acc__head .i { width: 12px; height: 7px; color: var(--muted-3); transition: transform 200ms ease; }
.acc__head[aria-expanded="true"] .i { transform: rotate(180deg); }
.acc__panel { padding: 0 16px 16px; }
.acc__head[aria-expanded="false"] + .acc__panel { display: none; }

.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tpl-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.tpl-card > img { display: block; width: 100%; height: 128px; object-fit: cover; }
.tpl-card .info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.tpl-card .info b { font-size: 14px; font-weight: 600; color: #0b2038; }
.tpl-card .info span { font-size: 13px; color: #000; }
.tpl-card .info .i { margin-left: auto; width: 12px; height: 12px; color: var(--navy); }
.tpl-card .btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 10px; }
.tpl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 0;
}
.tpl-tag--view { background: #e4f7e9; color: #1c9345; }
.tpl-tag--edit { background: #f3ecff; color: #7f49d3; }
.tpl-tag--assign { background: #f7f8e2; color: #74800d; }
.tpl-tag--thumb { background: #fdeee2; color: #e4690a; }
.tpl-tag--delete { background: var(--red-bg); color: var(--red); }
.tpl-card .foot {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
}
.tpl-card .foot .users { margin-left: auto; color: var(--muted-3); }

/* ==========================================================================
   Upload drop zone (Fonts)
   ========================================================================== */

.upload-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: #f6f9fd;
}
.upload-head .badge {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--indigo);
  color: #fff;
}
.upload-head b { display: block; font-size: 14px; font-weight: 600; }
.upload-head span { display: block; font-size: 13px; font-weight: 300; color: #4e6177; }
.upload-head .close { margin-left: auto; }

.dropzone {
  margin: 24px;
  padding: 28px 20px;
  border: 1.5px dashed #7aa7d8;
  border-radius: 10px;
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.dropzone:hover { background: #f7fbff; border-color: var(--indigo); }
.dropzone .up {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--r-field);
  background: var(--row-alt);
  color: #1c274c;
  font-size: 14px;
}
.dropzone p { margin: 14px 0 4px; font-size: 14px; }
.dropzone small { font-size: 13px; font-weight: 300; color: #000; }

.font-sample { font-family: "Montserrat", "Poppins", sans-serif; font-size: 13px; }
.font-sample--black { font-weight: 900; }

/* ==========================================================================
   Order details specifics
   ========================================================================== */

.line-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.line-item > img {
  width: 62px; height: 46px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
}
.line-item .meta { min-width: 0; flex: 1; }
.line-item .meta b { display: block; font-size: 13px; font-weight: 500; color: var(--navy); }
.line-item .meta p { margin: 4px 0 0; font-size: 12px; font-weight: 300; color: var(--muted-3); }
.line-item .qty, .line-item .price {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-3);
  white-space: nowrap;
}
.line-item .price { min-width: 76px; text-align: right; }

.note-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px;
  padding: 11px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--r-field);
  background: var(--field-bg);
  font-size: 13px;
  color: var(--ink-3);
}
.note-row .mini-btn { margin-left: auto; }

.file-strip { display: flex; gap: 12px; padding: 14px; }
.file-strip img {
  width: 108px; height: 62px;
  border-radius: 7px;
  object-fit: cover;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--ink-3);
}
.file-row .end { margin-left: auto; display: flex; gap: 26px; }
.file-row .end button {
  border: 0;
  background: none;
  color: var(--navy);
  font-size: 13px;
  cursor: pointer;
}
.file-row .end button:hover { text-decoration: underline; }

.stepper { display: grid; gap: 4px; padding: 16px 14px; }
.step { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 18px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: "";
  position: absolute;
  left: 14px; top: 30px; bottom: 4px;
  width: 1px;
  background: var(--border);
}
.step:last-child::before { display: none; }
.step .num {
  display: grid;
  place-items: center;
  width: 29px; height: 29px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  z-index: 1;
}
.step--active .num { background: var(--navy); border-color: var(--navy); color: #fff; }
.step .body { flex: 1; min-width: 0; }
.step .body b { display: block; font-size: 13px; font-weight: 500; color: var(--navy); }
.step .body p { margin: 3px 0 0; font-size: 12px; color: var(--muted-3); }
.step .body .link {
  border: 0; background: none; padding: 0;
  color: var(--navy); font-size: 12px; font-weight: 500; cursor: pointer;
}
.step .body .link:hover { text-decoration: underline; }

.summary { padding: 4px 14px 14px; }
.summary h4 { margin: 8px 0 12px; font-size: 14px; font-weight: 500; color: var(--muted-3); }
.summary .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--navy);
}
.summary .total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--r-field);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.empty-note {
  padding: 28px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-3);
}
.empty-note b { display: block; margin-bottom: 4px; font-weight: 500; color: var(--ink); }

.assigned-sp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.assigned-sp b { display: block; font-size: 13px; font-weight: 400; }
.assigned-sp span { display: block; font-size: 13px; font-weight: 300; color: var(--muted-3); }
.assigned-sp .remove {
  margin-left: auto;
  border: 0; background: none;
  color: #db2754; font-size: 13px; cursor: pointer;
}
.assigned-sp .remove:hover { text-decoration: underline; }

.prose { padding: 14px; font-size: 13px; color: var(--muted-3); font-weight: 300; }
.prose p { margin: 0 0 14px; }

/* ==========================================================================
   Menus (site menus page)
   ========================================================================== */

.menu-block { margin-bottom: 24px; }
.menu-block__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: #fff;
}
.menu-block__head b { display: block; font-size: 13px; font-weight: 500; }
.menu-block__head span { display: block; font-size: 13px; font-weight: 300; color: #4d4d4d; }
.menu-block__head .btn { margin-left: auto; }
.menu-block .table-wrap { border-radius: 0 0 var(--r-card) var(--r-card); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1360px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .grid--2, .grid--wide-left, .grid--half,
  .grid--main-aside, .grid--detail { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(281px, 82vw);
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }
  body.nav-open .sidebar { transform: none; }

  .sidebar-toggle {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    flex: none;
    border: 1px solid var(--border);
    border-radius: var(--r-field);
    background: #fff;
    cursor: pointer;
  }
  .sidebar-toggle .i { width: 18px; height: 18px; color: var(--navy); }

  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 39, 67, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 35;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

  .topbar { padding: 0 20px; gap: 14px; }
  .content { padding: 20px 20px 40px; }
  .topbar-user b, .topbar-user span { display: none; }
  .search { max-width: none; }
}

@media (max-width: 760px) {
  .topbar { gap: 10px; }
  .topbar-actions { gap: 8px; margin-left: auto; }
  .topbar-user img { width: 36px; height: 36px; }
  .icon-btn { width: 32px; height: 32px; }
  .page-title {
    font-size: 16px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search { display: none; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-grid, .field-grid, .field-grid--2,
  .tile-board, .perf-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-wrap: wrap; }
  .kv > div { flex-direction: column; gap: 4px; }
  .kv dd, .kv .v { margin-left: 0; text-align: left; }
  .pin-grid { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
