/* SAREN System Theme — Surin silk, translated into a digital UI language. */
:root {
  color-scheme: light;
  --paper: #f7f6fa;
  --surface: #ffffff;
  --ink: #191622;
  --ink-soft: #696474;
  --forest: #211c3d;
  --forest-2: #302951;
  --violet: #4937a8;
  --violet-dark: #382883;
  --violet-soft: #eeeafd;
  --saffron: #e9b949;
  --saffron-soft: #fff4ce;
  --sage: #ebe8f0;
  --line: #ded9e7;
  --danger: #c74652;
  --success: #2f8065;
  --shadow: 0 20px 55px rgba(52, 38, 92, .11);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --theme-coral: #e96558;
  --theme-gold: #e9b949;
  --theme-leaf: #2f8065;
  --theme-focus: rgba(73, 55, 168, .18);

  --bo-canvas: #f5f3f8;
  --bo-card: #ffffff;
  --bo-ink: #191622;
  --bo-muted: #716b7c;
  --bo-line: #dfdbe7;
  --bo-violet: #4937a8;
  --bo-violet-soft: #eeeafd;
  --bo-lime: #e9b949;
  --bo-lime-soft: #fff4ce;
  --bo-coral: #e96558;
  --bo-coral-soft: #ffede9;
  --bo-blue: #5e9fc7;
  --bo-green: #2f8065;
  --bo-red: #c74652;
}

html {
  accent-color: var(--violet);
  scrollbar-color: #b9b1c9 #f0edf4;
  scrollbar-width: thin;
}

body {
  color: var(--ink);
  background-color: var(--paper);
}

body::before {
  content: "";
  position: fixed;
  z-index: 10000;
  inset: 0 0 auto;
  height: 4px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
    var(--violet) 0 28px,
    var(--theme-coral) 28px 40px,
    var(--theme-gold) 40px 57px,
    var(--theme-leaf) 57px 68px);
}

::selection {
  color: #fff;
  background: var(--violet);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #f0edf4; }
::-webkit-scrollbar-thumb { background: #b9b1c9; border: 3px solid #f0edf4; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

:where(.home-body, .bo-body, .account-body) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  min-height: 46px;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid #d8d2e1;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(25, 22, 34, .03);
  font: 500 14px/1.35 var(--body, "Anuphan", system-ui, sans-serif);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

:where(.home-body, .bo-body, .account-body) :is(input:not([type="checkbox"]):not([type="radio"]), textarea)::placeholder {
  color: #9b94a5;
  opacity: 1;
}

:where(.home-body, .bo-body, .account-body) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select):hover {
  border-color: #aaa1ba;
}

:where(.home-body, .bo-body, .account-body) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select):focus {
  background-color: #fff;
  border-color: var(--violet);
  outline: 0;
  box-shadow: 0 0 0 4px var(--theme-focus), 0 5px 16px rgba(52, 38, 92, .08);
}

body select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
  padding: 10px 54px 10px 16px;
  color: var(--ink);
  background-color: #fbfaff;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5 5 5-5'/%3E%3C/svg%3E"),
    linear-gradient(var(--violet), var(--violet));
  background-repeat: no-repeat, no-repeat;
  background-position: right 12px center, right 5px center;
  background-size: 18px, 34px 34px;
  border: 2px solid #c9c1d9;
  border-radius: 12px;
  box-shadow: inset 4px 0 0 var(--theme-gold), 0 3px 10px rgba(52, 38, 92, .06);
  font-weight: 650;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body select:not([multiple]):hover {
  background-color: var(--violet-soft);
  border-color: #978bb7;
  box-shadow: inset 4px 0 0 var(--theme-coral), 0 5px 14px rgba(52, 38, 92, .1);
}

body select:not([multiple]):focus {
  background-color: #fff;
  border-color: var(--violet);
  outline: 0;
  box-shadow: inset 4px 0 0 var(--theme-gold), 0 0 0 4px var(--theme-focus), 0 7px 18px rgba(52, 38, 92, .12);
}

body select:not([multiple]):disabled,
body :is(input, textarea):disabled {
  color: #9a94a2;
  background-color: #efedf2;
  cursor: not-allowed;
}

body :is(input[type="checkbox"], input[type="radio"]) {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
}

body :focus-visible {
  outline: 3px solid rgba(73, 55, 168, .42);
  outline-offset: 3px;
}

.brand .brand-mark,
.bo-brand .brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  gap: 2px;
  padding: 7px;
  border-radius: 11px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  transform: none;
}

.brand .brand-mark i,
.bo-brand .brand-mark i {
  display: block;
  border-radius: 1px;
}

.brand .brand-copy,
.bo-brand .brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-mark i:first-child { background: var(--violet); }
.brand-mark i:nth-child(2) { background: var(--theme-coral); }
.brand-mark i:nth-child(3) { background: var(--theme-gold); }
.brand-mark i:nth-child(4) { background: var(--theme-leaf); }

/* Keep the official SAREN lockup visible after the shared theme overrides. */
.brand .brand-mark,
.bo-brand .brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 168px;
  height: 58px;
  padding: 0;
  border-radius: 0;
  background: url("assets/brand/logo-allsurin-dark.png") center / contain no-repeat;
  box-shadow: none;
}

.brand .brand-mark i,
.bo-brand .brand-mark i,
.brand .brand-copy,
.bo-brand .brand-copy {
  display: none;
}

@media (max-width: 620px) {
  .brand .brand-mark,
  .bo-brand .brand-mark {
    width: 132px;
    height: 46px;
  }
}

.announcement {
  background: var(--violet-dark);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.announcement span { color: var(--ink); background: var(--theme-gold); }

.site-header,
.account-topbar,
.bo-topbar {
  background: rgba(247, 246, 250, .9);
  border-color: rgba(216, 210, 225, .82);
  backdrop-filter: blur(20px) saturate(1.2);
}

.bo-sidebar {
  background: #211c3d;
  border-color: #3b345d;
}

.bo-nav button.active {
  color: #211c3d;
  background: var(--theme-gold);
}

.bo-nav button:not(.active):hover { background: rgba(255,255,255,.09); }

:where(.bo-card, .bo-metric-card, .auth-card, .profile-card, .account-recommend, .customer-order-list > article) {
  border-color: var(--line);
  box-shadow: 0 12px 34px rgba(52, 38, 92, .07);
}

.bo-inline-metrics:has(> article:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-inline-metrics:has(> article:first-child:last-child) {
  grid-template-columns: minmax(0, 1fr);
}

:where(.primary-button, .account-primary, .bo-button.primary) {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 3px 4px 0 #2b205f;
}

:where(.primary-button, .account-primary, .bo-button.primary):hover {
  color: #fff;
  background: var(--violet-dark);
  border-color: var(--violet-dark);
  box-shadow: 1px 2px 0 #2b205f;
  transform: translate(1px, 1px);
}

:where(.bo-button.secondary, .account-secondary) {
  color: var(--ink);
  background: #fff;
  border-color: #d8d2e1;
}

.bo-filter-tabs button.active,
.account-tabs button.active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}

.bo-status,
.account-status {
  border: 1px solid rgba(25,22,34,.07);
  font-weight: 700;
}

.bo-table thead th {
  color: #5f586b;
  background: #f1eef5;
  border-color: #dfd9e7;
}

.bo-table tbody tr:hover { background: #faf8fd; }

.bo-pagination button.active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
}

.auth-shell {
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(73,55,168,.05) 49.8% 50.2%, transparent 50.2%),
    var(--paper);
}

.auth-card {
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(52,38,92,.13);
}

.demo-account { background: #f8f6fb; border-color: var(--line); }
.demo-account-icon { background: var(--theme-gold); }
.demo-account.seller .demo-account-icon { background: #ffd9d3; }
.demo-account.admin .demo-account-icon { background: var(--violet); }

.bo-notification-popover,
.bo-profile-menu,
.bo-workspace-menu {
  border-color: #2b2640;
  box-shadow: 8px 9px 0 rgba(43, 38, 64, .18);
}

.bo-toast,
.account-toast {
  color: #fff;
  background: #211c3d;
  border: 1px solid #544b78;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  body::before { height: 3px; }
  body select:not([multiple]) {
    padding-right: 50px;
    background-position: right 11px center, right 4px center;
  }
}
