/* ==========================================================================
   KBS — components.css
   دکمه‌ها، فرم‌ها، کارت‌ها، جدول‌ها، نوتیفیکیشن، مودال، پنل و اجزای مشترک
   ========================================================================== */

/* ------------------------------------------------------------ buttons */
.btn {
  --btn-bg: var(--ink-800);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.22s var(--ease), background 0.22s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -16px rgba(16, 24, 32, 0.6);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  --btn-bg: var(--grad-navy-soft);
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 1px rgba(214, 181, 104, 0.26), 0 14px 30px -20px rgba(10, 20, 36, 0.75);
}

.btn-primary:hover {
  box-shadow: inset 0 0 0 1px rgba(214, 181, 104, 0.5), 0 18px 36px -20px rgba(10, 20, 36, 0.8);
}

.btn-accent {
  --btn-bg: linear-gradient(145deg, #35639f, #1d3c66);
}

.btn-gold {
  --btn-bg: var(--grad-gold);
  --btn-fg: #16233a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 14px 30px -18px rgba(154, 118, 38, 0.8);
}

.btn-gold:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 36px -18px rgba(154, 118, 38, 0.9);
  filter: brightness(1.04);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-700);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--surface-2);
  box-shadow: none;
}

.btn-soft {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--ink-700);
}

.btn-soft:hover {
  --btn-bg: #e4ecf7;
  box-shadow: inset 0 0 0 1px rgba(24, 43, 73, 0.12);
}

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  border-color: rgba(46, 90, 150, 0.35);
}

.btn-outline:hover {
  --btn-bg: var(--accent-soft);
  box-shadow: none;
}

.btn-danger {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
}

.btn-danger:hover {
  --btn-bg: #fbdcd9;
  box-shadow: none;
}

.btn-light {
  --btn-bg: rgba(255, 255, 255, 0.95);
  --btn-fg: var(--ink-800);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 8px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn.is-loading {
  color: transparent !important;
  position: relative;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.btn-ghost.is-loading::after,
.btn-soft.is-loading::after,
.btn-light.is-loading::after {
  border-color: rgba(16, 24, 32, 0.2);
  border-top-color: var(--ink-700);
}

/* -------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.card-pad {
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}

.card-head h3 {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head h3 svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.card-body {
  padding: 20px;
}

.card-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.glass {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px -34px rgba(16, 24, 32, 0.45);
}

/* ------------------------------------------------------- product card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 165, 74, 0.35);
}

.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #f6f4ef, #edebe4);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-thumb .ph {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #b9b3a5;
  padding: 18px;
  text-align: center;
}

.product-thumb .ph svg {
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.product-thumb .ph span {
  font-size: 11px;
  color: #a9a394;
}

.product-badges {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  align-items: flex-end;
}

.p-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  letter-spacing: 0.2px;
}

.p-badge.off {
  background: rgba(200, 69, 63, 0.94);
  color: #fff;
}

.p-badge.feat {
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #221a08;
}

.p-badge.new {
  background: rgba(46, 90, 150, 0.94);
  color: #fff;
}

.p-badge.out {
  background: rgba(16, 24, 32, 0.85);
  color: #fff;
}

.product-fav {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-600);
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: var(--shadow-xs);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.product-fav svg {
  width: 16px;
  height: 16px;
}

.product-fav:hover {
  transform: scale(1.06);
}

.product-fav.is-on {
  color: #d9534f;
}

.product-body {
  padding: 14px 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-brand {
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.product-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-card:hover .product-name {
  color: var(--accent);
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.price-old {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
  text-decoration: line-through;
}

.price-now {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.price-now small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.stock-line {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.stock-dot.low {
  background: var(--warn);
}

.stock-dot.out {
  background: var(--danger);
}

/* ----------------------------------------------------------- badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.9;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-ok {
  background: var(--ok-soft);
  color: #146b47;
}

.badge-warn {
  background: var(--warn-soft);
  color: #8a5a10;
}

.badge-danger {
  background: var(--danger-soft);
  color: #a5352f;
}

.badge-info {
  background: var(--info-soft);
  color: #255a9e;
}

.badge-gold {
  background: var(--gold-soft);
  color: #7d6224;
}

.badge-muted {
  background: #eef2f9;
  color: var(--muted);
}

.badge-dark {
  background: var(--ink-800);
  color: #fff;
}

.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-600);
}

.chip svg {
  width: 14px;
  height: 14px;
}

.chip.is-active {
  background: var(--ink-800);
  border-color: var(--ink-800);
  color: #fff;
}

/* ------------------------------------------------------------ forms */
.field {
  display: grid;
  gap: 6px;
}

.field > label,
.label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600);
}

.field .hint {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.8;
}

.field .req {
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  min-height: 44px;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
  font-size: 12.5px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(46, 90, 150, 0.55);
  box-shadow: 0 0 0 4px rgba(46, 90, 150, 0.09);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.input.is-error,
.select.is-error,
.textarea.is-error {
  border-color: rgba(200, 69, 63, 0.6);
  background: #fffaf9;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.9;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697586' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
  padding-inline-start: 36px;
  cursor: pointer;
}

.input-icon {
  position: relative;
}

.input-icon > svg {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  pointer-events: none;
}

.input-icon .input {
  padding-inline-start: 40px;
}

.input-icon .btn-eye {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.input-icon .btn-eye:hover {
  background: var(--surface-2);
}

.input-icon .btn-eye svg {
  width: 17px;
  height: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-grid .col-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.error-text {
  font-size: 11.5px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 5px;
}

.error-text svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-600);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

/* toggle */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d9d5cc;
  position: relative;
  transition: background 0.22s var(--ease);
  flex: none;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s var(--ease);
}

.switch input:checked + .track {
  background: var(--accent);
}

.switch input:checked + .track::after {
  transform: translateX(-18px);
}

[dir="ltr"] .switch input:checked + .track::after {
  transform: translateX(18px);
}

/* radio cards */
.radio-cards {
  display: grid;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  background: #fff;
}

.radio-card:hover {
  border-color: rgba(46, 90, 150, 0.4);
}

.radio-card input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.radio-card.is-selected,
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(46, 90, 150, 0.07);
}

.radio-card .rc-title {
  font-size: 13px;
  font-weight: 700;
}

.radio-card .rc-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.9;
}

/* search input */
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box svg {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
}

.search-box .input {
  padding-inline-start: 39px;
}

/* ------------------------------------------------------- file upload */
.dropzone {
  border: 1.5px dashed #d8d4ca;
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 26px 18px;
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone .dz-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.dropzone .dz-icon svg {
  width: 22px;
  height: 22px;
}

.dropzone strong {
  display: block;
  font-size: 13px;
}

.dropzone span {
  font-size: 11.5px;
  color: var(--muted);
}

.upload-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.upload-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.upload-item .ui-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-item .ui-name {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item .ui-size {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.upload-item .ui-state {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #eeece6;
  overflow: hidden;
  position: relative;
}

.progress .bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s var(--ease);
}

.progress.is-error .bar {
  background: linear-gradient(90deg, #cf5a52, var(--danger));
}

.progress.is-done .bar {
  background: linear-gradient(90deg, #1c8f5f, #27b374);
}

.upload-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb svg {
  width: 20px;
  height: 20px;
}

/* ----------------------------------------------------------- tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
}

table.data {
  width: 100%;
  min-width: 680px;
  font-size: 12.5px;
}

table.data thead th {
  text-align: right;
  padding: 11px 14px;
  background: #faf9f6;
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}

table.data tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

table.data tbody tr {
  transition: background 0.16s var(--ease);
}

table.data tbody tr:hover {
  background: #fbfaf7;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data .cell-title {
  font-weight: 700;
  color: var(--ink-800);
}

table.data .cell-sub {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}

table.data .cell-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

.table-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ink-700), var(--ink-600));
  color: var(--gold-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
  overflow: hidden;
  text-transform: uppercase;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 10.5px;
}

.avatar-lg {
  width: 62px;
  height: 62px;
  font-size: 19px;
}

/* ------------------------------------------------------- pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.pagination button,
.pagination a {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-600);
  transition: all 0.18s var(--ease);
}

.pagination button svg {
  width: 16px;
  height: 16px;
}

.pagination button:hover:not(:disabled),
.pagination a:hover {
  border-color: rgba(46, 90, 150, 0.4);
  color: var(--accent);
}

.pagination .is-active {
  background: var(--ink-800);
  border-color: var(--ink-800);
  color: #fff;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .dots {
  color: var(--muted-2);
  padding: 0 4px;
}

/* ---------------------------------------------------------- toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.toolbar .select {
  min-height: 40px;
  font-size: 12.5px;
  min-width: 130px;
  width: auto;
}

.toolbar .search-box .input {
  min-height: 40px;
  font-size: 12.5px;
}

.toolbar .spacer {
  flex: 1;
}

.toolbar-count {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* -------------------------------------------------------- toast/msg */
.toast-stack {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-start: 22px;
  z-index: 400;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  color: var(--ink-700);
  animation: toastIn 0.3s var(--ease-out) both;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  line-height: 1.9;
}

.toast::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--info);
}

.toast.ok::before {
  background: var(--ok);
}

.toast.error::before {
  background: var(--danger);
}

.toast.warn::before {
  background: var(--warn);
}

.toast .t-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--info-soft);
  color: var(--info);
  flex: none;
}

.toast.ok .t-ico {
  background: var(--ok-soft);
  color: var(--ok);
}

.toast.error .t-ico {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast.warn .t-ico {
  background: var(--warn-soft);
  color: var(--warn);
}

.toast .t-ico svg {
  width: 15px;
  height: 15px;
}

.toast .t-body {
  flex: 1;
}

.toast .t-close {
  color: var(--muted-2);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  flex: none;
}

.toast .t-close:hover {
  background: var(--surface-2);
  color: var(--ink-700);
}

.toast.is-out {
  animation: toastOut 0.25s var(--ease) both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s;
  }
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.9;
  border: 1px solid transparent;
}

.alert svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 3px;
}

.alert-info {
  background: var(--info-soft);
  border-color: rgba(47, 111, 202, 0.18);
  color: #24538f;
}

.alert-ok {
  background: var(--ok-soft);
  border-color: rgba(28, 143, 95, 0.18);
  color: #146b47;
}

.alert-warn {
  background: var(--warn-soft);
  border-color: rgba(185, 121, 26, 0.2);
  color: #8a5a10;
}

.alert-danger {
  background: var(--danger-soft);
  border-color: rgba(200, 69, 63, 0.18);
  color: #a5352f;
}

.alert strong {
  font-weight: 800;
}

/* ------------------------------------------------------------ modal */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.modal-root.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 18, 0.55);
  backdrop-filter: blur(4px);
}

.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 900px);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.28s var(--ease-out);
  overflow: hidden;
}

.modal-root.is-open .modal {
  transform: none;
}

.modal-lg {
  width: min(820px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}

.modal-head h3 {
  font-size: 15px;
  font-weight: 800;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fcfbf9;
  flex-wrap: wrap;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--ink-800);
}

/* ------------------------------------------------- empty / loading */
.empty {
  text-align: center;
  padding: 46px 20px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.empty .e-ico {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted-2);
  margin-bottom: 4px;
}

.empty .e-ico svg {
  width: 28px;
  height: 28px;
}

.empty strong {
  font-size: 14px;
  color: var(--ink-700);
}

.empty p {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 2;
}

.empty .btn {
  margin-top: 8px;
}

.loading-block {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(16, 24, 32, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.loader-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  color: var(--muted);
  font-size: 12.5px;
}

.skeleton-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.skeleton-card .sk-img {
  aspect-ratio: 1 / 1;
}

.skeleton-card .sk-body {
  padding: 14px;
  display: grid;
  gap: 9px;
}

.skeleton-card .sk-line {
  height: 11px;
}

.skeleton-card .sk-line.w60 {
  width: 60%;
}

/* ------------------------------------------------------------- tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 11px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tab:hover {
  color: var(--ink-800);
}

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------ stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-card .s-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.stat-card .s-ico svg {
  width: 19px;
  height: 19px;
}

.stat-card.gold .s-ico {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.stat-card.info .s-ico {
  background: var(--info-soft);
  color: var(--info);
}

.stat-card.warn .s-ico {
  background: var(--warn-soft);
  color: var(--warn);
}

.stat-card.danger .s-ico {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card .s-label {
  font-size: 11.5px;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}

.stat-card .s-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.stat-card .s-foot {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* --------------------------------------------------------- panel ui */
.panel-shell {
  display: grid;
  grid-template-columns: 258px 1fr;
  gap: 22px;
  align-items: start;
  padding-block: 24px 50px;
}

.panel-side {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-xs);
}

.panel-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 8px 14px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 10px;
}

.panel-user strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.panel-user span {
  font-size: 10.5px;
  color: var(--muted);
}

.panel-nav {
  display: grid;
  gap: 3px;
}

.panel-nav .p-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 12.5px;
  color: var(--ink-600);
  font-weight: 600;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.panel-nav .p-link svg {
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  flex: none;
}

.panel-nav .p-link:hover {
  background: var(--surface-2);
  color: var(--ink-900);
}

.panel-nav .p-link.is-active {
  background: linear-gradient(145deg, var(--ink-800), #202c3a);
  color: #fff;
  box-shadow: 0 10px 20px -16px rgba(10, 13, 18, 0.9);
}

.panel-nav .p-link.is-active svg {
  color: var(--gold-soft);
}

.panel-nav .p-group {
  font-size: 10.5px;
  color: var(--muted-2);
  font-weight: 700;
  padding: 14px 11px 5px;
  letter-spacing: 0.3px;
}

.panel-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-top h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.panel-top .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.panel-badge {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

/* --------------------------------------------------- definition list */
.dl {
  display: grid;
  gap: 0;
}

.dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.dl-row:last-child {
  border-bottom: 0;
}

.dl-row .k {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dl-row .k svg {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.dl-row .v {
  font-weight: 600;
  color: var(--ink-800);
  text-align: left;
}

/* --------------------------------------------------------- stars */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--gold);
}

.stars svg {
  width: 14px;
  height: 14px;
}

.stars .off {
  color: #e2ded4;
}

.stars-lg svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------- misc */
.list-plain {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item .li-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-600);
  flex: none;
}

.list-item .li-ico svg {
  width: 17px;
  height: 17px;
}

.list-item .li-body {
  flex: 1;
  min-width: 0;
}

.list-item .li-title {
  font-weight: 700;
  color: var(--ink-800);
  font-size: 12.5px;
}

.list-item .li-sub {
  font-size: 11px;
  color: var(--muted);
}

.empty-note {
  font-size: 11.5px;
  color: var(--muted);
  padding: 10px 0;
}

.code-box {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  unicode-bidi: embed;
}

.timeline {
  display: grid;
  gap: 0;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-block: 26px 0;
  inset-inline-start: 12px;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.timeline-dot svg {
  width: 13px;
  height: 13px;
}

.timeline-item.is-done .timeline-dot {
  background: var(--ok-soft);
  color: var(--ok);
}

.timeline-item.is-current .timeline-dot {
  background: var(--ink-800);
  color: var(--gold-soft);
}

.timeline-content strong {
  font-size: 12.5px;
  display: block;
}

.timeline-content span {
  font-size: 11px;
  color: var(--muted);
}

/* ======================================================= hero slider */
.hero-slider {
  position: relative;
  display: grid;
  gap: 18px;
}

.hero-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: center;
  animation: fadeUp 0.45s var(--ease-out) both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-slide-image {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.8);
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.06);
}

.hero-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-content h1 {
  color: #fff;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.4;
  letter-spacing: -1px;
  margin-top: 16px;
}

.hero-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.25s var(--ease), background 0.25s var(--ease);
}

.hero-dots button.is-active {
  width: 24px;
  border-radius: 6px;
  background: var(--gold);
}

/* ==================================================== campaign card */
.campaign-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.campaign-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--ink-800), var(--ink-600));
  display: grid;
  place-items: center;
  color: var(--gold-soft);
}

.campaign-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-cover > svg {
  width: 34px;
  height: 34px;
}

.campaign-cover .badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
}

.campaign-body {
  padding: 15px 16px 18px;
  display: grid;
  gap: 8px;
}

.campaign-body strong {
  font-size: 14px;
}

/* ===================================================== filter block */
.filter-block {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.filter-block:first-child {
  padding-top: 0;
}

.filter-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.filter-block h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 10px;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
  align-items: start;
}

.shop-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.shop-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.shop-bar .search-box {
  flex: 1;
  min-width: 180px;
}

.shop-bar .select {
  width: auto;
  min-width: 158px;
}

.active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ===================================================== product page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
  margin-top: 20px;
}

.pd-gallery {
  display: grid;
  gap: 12px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.pd-main {
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #f6f4ef, #ece9e2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.pd-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-main .ph {
  display: grid;
  place-items: center;
  gap: 10px;
  color: #a9a394;
  text-align: center;
  padding: 24px;
}

.pd-main .ph svg {
  width: 42px;
  height: 42px;
  opacity: 0.7;
}

.pd-main .ph span {
  font-size: 11.5px;
  max-width: 24ch;
  line-height: 1.9;
}

.pd-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-thumb {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-2);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumb.is-active {
  border-color: var(--accent);
}

.pd-info h1 {
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.55;
  letter-spacing: -0.6px;
  margin: 6px 0 10px;
}

.pd-brand {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.pd-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pd-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-block: 1px dashed var(--line);
}

.pd-price strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.pd-old {
  font-size: 13px;
  color: var(--muted-2);
  text-decoration: line-through;
}

.pd-off {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
}

.pd-short {
  font-size: 13px;
  color: var(--muted);
  line-height: 2.05;
  margin-top: 12px;
}

.pd-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.pd-buy .product-fav {
  position: static;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.pd-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pd-trust > div {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink-600);
}

.pd-trust svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: none;
}

.pd-attrs {
  margin-top: 18px;
}

.pd-attrs h3 {
  font-size: 13px;
  margin-bottom: 6px;
}

.pd-tabs {
  overflow: hidden;
}

.rich {
  font-size: 13px;
  line-height: 2.15;
  color: var(--ink-600);
  max-width: 78ch;
}

.rich p {
  margin-bottom: 12px;
}

.rich h2,
.rich h3,
.rich h4 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--ink-800);
}

.rich ul,
.rich ol {
  margin: 0 0 12px;
  padding-inline-start: 20px;
  list-style: disc;
}

.rich ol {
  list-style: decimal;
}

.rich a {
  color: var(--accent);
  text-decoration: underline;
}

.rich img {
  border-radius: 12px;
  margin: 10px 0;
}

.rich blockquote {
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 14px;
  color: var(--muted);
  margin: 12px 0;
}

.rich table {
  font-size: 12.5px;
  margin: 10px 0;
}

.rich td,
.rich th {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.review-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 12px;
}

.review-form h3 {
  font-size: 14px;
}

/* ============================================================= cart */
.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}

.cart-item:last-child {
  border-bottom: 0;
}

.ci-thumb {
  width: 74px;
  height: 74px;
  border-radius: 13px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted-2);
}

.ci-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ci-info {
  min-width: 0;
}

.ci-name {
  font-size: 13px;
  font-weight: 700;
  display: block;
  line-height: 1.8;
}

.ci-name:hover {
  color: var(--accent);
}

.ci-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.ci-price {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.ci-total {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}

.qty-control button {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--ink-600);
}

.qty-control button:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.qty-control button svg {
  width: 14px;
  height: 14px;
}

.qty-control input {
  width: 42px;
  border: 0;
  text-align: center;
  font-size: 12.5px;
  background: transparent;
  -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.coupon-form {
  display: flex;
  gap: 8px;
}

.coupon-form .input {
  min-height: 40px;
  font-size: 12.5px;
}

.coupon-form .btn {
  flex: none;
}

/* ===================================================== auth pages */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-block: 34px 54px;
}

.auth-card {
  padding: clamp(24px, 4vw, 46px);
  display: grid;
  align-content: center;
  gap: 14px;
}

.auth-card h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
}

.auth-card .auth-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 2;
}

.auth-aside {
  background:
    radial-gradient(500px 300px at 80% 10%, rgba(201, 165, 74, 0.28), transparent 65%),
    linear-gradient(150deg, var(--ink-900), #16202b);
  color: #fff;
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  align-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.auth-aside h2 {
  color: #fff;
  font-size: 20px;
  line-height: 1.7;
}

.auth-aside p {
  color: #b3bdc9;
  font-size: 12.5px;
  line-height: 2.1;
}

.auth-aside .auth-points {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.auth-aside .auth-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #dbe2ea;
}

.auth-aside .auth-point svg {
  width: 17px;
  height: 17px;
  color: var(--gold);
  flex: none;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted-2);
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============================================== page hero (inner) */
.page-hero {
  background:
    radial-gradient(700px 260px at 85% 0%, rgba(214, 181, 104, 0.24), transparent 65%),
    radial-gradient(520px 240px at 8% 120%, rgba(46, 90, 150, 0.34), transparent 62%),
    var(--grad-navy);
  box-shadow: inset 0 -1px 0 rgba(214, 181, 104, 0.28);
  color: #fff;
  padding-block: 40px 44px;
  position: relative;
  overflow: hidden;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -0.8px;
}

.page-hero p {
  color: #b3bdc9;
  font-size: 13px;
  margin-top: 10px;
  max-width: 62ch;
  line-height: 2.1;
}

.page-hero .breadcrumb {
  color: #97a3b0;
}

.page-hero .breadcrumb a:hover {
  color: var(--gold-soft);
}

.page-hero .breadcrumb .current {
  color: #fff;
}

/* =================================================== contact cards */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}

.contact-item:last-child {
  border-bottom: 0;
}

.contact-item .ci-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.contact-item .ci-ico svg {
  width: 18px;
  height: 18px;
}

.contact-item strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 2px;
}

.contact-item span,
.contact-item a {
  font-size: 12px;
  color: var(--muted);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--muted-2);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq-item .faq-body {
  padding: 0 16px 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 2.1;
}

/* چیدمان دو ستونی واکنش‌گرا (خانه: باشگاه مشتریان / فروشنده) */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

/* دکمهٔ منوی پنل — فقط در موبایل/تبلت نمایش داده می‌شود */
.panel-menu-btn {
  display: none;
}

/* جلوگیری از سرریز افقی محتوای بلند (ایمیل، شماره سفارش، لینک) */
.panel-main,
.dash-grid > *,
.card,
.table-wrap,
.panel-top,
.admin-bar {
  min-width: 0;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.v,
.dl-row .v,
.ab-chip,
.settings-item .key,
.ci-name,
.ti-msg,
.table-wrap td,
.panel-user .pu-meta b {
  overflow-wrap: anywhere;
}

/* آیکون‌های اعلامی در HTML استاتیک (data-icon) */
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 1;
}

[data-icon] > svg {
  width: 18px;
  height: 18px;
}

.hero-eyebrow [data-icon] > svg,
.hero-float .ico [data-icon] > svg {
  width: 15px;
  height: 15px;
}

.trust-item .ico[data-icon] > svg,
.contact-item .ci-ico[data-icon] > svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar .search-box {
    min-width: 100%;
  }
}

/* ==========================================================================
   KBS — لایهٔ پالایش بصری (Premium polish)
   آخرین لایهٔ CSS سایت؛ فقط توکن، رنگ، بافت، سایه و ریزجزئیات.
   هیچ قاعدهٔ چیدمانی یا ساختاری را جایگزین نمی‌کند و همهٔ انتخابگرها یکتا هستند.
   ========================================================================== */

/* ---------------------------------------------------------------- ۱) توکن */
:root {
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(10, 20, 36, 0.04), 0 12px 28px -22px rgba(10, 20, 36, 0.35);
  --shadow: 0 18px 42px -32px rgba(10, 20, 36, 0.45), 0 2px 10px rgba(10, 20, 36, 0.04);
  --shadow-lg: 0 42px 80px -52px rgba(10, 20, 36, 0.55), 0 10px 24px -18px rgba(10, 20, 36, 0.25);
}

/* ------------------------------------------------------- ۲) پایه و صفحه */
body {
  background:
    radial-gradient(1200px 520px at 88% -10%, rgba(201, 165, 74, 0.12), transparent 60%),
    radial-gradient(900px 460px at 2% 6%, rgba(24, 43, 73, 0.07), transparent 62%),
    #f6f8fc;
}

/* خط طلایی باریک بالای صفحه */
body::before {
  content: "";
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--grad-gold);
  z-index: 90;
  opacity: 0.85;
  pointer-events: none;
}

h1,
h2,
h3 {
  letter-spacing: -0.45px;
}

/* --------------------------------------------------- ۳) سرتیتر بخش‌ها */
.section-head .section-title {
  font-size: clamp(21px, 2.5vw, 30px);
  letter-spacing: -0.7px;
}

.section-head .section-title::before {
  width: 5px;
  height: 30px;
  border-radius: 99px;
  background: var(--grad-gold);
  box-shadow: 0 0 18px -2px rgba(201, 165, 74, 0.55);
}

.section-sub {
  position: relative;
  padding-inline-start: 15px;
  font-size: 12.5px;
}

.section-sub::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.9em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 10px rgba(201, 165, 74, 0.55);
}

.section-link {
  color: var(--navy);
  font-weight: 700;
  transition: color 0.2s var(--ease);
}

.section-link:hover {
  color: var(--gold-deep);
}

.section-link svg {
  transition: transform 0.25s var(--ease);
}

.section-link:hover svg {
  transform: translateX(-3px);
}

/* بخش‌های یک‌درمیان روشن */
.section-alt {
  background: linear-gradient(180deg, #ffffff, #f8fbff 65%, #f4f8fe);
  border-block: 1px solid var(--line);
  box-shadow: inset 0 24px 60px -52px rgba(10, 20, 36, 0.35);
}

/* ------------------------------------------------------------- ۴) هدر */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(10, 20, 36, 0.04);
}

.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px -34px rgba(10, 20, 36, 0.55);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 165, 74, 0.5), transparent);
  pointer-events: none;
}

.brand-name {
  letter-spacing: 0.6px;
}

.header-search .search-field {
  background: #fff;
  border-color: #e3eaf5;
  box-shadow: inset 0 1px 2px rgba(10, 20, 36, 0.03);
}

.header-search .search-field:focus-within {
  border-color: rgba(201, 165, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 165, 74, 0.12);
}

/* ------------------------------------------------------------ ۵) هیرو */
.hero {
  background:
    radial-gradient(1050px 480px at 84% -18%, rgba(236, 205, 132, 0.26), transparent 58%),
    radial-gradient(760px 420px at 4% 118%, rgba(58, 104, 168, 0.45), transparent 62%),
    radial-gradient(560px 520px at 48% 128%, rgba(201, 165, 74, 0.18), transparent 66%),
    var(--grad-navy);
  padding-block: 62px 68px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--grad-gold-line);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.34;
  letter-spacing: -1.4px;
  text-shadow: 0 24px 50px rgba(4, 9, 18, 0.5);
}

/* خط طلایی زیر تیتر هیرو */
.hero h1::after {
  content: "";
  display: block;
  width: 76px;
  height: 3px;
  border-radius: 99px;
  background: var(--grad-gold);
  margin-top: 22px;
  box-shadow: 0 0 22px rgba(201, 165, 74, 0.55);
}

.hero h1 .grad {
  filter: drop-shadow(0 8px 26px rgba(201, 165, 74, 0.35));
}

.hero p.lead {
  color: #a9bad2;
}

.hero-eyebrow {
  background: linear-gradient(120deg, rgba(214, 181, 104, 0.2), rgba(255, 255, 255, 0.05));
  border-color: rgba(214, 181, 104, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px -24px rgba(0, 0, 0, 0.8);
  color: var(--gold-light);
}

.hero-stats {
  border-top-color: rgba(214, 181, 104, 0.18);
}

.hero-stat {
  padding-inline-start: 18px;
  border-inline-start: 1px solid rgba(214, 181, 104, 0.24);
}

.hero-stat:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.hero-stat strong {
  letter-spacing: -0.2px;
}

.hero-stat span {
  color: #94a6bf;
}

/* هالهٔ طلایی پشت نشان */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201, 165, 74, 0.3), transparent 72%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-glass {
  border-radius: 34px;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.2), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(214, 181, 104, 0.32);
  box-shadow:
    0 48px 90px -56px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 60px -30px rgba(214, 181, 104, 0.35);
}

/* حاشیهٔ گرادیانت طلایی روی کارت شیشه‌ای */
.hero-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(247, 233, 182, 0.9), rgba(201, 165, 74, 0.28) 42%, rgba(255, 255, 255, 0.05) 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* هالهٔ نرم طلایی زیر کارت */
.hero-glass::after {
  content: "";
  position: absolute;
  inset: auto -18% -38% -18%;
  height: 72%;
  background: radial-gradient(closest-side, rgba(214, 181, 104, 0.38), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.hero-glass > svg {
  filter: drop-shadow(0 26px 44px rgba(201, 165, 74, 0.22));
}

.hero-float {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow:
    0 26px 54px -32px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  color: #0f1d33;
}

.hero-float .ico {
  background: var(--grad-gold);
  color: #16233a;
  box-shadow: 0 10px 20px -12px rgba(154, 118, 38, 0.9);
}

/* --------------------------------------------------------- ۶) دکمه‌ها */
.btn {
  letter-spacing: 0.1px;
}

.btn-gold {
  position: relative;
  overflow: hidden;
}

/* درخشش متحرک روی دکمهٔ طلایی */
.btn-gold::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 42%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.65s var(--ease);
  pointer-events: none;
}

.btn-gold:hover::after {
  left: 125%;
}

.btn-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(6px);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(214, 181, 104, 0.55);
}

/* --------------------------------------------- ۷) کارت‌ها و محصولات */
.card {
  border-color: #e5ebf5;
  box-shadow: 0 1px 2px rgba(10, 20, 36, 0.03), 0 20px 44px -40px rgba(10, 20, 36, 0.45);
}

.card-seller {
  padding: 22px;
  display: grid;
  gap: 12px;
  background: linear-gradient(150deg, #fbfcff, #f1f6fd);
  border-color: #e3ebf7;
}

.product-card {
  background: linear-gradient(180deg, #ffffff, #fdfeff);
  border-color: #e6ecf5;
  box-shadow: 0 1px 2px rgba(10, 20, 36, 0.03);
}

.product-card:hover {
  box-shadow:
    0 34px 64px -46px rgba(10, 20, 36, 0.6),
    0 0 0 1px rgba(201, 165, 74, 0.4),
    0 0 44px -14px rgba(201, 165, 74, 0.22);
}

.product-thumb {
  background: radial-gradient(120% 85% at 28% 8%, #f9fbff, #e8eef8);
}

.product-thumb .ph {
  color: #9fadc1;
}

.product-thumb .ph span {
  color: #93a2b6;
}

.price-now {
  color: var(--navy);
}

.p-badge.feat {
  background: var(--grad-gold);
  color: #1a2438;
  box-shadow: 0 8px 18px -12px rgba(154, 118, 38, 0.9);
}

.badge-gold {
  background: linear-gradient(120deg, #fbf2d8, #f6e9c6);
  color: #7a5f1f;
  border-color: rgba(201, 165, 74, 0.35);
}

.cat-thumb {
  background: radial-gradient(120% 90% at 28% 8%, #fbfdff, #e9f0f9);
}

.cat-card,
.brand-card {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.cat-card:hover,
.brand-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 165, 74, 0.4);
  box-shadow: 0 30px 60px -48px rgba(10, 20, 36, 0.6);
}

.loyalty-card {
  box-shadow:
    0 30px 60px -46px rgba(154, 118, 38, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ----------------------------------------------------- ۸) حالت خالی */
.empty .e-ico {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  background: radial-gradient(120% 100% at 30% 10%, #fffaf0, #f5e9c9);
  color: var(--gold-deep);
  box-shadow:
    inset 0 0 0 1px rgba(201, 165, 74, 0.35),
    0 22px 42px -32px rgba(154, 118, 38, 0.9);
}

.empty strong {
  font-size: 15px;
  letter-spacing: -0.2px;
}

/* --------------------------------------------------- ۹) نوار اعتماد */
.trust-strip {
  background: linear-gradient(180deg, #ffffff, #f7fafe);
  border-bottom: 1px solid var(--line);
}

.trust-item .ico {
  background: linear-gradient(150deg, rgba(24, 43, 73, 0.08), rgba(24, 43, 73, 0.03));
  color: var(--navy);
  border: 1px solid rgba(24, 43, 73, 0.08);
}

/* ------------------------------------------------ ۱۰) جدول و فرم‌ها */
.table-wrap thead th {
  background: linear-gradient(180deg, #f5f8fd, #eef3fa);
  color: var(--navy);
}

.table-wrap tbody tr {
  transition: background 0.18s var(--ease);
}

.table-wrap tbody tr:hover {
  background: rgba(201, 165, 74, 0.05);
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: rgba(201, 165, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 165, 74, 0.13);
}

.filter-block h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--navy);
}

.filter-block h4::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 99px;
  background: var(--grad-gold);
  flex: none;
}

/* --------------------------------------------------------- ۱۱) پنل‌ها */
.panel-side {
  border-color: #e4eaf4;
  box-shadow: 0 26px 52px -46px rgba(10, 20, 36, 0.5);
}

.p-link.is-active {
  background: linear-gradient(90deg, rgba(201, 165, 74, 0.18), rgba(201, 165, 74, 0.04));
  color: var(--navy);
  box-shadow: inset -3px 0 0 var(--gold);
}

.panel-menu-btn {
  background: linear-gradient(180deg, #f7faff, #eef3fa);
  border-color: #e3eaf5;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-color: #e6ecf5;
  box-shadow: 0 1px 2px rgba(10, 20, 36, 0.03), 0 18px 40px -38px rgba(10, 20, 36, 0.5);
}

.stat-card .s-value {
  color: var(--navy);
}

/* ------------------------------------------------------------ ۱۲) فوتر */
.site-footer {
  border-top: 1px solid rgba(214, 181, 104, 0.28);
  box-shadow: inset 0 40px 80px -70px rgba(214, 181, 104, 0.5);
}

.footer-col h4 {
  letter-spacing: 0.3px;
}

.footer-bottom {
  border-top-color: rgba(214, 181, 104, 0.14);
}

/* ------------------------------------------------- ۱۳) اسکرول‌بار و جزئیات */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 43, 73, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2b4874, #182b49);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------------------- ۱۴) واکنش‌گرایی و کارایی */
@media (max-width: 720px) {
  /* فاصلهٔ هیرو در موبایل در responsive.css تعریف می‌شود */
  .hero-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hero-glass::after {
    display: none;
  }

  .hero h1 {
    letter-spacing: -0.8px;
  }

  .hero-stat {
    padding-inline-start: 12px;
  }

  .section-sub {
    padding-inline-start: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-gold::after {
    display: none;
  }

  .section-link svg {
    transition: none;
  }
}
