/* ============================================
   CREATOR 创作者 — CMS Admin Portal
   Premium Crystal Boutique Admin Design System
   Mirrors the public Creator website identity.
   ============================================ */

:root {
  /* Creator palette (matches crystal-shop/css/styles.css) */
  --gold: #c48888;
  --gold-light: #e8c4c4;
  --gold-dark: #a06060;
  --rose: #e8b4b8;
  --rose-light: #f5dfe1;
  --amethyst: #9b7bb8;
  --jade: #5fa899;
  --obsidian: #2c2c2c;
  --white: #ffffff;
  --off-white: #faf8f5;
  --cream: #f5efe6;
  --light-gray: #f0ece4;
  --mid-gray: #b8b0a4;
  --dark-gray: #6b6560;
  --charcoal: #3a3530;
  --black: #1a1714;

  /* Typography */
  --font-heading: 'Playfair Display', 'Noto Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(196, 136, 136, 0.25);

  /* Layout */
  --sidebar-w: 264px;
  --topbar-h: 72px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--charcoal);
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }

/* ============ INPUTS / FORM ============ */
.input {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--light-gray);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 136, 136, 0.15);
}

.input--sm {
  padding: 9px 14px;
  font-size: 0.85rem;
  max-width: 260px;
}

.input::placeholder { color: var(--mid-gray); }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-gray);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

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

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(196, 136, 136, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--light-gray);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--dark-gray);
}

.btn-ghost:hover { color: var(--gold-dark); background: var(--cream); }

.btn-dark {
  background: var(--charcoal);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--black);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--rose);
  color: var(--white);
}

.btn-danger:hover {
  background: #d4898e;
}

.btn-lg { padding: 15px 36px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.btn-block { display: flex; width: 100%; }

/* ============ LOGIN VIEW ============ */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(232, 180, 184, 0.25), transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(155, 123, 184, 0.18), transparent 50%),
    linear-gradient(160deg, var(--off-white) 0%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}

.login-crystal {
  position: absolute;
  border-radius: var(--radius-full);
  pointer-events: none;
  opacity: 0.5;
}

.login-crystal--1 {
  width: 260px; height: 260px;
  top: -80px; right: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), var(--rose-light) 60%, rgba(232,180,184,0.4));
  box-shadow: inset -12px -12px 30px rgba(0,0,0,0.06), var(--shadow-md);
  animation: floaty 8s ease-in-out infinite;
}

.login-crystal--2 {
  width: 140px; height: 140px;
  bottom: 60px; left: 8%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), var(--amethyst) 75%);
  opacity: 0.25;
  animation: floaty 11s ease-in-out infinite reverse;
}

.login-crystal--3 {
  width: 80px; height: 80px;
  top: 22%; left: 20%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold-light) 70%);
  opacity: 0.5;
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 44px;
  text-align: center;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.login-card__icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-light), var(--rose-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  padding: 14px;
}

.login-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card__brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.login-card__zh {
  font-family: var(--font-heading);
  color: var(--gold-dark);
  font-weight: 600;
}

.login-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.login-card__subtitle {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin-bottom: 32px;
}

.login-form { text-align: left; }

.login-form .form-group {
  margin-bottom: 18px;
}

.login-error {
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--rose-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: center;
}

.login-card__footer {
  margin-top: 28px;
  font-size: 0.75rem;
  color: var(--mid-gray);
  letter-spacing: 0.04em;
}

/* ============ ADMIN LAYOUT ============ */
.admin-view {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--light-gray);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 50;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--cream);
}

.sidebar__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: contain;
  padding: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--rose-light));
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar__brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
}

.sidebar__brand-zh {
  font-size: 0.75rem;
  color: var(--gold-dark);
  font-weight: 600;
}

.sidebar__nav {
  flex: 1;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--dark-gray);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar__link:hover {
  color: var(--gold-dark);
  background: var(--cream);
}

.sidebar__link.active {
  color: var(--gold-dark);
  background: linear-gradient(135deg, rgba(196,136,136,0.12), rgba(232,180,184,0.12));
  font-weight: 600;
}

.sidebar__link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
}

.sidebar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  width: 20px;
  height: 20px;
}

.sidebar__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar__footer {
  padding: 18px 20px;
  border-top: 1px solid var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.sidebar__user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: 0.72rem;
  color: var(--mid-gray);
}

/* Main column */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--mid-gray);
}

.breadcrumbs__current {
  color: var(--charcoal);
  font-weight: 600;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__date {
  font-size: 0.82rem;
  color: var(--mid-gray);
  white-space: nowrap;
}

/* Content */
.content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.cms-section { display: none; }
.cms-section.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section head */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-head__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
}

.section-head__desc {
  color: var(--dark-gray);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream);
  margin-bottom: 24px;
  overflow: hidden;
}

.card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
}

.card__action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.card__body {
  padding: 24px;
}

.card--wide { grid-column: 1 / -1; }

/* ============ WELCOME ============ */
.welcome {
  margin-bottom: 28px;
}

.welcome__title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--charcoal);
}

.welcome__subtitle {
  color: var(--dark-gray);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ============ KPI CARDS ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '✦';
  position: absolute;
  right: 14px;
  bottom: -6px;
  font-size: 2.6rem;
  color: rgba(196, 136, 136, 0.12);
}

.kpi-card__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-gray);
  margin-bottom: 10px;
}

.kpi-card__value {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.1;
}

.kpi-card--warn .kpi-card__value { color: var(--gold-dark); }

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

/* ============ TABLES ============ */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.table th {
  text-align: left;
  padding: 13px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-gray);
  background: var(--off-white);
  border-bottom: 1px solid var(--light-gray);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--cream);
  color: var(--charcoal);
  vertical-align: middle;
}

.table tbody tr:hover td { background: var(--off-white); }
.table tbody tr:last-child td { border-bottom: none; }

.table .thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
}

.table .empty-row td {
  text-align: center;
  color: var(--mid-gray);
  padding: 40px 16px;
  font-size: 0.9rem;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--active, .badge--delivered, .badge--paid, .badge--shipped { background: #e3f0ec; color: #3f8577; }
.badge--draft, .badge--pending, .badge--new, .badge--processing { background: var(--gold-light); color: var(--gold-dark); }
.badge--inactive, .badge--cancelled { background: var(--light-gray); color: var(--dark-gray); }
.badge--refunded { background: var(--amethyst); color: #fff; }
.badge--production { background: var(--rose-light); color: var(--gold-dark); }

/* Action buttons in tables */
.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--light-gray);
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.action-btn--edit:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--cream); }
.action-btn--delete:hover { border-color: var(--rose); color: var(--gold-dark); background: var(--rose-light); }
.action-btn--view:hover { border-color: var(--jade); color: #3f8577; }

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cream);
}

.toolbar__left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.toolbar__left .input--sm { margin-bottom: 0; }

.toolbar__count {
  font-size: 0.8rem;
  color: var(--mid-gray);
  white-space: nowrap;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--cream);
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--light-gray);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark-gray);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.page-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.page-btn.active { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ PAGES GRID ============ */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 24px;
}

.page-item {
  border: 1px solid var(--cream);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--white);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-item:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.page-item__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.page-item__zh {
  font-size: 0.78rem;
  color: var(--gold-dark);
  font-weight: 600;
}

.page-item__meta {
  font-size: 0.75rem;
  color: var(--mid-gray);
}

.page-item__status {
  align-self: flex-start;
}

.page-item__actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* ============ DIY SETTINGS ============ */
.diy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.diy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream);
  font-size: 0.88rem;
}

.diy-field:last-child { border-bottom: none; }

.diy-field__label {
  color: var(--charcoal);
  font-weight: 500;
}

.diy-field__label small {
  display: block;
  color: var(--mid-gray);
  font-weight: 400;
  font-size: 0.75rem;
}

.diy-field .input {
  max-width: 120px;
  text-align: right;
}

.diy-field .check { margin-bottom: 0; }

.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--charcoal);
  cursor: pointer;
  background: var(--off-white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: all var(--transition-fast);
}

.check:hover { border-color: var(--gold-light); }
.check input { accent-color: var(--gold); }

.save-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* ============ STORE SETTINGS ============ */
.settings-form .form-group { max-width: 520px; }
.settings-form .form-row { max-width: 780px; }

.settings-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin: 18px 0 12px;
}

.settings-subtitle:first-child { margin-top: 0; }

/* Image upload */
.img-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.img-upload__preview {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--light-gray);
  object-fit: contain;
  background: var(--off-white);
  padding: 6px;
}

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(58, 53, 48, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

.modal--lg { max-width: 860px; }
.modal--sm { max-width: 460px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--cream);
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
}

.modal__close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--off-white);
  color: var(--dark-gray);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.modal__close:hover { background: var(--rose-light); color: var(--gold-dark); }

.modal__body {
  padding: 26px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 26px;
  border-top: 1px solid var(--cream);
}

/* EN / ZH tabs */
.lang-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: var(--off-white);
  border-radius: var(--radius-md);
  width: fit-content;
}

.lang-tab {
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--mid-gray);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-tab.active {
  background: var(--white);
  color: var(--gold-dark);
  box-shadow: var(--shadow-sm);
}

/* ============ MISC / LISTS ============ */
.muted { color: var(--mid-gray); font-weight: 400; }
.strike { text-decoration: line-through; color: var(--mid-gray); }

.empty-state {
  text-align: center;
  color: var(--mid-gray);
  padding: 36px 16px;
  font-size: 0.9rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream);
  font-size: 0.87rem;
}

.list-row:last-child { border-bottom: none; }
.list-row .thumb { width: 34px; height: 34px; }

.list-row__qty {
  color: var(--dark-gray);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.8rem;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

/* Customer profile */
.customer-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--off-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--cream);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.customer-profile__main {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-profile__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
}

.customer-profile__stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-left: auto;
}

.customer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.customer-stat__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mid-gray);
}

.customer-stat__value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
}

/* ============ TOASTS ============ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--charcoal);
  color: var(--white);
  padding: 13px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.87rem;
  font-weight: 500;
  min-width: 260px;
  max-width: 360px;
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast--success { background: linear-gradient(135deg, #4a8c6e, #5fa899); }
.toast--error { background: linear-gradient(135deg, #a06060, #c96e6e); }
.toast--info { background: var(--charcoal); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.hide { opacity: 0; transform: translateX(30px); transition: all 0.3s ease; }

/* ============ CONFIRM DIALOG ============ */
.confirm-icon {
  font-size: 2.4rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 14px;
}

.confirm-text {
  text-align: center;
  color: var(--charcoal);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .sidebar {
    width: 72px;
    min-width: 72px;
  }

  .sidebar__brand-text, .sidebar__user-info, .sidebar__link span:not(.sidebar__icon) {
    display: none;
  }

  .sidebar__brand { justify-content: center; padding: 20px 12px; }
  .sidebar__footer { flex-direction: column; }
  .sidebar__user { display: none; }

  .admin-main { margin-left: 72px; }
  .content { padding: 24px 20px; }
  .topbar { padding: 0 20px; }
  .topbar__search { display: none; }
}

@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .login-card { padding: 36px 28px; }
  .topbar__date { display: none; }
}

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