:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --ink: #1e2528;
  --muted: #66706d;
  --line: #dfe5df;
  --accent: #246b61;
  --accent-2: #a74735;
  --warn: #b7791f;
  --good: #2f7d45;
  --bad: #b33a3a;
  --soft: #f2e8d8;
  --shadow: 0 18px 45px rgba(31, 41, 38, .10);
}

* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(circle at 14% 8%, rgba(120, 94, 255, .12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 56%, #eef4ff 100%);
  color: #111936;
  padding: 30px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  box-shadow: 10px 0 34px rgba(46, 70, 120, .08);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 152px;
  padding: 4px 8px 14px;
  margin-bottom: 0;
  text-align: center;
}

.sidebar-brand-logo {
  display: block;
  width: min(254px, 100%);
  max-height: 144px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(46, 70, 120, .10));
}

.sidebar-brand-symbol {
  display: block;
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 5px;
  filter: drop-shadow(0 10px 14px rgba(46, 70, 120, .10));
}

.sidebar-brand-text {
  display: grid;
  justify-items: center;
  gap: 3px;
  line-height: 1;
}

.brand .sidebar-brand-text strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  line-height: .95;
  letter-spacing: 0;
  color: #050b36;
}

.brand .sidebar-brand-text strong span {
  display: inline;
  color: inherit;
  font-size: inherit;
  margin: 0;
}

.brand .sidebar-brand-text strong span:last-child {
  background: linear-gradient(100deg, #ea37d7 0%, #ff7b3a 35%, #8142ff 66%, #12a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-brand-text small {
  display: block;
  color: #8b92b5;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background:
    radial-gradient(circle at 50% 50%, #2cf7ff 0 10%, #8456ff 11% 20%, #060814 21% 36%, transparent 37%),
    conic-gradient(from 35deg, #15d6ff, #b41fff, #ff6a00, #16f0d5, #325dff, #15d6ff);
  color: #ffffff;
  border: 5px solid #050816;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(33, 38, 69, .20);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .86);
}

.brand-mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  right: 8px;
  top: 8px;
}

.brand span {
  display: block;
  color: #6d7698;
  font-size: 16px;
  margin-top: 4px;
}

.brand strong {
  color: #151c3f;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

.nav {
  display: grid;
  gap: 10px;
  padding: 0;
}

.nav button {
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 8px;
  background: transparent;
  color: #192241;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 16px;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.nav button:hover {
  background: rgba(58, 112, 255, .08);
  color: #132d8f;
}

.nav button.active {
  background: linear-gradient(100deg, #00aeff 0%, #264fff 54%, #c83cff 100%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(42, 89, 237, .28), inset 0 -2px 0 rgba(255, 255, 255, .42);
  transform: translateY(-1px);
}

.nav .nav-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  color: #53618d;
  display: grid;
  place-items: center;
}

.nav button.active .nav-icon {
  color: #ffffff;
}

.nav .nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-card {
  margin-top: auto;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(214, 221, 239, .78);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(45, 55, 100, .14);
  min-height: 58px;
  padding: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0;
  color: #18213f;
}

.sidebar-card > * {
  display: none !important;
}

.sidebar-card::before {
  content: "Bem-vindo ao sistema";
  font-size: 15px;
  font-weight: 800;
}

.sidebar-camera {
  min-height: 112px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 88%, rgba(167, 112, 255, .25), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(81, 185, 255, .28), transparent 30%),
    linear-gradient(150deg, #fff7ff, #edf4ff 62%, #f8fbff);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.camera-body {
  position: absolute;
  width: 142px;
  height: 82px;
  right: 18px;
  bottom: 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8cc8ff, #5865ff);
  box-shadow: 0 14px 24px rgba(61, 72, 150, .25);
}

.camera-body::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -18px;
  width: 48px;
  height: 24px;
  border-radius: 16px 16px 4px 4px;
  background: #7fb8ff;
}

.camera-lens {
  position: absolute;
  width: 58px;
  height: 58px;
  left: 40px;
  top: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 48%, #0b1024 0 19%, #692dff 20% 34%, #1ff0ff 35% 43%, #172056 44% 58%, #ffffff 59% 64%, #273a91 65%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .48);
}

.camera-flash {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 24px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-weight: 800;
  font-size: 14px;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #00a8ff, #8138ff);
  box-shadow: 0 10px 18px rgba(72, 83, 219, .22);
}

.sidebar-chevron {
  margin-left: auto;
  color: #111936;
  font-size: 22px;
  line-height: 1;
}

.main {
  min-width: 0;
}

body.public-mode {
  background: #edf2ef;
  overflow-y: scroll;
}

body.public-mode .shell {
  display: block;
  min-height: 100vh;
}

body.public-mode .sidebar,
body.public-mode .topbar {
  display: none;
}

body.public-mode .content {
  min-height: 100vh;
  padding: 34px 18px;
  display: grid;
  place-items: start center;
}

.public-card {
  width: min(920px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.public-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.public-head h2,
.public-success h2 {
  margin: 0;
  font-size: 24px;
}

.public-head p,
.public-success p {
  margin: 6px 0 0;
  color: var(--muted);
}

.public-success {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 34px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 245, .92);
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.12;
  letter-spacing: 0;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.content {
  padding: 28px 34px 46px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head h2 {
  margin: 0;
  font-size: 24px;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.stack {
  display: grid;
  gap: 16px;
}

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

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

.panel,
.card,
.stat,
.table-wrap,
.calendar,
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(30, 37, 40, .04);
}

.panel,
.form-panel {
  padding: 18px;
}

.stat {
  padding: 16px;
  min-height: 102px;
}

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

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.stat small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.button,
.primary,
.secondary,
.gallery-file-picker,
.gallery-upload-action,
.ghost,
.danger,
.small,
.tab,
.segmented button {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.button {
  text-decoration: none;
}

.primary {
  background: var(--accent);
  color: white;
}

.secondary {
  background: var(--soft);
  color: #442a18;
}

.gallery-upload-action {
  background: #000080;
  color: #fff;
}

.gallery-file-picker {
  background: #B0C4DE;
  color: #1c1c1c;
  cursor: pointer;
}

.ghost,
.tab,
.segmented button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.danger {
  background: #f8dddd;
  color: #7b2020;
}

.small {
  min-height: 32px;
  padding: 6px 10px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  color: #315c54;
  font-size: 12px;
  font-weight: 700;
}

.client-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto 150px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-filter-panel {
  display: grid;
  grid-template-columns: 160px 170px 160px 160px auto 150px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin: 14px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-count {
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  align-content: center;
}

.filter-count strong {
  font-size: 18px;
  line-height: 1;
}

.filter-count span {
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.segmented button {
  border: 0;
  border-radius: 0;
}

.segmented button.active,
.tab.active,
.ghost.active {
  background: var(--accent);
  color: #fff;
}

body.dashboard-mode {
  background: #f6f9ff;
}

body.dashboard-mode .main {
  background:
    linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.dashboard-mode .topbar {
  min-height: 142px;
  padding: 42px 34px 28px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 42%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .16) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .28) 72%, rgba(222, 90, 255, .24) 84%, transparent 100%);
  box-shadow: none;
}

body.dashboard-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.dashboard-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.dashboard-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.dashboard-mode #resetDemoBtn::before {
  content: "↻";
  color: #1265ff;
  font-size: 22px;
  line-height: 1;
}

body.dashboard-mode .content {
  padding: 28px 32px 52px;
}

.dashboard-page {
  display: grid;
  gap: 26px;
}

.dashboard-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-filter-row p {
  margin: 0;
  color: #69749f;
  font-size: 16px;
  font-weight: 600;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  flex-wrap: nowrap;
}

.dashboard-actions .segmented {
  border-radius: 10px 0 0 10px;
  border-color: rgba(218, 225, 243, .96);
  box-shadow: 0 10px 22px rgba(45, 76, 145, .08);
}

.dashboard-actions .segmented button,
.dashboard-actions .ghost {
  min-height: 42px;
  min-width: 132px;
  padding: 0 16px;
  border-radius: 0;
  background: rgba(255, 255, 255, .96);
  color: #263052;
  border-color: rgba(218, 225, 243, .96);
  font-size: 14px;
  font-weight: 500;
}

.dashboard-actions .segmented button.active,
.dashboard-actions .ghost.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  border-color: transparent;
  box-shadow: 0 9px 18px rgba(37, 101, 255, .28), inset 0 -2px 0 rgba(255, 255, 255, .28);
}

.dashboard-actions .ghost {
  border-left: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: 0 10px 22px rgba(45, 76, 145, .08);
}

.dashboard-period-card {
  min-height: 116px;
  border: 1px solid rgba(90, 139, 255, .32);
  border-radius: 14px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .94) 0 58%, rgba(237, 246, 255, .84) 100%);
  box-shadow: 0 14px 36px rgba(51, 82, 152, .10);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.dashboard-period-card::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -22px;
  width: 470px;
  height: 120px;
  opacity: .56;
  background:
    repeating-radial-gradient(ellipse at 72% 42%, transparent 0 15px, rgba(60, 139, 255, .38) 16px 17px, transparent 18px 26px);
  transform: rotate(-7deg);
}

.dashboard-period-icon,
.dashboard-stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.dashboard-period-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #eaf3ff;
  color: #116bff;
  box-shadow: 0 14px 24px rgba(38, 101, 230, .14);
}

.dashboard-period-icon svg,
.dashboard-stat-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-period-card strong {
  display: block;
  color: #121936;
  font-size: 16px;
}

.dashboard-period-card strong span {
  color: #0b65ff;
}

.dashboard-period-card small {
  display: block;
  color: #66749f;
  font-size: 14px;
  margin-top: 8px;
}

.dashboard-metrics {
  display: grid;
  gap: 28px;
}

.dashboard-metrics-main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metrics-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.dashboard-stat {
  min-height: 190px;
  border: 1px solid rgba(218, 226, 243, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
  padding: 22px 24px 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
}

.dashboard-metrics-secondary .dashboard-stat {
  min-height: 154px;
  padding: 26px 94px 46px 26px;
  align-content: start;
}

.dashboard-stat-menu {
  position: absolute;
  top: 24px;
  right: 22px;
  width: 34px;
  height: 24px;
  padding: 0;
  background: transparent;
  color: #405181;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
}

.dashboard-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.dashboard-stat span {
  color: #3d496f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.dashboard-stat strong {
  color: #05082a;
  display: block;
  margin-top: 9px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
}

.dashboard-stat small {
  color: #6f7ca5;
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

.dashboard-stat-line {
  height: 3px;
  border-radius: 999px;
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.dashboard-metrics-secondary .dashboard-stat-menu {
  display: none;
}

.dashboard-metrics-secondary .dashboard-stat-icon {
  position: absolute;
  right: 26px;
  top: 28px;
  width: 58px;
  height: 58px;
  margin: 0;
  z-index: 2;
}

.dashboard-metrics-secondary .dashboard-stat span,
.dashboard-metrics-secondary .dashboard-stat strong,
.dashboard-metrics-secondary .dashboard-stat small {
  position: relative;
  z-index: 2;
}

.dashboard-metrics-secondary .dashboard-stat span {
  color: #1d2646;
  font-size: 16px;
  font-weight: 800;
}

.dashboard-metrics-secondary .dashboard-stat strong {
  margin-top: 12px;
  font-size: 32px;
}

.dashboard-metrics-secondary .dashboard-stat small {
  margin-top: 12px;
  font-size: 13px;
}

.dashboard-metrics-secondary .dashboard-stat-line {
  height: 54px;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 1;
  border-radius: 0;
  background: transparent !important;
}

.dashboard-stat-income .dashboard-stat-icon,
.dashboard-stat-gallery .dashboard-stat-icon { background: #dff9ec; color: #18c476; }
.dashboard-stat-wallet .dashboard-stat-icon,
.dashboard-stat-clients .dashboard-stat-icon { background: #e5f2ff; color: #1577ff; }
.dashboard-stat-expense .dashboard-stat-icon,
.dashboard-stat-orders .dashboard-stat-icon { background: #ede2ff; color: #8732ff; }
.dashboard-stat-payable .dashboard-stat-icon { background: #ffe8d2; color: #ff7415; }

.dashboard-stat-income .dashboard-stat-line,
.dashboard-stat-gallery .dashboard-stat-line { background: linear-gradient(90deg, #1bd37c, #bdf5dc); }
.dashboard-stat-wallet .dashboard-stat-line,
.dashboard-stat-clients .dashboard-stat-line { background: linear-gradient(90deg, #1876ff, #bad8ff); }
.dashboard-stat-expense .dashboard-stat-line,
.dashboard-stat-orders .dashboard-stat-line { background: linear-gradient(90deg, #842fff, #dfc8ff); }
.dashboard-stat-payable .dashboard-stat-line { background: linear-gradient(90deg, #ff780a, #ffd0a7); }

.dashboard-stat-gallery { --dashboard-wave: #8ee7c3; --dashboard-wave-fill: rgba(142, 231, 195, .22); }
.dashboard-stat-clients { --dashboard-wave: #9ec5ff; --dashboard-wave-fill: rgba(158, 197, 255, .20); }
.dashboard-stat-orders { --dashboard-wave: #c59dff; --dashboard-wave-fill: rgba(197, 157, 255, .20); }

.dashboard-metrics-secondary .dashboard-stat-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dashboard-wave-fill);
  clip-path: polygon(0 72%, 13% 58%, 25% 50%, 38% 58%, 52% 34%, 66% 66%, 82% 60%, 100% 74%, 100% 100%, 0 100%);
  opacity: 1;
}

.dashboard-metrics-secondary .dashboard-stat-line::after {
  content: "";
  position: absolute;
  inset: 4px 0 0;
  background: var(--dashboard-wave);
  clip-path: polygon(0 69%, 13% 55%, 25% 47%, 38% 55%, 52% 31%, 66% 63%, 82% 57%, 100% 71%, 100% 75%, 82% 61%, 66% 67%, 52% 35%, 38% 59%, 25% 51%, 13% 59%, 0 73%);
  opacity: .88;
}

.person-form {
  gap: 18px;
}

.person-type-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(249, 251, 255, .92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.person-type-box button {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  color: #263052;
  display: grid;
  gap: 4px;
  text-align: left;
  align-content: center;
  box-shadow: 0 10px 20px rgba(45, 76, 145, .06);
}

.person-type-box button strong {
  color: #071034;
  font-size: 15px;
  font-weight: 600;
}

.person-type-box button span {
  color: #68749c;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 400;
}

.person-type-box button.active {
  border-color: rgba(85, 112, 255, .28);
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.person-type-box button.active strong {
  color: #ffffff;
}

.person-type-box button.active span {
  color: rgba(255, 255, 255, .84);
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.section-title {
  display: grid;
  gap: 3px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.relaxed-grid {
  gap: 14px 16px;
}

.integration-status {
  display: block;
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.integration-status.loading {
  background: #faedcf;
  color: #81540c;
}

.integration-status.success {
  background: #dff1e3;
  color: #1f6133;
}

.integration-status.error {
  background: #f7dada;
  color: #8e2f2f;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

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

.required {
  color: var(--bad);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 11px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.copy-link-field {
  min-height: 120px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.35;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 107, 97, .24);
  border-color: var(--accent);
}

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.resizable-table {
  table-layout: fixed;
}

.client-table {
  min-width: 0;
  width: 100%;
  font-size: 15px;
}

.order-table {
  min-width: 0;
  width: 100%;
  font-size: 15px;
}

.gallery-table {
  min-width: 0;
  width: 100%;
  font-size: 14px;
}

.gallery-table-wrap {
  overflow-x: hidden;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: #fbfcfa;
  position: relative;
  user-select: none;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th:last-child {
  border-right: 0;
}

.resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}

.resize-handle::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

th:hover .resize-handle::after {
  background: var(--accent);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.client-table .row-actions .small {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.action-select {
  width: 100%;
  min-width: 142px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 14px, calc(100% - 11px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 0 30px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.action-select:focus {
  border-color: currentColor;
  box-shadow: 0 0 0 3px rgba(47, 111, 99, .12);
}

.status-select {
  min-width: 126px;
}

.order-table .status-select {
  width: fit-content;
  min-width: 118px;
  height: 30px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 24px 0 8px;
  line-height: 30px;
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  field-sizing: content;
}

.order-table .order-action-select {
  width: fit-content;
  min-width: 132px;
  height: 30px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 24px 0 8px;
  line-height: 30px;
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  field-sizing: content;
}

.gallery-table .gallery-action-select {
  width: fit-content;
  min-width: 146px;
  height: 30px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 24px 0 8px;
  line-height: 30px;
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  field-sizing: content;
}

.order-table .status-select.status-running,
.order-table .status-option-running {
  color: #00008B;
}

.order-table .status-select.status-paused,
.order-table .status-option-paused {
  color: #8B0000;
}

.order-table .status-select.status-done,
.order-table .status-option-done {
  color: #228B22;
}

.order-table .status-select.status-pending,
.order-table .status-option-pending {
  color: #D2691E;
}

.order-table .order-action-select,
.order-table .order-action-option-default,
.client-table .person-action-select,
.client-table .person-action-option-default,
.gallery-table .gallery-action-select,
.gallery-table .gallery-action-option-default {
  color: #1C1C1C;
}

.order-table .order-action-option-edit,
.client-table .person-action-option-edit,
.gallery-table .gallery-action-option-edit {
  color: #00008B;
}

.client-table .person-action-select {
  width: fit-content;
  min-width: 146px;
  height: 30px;
  min-height: 30px;
  max-width: 100%;
  padding: 0 24px 0 8px;
  line-height: 30px;
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
  field-sizing: content;
}

.icon-button {
  width: 38px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.icon-button small {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.comment-edit-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.overdue-delivery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #B22222;
  font-weight: 800;
}

.overdue-alert-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.gallery-filter-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-filter-buttons button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  color: #263052;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
  cursor: pointer;
}

.gallery-filter-buttons button span {
  margin-right: 6px;
}

.gallery-filter-buttons button.active {
  box-shadow: 0 12px 22px rgba(37, 101, 255, .16);
}

.gallery-filter-buttons button[data-filter="todas"].active {
  background: #dce9ff;
  color: #0b4c9c;
  border-color: #6fa6f0;
}

.gallery-filter-buttons .filter-released.active {
  background: #dff1e3;
  color: #1f6133;
  border-color: #91c99d;
}

.gallery-filter-buttons .filter-blocked.active {
  background: #f8dddd;
  color: #7b2020;
  border-color: #d99494;
}

.gallery-upload-button,
.gallery-link-button {
  width: 42px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.gallery-upload-button img,
.gallery-link-button img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.gallery-link-button img {
  width: 30px;
  height: 30px;
}

.gallery-release-toggle {
  width: 118px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding: 0 12px 0 42px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45), 0 1px 3px rgba(0,0,0,.18);
}

.gallery-release-toggle.blocked {
  background: #c13a32;
}

.gallery-release-toggle.released {
  background: #50b70a;
  padding: 0 42px 0 14px;
}

.gallery-release-toggle i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f7f7f7;
  border: 1px solid rgba(0,0,0,.22);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .18s ease;
}

.gallery-release-toggle.released i {
  transform: translateX(84px);
}

.gallery-upload-panel {
  display: grid;
  gap: 12px;
}

.gallery-upload-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, .85fr) auto;
  gap: 12px;
  align-items: end;
}

.gallery-upload-info {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-weight: 800;
}

.gallery-upload-info small {
  color: var(--muted);
  font-weight: 700;
}

.gallery-file-picker input {
  display: none;
}

.gallery-file-path {
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: #3f3f46;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-photo-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-height: 770px;
  overflow: auto;
  padding: 6px 4px 10px;
}

.gallery-photo-card {
  min-height: 304px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: 145px minmax(58px, auto) 34px 34px 38px;
}

.gallery-photo-card.cover-selected {
  border-color: #000080;
  box-shadow: 0 0 0 2px rgba(0,0,128,.16);
}

.gallery-photo-open {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-photo-open img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  display: block;
  border-radius: 8px 8px 0 0;
}

.gallery-photo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  min-height: 58px;
  overflow: visible;
}

.gallery-photo-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gallery-photo-flags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
}

.gallery-photo-flags label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.gallery-cover-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #000080;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.gallery-client-choice {
  color: #228B22;
  white-space: nowrap;
}

.gallery-client-choice.muted,
.muted-text {
  color: var(--muted);
}

.gallery-choice-pending {
  color: #8B0000;
  font-weight: 900;
}

.gallery-choice-done {
  color: #228B22;
  font-weight: 900;
}

.gallery-photo-card label,
.gallery-expanded-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  min-height: 34px;
  white-space: nowrap;
}

.gallery-photo-card input,
.gallery-expanded-toolbar input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.gallery-photo-zoom,
.gallery-photo-delete {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.gallery-photo-zoom {
  border: 1px solid rgba(0,0,128,.28);
  background: #e9efff;
  color: #000080;
}

.gallery-photo-delete {
  border: 1px solid rgba(123,32,32,.35);
  background: #f8dddd;
  color: #7b2020;
}

.gallery-photo-card strong {
  padding: 9px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-photo-viewer {
  position: fixed;
  inset: 18px;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21, 28, 25, .72);
}

.gallery-photo-viewer[hidden] {
  display: none;
}

.gallery-expanded-box {
  width: min(1040px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gallery-expanded-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.gallery-expanded-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 0;
}

.gallery-expanded-frame img {
  width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  background: #101615;
  border-radius: 8px;
}

.gallery-expanded-box > strong {
  text-align: center;
}

.client-table th,
.client-table td,
.gallery-table th,
.gallery-table td,
.order-table th,
.order-table td {
  padding: 11px 10px;
}

.client-table th,
.client-table td,
.gallery-table th,
.gallery-table td,
.order-table th,
.order-table td {
  white-space: nowrap;
}

.client-table td,
.gallery-table td,
.order-table td {
  line-height: 1.25;
}

.gallery-table {
  table-layout: fixed;
}

.gallery-table th,
.gallery-table td {
  padding: 7px 5px;
  font-size: 12px;
  line-height: 1.18;
  vertical-align: middle;
}

.gallery-table th {
  white-space: normal;
}

.gallery-table td {
  white-space: nowrap;
}

.gallery-table .badge {
  min-height: 22px;
  padding: 2px 6px;
  font-size: 11px;
}

.gallery-table .muted-text {
  font-size: 11px;
}

.gallery-table .gallery-upload-button,
.gallery-table .gallery-link-button {
  width: 34px;
  height: 30px;
}

.gallery-table .gallery-upload-button img,
.gallery-table .gallery-link-button img {
  width: 22px;
  height: 22px;
}

.gallery-table .gallery-release-toggle {
  width: 104px;
  height: 30px;
  padding: 0 10px 0 36px;
  font-size: 11px;
}

.gallery-table .gallery-release-toggle.released {
  padding: 0 36px 0 10px;
}

.gallery-table .gallery-release-toggle i {
  width: 26px;
  height: 26px;
}

.gallery-table .gallery-release-toggle.released i {
  transform: translateX(74px);
}

.gallery-table .gallery-action-select {
  width: 100%;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0 22px 0 6px;
  font-size: 12px;
  line-height: 30px;
  background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px;
}

.public-gallery-shell,
.public-gallery-client-shell {
  display: grid;
  gap: 18px;
}

.public-gallery-client-shell {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin: 0 auto;
}

.public-gallery-cover {
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background-size: cover;
  background-position: center 22%;
}

.public-gallery-cover h2 {
  margin: 4px 0;
  font-size: 36px;
}

.public-gallery-cover strong {
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}

.public-face-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-face-search h3,
.public-face-search p {
  margin: 0;
}

.public-gallery-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: start;
}

.public-gallery-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 3px;
  min-height: 470px;
  align-content: start;
}

.public-select-photo-card {
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 0;
  overflow: hidden;
  background: #121212;
}

.public-select-photo-card.selected {
  border-color: #228B22;
  box-shadow: 0 0 0 2px rgba(34,139,34,.18);
}

.public-select-photo-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  background: #101615;
}

.public-select-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.public-select-photo-actions {
  display: none;
}

.public-select-photo-actions label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.public-select-photo-actions input {
  width: auto;
  min-height: auto;
}

.public-photo-check,
.public-photo-cart,
.public-download-chip {
  position: absolute;
  z-index: 2;
}

.public-photo-check {
  left: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: rgba(0,0,0,.28);
}

.public-photo-check input {
  width: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: #228B22;
}

.public-photo-cart {
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 4px;
  background: rgba(40, 40, 40, .72);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.public-download-chip {
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(34,139,34,.9);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.public-cart-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.public-cart-panel strong {
  color: var(--ink);
  font-size: 18px;
}

.public-order-footer {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 20px;
}

.face-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(21,28,25,.68);
}

.face-modal[hidden],
.face-file-input,
.face-camera-input {
  display: none;
}

.face-modal-box {
  position: relative;
  width: min(450px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 28px 24px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.face-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.face-modal-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ff;
  color: #2f80ed;
  font-size: 42px;
  font-weight: 900;
}

.face-modal-box h3,
.face-modal-box p {
  margin: 0;
}

.face-modal-box small {
  color: var(--muted);
}

.face-modal-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.public-gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.public-gallery-head h2 {
  margin: 2px 0;
}

.public-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.public-selection-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font-weight: 800;
  color: var(--ink);
}

.public-gallery-viewer {
  display: grid;
  gap: 12px;
}

.public-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-viewer-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.public-viewer-photo {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101615;
}

.public-viewer-photo img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.public-gallery-photo {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.public-gallery-photo img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(-24deg);
  color: rgba(255,255,255,.72);
  font-size: clamp(22px, 3vw, 44px);
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,.28);
  pointer-events: none;
}

.public-photo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.public-photo-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.public-photo-actions input {
  width: auto;
  min-height: auto;
}

.print-guard-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(255,255,255,.40);
  color: #7b2020;
  font-size: 24px;
  font-weight: 900;
}

.gallery-print-guard .public-gallery-grid,
.gallery-print-guard .public-gallery-viewer {
  filter: blur(22px);
}

.gallery-print-guard .print-guard-mask {
  display: grid;
}

.public-face-search {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(47,128,237,.22);
  background:
    linear-gradient(135deg, rgba(232,244,255,.96), rgba(255,255,255,.95) 58%, rgba(226,244,236,.92)),
    #fff;
  box-shadow: 0 16px 38px rgba(33, 97, 150, .12);
}

.public-face-search::after {
  content: "";
  position: absolute;
  right: -64px;
  top: -82px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(47,128,237,.12);
}

.public-face-icon,
.face-modal-icon {
  color: #2f80ed;
}

.public-face-icon {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.56);
}

.public-face-icon svg,
.face-modal-icon svg {
  width: 58px;
  height: 58px;
}

.public-face-copy {
  position: relative;
  z-index: 1;
  flex: 1;
}

.public-face-button {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #2f80ed;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(47,128,237,.24);
}

.public-gallery-shop-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  gap: 18px;
}

.public-gallery-main {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.public-photo-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-photo-filter button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5d0;
  border-radius: 8px;
  background: #fff;
  color: #26332f;
  font-size: 13px;
  font-weight: 800;
}

.public-photo-filter .public-smart-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  order: 10;
  cursor: not-allowed;
}

.public-photo-filter .public-smart-filter:disabled {
  opacity: 1;
}

.public-filter-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf4ff;
  color: #2f80ed;
}

.public-filter-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.public-photo-filter button.active {
  border-color: #246b61;
  background: #246b61;
  color: #fff;
}

.public-photo-filter .public-smart-filter.active {
  border-color: #228B22;
  background: #228B22;
  color: #fff;
  box-shadow: 0 8px 18px rgba(34,139,34,.24);
}

.public-photo-filter .public-smart-filter.active .public-filter-icon {
  background: rgba(255,255,255,.92);
  color: #228B22;
}

.public-empty-filter,
.public-released-note {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.public-gallery-main .public-empty-filter {
  position: absolute;
  left: 0;
  right: 0;
  top: 56px;
  z-index: 3;
  pointer-events: none;
}

.public-order-side {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
}

.public-side-card {
  border: 1px solid rgba(36,107,97,.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(31,41,38,.10);
}

.public-cart-panel.public-side-card {
  position: static;
  padding: 16px;
  gap: 12px;
}

.public-side-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-side-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf4ff;
  color: #2f80ed;
  font-size: 18px;
}

.public-order-summary {
  padding: 18px;
}

.public-order-summary h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.public-order-summary dl {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
}

.public-order-summary dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1ee;
}

.public-order-summary dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.public-order-summary dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.public-order-summary .public-summary-total {
  align-items: center;
  margin-top: 4px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #f1f8f5;
}

.public-summary-total dt,
.public-summary-total dd {
  color: #1f6133;
  font-size: 14px;
}

.public-order-summary > button,
.public-cart-panel > button {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.public-select-photo-card {
  cursor: zoom-in;
}

.public-select-photo-card[hidden] {
  display: none;
}

.public-select-photo-card.selected .public-select-photo-frame {
  outline: 3px solid #228B22;
  outline-offset: -3px;
}

.public-photo-check {
  background: rgba(255,255,255,.72);
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.public-photo-check input {
  cursor: pointer;
}

.public-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  grid-template-columns: minmax(42px, 1fr) minmax(260px, 720px) minmax(42px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 34px 26px;
  background: radial-gradient(circle at center, rgba(31,35,42,.86), rgba(0,0,0,.97));
}

.public-photo-lightbox[hidden] {
  display: none;
}

.public-photo-lightbox figure {
  margin: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.public-lightbox-frame {
  position: relative;
  display: grid;
  place-items: center;
  max-height: 78vh;
  overflow: hidden;
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.public-lightbox-frame img {
  max-width: min(72vw, 720px);
  max-height: 78vh;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.public-photo-lightbox figcaption {
  min-width: min(100%, 420px);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
}

.public-photo-lightbox figcaption button {
  min-width: 180px;
  border-radius: 8px;
  font-weight: 900;
}

.public-photo-lightbox figcaption strong {
  color: var(--ink);
}

.public-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 38px;
  border-radius: 8px;
  background: #B22222;
  color: #fff;
  font-weight: 900;
}

.public-lightbox-nav {
  width: 42px;
  height: 42px;
  justify-self: center;
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  color: #29302d;
  font-size: 28px;
  font-weight: 900;
}

.face-modal-icon {
  font-size: 0;
}

.face-camera-preview {
  width: 100%;
  display: grid;
  gap: 10px;
}

.face-camera-preview[hidden] {
  display: none;
}

.face-camera-preview video {
  width: 100%;
  max-height: 260px;
  border-radius: 8px;
  background: #111;
  object-fit: cover;
}

.gallery-print-guard .public-gallery-cover,
.gallery-print-guard .public-face-search,
.gallery-print-guard .public-gallery-shop-layout,
.gallery-print-guard .public-photo-lightbox {
  filter: blur(24px) saturate(.15) contrast(.62);
}

.print-guard-mask {
  z-index: 180;
  background: rgba(0,0,0,.78);
  color: #fff;
  backdrop-filter: blur(5px);
}

.print-guard-mask strong {
  padding: 18px 24px;
  border-radius: 8px;
  background: rgba(178,34,34,.92);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.print-guard-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 38px;
  border-radius: 8px;
  background: #B22222;
  color: #fff;
  font-weight: 900;
}

.public-download-all {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .public-face-search,
  .public-gallery-shop-layout {
    grid-template-columns: 1fr;
  }

  .public-face-search {
    display: grid;
    justify-items: start;
  }

  .public-order-side {
    position: static;
  }

  .public-photo-lightbox {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 58px 10px 18px;
  }

  .public-lightbox-frame img {
    max-width: 100%;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink);
}

.badge.good { background: #dff1e3; color: #1f6133; }
.badge.warn { background: #faedcf; color: #81540c; }
.badge.bad { background: #f7dada; color: #8e2f2f; }
.badge.info { background: #dcefeb; color: #235e56; }

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}

.progress {
  height: 10px;
  min-width: 120px;
  border-radius: 999px;
  background: #e5ebe8;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.modal-root.active {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 28, 25, .52);
}

.modal {
  position: relative;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  margin: 22px auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal:has(.gallery-form) {
  width: min(1240px, calc(100vw - 28px));
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.modal-body {
  padding: 18px;
}

.pause-notes-list {
  display: grid;
  gap: 12px;
}

.pause-note-entry {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pause-note-entry strong,
.pause-note-entry span,
.pause-note-entry p {
  margin: 0;
}

.pause-note-entry span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.empty-inline {
  padding: 14px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.dashboard-range-modal {
  width: min(680px, calc(100vw - 32px));
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
}

.dashboard-range-modal .modal-header {
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.dashboard-range-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.dashboard-range-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
}

.dashboard-range-modal .modal-body {
  padding: 24px 26px 26px;
}

.dashboard-range-form {
  display: grid;
  gap: 20px;
}

.dashboard-range-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 102px;
  padding: 20px;
  border: 1px solid rgba(90, 139, 255, .30);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 58%, rgba(235, 244, 255, .9) 100%);
  box-shadow: 0 14px 28px rgba(51, 82, 152, .09);
  position: relative;
  overflow: hidden;
}

.dashboard-range-hero::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 260px;
  height: 100px;
  opacity: .28;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 13px, rgba(60, 139, 255, .52) 14px 15px, transparent 16px 22px);
  transform: rotate(-8deg);
}

.dashboard-range-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-range-hero strong {
  display: block;
  color: #071034;
  font-size: 18px;
  font-weight: 900;
}

.dashboard-range-hero p {
  margin: 7px 0 0;
  color: #68749c;
  line-height: 1.45;
}

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

.dashboard-range-fields label {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .08);
  color: #263052;
  font-weight: 600;
}

.dashboard-range-fields label span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-range-fields label b {
  color: #1265ff;
}

.dashboard-range-fields input {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #f9fbff;
  color: #071034;
  padding: 0 13px;
  font-weight: 400;
}

.dashboard-range-fields input:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.dashboard-range-preview {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eef5ff;
  color: #51608b;
}

.dashboard-range-preview span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-range-preview strong {
  color: #0b65ff;
}

.dashboard-range-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 2px;
}

.dashboard-range-footer .ghost,
.dashboard-range-footer .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 500;
}

.dashboard-range-footer .ghost {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
}

.dashboard-range-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .28);
}

body.clients-mode {
  background: #f6f9ff;
}

body.clients-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.clients-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.clients-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.clients-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.clients-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.clients-mode #resetDemoBtn::before {
  content: "↻";
  color: #1265ff;
  font-size: 22px;
  line-height: 1;
}

body.clients-mode .content {
  padding: 28px 32px 52px;
}

.clients-page {
  display: grid;
  gap: 22px;
}

.clients-hero {
  min-height: 118px;
  border: 1px solid rgba(90, 139, 255, .32);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 58%, rgba(237, 246, 255, .86) 100%);
  box-shadow: 0 16px 34px rgba(51, 82, 152, .10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.clients-hero::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 430px;
  height: 110px;
  opacity: .34;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 15px, rgba(60, 139, 255, .42) 16px 17px, transparent 18px 26px);
  transform: rotate(-7deg);
}

.clients-hero-copy,
.clients-hero-actions {
  position: relative;
  z-index: 1;
}

.clients-hero-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

.clients-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #e5f2ff;
  color: #1577ff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 24px rgba(38, 101, 230, .14);
}

.clients-hero-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clients-hero h2 {
  margin: 0;
  color: #071034;
  font-size: 28px;
  font-weight: 900;
}

.clients-hero p {
  margin: 7px 0 0;
  color: #68749c;
  font-size: 15px;
  font-weight: 600;
}

.clients-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.clients-hero-actions .secondary,
.clients-hero-actions .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.clients-hero-actions .secondary {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  box-shadow: 0 10px 22px rgba(45, 76, 145, .08);
}

.clients-hero-actions .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 101, 255, .28);
}

.clients-filter-panel {
  grid-template-columns: minmax(260px, 1fr) 170px 170px auto 160px;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 0;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 32px rgba(46, 65, 115, .09);
}

.clients-filter-panel label {
  color: #263052;
  font-weight: 800;
}

.clients-filter-panel input {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #f9fbff;
  color: #071034;
  font-weight: 700;
}

.clients-filter-panel input:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.clients-filter-panel .ghost {
  min-height: 44px;
  border-radius: 12px;
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  font-weight: 900;
}

.clients-filter-count {
  min-height: 52px;
  border-radius: 14px;
  background: #eef5ff;
  color: #071034;
  box-shadow: inset 0 0 0 1px rgba(206, 218, 242, .58);
}

.clients-filter-count strong {
  color: #1265ff;
  font-size: 22px;
}

.clients-table-card {
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
  overflow: hidden;
}

.clients-table-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(218, 226, 244, .94);
  background: linear-gradient(100deg, rgba(255, 255, 255, .96), rgba(241, 247, 255, .9));
}

.clients-table-head strong {
  display: block;
  color: #071034;
  font-size: 18px;
  font-weight: 900;
}

.clients-table-head span {
  display: block;
  margin-top: 4px;
  color: #68749c;
  font-size: 13px;
  font-weight: 700;
}

.clients-table-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #e5f2ff;
  color: #1265ff;
  font-size: 13px;
  font-weight: 900;
}

.clients-table-wrap {
  overflow-x: hidden;
}

.clients-page .client-table {
  border-collapse: separate;
  border-spacing: 0;
}

.clients-page .client-table th {
  background: #f8fbff;
  color: #53618d;
  border-bottom: 1px solid rgba(218, 226, 244, .94);
}

.clients-page .client-table td {
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(218, 226, 244, .70);
}

.clients-page .client-table tbody tr:hover td {
  background: #f7fbff;
}

.clients-page .source-pill {
  background: #eef5ff;
  color: #1265ff;
}

body.orders-mode {
  background: #f6f9ff;
}

body.orders-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.orders-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.orders-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.orders-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.orders-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.orders-mode #resetDemoBtn::before {
  content: "\21bb";
  color: #1265ff;
  font-size: 22px;
  line-height: 1;
}

body.orders-mode .content {
  padding: 28px 32px 52px;
}

body.gallery-mode {
  background: #f6f9ff;
}

body.gallery-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.gallery-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.gallery-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.gallery-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.gallery-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.gallery-mode #resetDemoBtn::before {
  content: "\21bb";
  color: #1265ff;
  font-size: 22px;
  line-height: 1;
}

body.gallery-mode .content {
  padding: 28px 32px 52px;
}

body.gallery-mode .page-head {
  min-height: 118px;
  margin-bottom: 18px;
  border: 1px solid rgba(90, 139, 255, .32);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 58%, rgba(237, 246, 255, .86) 100%);
  box-shadow: 0 16px 34px rgba(51, 82, 152, .10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

body.gallery-mode .page-head::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 430px;
  height: 110px;
  opacity: .34;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 15px, rgba(60, 139, 255, .42) 16px 17px, transparent 18px 26px);
  transform: rotate(-7deg);
}

body.gallery-mode .page-head > * {
  position: relative;
  z-index: 1;
}

body.gallery-mode .page-head h2 {
  margin: 0;
  color: #071034;
  font-size: 28px;
  font-weight: 900;
}

body.gallery-mode .page-head p {
  margin: 7px 0 0;
  color: #68749c;
  font-size: 15px;
  font-weight: 500;
}

body.gallery-mode .page-head .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

body.gallery-mode .page-head .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

body.gallery-mode .gallery-table-wrap {
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
  overflow: auto;
}

.orders-page {
  display: grid;
  gap: 22px;
}

.orders-hero-icon {
  background: #ede2ff;
  color: #8732ff;
}

.orders-hero .clients-hero-actions {
  gap: 10px;
}

.orders-hero .clients-hero-actions .primary,
.orders-hero .clients-hero-actions .secondary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.orders-hero .clients-hero-actions .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.orders-hero .clients-hero-actions .secondary {
  background: rgba(255, 255, 255, .94);
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.orders-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.orders-summary-grid .stat {
  min-height: 86px;
  padding: 12px 16px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .08);
}

.orders-summary-grid .stat span {
  color: #68749c;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
}

.orders-summary-grid .stat strong {
  margin-top: 5px;
  color: #071034;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orders-summary-grid .stat small {
  margin-top: 5px;
  color: #68749c;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 400;
}

.orders-summary-grid .stat:nth-child(3) strong {
  font-size: 19px;
}

.orders-view-bar {
  display: flex;
  justify-content: flex-start;
  margin: -4px 0 -6px;
}

.orders-segmented {
  min-height: 44px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 22px rgba(45, 76, 145, .08);
}

.orders-segmented button {
  min-width: 104px;
  padding: 0 18px;
  color: #263052;
  font-weight: 900;
}

.orders-segmented button.active {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #fff;
}

.orders-filter-panel {
  grid-template-columns: minmax(150px, .85fr) minmax(160px, .95fr) minmax(150px, .9fr) minmax(150px, .9fr) auto 160px;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin: 0;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 32px rgba(46, 65, 115, .09);
}

.orders-filter-panel label {
  color: #263052;
  font-weight: 500;
}

.orders-filter-panel input,
.orders-filter-panel select {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(206, 218, 242, .96);
  background-color: #f9fbff;
  color: #071034;
  font-size: 14px;
  font-weight: 500;
}

.orders-filter-panel input:focus,
.orders-filter-panel select:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.orders-filter-panel .ghost {
  min-height: 44px;
  border-radius: 12px;
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  font-weight: 500;
  white-space: nowrap;
}

.orders-filter-count {
  min-height: 52px;
}

.orders-table-card {
  overflow: hidden;
}

.orders-table-wrap {
  overflow-x: hidden;
}

.orders-table-inner {
  overflow-x: auto;
}

.orders-page .order-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 0;
}

.orders-page .order-table th {
  background: #f8fbff;
  color: #53618d;
  border-bottom: 1px solid rgba(218, 226, 244, .94);
  font-size: 13px;
  font-weight: 900;
}

.orders-page .order-table td {
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(218, 226, 244, .70);
  color: #263052;
  font-size: 15px;
  font-weight: 400;
  vertical-align: middle;
}

.orders-page .order-table tbody tr:hover td {
  background: #f7fbff;
}

.orders-page .order-table td strong {
  color: #071034;
  font-weight: 500;
}

.orders-page .empty {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .82);
  color: #68749c;
  font-weight: 800;
}

.orders-page .calendar {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.client-link-modal {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
}

.client-link-modal .modal-header {
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.client-link-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.client-link-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
}

.client-link-modal .modal-body {
  padding: 24px 26px 26px;
}

.client-link-modal-body {
  display: grid;
  gap: 18px;
}

.client-link-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(90, 139, 255, .30);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 60%, rgba(235, 244, 255, .9) 100%);
  box-shadow: 0 14px 28px rgba(51, 82, 152, .09);
  position: relative;
  overflow: hidden;
}

.client-link-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 280px;
  height: 110px;
  opacity: .26;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 13px, rgba(60, 139, 255, .52) 14px 15px, transparent 16px 22px);
  transform: rotate(-8deg);
}

.client-link-card > * {
  position: relative;
  z-index: 1;
}

.client-link-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-link-hero strong {
  display: block;
  color: #071034;
  font-size: 18px;
  font-weight: 900;
}

.client-link-hero span {
  display: block;
  margin-top: 5px;
  color: #68749c;
  font-size: 14px;
  font-weight: 700;
}

.client-link-field {
  display: grid;
  gap: 10px;
  color: #263052;
  font-weight: 500;
}

.client-link-field input {
  min-height: 44px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #071034;
  padding: 0 14px;
  font-weight: 400;
}

.client-link-field input:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.client-link-card #copyGeneratedClientLink {
  justify-self: start;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 500;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 101, 255, .28);
}

.client-link-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.client-link-actions .button,
.client-link-actions .ghost {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 500;
  text-decoration: none;
}

.client-link-actions .secondary {
  background: #eaf7ef;
  color: #137a42;
  border-color: rgba(40, 178, 99, .22);
}

.client-link-actions .ghost {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
}

.client-person-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.client-person-modal .modal-header {
  flex: 0 0 auto;
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.client-person-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.client-person-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
  font-weight: 400;
}

.client-person-modal .modal-body {
  padding: 24px 26px 26px;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 121, 186, .55) rgba(235, 241, 253, .9);
}

.client-person-modal .modal-body::-webkit-scrollbar {
  width: 10px;
}

.client-person-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(235, 241, 253, .9);
  border-radius: 999px;
}

.client-person-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(92, 121, 186, .55);
  border: 2px solid rgba(235, 241, 253, .9);
  border-radius: 999px;
}

.client-person-modal .person-form {
  gap: 18px;
}

.client-person-modal .person-type-box {
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(90, 139, 255, .30);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 60%, rgba(235, 244, 255, .9) 100%);
  box-shadow: 0 14px 28px rgba(51, 82, 152, .09);
  position: relative;
  overflow: hidden;
}

.client-person-modal .person-type-box::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -40px;
  width: 280px;
  height: 110px;
  opacity: .22;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 13px, rgba(60, 139, 255, .52) 14px 15px, transparent 16px 22px);
  transform: rotate(-8deg);
}

.client-person-modal .person-type-box button {
  position: relative;
  z-index: 1;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(218, 226, 244, .94);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.client-person-modal .person-type-box button strong {
  color: #071034;
  font-size: 15px;
  font-weight: 500;
}

.client-person-modal .person-type-box button span {
  color: #68749c;
  font-size: 13px;
  font-weight: 400;
}

.client-person-modal .person-type-box button.active {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  border-color: rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.client-person-modal .person-type-box button.active strong {
  color: #ffffff;
}

.client-person-modal .person-type-box button.active span {
  color: rgba(255, 255, 255, .84);
}

.client-person-modal .form-section {
  padding: 18px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .07);
}

.client-person-modal .section-title strong {
  color: #071034;
  font-weight: 600;
}

.client-person-modal .section-title span {
  color: #68749c;
  font-weight: 400;
}

.client-person-modal label {
  color: #263052;
  font-weight: 400;
}

.client-person-modal input,
.client-person-modal textarea {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #071034;
  font-weight: 400;
}

.client-person-modal input:focus,
.client-person-modal textarea:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.client-person-modal .integration-status {
  border-radius: 12px;
  background: #eef5ff;
  color: #51608b;
}

.client-person-modal .modal-footer {
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(218, 226, 244, .72);
  position: sticky;
  bottom: -26px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(247, 250, 255, .72), rgba(247, 250, 255, .98) 30%, rgba(247, 250, 255, .98));
}

.client-person-modal .modal-footer .ghost,
.client-person-modal .modal-footer .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 400;
}

.client-person-modal .modal-footer .ghost {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.client-person-modal .modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border-color: rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.order-entry-modal {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.order-entry-modal .modal-header {
  flex: 0 0 auto;
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.order-entry-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.order-entry-modal .modal-body {
  padding: 24px 26px 26px;
  overflow-y: auto;
}

.order-entry-modal form {
  gap: 18px;
}

.order-entry-modal label {
  color: #263052;
  font-weight: 400;
}

.order-entry-modal input,
.order-entry-modal select,
.order-entry-modal textarea {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #071034;
  font-weight: 400;
}

.order-entry-modal input:focus,
.order-entry-modal select:focus,
.order-entry-modal textarea:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.order-entry-modal .eyebrow {
  padding: 12px 14px;
  border: 1px solid rgba(218, 226, 244, .78);
  border-radius: 12px;
  background: rgba(238, 245, 255, .72);
  color: #51608b;
  font-weight: 400;
}

.order-entry-modal .modal-footer {
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(218, 226, 244, .72);
  position: sticky;
  bottom: -26px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(247, 250, 255, .72), rgba(247, 250, 255, .98) 30%, rgba(247, 250, 255, .98));
}

.order-entry-modal .modal-footer .ghost,
.order-entry-modal .modal-footer .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 400;
}

.order-entry-modal .modal-footer .ghost {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.order-entry-modal .modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border-color: rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.modal.gallery-create-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-create-modal .modal-header {
  flex: 0 0 auto;
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.gallery-create-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.gallery-create-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
  font-weight: 400;
}

.gallery-create-modal .modal-body {
  padding: 24px 26px 26px;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 121, 186, .55) rgba(235, 241, 253, .9);
}

.gallery-create-modal .modal-body::-webkit-scrollbar {
  width: 10px;
}

.gallery-create-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(235, 241, 253, .9);
  border-radius: 999px;
}

.gallery-create-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(92, 121, 186, .55);
  border: 2px solid rgba(235, 241, 253, .9);
  border-radius: 999px;
}

.gallery-create-modal .gallery-create-form {
  gap: 18px;
}

.gallery-create-modal .gallery-create-form > .grid {
  padding: 18px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 60%, rgba(235, 244, 255, .9) 100%);
  box-shadow: 0 14px 28px rgba(51, 82, 152, .09);
}

.gallery-create-modal label {
  color: #263052;
  font-weight: 400;
}

.gallery-create-modal input,
.gallery-create-modal select,
.gallery-create-modal textarea {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #071034;
  font-weight: 400;
}

.gallery-create-modal input:focus,
.gallery-create-modal select:focus,
.gallery-create-modal textarea:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.gallery-create-modal .gallery-upload-panel {
  padding: 18px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .07);
}

.gallery-create-modal .gallery-upload-head {
  grid-template-columns: minmax(210px, 1fr) auto minmax(240px, .9fr) auto;
  align-items: end;
}

.gallery-create-modal .gallery-upload-info {
  color: #071034;
  font-weight: 500;
}

.gallery-create-modal .gallery-upload-info small {
  color: #68749c;
  font-weight: 400;
}

.gallery-create-modal .gallery-file-path {
  min-height: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  color: #3f3f46;
  font-weight: 400;
}

.gallery-create-modal .gallery-file-picker,
.gallery-create-modal .gallery-upload-action {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 400;
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.gallery-create-modal .gallery-file-picker {
  background: #B0C4DE;
  color: #1c1c1c;
  border-color: rgba(176, 196, 222, .95);
}

.gallery-create-modal .gallery-upload-action {
  background: #000080;
  color: #ffffff;
  border-color: rgba(0, 0, 128, .26);
}

.gallery-create-modal .gallery-photo-preview {
  border: 1px solid rgba(218, 226, 244, .78);
  border-radius: 16px;
  background: rgba(247, 250, 255, .78);
  padding: 12px;
}

.gallery-create-modal .gallery-photo-card {
  border-color: rgba(218, 226, 244, .94);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.gallery-create-modal .gallery-photo-open img {
  border-radius: 12px 12px 0 0;
}

.gallery-create-modal .modal-footer {
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(218, 226, 244, .72);
  position: sticky;
  bottom: -26px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(247, 250, 255, .72), rgba(247, 250, 255, .98) 30%, rgba(247, 250, 255, .98));
}

.gallery-create-modal .modal-footer .ghost,
.gallery-create-modal .modal-footer .primary,
.gallery-create-modal .modal-footer .danger {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 400;
}

.gallery-create-modal .modal-footer .ghost {
  background: #ffffff;
  color: #263052;
  border-color: rgba(218, 226, 244, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.gallery-create-modal .modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border-color: rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.gallery-create-modal .modal-footer .danger {
  background: #fff1f1;
  color: #8B0000;
  border-color: rgba(139, 0, 0, .18);
  box-shadow: 0 10px 20px rgba(139, 0, 0, .06);
}

@media (max-width: 980px) {
  .gallery-create-modal .gallery-upload-head {
    grid-template-columns: 1fr;
  }

  .gallery-create-modal .modal-footer {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .gallery-create-modal .modal-footer .ghost,
  .gallery-create-modal .modal-footer .primary,
  .gallery-create-modal .modal-footer .danger {
    flex: 1 1 190px;
  }
}

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

.toast {
  width: min(390px, calc(100vw - 36px));
  background: #26332f;
  color: #fff;
  border-radius: 8px;
  padding: 13px 14px;
  box-shadow: var(--shadow);
}

.calendar {
  padding: 16px;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 8px;
}

.weekday,
.day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 42px;
  padding: 8px;
}

.weekday {
  min-height: 34px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  background: #fbfcfa;
}

.day {
  min-height: 112px;
}

.day.muted {
  opacity: .46;
}

.day-number {
  font-weight: 800;
  margin-bottom: 6px;
}

.calendar-item {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  padding: 6px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 99px;
  margin-right: 5px;
}

.dot.wait { background: #D2691E; }
.dot.run { background: var(--accent); }
.dot.pause { background: var(--bad); }
.dot.done { background: var(--good); }

.finance-bars {
  display: grid;
  gap: 12px;
}

body.finance-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.finance-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.finance-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.finance-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.finance-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.finance-mode .content {
  padding: 28px 32px 52px;
}

.finance-page {
  display: grid;
  gap: 22px;
}

.finance-hero-icon {
  background: #e4f8ee;
  color: #13a862;
}

.finance-hero .clients-hero-actions {
  gap: 10px;
}

.finance-hero .segmented {
  min-height: 44px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.finance-hero .segmented button {
  min-height: 42px;
  padding: 0 14px;
  color: #263052;
  font-size: 13px;
  font-weight: 500;
}

.finance-hero .segmented button.active {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #fff;
}

.finance-hero .clients-hero-actions .primary,
.finance-hero .clients-hero-actions .ghost {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.finance-hero .clients-hero-actions .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.finance-hero .clients-hero-actions .ghost {
  background: #fff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
}

.finance-hero .clients-hero-actions .ghost.active {
  color: #fff;
  border-color: rgba(85, 112, 255, .28);
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
}

.finance-summary-grid .stat:nth-child(1) .dashboard-stat-line,
.finance-summary-grid .stat:nth-child(1)::after {
  background: #20c981;
}

.finance-metric-card,
.finance-pending-card {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
  text-align: left;
}

.finance-metric-card > span,
.finance-pending-card > span {
  color: #52618a;
  font-size: 13px;
  font-weight: 600;
}

.finance-metric-card div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(218, 226, 244, .62);
}

.finance-metric-card div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.finance-metric-card small {
  color: #68749c;
  font-size: 13px;
  font-weight: 400;
}

.finance-metric-card strong,
.finance-pending-card strong {
  color: #071034;
  font-size: 18px;
  font-weight: 600;
}

.finance-metric-income {
  border-bottom: 3px solid #20c981;
}

.finance-metric-expense {
  border-bottom: 3px solid #ff7a59;
}

.finance-metric-balance {
  border-bottom: 3px solid #1f86ff;
}

.finance-metric-danger {
  border-bottom: 3px solid #B22222;
}

.finance-pending-card {
  cursor: pointer;
  border-bottom: 3px solid #D2691E;
}

.finance-pending-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(46, 65, 115, .14);
}

.finance-chart-card,
.finance-table-wrap,
.finance-filter-card {
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
}

.finance-chart-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.finance-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.finance-chart-head strong {
  color: #071034;
  font-size: 16px;
  font-weight: 600;
}

.finance-chart-head span {
  color: #68749c;
  font-size: 13px;
  font-weight: 400;
}

.finance-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.finance-chart-summary {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(218, 226, 244, .82);
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff, #fff);
}

.finance-chart-summary span {
  color: #52618a;
  font-size: 13px;
  font-weight: 400;
}

.finance-chart-summary strong {
  color: #071034;
  font-weight: 600;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  gap: 10px;
  align-items: center;
}

.finance-page .bar-row {
  grid-template-columns: 120px minmax(180px, 1fr) 120px;
}

.finance-page .bar-row > span,
.finance-page .bar-row > strong {
  color: #263052;
  font-size: 13px;
  font-weight: 500;
}

.bar {
  height: 18px;
  border-radius: 999px;
  background: #e5ebe8;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
}

.bar .income { background: var(--good); }
.bar .expense { background: var(--accent-2); }

.finance-page .bar {
  height: 14px;
  background: #edf3ff;
}

.finance-page .bar .income {
  background: linear-gradient(135deg, #16c784 0%, #35df9b 100%);
}

.finance-page .bar .income-pending {
  background: linear-gradient(135deg, #7dd3fc 0%, #1f86ff 100%);
}

.finance-page .bar .expense {
  background: linear-gradient(135deg, #ff7a59 0%, #d94c7a 100%);
}

.finance-page .bar .expense-pending {
  background: linear-gradient(135deg, #ffd166 0%, #D2691E 100%);
}

.finance-filter-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.finance-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.finance-search-row input,
.finance-advanced-filters input,
.finance-advanced-filters select {
  min-height: 42px;
  border: 1px solid rgba(197, 212, 242, .96);
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  color: #1f2a44;
  font-size: 14px;
  font-weight: 400;
}

.finance-search-row .ghost,
.finance-filter-actions .ghost,
.finance-filter-actions .primary {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}

.finance-filter-actions .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #fff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .18);
}

.finance-advanced-filters {
  display: none;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(218, 226, 244, .72);
}

.finance-advanced-filters.open {
  display: grid;
}

.finance-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.finance-table-wrap {
  overflow: auto;
}

.finance-table {
  min-width: 0;
  width: 100%;
  font-size: 14px;
}

.finance-table th {
  color: #52618a;
  font-size: 12px;
  font-weight: 600;
  background: rgba(245, 248, 255, .94);
  border-bottom: 1px solid rgba(218, 226, 244, .94);
}

.finance-table td {
  color: #1f2a44;
  font-size: 13px;
  font-weight: 400;
  vertical-align: middle;
}

.finance-table td,
.finance-table th {
  padding: 12px 10px;
  white-space: nowrap;
}

.finance-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.finance-action-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #fff;
  color: #263052;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(46,65,115,.06);
}

.finance-action-button.edit {
  color: #00008B;
}

.finance-action-button.view {
  color: #1C1C1C;
}

.finance-action-button.settle {
  color: #228B22;
  border-color: rgba(34, 139, 34, .2);
}

.finance-action-button.undo {
  color: #D2691E;
  border-color: rgba(210, 105, 30, .22);
}

.finance-action-button.delete {
  color: #B22222;
  border-color: rgba(178, 34, 34, .2);
}

.finance-description-cell {
  display: grid;
  gap: 3px;
}

.finance-description-cell strong {
  color: #1f2a44;
  font-size: 13px;
  font-weight: 500;
}

.finance-description-cell small {
  color: #68749c;
  font-size: 12px;
}

.finance-modal {
  width: min(820px, calc(100vw - 32px));
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
}

.finance-modal .modal-header {
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.finance-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 800;
}

.finance-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
  font-weight: 500;
}

.finance-modal .modal-body {
  max-height: min(78vh, 820px);
  overflow-y: auto;
  padding: 24px 26px 26px;
}

.finance-modal-form {
  gap: 18px;
}

.finance-modal-subtitle {
  margin: -4px 0 0;
  color: #68749c;
  font-size: 14px;
}

.finance-modal-form label {
  color: #263052;
  font-size: 13px;
  font-weight: 500;
}

.finance-modal-form input,
.finance-modal-form select,
.finance-modal-form textarea {
  margin-top: 7px;
  border: 1px solid rgba(197, 212, 242, .96);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  color: #1f2a44;
  font-size: 14px;
  font-weight: 400;
}

.finance-modal-form input:focus,
.finance-modal-form select:focus,
.finance-modal-form textarea:focus {
  outline: 3px solid rgba(37, 101, 255, .14);
  border-color: rgba(37, 101, 255, .55);
}

.finance-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(218, 226, 244, .72);
  background: linear-gradient(180deg, rgba(247, 250, 255, .70), rgba(247, 250, 255, .98));
}

.finance-modal .modal-footer .ghost,
.finance-modal .modal-footer .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.finance-modal .modal-footer .ghost {
  background: #fff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
}

.finance-modal .modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #fff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.finance-modal .modal-footer .primary:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}

.finance-payment-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.finance-choice-row {
  align-items: stretch;
}

.finance-choice-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(218, 226, 244, .68);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

.finance-choice-block > span {
  color: #263052;
  font-size: 13px;
  font-weight: 500;
}

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

.finance-payment-choice label {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 13px;
  background: #fff;
  color: #263052;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(46,65,115,.05);
}

.finance-payment-choice label.active {
  color: #fff;
  border-color: rgba(85, 112, 255, .28);
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
}

.finance-payment-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.finance-modal [hidden],
.finance-modal [data-pay-fields][hidden] {
  display: none !important;
}

.finance-field-with-action {
  display: grid;
  gap: 8px;
}

.finance-inline-action {
  width: fit-content;
  min-height: 36px;
  border-radius: 10px;
  padding: 0 13px;
  border: 1px solid rgba(218, 226, 244, .94);
  background: #fff;
  color: #263052;
  font-size: 13px;
  font-weight: 400;
  box-shadow: 0 8px 16px rgba(46,65,115,.05);
}

.finance-recurring-fields,
.finance-main-fields,
.finance-integral-fields,
.finance-parceled-fields,
.finance-signal-fields,
.finance-settlement-fields {
  padding: 14px;
  border: 1px solid rgba(218, 226, 244, .68);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

.finance-context-note {
  color: #52618a;
  font-size: 13px;
  line-height: 1.45;
}

.finance-subsection-title {
  margin: 2px 0 -2px;
  color: #071034;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.finance-description-wide {
  grid-column: 1 / -1;
}

.finance-description-wide textarea {
  min-height: 96px;
  resize: vertical;
}

.finance-signal-fields {
  display: grid;
  gap: 14px;
}

.finance-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.finance-warning-box,
.finance-settle-summary,
.finance-launch-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(37, 101, 255, .18);
  border-radius: 14px;
  background: linear-gradient(135deg, #eef6ff, #fff);
}

.finance-warning-box strong,
.finance-settle-summary strong,
.finance-launch-summary strong {
  color: #071034;
  font-size: 15px;
  font-weight: 600;
}

.finance-warning-box p,
.finance-settle-summary span {
  margin: 0;
  color: #68749c;
  font-size: 13px;
}

.finance-launch-summary [data-finance-summary] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  color: #52618a;
  font-size: 13px;
}

.finance-installments-preview:empty {
  display: none;
}

.finance-installments-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(37, 101, 255, .18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 22px rgba(45, 76, 145, .06);
}

.finance-installments-card strong {
  color: #071034;
  font-size: 15px;
  font-weight: 600;
}

.finance-installments-card table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(218, 226, 244, .78);
  border-radius: 12px;
}

.finance-installments-card th,
.finance-installments-card td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(218, 226, 244, .72);
  color: #263052;
  font-size: 13px;
  text-align: left;
  font-weight: 400;
}

.finance-installments-card th {
  background: rgba(238, 245, 255, .72);
  color: #52618a;
}

.finance-installments-card tr:last-child td {
  border-bottom: 0;
}

.finance-view-modal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-view-modal div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(218, 226, 244, .72);
  border-radius: 12px;
  background: #fff;
}

.finance-view-modal .wide {
  grid-column: 1 / -1;
}

.finance-view-modal span {
  color: #68749c;
  font-size: 12px;
}

.finance-view-modal strong {
  color: #071034;
  font-size: 14px;
  font-weight: 500;
}

body.settings-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.settings-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.settings-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.settings-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.settings-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.settings-mode .content {
  padding: 28px 32px 52px;
}

.settings-page {
  display: grid;
  gap: 22px;
}

.settings-hero-icon {
  background: #edf0ff;
  color: #5361ff;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 28px rgba(46, 65, 115, .08);
}

.settings-tab {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 12px;
  background: #fff;
  color: #263052;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(46,65,115,.05);
}

.settings-tab.active {
  color: #fff;
  border-color: rgba(85, 112, 255, .28);
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.settings-panel-card {
  padding: 22px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-form label {
  color: #263052;
  font-size: 13px;
  font-weight: 500;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  margin-top: 7px;
  border: 1px solid rgba(197, 212, 242, .96);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  color: #1f2a44;
  font-size: 14px;
  font-weight: 400;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
  outline: 3px solid rgba(37, 101, 255, .14);
  border-color: rgba(37, 101, 255, .55);
}

.settings-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(218, 226, 244, .72);
}

.settings-form-actions .ghost,
.settings-form-actions .primary,
.settings-account-head .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.settings-form-actions .ghost {
  background: #fff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
}

.settings-form-actions .primary,
.settings-account-head .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #fff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.settings-status-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(37, 101, 255, .18);
  border-radius: 14px;
  background: linear-gradient(135deg, #eef6ff, #fff);
}

.settings-status-card strong {
  color: #071034;
  font-size: 15px;
  font-weight: 600;
}

.settings-status-card p {
  margin: 0;
  color: #68749c;
  font-size: 13px;
}

.settings-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-account-head > div {
  display: grid;
  gap: 4px;
}

.settings-account-head strong {
  color: #071034;
  font-size: 17px;
  font-weight: 600;
}

.settings-account-head span {
  color: #68749c;
  font-size: 13px;
}

.settings-table-wrap {
  overflow: auto;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}

.settings-table {
  min-width: 720px;
  width: 100%;
  font-size: 14px;
}

.settings-table th {
  color: #52618a;
  font-size: 12px;
  font-weight: 600;
  background: rgba(245, 248, 255, .94);
  border-bottom: 1px solid rgba(218, 226, 244, .94);
}

.settings-table td {
  color: #1f2a44;
  font-size: 13px;
  font-weight: 400;
  vertical-align: middle;
}

.settings-table td,
.settings-table th {
  padding: 12px 10px;
  white-space: nowrap;
}

.settings-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.settings-action-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #fff;
  color: #263052;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(46,65,115,.06);
}

.settings-action-button.edit {
  color: #00008B;
}

.settings-action-button.toggle {
  color: #228B22;
  border-color: rgba(34, 139, 34, .2);
}

.settings-action-button.delete {
  color: #B22222;
  border-color: rgba(178, 34, 34, .2);
}

.settings-page .watermark-preview {
  min-height: 250px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(46,65,115,.08);
}

.watermark-preview {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(36,107,97,.82), rgba(167,71,53,.62)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='520' viewBox='0 0 800 520'%3E%3Crect width='800' height='520' fill='%236f8379'/%3E%3Ccircle cx='185' cy='165' r='92' fill='%23e9d7b5'/%3E%3Cpath d='M0 420 C170 290 250 360 390 265 C520 176 610 250 800 128 L800 520 L0 520 Z' fill='%2326332f'/%3E%3Cpath d='M0 468 C210 340 320 420 470 322 C590 245 665 310 800 235 L800 520 L0 520 Z' fill='%23a74735' opacity='.75'/%3E%3C/svg%3E") center/cover;
}

.wm-text {
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.64);
  background: rgba(0,0,0,.18);
  border-radius: 8px;
  font-weight: 800;
}

.watermark-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.watermark-preview-head > label {
  margin: 0;
  color: #071034;
  font-weight: 900;
}

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

.watermark-preview-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #ffffff;
  color: #263052;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(45, 76, 145, .08);
}

.watermark-preview-actions button.active {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border-color: rgba(85, 112, 255, .28);
}

.watermark-logo-field {
  display: grid;
  gap: 8px;
}

.watermark-logo-field input[type="file"] {
  padding: 9px 11px;
  cursor: pointer;
}

.watermark-logo-field span {
  color: #68749c;
  font-size: 12px;
  font-weight: 700;
}

.watermark-logo-upload {
  width: max-content;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 8px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(55, 94, 255, .18);
}

.watermark-logo-upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(55, 94, 255, .22);
}

.watermark-preview {
  min-height: 250px;
  padding: 16px;
  display: grid;
  place-items: center;
}

.watermark-preview-frame {
  width: min(100%, 520px);
  aspect-ratio: 1024 / 683;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)),
    url("watermark-preview-horizontal.png") center / cover no-repeat;
  box-shadow: 0 18px 36px rgba(20, 28, 48, .24);
}

.watermark-preview-frame.vertical {
  width: min(76%, 360px);
  aspect-ratio: 683 / 1024;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)),
    url("watermark-preview-vertical.png") center / cover no-repeat;
}

.watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  color: var(--wm-color, #ffffff);
  font-family: var(--wm-font-family, Inter, Arial, sans-serif);
  opacity: var(--wm-opacity, .38);
  pointer-events: none;
}

.gallery-watermark {
  position: absolute;
  inset: 0;
  display: block;
  place-items: initial;
  transform: none;
  font-size: initial;
  font-weight: initial;
  text-shadow: none;
  color: var(--wm-color, #ffffff);
}

.wm-ribbon {
  position: absolute;
  left: -4%;
  right: -4%;
  min-height: 28px;
  padding: 5px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 9, 22, .38);
  color: var(--wm-color, #ffffff);
  letter-spacing: 0;
  font-size: clamp(8px, 1.25vw, 16px);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .38);
  white-space: nowrap;
  overflow: hidden;
}

.wm-ribbon span {
  display: inline-block;
  max-width: none;
  padding: 0 24px;
  text-align: center;
}

.wm-ribbon-top {
  top: 0;
}

.wm-ribbon-bottom {
  bottom: 0;
}

.wm-brand-pattern {
  position: absolute;
  inset: 10% 5%;
}

.wm-brand-mark {
  position: absolute;
  width: max-content;
  min-width: clamp(96px, 17vw, 170px);
  max-width: min(34%, 230px);
  min-height: 42px;
  padding: clamp(7px, 1vw, 12px) clamp(10px, 1.2vw, 16px);
  border: 2px solid currentColor;
  border-radius: 9px;
  background: rgba(8, 12, 24, .20);
  color: var(--wm-color, #ffffff);
  display: grid;
  place-items: center;
  font-size: clamp(13px, calc(var(--wm-font-size, 28px) * var(--wm-scale, 1)), 34px);
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.wm-brand-mark span {
  display: block;
  max-width: 100%;
}

.wm-brand-mark img {
  display: block;
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .35));
}

.wm-brand-mark:nth-child(1) {
  left: 9%;
  top: 15%;
}

.wm-brand-mark:nth-child(2) {
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
}

.wm-brand-mark:nth-child(3) {
  right: 8%;
  top: 16%;
}

.wm-brand-mark:nth-child(4) {
  left: 40%;
  top: 55%;
  transform: translateX(-50%);
}

.wm-brand-mark:nth-child(5) {
  right: 10%;
  top: 58%;
}

.watermark-preview-frame.vertical .wm-brand-pattern {
  inset: 8% 7%;
}

.watermark-preview-frame.vertical .wm-brand-mark {
  min-width: clamp(88px, 31%, 150px);
  max-width: 44%;
}

.watermark-preview-frame.vertical .wm-brand-mark:nth-child(1) {
  left: 6%;
  top: 13%;
}

.watermark-preview-frame.vertical .wm-brand-mark:nth-child(2) {
  left: auto;
  right: 6%;
  top: 24%;
  transform: none;
}

.watermark-preview-frame.vertical .wm-brand-mark:nth-child(3) {
  left: 50%;
  right: auto;
  top: 43%;
  transform: translateX(-50%);
}

.watermark-preview-frame.vertical .wm-brand-mark:nth-child(4) {
  left: 6%;
  top: 62%;
  transform: none;
}

.watermark-preview-frame.vertical .wm-brand-mark:nth-child(5) {
  right: 6%;
  top: 72%;
}

.public-select-photo-frame .watermark-layer,
.public-lightbox-frame .watermark-layer,
.public-gallery-photo .watermark-layer {
  opacity: var(--wm-opacity, .38);
}

.public-select-photo-frame .wm-ribbon,
.public-lightbox-frame .wm-ribbon,
.public-gallery-photo .wm-ribbon {
  min-height: 18px;
  padding: 3px 0;
  font-size: clamp(7px, 1.05vw, 14px);
}

.public-select-photo-frame .wm-brand-mark,
.public-lightbox-frame .wm-brand-mark,
.public-gallery-photo .wm-brand-mark {
  width: max-content;
  min-width: clamp(54px, 18%, 122px);
  max-width: 32%;
  min-height: 30px;
  padding: 5px 8px;
  border-width: 1.5px;
  border-radius: 7px;
  font-size: clamp(9px, calc(var(--wm-font-size, 28px) * .42), 22px);
}

.public-select-photo-frame .wm-brand-mark img,
.public-lightbox-frame .wm-brand-mark img,
.public-gallery-photo .wm-brand-mark img {
  max-height: 48px;
}

body.catalog-mode .content {
  padding: 28px 32px 52px;
}

body.catalog-mode {
  background: #f6f9ff;
}

body.catalog-mode .main {
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

body.catalog-mode .topbar {
  min-height: 136px;
  padding: 40px 34px 26px;
  align-items: center;
  border-bottom: 1px solid rgba(205, 215, 236, .72);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .96) 0 44%, rgba(244, 248, 255, .78) 58%, rgba(240, 245, 255, .95) 100%),
    repeating-radial-gradient(circle at 66% 28%, rgba(61, 109, 255, .13) 0 1px, transparent 1px 12px),
    linear-gradient(102deg, transparent 0 64%, rgba(34, 171, 255, .22) 72%, rgba(222, 90, 255, .18) 84%, transparent 100%);
  box-shadow: none;
}

body.catalog-mode .topbar h1 {
  color: #070b2c;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
}

body.catalog-mode .topbar .eyebrow {
  color: #1265ff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

body.catalog-mode #resetDemoBtn {
  min-height: 58px;
  padding: 0 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 230, 246, .82);
  box-shadow: 0 14px 28px rgba(38, 67, 135, .12);
  color: #1c2441;
  font-weight: 800;
}

body.catalog-mode #resetDemoBtn::before {
  content: "\21bb";
  color: #1265ff;
  font-size: 22px;
  line-height: 1;
}

.catalog-page {
  display: grid;
  gap: 22px;
}

.catalog-hero-icon {
  background: #eef0ff;
  color: #6e31ff;
}

.catalog-hero .clients-hero-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-hero .clients-hero-actions .primary,
.catalog-hero .clients-hero-actions .secondary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.catalog-hero .clients-hero-actions .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.catalog-hero .clients-hero-actions .secondary {
  background: rgba(255, 255, 255, .94);
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.catalog-link-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 60%, rgba(235, 244, 255, .9) 100%);
  box-shadow: 0 14px 28px rgba(51, 82, 152, .09);
}

.catalog-link-copy {
  display: grid;
  gap: 5px;
}

.catalog-link-copy strong {
  color: #071034;
  font-size: 16px;
  font-weight: 600;
}

.catalog-link-copy span {
  color: #68749c;
}

.catalog-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.catalog-link-row input,
.category-link-field input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #3f3f46;
  font-weight: 400;
}

.catalog-link-row .ghost,
.category-card-actions .ghost,
.category-card-actions .small,
.category-card-actions .danger {
  border-radius: 12px;
  font-weight: 400;
}

.catalog-link-row .ghost[data-action="copy-catalog-link"] {
  min-height: 42px;
  padding: 0 16px;
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
  font-weight: 500;
}

.catalog-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.catalog-summary-grid .stat {
  min-height: 86px;
  padding: 12px 16px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .08);
}

.catalog-summary-grid .stat span {
  color: #68749c;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
}

.catalog-summary-grid .stat strong {
  margin-top: 5px;
  color: #071034;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-summary-grid .stat small {
  margin-top: 5px;
  color: #68749c;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 400;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.catalog-category-card {
  padding: 18px;
  min-height: 260px;
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .07);
}

.category-card-main {
  display: grid;
  gap: 12px;
}

.category-card-main strong {
  color: #071034;
  font-size: 18px;
  font-weight: 600;
}

.category-link-field {
  display: grid;
  gap: 7px;
  color: #263052;
  font-weight: 400;
}

.category-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.public-catalog-shell {
  display: grid;
  gap: 22px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.public-catalog-cover {
  min-height: 220px;
  border: 1px solid rgba(90, 139, 255, .32);
  border-radius: 20px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, .96) 0 48%, rgba(231, 242, 255, .88) 100%),
    radial-gradient(circle at 86% 12%, rgba(110, 49, 255, .20), transparent 34%);
  box-shadow: 0 18px 38px rgba(51, 82, 152, .12);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 32px;
}

.public-catalog-cover .brand-mark {
  width: 70px;
  height: 70px;
}

.public-catalog-cover h2 {
  margin: 0;
  color: #071034;
  font-size: 38px;
  line-height: 1.1;
}

.public-catalog-cover p {
  margin: 8px 0 0;
  color: #68749c;
  font-size: 16px;
}

.public-catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.public-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.public-category-card {
  overflow: hidden;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(46, 65, 115, .08);
}

.public-category-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  background: #f2f6ff;
}

.public-category-cover span {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(135deg, #d8c7ac, #719186 55%, #a74735);
}

.public-category-cover img,
.catalog-card-cover img,
.catalog-photo-item img,
.public-catalog-photo-card img,
.catalog-lightbox-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.public-category-copy {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.public-category-copy strong {
  color: #071034;
  font-size: 18px;
  font-weight: 600;
}

.public-category-copy span {
  color: #68749c;
}

.catalog-link-copy > div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-link-row {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.catalog-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(180px, .9fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 32px rgba(46, 65, 115, .09);
}

.catalog-toolbar label,
.catalog-modal-form label,
.category-link-field {
  color: #263052;
  font-weight: 500;
}

.catalog-toolbar input,
.catalog-toolbar select,
.catalog-modal-form input,
.catalog-modal-form select,
.catalog-modal-form textarea {
  min-height: 44px;
  font-weight: 400;
  border-radius: 10px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #f9fbff;
  color: #071034;
}

.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.catalog-toolbar .ghost,
.catalog-toolbar .secondary {
  min-height: 44px;
  border-radius: 12px;
  background: #ffffff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
  font-weight: 500;
  white-space: nowrap;
}

.catalog-toolbar .secondary {
  box-shadow: 0 10px 20px rgba(45, 76, 145, .07);
}

.catalog-list-card {
  overflow: hidden;
}

.catalog-list-wrap {
  padding: 18px;
  background: rgba(255, 255, 255, .82);
}

.catalog-category-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(218, 226, 244, .94);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 24px rgba(46, 65, 115, .07);
}

.catalog-card-cover {
  position: relative;
  height: 180px;
  background: #eef4ff;
}

.catalog-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #0f5132;
  background: rgba(209, 250, 229, .95);
  font-size: 12px;
}

.catalog-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.catalog-card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.catalog-card-title-row strong {
  display: block;
  color: #071034;
  font-size: 17px;
  font-weight: 500;
}

.catalog-card-title-row span:not(.catalog-status) {
  color: #68749c;
  font-size: 13px;
}

.catalog-card-body p {
  margin: 0;
  color: #505f88;
  line-height: 1.45;
}

.catalog-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #68749c;
  font-size: 12px;
}

.catalog-card-meta span {
  padding: 6px 8px;
  border-radius: 999px;
  background: #f4f7ff;
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.catalog-status-publico,
.catalog-status-publico-e-ativo,
.catalog-status-ativa {
  color: #047857;
  background: #d1fae5;
}

.catalog-status-nao-listado,
.catalog-status-oculto {
  color: #b45309;
  background: #fef3c7;
}

.catalog-status-rascunho {
  color: #475569;
  background: #e2e8f0;
}

.catalog-status-arquivado,
.catalog-status-pausado,
.catalog-status-inativo {
  color: #991b1b;
  background: #fee2e2;
}

.catalog-action-select {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(197, 212, 242, .96);
  background: #fff;
  color: #1f2a44;
  font-weight: 400;
}

.catalog-card-link-actions {
  display: grid;
  gap: 8px;
}

.catalog-link-button {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(37, 101, 255, .22);
  border-radius: 12px;
  background: linear-gradient(135deg, #eef6ff, #fff);
  color: #0f3f8f;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 101, 255, .08);
}

.catalog-card-action-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-action-button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #fff;
  color: #263052;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(46,65,115,.06);
}

.catalog-action-button.edit {
  color: #00008B;
}

.catalog-action-button.activate {
  color: #228B22;
  border-color: rgba(34, 139, 34, .22);
}

.catalog-action-button.archive {
  color: #8B0000;
  border-color: rgba(139, 0, 0, .2);
}

.catalog-action-button.delete {
  color: #B22222;
  border-color: rgba(178, 34, 34, .2);
}

.catalog-action-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #f4f7ff;
  box-shadow: none;
}

.catalog-empty,
.public-catalog-unavailable {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 44px 24px;
  text-align: center;
  border: 1px solid rgba(218, 226, 244, .96);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 24px rgba(46,65,115,.07);
}

.catalog-empty-art {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #2563eb;
  background: #eaf2ff;
}

.catalog-modal-form {
  max-height: min(72vh, 760px);
  overflow-y: auto;
  padding-right: 6px;
}

.catalog-modal-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,248,255,.94));
}

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

.catalog-check-grid label,
.catalog-consent {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 12px;
  background: #fff;
}

.catalog-upload-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-upload-create {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(180px, .75fr);
  gap: 10px;
  align-items: center;
}

.catalog-upload-create small {
  color: #52618a;
}

.catalog-upload-path {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(206, 218, 242, .96);
  background: #ffffff;
  color: #3f465f;
  font-size: 14px;
  font-weight: 400;
}

.catalog-upload-path:focus {
  outline: 3px solid rgba(18, 101, 255, .16);
  border-color: #1265ff;
}

.catalog-category-modal {
  width: min(860px, calc(100vw - 32px));
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 30px 70px rgba(38, 62, 125, .22);
  overflow: hidden;
}

.catalog-category-modal .modal-header {
  min-height: 82px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(218, 226, 244, .86);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94) 0 52%, rgba(236, 245, 255, .88) 100%),
    repeating-radial-gradient(circle at 76% 8%, rgba(61, 109, 255, .14) 0 1px, transparent 1px 12px);
}

.catalog-category-modal .modal-header h3 {
  color: #071034;
  font-size: 24px;
  font-weight: 900;
}

.catalog-category-modal .modal-header .ghost {
  min-height: 38px;
  border-radius: 10px;
  color: #263052;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(218, 226, 244, .94);
  font-weight: 500;
}

.catalog-category-modal .modal-body {
  max-height: min(78vh, 820px);
  overflow-y: auto;
  padding: 24px 26px 26px;
}

.catalog-category-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(218, 226, 244, .72);
  background: linear-gradient(180deg, rgba(247, 250, 255, .70), rgba(247, 250, 255, .98));
}

.catalog-category-modal .modal-footer .ghost,
.catalog-category-modal .modal-footer .primary {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.catalog-category-modal .modal-footer .ghost {
  background: #ffffff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
}

.catalog-category-modal .modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.catalog-existing-photos-block {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.catalog-existing-photos-block > strong {
  color: #071034;
  font-size: 15px;
  font-weight: 600;
}

.catalog-existing-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.catalog-existing-photo {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(218, 226, 244, .92);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 18px rgba(46,65,115,.07);
}

.catalog-existing-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #eef3ff;
}

.catalog-existing-photo span {
  overflow: hidden;
  color: #263052;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-photo-delete {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(178, 34, 34, .25);
  border-radius: 9px;
  background: rgba(255, 241, 242, .94);
  color: #B22222;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(29, 42, 79, .14);
}

.catalog-existing-empty {
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, .55);
  border-radius: 14px;
  color: #68749c;
  background: rgba(255,255,255,.72);
}

.catalog-link-modal .copy-link-field {
  min-height: 96px;
  border-radius: 12px;
  color: #263052;
  font-weight: 400;
}

.catalog-link-modal-actions {
  justify-content: flex-end;
}

.catalog-link-modal-actions .ghost,
.catalog-link-modal-actions .secondary,
.catalog-link-modal-actions .primary {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}

.catalog-link-modal-actions .ghost {
  color: #263052;
  background: #ffffff;
  border: 1px solid rgba(218, 226, 244, .94);
  box-shadow: 0 8px 16px rgba(46, 65, 115, .06);
}

.catalog-link-modal-actions .secondary {
  color: #00008B;
  background: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
  border: 1px solid rgba(37, 101, 255, .18);
  box-shadow: 0 10px 20px rgba(45, 76, 145, .08);
}

.catalog-link-modal-actions .primary {
  color: #ffffff;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
}

.catalog-general-link-modal .modal-header {
  padding-right: 26px;
}

.catalog-general-link-modal .modal-header .ghost {
  display: none;
}

.catalog-upload-warning {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 105, 30, .34);
  border-radius: 14px;
  color: #8b4513;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: 0 12px 24px rgba(180, 83, 9, .08);
}

.catalog-upload-warning[hidden] {
  display: none;
}

.catalog-upload-warning strong {
  font-weight: 600;
}

.catalog-upload-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.catalog-upload-preview article {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 12px;
  background: #fff;
}

.catalog-upload-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 9px;
}

.catalog-upload-preview span {
  overflow: hidden;
  color: #52618a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-photo-manager {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
}

.catalog-photo-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 14px;
  background: #fff;
}

.catalog-photo-item img {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
}

.public-catalog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.public-category-cover {
  display: block;
  padding: 0;
  height: 190px;
}

.public-category-copy p {
  margin: 0;
  color: #505f88;
}

.public-category-copy .primary {
  width: fit-content;
  text-decoration: none;
}

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

.public-catalog-photo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(46,65,115,.08);
  cursor: zoom-in;
}

.public-catalog-photo-card img {
  aspect-ratio: 4 / 3;
}

.public-catalog-photo-card > span:not(.catalog-watermark) {
  display: block;
  padding: 10px 12px;
  color: #475569;
}

.catalog-watermark {
  position: absolute;
  inset: 42% auto auto 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.7);
  color: rgba(255,255,255,.88);
  background: rgba(15,23,42,.25);
  font-weight: 700;
  pointer-events: none;
}

.public-related-catalogs,
.public-catalog-footer {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(218,226,244,.96);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
}

.public-catalog-footer span {
  color: #68749c;
}

.catalog-lightbox-view {
  width: min(820px, 82vw);
  max-height: 78vh;
}

.catalog-lightbox-view img {
  max-height: 78vh;
  border-radius: 16px;
  object-fit: contain;
  background: #020617;
}

.catalog-qr-box {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.catalog-qr-fallback {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #071034;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 20px, #111 20px 30px, transparent 30px 40px),
    linear-gradient(#fff, #eef4ff);
  font-size: 42px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .catalog-link-row,
  .catalog-summary-grid,
  .public-catalog-stats {
    grid-template-columns: 1fr;
  }

  .public-catalog-cover {
    display: grid;
    padding: 24px;
  }

  .public-catalog-cover h2 {
    font-size: 30px;
  }

  .catalog-toolbar,
  .catalog-photo-manager,
  .catalog-check-grid,
  .catalog-upload-create,
  .catalog-upload-preview {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .catalog-link-row,
  .catalog-toolbar,
  .catalog-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-link-row input,
  .catalog-toolbar label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  body.dashboard-mode .topbar {
    min-height: auto;
    padding: 28px 18px;
  }

  .dashboard-filter-row,
  .dashboard-actions {
    display: grid;
    justify-content: stretch;
  }

  .dashboard-actions .segmented {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 10px;
  }

  .dashboard-actions .segmented button,
  .dashboard-actions .ghost {
    min-width: 0;
    border-radius: 10px;
  }

  .dashboard-metrics-main,
  .dashboard-metrics-secondary {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  body.clients-mode .topbar {
    min-height: auto;
    padding: 28px 18px;
  }

  body.orders-mode .topbar {
    min-height: auto;
    padding: 28px 18px;
  }

  .clients-hero {
    display: grid;
  }

  .clients-hero-actions {
    justify-content: stretch;
  }

  .clients-hero-actions .secondary,
  .clients-hero-actions .primary {
    width: 100%;
  }

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

  .orders-summary-grid,
  .orders-filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .dashboard-metrics-main,
  .dashboard-metrics-secondary {
    grid-template-columns: 1fr;
  }

  .dashboard-period-card {
    display: grid;
    gap: 14px;
  }

  .clients-hero-copy {
    display: grid;
  }

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

  .orders-summary-grid,
  .orders-filter-panel {
    grid-template-columns: 1fr;
  }
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.photo-cell {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: linear-gradient(135deg, #d8c7ac, #719186 55%, #a74735);
}

.hidden {
  display: none !important;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .grid.cols-3,
  .grid.cols-4,
  .grid.cols-2,
  .field-row,
  .person-type-box {
    grid-template-columns: 1fr;
  }

  .topbar,
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-head {
    display: grid;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .client-filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .order-filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-card-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .finance-hero .clients-hero-actions {
    justify-content: flex-start;
  }

  .finance-page .bar-row {
    grid-template-columns: 1fr;
  }

  .finance-chart-grid,
  .finance-search-row {
    grid-template-columns: 1fr;
  }

  .settings-account-head {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .actions,
  .top-actions {
    justify-content: stretch;
  }

  .actions > *,
  .top-actions > * {
    width: 100%;
  }

  .client-filter-panel {
    grid-template-columns: 1fr;
  }

  .order-filter-panel {
    grid-template-columns: 1fr;
  }

  .catalog-card-action-buttons {
    grid-template-columns: 1fr;
  }

  .catalog-existing-photo-grid {
    grid-template-columns: 1fr;
  }

  .finance-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-hero .segmented,
  .finance-hero .clients-hero-actions .primary {
    width: 100%;
  }

  .finance-hero .segmented button {
    flex: 1;
    padding: 0 8px;
  }

  .finance-modal .modal-footer {
    display: grid;
  }

  .finance-modal .modal-footer .ghost,
  .finance-modal .modal-footer .primary {
    width: 100%;
  }

  .finance-payment-choice,
  .finance-launch-summary [data-finance-summary],
  .finance-view-modal {
    grid-template-columns: 1fr;
  }

  .finance-filter-actions {
    display: grid;
  }

  .finance-filter-actions .ghost,
  .finance-filter-actions .primary,
  .finance-search-row .ghost {
    width: 100%;
  }

  .settings-tab,
  .settings-account-head .primary,
  .settings-form-actions .ghost,
  .settings-form-actions .primary {
    width: 100%;
  }

  .settings-form-actions {
    display: grid;
  }

  .settings-row-actions {
    flex-wrap: wrap;
  }
}

/* LOGIN MODE */
.shell.login-mode {
  grid-template-columns: 1fr;
  background: #f6f9ff;
}
.shell.login-mode .sidebar {
  display: none;
}
.shell.login-mode .topbar {
  display: none;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 34px 22px;
  background: linear-gradient(180deg, #f7faff 0%, #f4f7ff 46%, #f9fbff 100%);
}

.login-card {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .96) 0 58%, rgba(237, 246, 255, .86) 100%);
  border: 1px solid rgba(90, 139, 255, .32);
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(46, 65, 115, .10);
  width: 100%;
  max-width: 460px;
  padding: 34px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::after {
  content: "";
  position: absolute;
  right: -110px;
  top: 22px;
  width: 310px;
  height: 150px;
  opacity: .28;
  background: repeating-radial-gradient(ellipse at 72% 42%, transparent 0 15px, rgba(60, 139, 255, .42) 16px 17px, transparent 18px 26px);
  transform: rotate(-7deg);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: grid;
  justify-items: center;
  margin: 0 auto 20px;
}

.login-logo {
  display: block;
  width: min(230px, 78vw);
  max-height: 178px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(38, 101, 230, .14));
}

.login-card h2 {
  margin: 0 0 8px;
  color: #071034;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.16;
  letter-spacing: 0;
}

.login-card p {
  color: #68749c;
  margin: 0 0 26px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-form label span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #263052;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(206, 218, 242, .96);
  border-radius: 10px;
  font-size: 15px;
  color: #071034;
  font-weight: 700;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  background: #f9fbff;
}

.login-form input:focus {
  border-color: #1265ff;
  box-shadow: 0 0 0 3px rgba(18, 101, 255, .16);
  outline: none;
}

.login-form input::placeholder {
  font-weight: 400;
}

.login-form button {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  box-shadow: 0 12px 22px rgba(37, 101, 255, .28);
}

.login-form button:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.login-error {
  color: var(--bad);
  font-size: 14px;
  margin-top: 16px;
  min-height: 20px;
}

.login-success {
  color: var(--good);
  font-size: 14px;
  margin-top: 16px;
  min-height: 20px;
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(218, 226, 244, .94);
}

.login-links a {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #263052;
  border: 1px solid rgba(218, 226, 244, .94);
  box-shadow: 0 10px 22px rgba(45, 76, 145, .08);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.login-links a:hover {
  color: #1265ff;
  border-color: rgba(90, 139, 255, .38);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .login-card {
    padding: 28px 22px;
  }

  .login-logo {
    width: min(205px, 74vw);
    max-height: 158px;
  }

  .login-card h2 {
    font-size: 22px;
  }
}

.team-page {
  display: grid;
  gap: 22px;
}

.team-hero .clients-hero-actions .primary,
.team-modal-footer .primary {
  background: linear-gradient(135deg, #1f86ff 0%, #6e31ff 100%);
  color: #ffffff;
  border: 1px solid rgba(85, 112, 255, .28);
  box-shadow: 0 12px 22px rgba(37, 101, 255, .22);
  font-weight: 700;
}

.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.team-summary-card {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(90, 139, 255, .22);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 26px rgba(51, 82, 152, .08);
}

.team-summary-card span {
  color: #68749c;
  font-size: 13px;
  font-weight: 700;
}

.team-summary-card strong {
  display: block;
  margin-top: 10px;
  color: #071034;
  font-size: 28px;
  font-weight: 900;
}

.team-table-card {
  overflow: hidden;
  border: 1px solid rgba(210, 220, 244, .94);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(51, 82, 152, .10);
}

.team-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(218, 226, 244, .94);
  background: linear-gradient(100deg, rgba(255, 255, 255, .96) 0 58%, rgba(237, 246, 255, .84) 100%);
}

.team-table-head h3 {
  margin: 0;
  color: #071034;
  font-size: 18px;
  font-weight: 900;
}

.team-table-head p {
  margin: 6px 0 0;
  color: #68749c;
  font-size: 13px;
  font-weight: 600;
}

.team-table-badge {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1265ff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.team-table-wrap {
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.team-table {
  min-width: 850px;
}

.team-table th {
  background: #f6f9ff;
  color: #405181;
  border-color: rgba(218, 226, 244, .94);
}

.team-table td {
  vertical-align: top;
  border-color: rgba(218, 226, 244, .76);
}

.team-member-name {
  display: grid;
  gap: 5px;
}

.team-member-name strong {
  color: #071034;
  font-size: 14px;
  font-weight: 900;
}

.team-member-name small {
  color: #68749c;
  font-size: 12px;
  font-weight: 600;
}

.team-permissions-list {
  color: #263052;
  line-height: 1.45;
}

.team-actions {
  display: flex;
  gap: 10px;
}

.team-action-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #ffffff;
  color: #1265ff;
  box-shadow: 0 8px 16px rgba(46, 65, 115, .06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.team-action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-action-danger {
  color: #b4233a;
  border-color: rgba(255, 205, 214, .96);
  background: #fff5f6;
}

.team-action-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.team-empty-row {
  padding: 28px;
  text-align: center;
  color: #68749c;
  font-weight: 700;
}

.modal:has(.team-modal-form) {
  width: min(780px, calc(100vw - 32px));
  border: 1px solid rgba(211, 221, 245, .92);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
  box-shadow: 0 26px 60px rgba(35, 54, 104, .18);
  overflow: hidden;
}

.team-modal-form {
  display: grid;
  gap: 16px;
}

.team-modal-form label {
  color: #263052;
  font-weight: 700;
}

.team-modal-form input,
.team-modal-form select {
  min-height: 44px;
  border: 1px solid rgba(206, 218, 242, .96);
  border-radius: 10px;
  background: #f9fbff;
  color: #071034;
  font-weight: 400;
}

.team-permissions-block {
  padding: 16px;
  border: 1px solid rgba(218, 226, 244, .96);
  border-radius: 14px;
  background: #ffffff;
}

.team-permissions-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.team-permissions-head strong {
  color: #071034;
  font-size: 15px;
  font-weight: 900;
}

.team-permissions-head span {
  color: #68749c;
  font-size: 13px;
  font-weight: 600;
}

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

.team-permission-option {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  padding: 10px 12px;
  border: 1px solid rgba(218, 226, 244, .94);
  border-radius: 10px;
  background: #f9fbff;
  color: #263052;
  font-weight: 600 !important;
}

.team-permission-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
}

.team-modal-footer {
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(218, 226, 244, .94);
}

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

  .team-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .team-permissions-grid {
    grid-template-columns: 1fr;
  }
}


.sidebar-footer-actions { padding: 16px; border-top: 1px solid var(--line); }
.sidebar-footer-actions .ghost { width: 100%; justify-content: flex-start; text-align: left; padding: 10px 16px; font-weight: 500; border-radius: 8px; }
.sidebar-footer-actions .ghost:hover { background-color: var(--card-bg); }

.shell:not(.login-mode) .topbar {
  display: none !important;
}
