:root {
  color-scheme: light;
  --page: #f7f7f4;
  --surface: #ffffff;
  --surface-soft: #faf9f5;
  --surface-gold: #fff8e8;
  --ink: #25241f;
  --ink-soft: #655f54;
  --ink-faint: #8b8375;
  --gold: #a97920;
  --gold-dark: #6f4c0d;
  --gold-soft: #ecd39a;
  --line: #e8e4dc;
  --line-strong: #d8d1c4;
  --success: #14704d;
  --success-soft: #e9f6ef;
  --warning: #8a5a06;
  --warning-soft: #fff5d9;
  --danger: #a73c36;
  --danger-soft: #fff0ee;
  --focus: #315fbd;
  --sidebar-width: 236px;
  --header-height: 68px;
  --shadow-sm: 0 1px 2px rgba(51, 42, 23, .04), 0 5px 18px rgba(51, 42, 23, .05);
  --shadow-md: 0 18px 50px rgba(70, 53, 20, .09);
}

html {
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 280px;
  background: var(--page) !important;
  color: var(--ink) !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 8% -12%, rgba(231, 194, 111, .16), transparent 32%),
    radial-gradient(circle at 95% 5%, rgba(205, 181, 125, .09), transparent 22%);
  content: "";
  pointer-events: none;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a,
button,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid rgba(49, 95, 189, .28) !important;
  outline-offset: 2px;
}

a {
  color: var(--gold-dark) !important;
  text-underline-offset: 3px;
}

a:hover {
  color: #4d3307 !important;
}

[hidden] {
  display: none !important;
}

/* Login */

body.login-page {
  display: grid;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
  background:
    radial-gradient(circle at 15% 0%, #fff6d9 0, transparent 32%),
    linear-gradient(145deg, #f8f7f3, #eee9df) !important;
}

.login-page .login-shell {
  display: grid;
  width: min(940px, 100%);
  min-height: 560px;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(65, 49, 19, .16);
}

.login-page .login-welcome {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 46px;
  background:
    linear-gradient(155deg, rgba(45, 38, 24, .97), rgba(76, 57, 20, .91)),
    #3e321e;
  color: #fff;
}

.login-page .login-welcome::before,
.login-page .login-welcome::after {
  position: absolute;
  border: 1px solid rgba(238, 209, 142, .3);
  border-radius: 50%;
  content: "";
}

.login-page .login-welcome::before {
  top: -95px;
  right: -100px;
  width: 300px;
  height: 300px;
  box-shadow: 0 0 0 36px rgba(236, 201, 119, .05), 0 0 0 75px rgba(236, 201, 119, .035);
}

.login-page .login-welcome::after {
  top: 80px;
  left: 48px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #f3d686, #a9771f);
  box-shadow: inset 0 1px rgba(255, 255, 255, .7), 0 12px 35px rgba(0, 0, 0, .2);
}

.login-page .login-welcome p,
.login-page .login-welcome h2 {
  position: relative;
  z-index: 1;
}

.login-page .login-welcome h2 {
  max-width: 380px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(30px, 4vw, 45px);
  letter-spacing: -.045em;
  line-height: 1.06;
}

.login-page .login-welcome p {
  max-width: 390px;
  margin: 15px 0 0;
  color: #d8d0bf;
}

.login-page .card {
  align-self: center;
  width: 100% !important;
  padding: 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.login-page .login-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #f0d58f, #ae7b21);
  box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 8px 22px rgba(134, 93, 20, .2);
  color: #261b05;
  font-size: 20px;
  font-weight: 900;
}

.login-page h1 {
  margin: 0 0 8px;
  color: var(--ink) !important;
  font-size: 30px;
  letter-spacing: -.035em;
}

.login-page .card > p {
  margin: 0 0 30px;
  color: var(--ink-soft) !important;
}

.login-page .error {
  padding: 11px 13px;
  border: 1px solid #efc7c3;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger) !important;
}

.login-page label {
  margin: 0 0 7px;
}

.login-page button {
  width: 100%;
  margin-top: 18px;
}

/* Dashboard shell */

.admin-sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 23px 14px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  box-shadow: 8px 0 35px rgba(61, 48, 22, .035);
  backdrop-filter: blur(18px);
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
  padding: 0 8px;
  color: inherit !important;
  text-decoration: none;
}

.admin-sidebar-brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #d1aa54;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2d98e, #b27d20);
  box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 7px 16px rgba(132, 90, 16, .17);
  color: #251a04;
  font-size: 17px;
  font-weight: 900;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand small {
  display: block;
}

.admin-sidebar-brand strong {
  color: var(--ink);
  font-size: 14px;
}

.admin-sidebar-brand small,
.admin-sidebar-label {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.admin-sidebar-label {
  margin: 0 10px 9px;
}

.admin-sidebar nav {
  display: flex !important;
  width: 100%;
  flex: 1;
  flex-direction: column;
  gap: 5px !important;
  overflow: visible !important;
  padding: 0 !important;
}

.admin-sidebar nav a {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ink-soft) !important;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.admin-sidebar nav a:hover {
  background: var(--surface-soft);
  color: var(--ink) !important;
  transform: translateX(2px);
}

.admin-sidebar nav a.is-active {
  border-color: #e5d3a7;
  background: linear-gradient(90deg, #fff5dd, #fffdfa);
  box-shadow: inset 3px 0 var(--gold), 0 4px 14px rgba(100, 70, 14, .06);
  color: var(--gold-dark) !important;
}

.nav-icon,
.quick-icon {
  display: inline-grid;
  place-items: center;
}

.nav-icon {
  width: 21px;
  height: 21px;
  color: var(--ink-faint);
}

.is-active .nav-icon {
  color: var(--gold-dark);
}

.nav-icon svg,
.quick-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

body.dashboard-shell > header {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  height: var(--header-height);
  align-items: center;
  gap: 18px !important;
  margin-left: var(--sidebar-width);
  padding: 0 32px !important;
  border-bottom: 1px solid rgba(224, 218, 207, .8);
  background: rgba(247, 247, 244, .87) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
}

body.dashboard-shell > header > strong {
  display: none;
}

.admin-context {
  flex: 1;
  min-width: 0;
}

.admin-context span,
.admin-context b {
  display: block;
}

.admin-context span {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-context b {
  overflow: hidden;
  margin-top: 1px;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout {
  margin: 0 !important;
}

.logout input[type="hidden"] {
  display: none;
}

.logout button {
  min-height: 40px;
  padding: 0 14px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(255, 255, 255, .8) !important;
  box-shadow: none !important;
  color: var(--ink-soft) !important;
}

body.dashboard-shell > main {
  width: auto;
  max-width: none !important;
  margin: 0 0 0 var(--sidebar-width) !important;
  padding: 32px clamp(20px, 3.5vw, 52px) 72px !important;
}

.workspace-view {
  width: min(100%, 1320px);
  margin: 0 auto !important;
}

.workspace-view.is-active {
  animation: workspace-enter .2s ease-out;
}

@keyframes workspace-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.workspace-heading {
  position: static !important;
  display: flex !important;
  height: auto !important;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 24px !important;
  margin: 0 0 24px !important;
  padding: 0 0 22px !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.workspace-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -.045em;
  line-height: 1.08;
}

.workspace-heading > div > p:last-child {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.dashboard-kicker {
  margin: 0 0 7px;
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-nav {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .76);
}

.section-nav a {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ink-soft) !important;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.section-nav a:hover {
  background: var(--surface-gold);
  color: var(--gold-dark) !important;
}

.workspace-panel {
  scroll-margin-top: calc(var(--header-height) + 22px);
  margin: 0 0 34px !important;
}

.workspace-panel + .workspace-panel {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.workspace-panel > h2 {
  margin: 0 0 7px;
  color: var(--ink) !important;
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -.025em;
}

.workspace-panel > h2 + .muted,
.workspace-panel > p.muted {
  max-width: 760px;
  margin: 0 0 19px;
  color: var(--ink-soft) !important;
  line-height: 1.6;
}

/* Overview */

.dashboard-overview {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 210px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #e7d7b3;
  border-radius: 24px;
  background: linear-gradient(125deg, #fff 0%, #fff8e7 64%, #efd69a 145%);
  box-shadow: var(--shadow-md);
}

.dashboard-hero::after {
  position: absolute;
  right: -65px;
  bottom: -105px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(166, 118, 29, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(177, 130, 38, .045), 0 0 0 72px rgba(177, 130, 38, .025);
  content: "";
}

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

.dashboard-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(31px, 5vw, 48px);
  letter-spacing: -.052em;
  line-height: 1;
}

.dashboard-hero p:last-child {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #d1a548, #f0dfb9);
  content: "";
}

.metric-card span,
.metric-card small {
  display: block;
  overflow: hidden;
  color: var(--ink-faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card span {
  font-size: 12px;
  font-weight: 750;
}

.metric-card b {
  display: block;
  overflow: hidden;
  margin: 7px 0 2px;
  color: var(--ink) !important;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  font-size: 11px;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
}

.overview-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
}

.panel-heading h2 {
  margin: 0 0 16px;
  color: var(--ink) !important;
  font-size: 20px;
  letter-spacing: -.02em;
}

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

.quick-actions a {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink) !important;
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.quick-actions a:hover {
  border-color: #dfc88f;
  background: var(--surface-gold);
  transform: translateY(-1px);
}

.quick-actions .quick-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: #f0e2bf;
  color: var(--gold-dark);
}

.quick-actions b,
.quick-actions small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions b {
  font-size: 13px;
}

.quick-actions small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
}

.quick-actions i {
  color: var(--ink-faint);
  font-style: normal;
}

.overview-activity > .stats {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

.overview-activity .stat {
  display: flex;
  min-height: 0 !important;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px !important;
  border-radius: 11px !important;
  background: var(--surface-soft) !important;
  box-shadow: none !important;
}

.overview-activity .stat b {
  order: 2;
  font-size: 20px !important;
}

/* Forms, cards, and data */

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

.stat,
.card,
table {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: var(--shadow-sm) !important;
}

.stat {
  min-width: 0;
  min-height: 104px;
  padding: 17px !important;
  border-radius: 15px !important;
  color: var(--ink-soft);
}

.stat b {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  color: var(--gold-dark) !important;
  font-size: clamp(22px, 2.8vw, 29px) !important;
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card {
  min-width: 0;
  padding: 20px !important;
  border-radius: 16px !important;
}

.card h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.01em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
  gap: 14px !important;
}

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

label {
  margin: 12px 0 6px !important;
  color: var(--ink-soft) !important;
  font-size: 12px;
  font-weight: 650;
}

input,
textarea,
select {
  min-height: 44px;
  padding: 10px 11px !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(35, 29, 17, .025);
  color: var(--ink) !important;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #a09a8e;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #9eb4df !important;
  outline: 3px solid rgba(49, 95, 189, .14) !important;
  box-shadow: 0 0 0 1px rgba(49, 95, 189, .1);
}

textarea {
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.check input {
  width: 18px !important;
  min-height: 18px;
  margin: 0;
}

button,
.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px !important;
  border: 1px solid #c69c48 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #f1d98e, #d2aa57) !important;
  box-shadow: 0 6px 15px rgba(118, 79, 12, .12) !important;
  color: #271b04 !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}

button:hover,
.button-link:hover {
  color: #271b04 !important;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(118, 79, 12, .17) !important;
}

button:active,
.button-link:active {
  transform: translateY(0);
}

button:disabled {
  opacity: .58;
  cursor: wait;
}

.card > form > button,
details form > button {
  margin-top: 14px;
}

.secondary {
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  color: var(--ink-soft) !important;
}

.secondary:hover {
  border-color: #d6bd83 !important;
  background: var(--surface-gold) !important;
  color: var(--gold-dark) !important;
}

.danger {
  border-color: #ebc1bd !important;
  background: var(--danger-soft) !important;
  box-shadow: none !important;
  color: var(--danger) !important;
}

.danger:hover {
  border-color: #d99690 !important;
  background: #ffe4e1 !important;
  color: #7f2924 !important;
}

.muted {
  color: var(--ink-soft) !important;
}

.small {
  font-size: 12px;
}

.flash {
  width: min(100%, 1320px);
  margin: 0 auto 16px !important;
  padding: 12px 15px !important;
  border: 1px solid #bddfcf !important;
  border-radius: 11px !important;
  background: var(--success-soft) !important;
  color: #10583d !important;
  box-shadow: var(--shadow-sm);
}

.flash--error {
  border-color: #edc2be !important;
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.flash--warning {
  border-color: #ead39d !important;
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

details {
  margin-top: 15px !important;
  padding-top: 12px !important;
  border-top-color: var(--line) !important;
}

summary {
  min-height: 40px;
  padding: 8px 2px !important;
  border-radius: 7px;
  color: var(--gold-dark) !important;
  font-weight: 750;
  cursor: pointer;
}

code {
  overflow-wrap: anywhere;
}

.items {
  scrollbar-color: #cfc5b4 transparent;
}

.item {
  min-height: 48px;
  border-bottom-color: var(--line) !important;
}

.item button {
  min-height: 44px;
  padding: 7px 10px !important;
}

.stock-pill,
.product-price,
.pill,
.status-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.stock-pill,
.pill,
.status-delivered,
.status-credited,
.status-completed {
  background: var(--success-soft) !important;
  color: var(--success) !important;
}

.stock-pill.is-low {
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

.stock-pill.is-empty,
.status-failed,
.status-canceled,
.status-rejected {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.product-price {
  margin-left: 5px;
  background: #f3f0e9;
  color: var(--ink-soft);
}

.product-editor {
  margin-top: 16px !important;
}

.product-editor[open] summary {
  margin-bottom: 4px;
}

.catalog-toolbar {
  position: sticky;
  z-index: 4;
  top: calc(var(--header-height) + 10px);
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -6px 0 20px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 247, 244, .91);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(15px);
}

.catalog-search {
  position: relative;
  flex: 1;
  margin: 0 !important;
}

.catalog-search input {
  padding-left: 38px !important;
  background: #fff !important;
}

.catalog-search::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
  content: "";
  transform: translateY(-58%);
  pointer-events: none;
}

.catalog-search::after {
  position: absolute;
  z-index: 1;
  top: 27px;
  left: 27px;
  width: 6px;
  height: 2px;
  background: var(--ink-faint);
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}

.catalog-empty {
  margin: 14px 0 0;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  text-align: center;
}

.primary-action {
  flex: 0 0 auto;
}

.album-head,
.secret-row,
.copy-actions,
.album-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.album-head {
  justify-content: space-between;
}

.album-head h3 {
  margin-bottom: 0;
}

.accounts {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.account {
  padding: 14px;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface-soft) !important;
}

.secret-row {
  align-items: stretch;
}

.secret-row .secret-box {
  min-width: 0;
  flex: 1;
}

.cookie-box {
  height: 44px;
  min-height: 44px;
  resize: none;
}

.copy-actions {
  margin-top: 10px;
}

.copy-actions button {
  min-height: 44px;
  padding: 7px 10px !important;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
  scrollbar-color: #c8bdab transparent;
}

.table-scroll > table {
  display: table !important;
  width: 100%;
  min-width: 760px;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0;
  box-shadow: none !important;
}

.table-scroll thead {
  display: table-header-group !important;
  width: auto !important;
  min-width: 0 !important;
}

.table-scroll tbody {
  display: table-row-group !important;
  width: auto !important;
  min-width: 0 !important;
}

th,
td {
  padding: 12px 11px !important;
  border-bottom: 1px solid var(--line) !important;
  white-space: nowrap;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f8f3e8 !important;
  color: var(--gold-dark) !important;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

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

tr:hover td {
  background: #fffaf0 !important;
}

.status-badge {
  background: #f2f0eb;
  color: var(--ink-soft);
  text-transform: capitalize;
}

.calendar-nav {
  gap: 16px !important;
}

.calendar-nav h3 {
  margin: 0;
}

.calendar-grid {
  gap: 7px !important;
}

.calendar-day {
  min-height: 96px !important;
  border-color: var(--line) !important;
  border-radius: 11px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}

.calendar-day:hover {
  border-color: #d3b875 !important;
  background: var(--surface-gold) !important;
}

.calendar-day b {
  color: var(--gold-dark);
}

.calendar-day .profit {
  color: var(--success) !important;
}

@media (max-width: 1100px) {
  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .overview-activity > .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .overview-activity .stat {
    display: block;
  }
}

@media (max-width: 880px) {
  :root {
    --header-height: 60px;
  }

  body.dashboard-shell {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .admin-sidebar {
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 26px rgba(55, 43, 20, .08);
    backdrop-filter: blur(18px);
  }

  .admin-sidebar-brand,
  .admin-sidebar-label {
    display: none;
  }

  .admin-sidebar nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px !important;
  }

  .admin-sidebar nav a {
    min-width: 0;
    min-height: 56px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    border: 0;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1;
  }

  .admin-sidebar nav a:hover {
    transform: none;
  }

  .admin-sidebar nav a.is-active {
    border: 0;
    background: var(--surface-gold);
    box-shadow: none;
  }

  .nav-icon {
    width: 21px;
    height: 21px;
  }

  body.dashboard-shell > header {
    height: var(--header-height);
    margin-left: 0;
    padding: 0 15px !important;
  }

  body.dashboard-shell > header > strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink) !important;
    font-size: 15px;
  }

  body.dashboard-shell > header > strong::before {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #f0d58c, #b27d20);
    color: #271b04;
    content: "Y";
    font-size: 14px;
  }

  .admin-context {
    display: none;
  }

  body.dashboard-shell > main {
    margin-left: 0 !important;
    padding: 24px 16px 30px !important;
  }

  .workspace-heading {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 16px !important;
  }

  .section-nav {
    justify-content: flex-start;
  }

  .catalog-toolbar {
    top: calc(var(--header-height) + 8px);
  }
}

@media (max-width: 680px) {
  body.login-page {
    padding: 0;
    place-items: stretch;
  }

  .login-page .login-shell {
    min-height: 100svh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .login-page .login-welcome {
    min-height: 220px;
    padding: 28px;
  }

  .login-page .login-welcome h2 {
    font-size: 30px;
  }

  .login-page .card {
    align-self: start;
    padding: 34px 28px !important;
  }

  .dashboard-hero {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }

  .dashboard-hero .button-link {
    width: 100%;
  }

  .overview-metrics,
  .quick-actions,
  .stats,
  .analytics-cards,
  .overview-activity > .stats {
    grid-template-columns: 1fr !important;
  }

  .metric-card {
    padding: 16px;
  }

  .overview-panel {
    padding: 16px;
  }

  .overview-activity .stat {
    display: flex;
  }

  .row {
    grid-template-columns: 1fr !important;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar .button-link {
    width: 100%;
  }

  .section-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .section-nav a {
    flex: 0 0 auto;
  }

  .secret-row button {
    width: 100%;
  }

  .table-scroll > table {
    min-width: 700px !important;
  }

  .calendar-grid {
    gap: 3px !important;
  }

  .calendar-day {
    min-height: 68px !important;
    padding: 5px !important;
    font-size: 10px;
  }

  .calendar-day small {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  body.dashboard-shell > main {
    padding-right: 11px !important;
    padding-left: 11px !important;
  }

  .admin-sidebar nav a {
    font-size: 9px;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
  }

  .card {
    padding: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
