/**
 * GLOWS WAFFLE - Premium Brand Theme
 * Gold, chocolate & pistachio | Apple-inspired layout
 */

:root {
  /* Primary Brand */
  --gold: #CC8337;
  --gold-light: #D5995A;
  --chocolate: #492E1D;
  --chocolate-light: #6b4532;
  
  /* Background & Neutrals */
  --cream: #F7F4F1;
  --beige: #F2EBE5;
  --gray: #A89B93;
  --gray-light: #c4bbb4;
  
  /* Accent */
  --pistachio: #86A85B;
  --pistachio-dark: #6F9445;
  
  /* Shadows (warm) */
  --shadow-soft: 0 2px 12px rgba(73, 46, 29, 0.06);
  --shadow-medium: 0 4px 20px rgba(73, 46, 29, 0.08);
  --shadow-card: 0 2px 16px rgba(73, 46, 29, 0.04);
  
  /* Radius */
  --radius: 16px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Motion (premium, subtle) */
  --ease-premium: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur: 200ms;
  --dur-slow: 250ms;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: var(--chocolate);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease-premium), opacity var(--dur) var(--ease-premium);
}
a:hover { text-decoration: underline; color: var(--chocolate); }

/* Motion primitives */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout */
.main-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  animation: fade-rise var(--dur-slow) var(--ease-out) both;
  will-change: transform, opacity;
}

/* Header */
.site-header {
  background: rgba(247, 244, 241, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(168, 155, 147, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--chocolate);
  text-decoration: none;
  transition: color var(--dur) var(--ease-premium), opacity var(--dur) var(--ease-premium);
}
.logo:hover { text-decoration: none; opacity: 0.85; color: var(--gold); }
.logo-img {
  max-height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-main { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.nav-main a {
  font-size: 0.875rem;
  color: var(--chocolate);
  opacity: 0.9;
  transition: color var(--dur) var(--ease-premium), opacity var(--dur) var(--ease-premium);
}
.nav-main a:hover { opacity: 1; text-decoration: none; color: var(--gold); }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
}
.lang-link {
  color: var(--gray);
  opacity: 0.9;
}
.lang-link:hover { opacity: 1; color: var(--gold); }
.lang-link.active { color: var(--chocolate); font-weight: 600; }
.lang-sep { color: var(--gray-light); user-select: none; }

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  position: relative;
}
.login-page-with-hero { background: var(--cream); }
.login-hero-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
  z-index: 0;
}
.login-hero-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(247, 244, 241, 0.7) 0%, rgba(247, 244, 241, 0.9) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
}
.login-wrapper { position: relative; z-index: 2; width: 100%; animation: fade-rise var(--dur-slow) var(--ease-out) both; }
.login-lang-switcher {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
}
.login-lang-switcher .lang-link { color: var(--gray); }
.login-lang-switcher .lang-link:hover { color: var(--gold); }
.login-lang-switcher .lang-link.active { color: var(--chocolate); font-weight: 600; }
.login-lang-switcher .lang-sep { color: var(--gray-light); }
.login-container { width: 100%; max-width: 400px; padding: 24px; margin: 0 auto; }
.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(168, 155, 147, 0.2);
}
.login-logo {
  text-align: center;
  margin-bottom: 8px;
}
.login-logo img {
  max-width: 180px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.login-title { font-size: 1.75rem; font-weight: 600; margin: 0 0 4px; text-align: center; color: var(--chocolate); }
.login-subtitle { font-size: 0.9375rem; color: var(--gray); margin: 0 0 32px; text-align: center; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 6px; color: var(--chocolate); }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--chocolate);
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid rgba(168, 155, 147, 0.4);
  border-radius: var(--radius);
  background: #fff;
  color: var(--chocolate);
  transition: border-color var(--dur) var(--ease-premium), box-shadow var(--dur) var(--ease-premium), transform var(--dur) var(--ease-premium);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(204, 131, 55, 0.18), 0 8px 18px rgba(73, 46, 29, 0.06);
}
.form-row { display: flex; gap: 20px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }
.form-row .form-group.flex-2 { flex: 2; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: opacity var(--dur) var(--ease-premium), transform var(--dur) var(--ease-premium), box-shadow var(--dur) var(--ease-premium), filter var(--dur) var(--ease-premium);
  background: var(--beige);
  color: var(--chocolate);
}
.btn:hover { opacity: 0.95; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(73, 46, 29, 0.10); }
.btn:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(73, 46, 29, 0.08); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(204, 131, 55, 0.18), 0 10px 26px rgba(73, 46, 29, 0.10); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(204, 131, 55, 0.25);
}
.btn-primary:hover { opacity: 1; filter: brightness(1.02); box-shadow: 0 12px 28px rgba(204, 131, 55, 0.22); }
.btn-secondary {
  background: linear-gradient(135deg, var(--pistachio) 0%, var(--pistachio-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(111, 148, 69, 0.25);
}
.btn-secondary:hover { opacity: 1; filter: brightness(1.02); box-shadow: 0 12px 28px rgba(111, 148, 69, 0.20); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-danger {
  background: transparent;
  color: var(--chocolate);
  border: 1px solid rgba(73, 46, 29, 0.3);
}
.btn-danger:hover { background: rgba(73, 46, 29, 0.06); }
.input-qty { width: 70px; text-align: center; }
.input-qty-inline { width: 60px; padding: 6px; text-align: center; }
.input-size { width: 90px; min-width: 90px; }
.btn-order {
  padding: 4px 8px;
  font-size: 0.75rem;
  min-width: 32px;
}
.btn-order:disabled { opacity: 0.5; cursor: not-allowed; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(168, 155, 147, 0.2);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--dur) var(--ease-premium), transform var(--dur) var(--ease-premium);
  transform: translateY(0);
}
.card:hover { box-shadow: var(--shadow-medium); transform: translateY(-2px); }
.card h2 { font-size: 1.25rem; font-weight: 600; margin: 0 0 24px; color: var(--chocolate); }

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.page-header h1 { font-size: 2rem; font-weight: 600; margin: 0; color: var(--chocolate); }
.page-header .subtitle { font-size: 0.9375rem; color: var(--gray); margin: 4px 0 0; }
.back-link { font-size: 0.9375rem; color: var(--gold); }
.back-link:hover { color: var(--chocolate); }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(168, 155, 147, 0.2);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-medium); }
.stat-value { font-size: 2rem; font-weight: 600; margin: 0; color: var(--chocolate); }
.stat-label { font-size: 0.875rem; color: var(--gray); margin: 4px 0 8px; }
.stat-link { font-size: 0.8125rem; color: var(--gold); }
.stat-link:hover { color: var(--chocolate); }

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(168, 155, 147, 0.16);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(73,46,29,0.14); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-track { background: rgba(168,155,147,0.12); border-radius: 999px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.data-table th,
.data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(168, 155, 147, 0.2); }
.data-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--chocolate);
  background: linear-gradient(180deg, rgba(204, 131, 55, 0.08) 0%, rgba(204, 131, 55, 0.04) 100%);
  border-bottom: 1px solid rgba(168, 155, 147, 0.25);
}
.data-table tbody tr { transition: background var(--dur) var(--ease-premium), color var(--dur) var(--ease-premium); }
.data-table tbody tr:hover { background: rgba(242, 235, 229, 0.8); }
.row-inactive { opacity: 0.6; }
.text-muted { color: var(--gray); font-size: 0.875rem; }

/* ------------------------------------------------------------------ */
/* Premium components (Orders + Order Detail) */
/* ------------------------------------------------------------------ */

.section-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(168, 155, 147, 0.18);
  box-shadow: var(--shadow-card);
}
.section-card + .section-card { margin-top: 16px; }

.section-card__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(168, 155, 147, 0.16);
}
.section-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--chocolate);
}
.section-card__summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(168, 155, 147, 0.22);
  background: rgba(242, 235, 229, 0.85);
  color: var(--chocolate);
}
.pill--qty {
  border-color: rgba(204, 131, 55, 0.30);
  background: rgba(204, 131, 55, 0.12);
}
.pill--size {
  border-color: rgba(134, 168, 91, 0.30);
  background: rgba(134, 168, 91, 0.12);
}
.pill--muted {
  border-color: rgba(168, 155, 147, 0.22);
  background: rgba(247, 244, 241, 0.9);
  color: rgba(73, 46, 29, 0.62);
}

.items-list { display: block; }
.items-list__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(204, 131, 55, 0.08) 0%, rgba(204, 131, 55, 0.04) 100%);
  border: 1px solid rgba(168, 155, 147, 0.16);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(73, 46, 29, 0.86);
}
.items-list__cols {
  display: grid;
  grid-template-columns: 96px 96px;
  gap: 10px;
  justify-content: end;
  text-align: right;
}
.items-list__body { margin-top: 10px; }

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(168, 155, 147, 0.14);
  box-shadow: 0 1px 0 rgba(255,255,255,0.65);
  transition: background var(--dur) var(--ease-premium), transform var(--dur) var(--ease-premium), box-shadow var(--dur) var(--ease-premium);
  transform: translateY(0);
}
.items-list__body .item-row:nth-child(even) { background: rgba(242, 235, 229, 0.45); }
.items-list__body .item-row:hover {
  background: rgba(242, 235, 229, 0.70);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(73, 46, 29, 0.06);
}
.item-main { min-width: 0; }
.item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--chocolate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-subtitle {
  margin-top: 3px;
  font-size: 0.8125rem;
  color: rgba(73, 46, 29, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  display: grid;
  grid-template-columns: 96px 96px;
  gap: 10px;
  justify-content: end;
  align-items: center;
  text-align: right;
}
.item-empty {
  font-size: 0.8125rem;
  color: rgba(73, 46, 29, 0.45);
}

.table-premium {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.table-premium th,
.table-premium td { padding: 14px 16px; }
.table-premium th {
  background: rgba(242, 235, 229, 0.75);
  border-bottom: 1px solid rgba(168, 155, 147, 0.22);
}
.table-premium tbody tr:hover { background: rgba(242, 235, 229, 0.70); }
.table-premium .col-actions { text-align: right; white-space: nowrap; }
.table-premium .col-actions .btn { margin-left: 8px; }

.orders-cards {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.order-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(168, 155, 147, 0.18);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease-premium), box-shadow var(--dur) var(--ease-premium);
  transform: translateY(0);
}
.order-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-medium); }
.order-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.order-card__id {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.order-card__label { font-size: 0.75rem; color: rgba(73, 46, 29, 0.55); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.order-card__meta { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; color: rgba(73, 46, 29, 0.72); font-size: 0.875rem; }
.order-card__actions { margin-top: 12px; display: grid; gap: 10px; }

.order-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.2px;
}
.order-id--masked {
  position: relative;
  display: inline-block;
  color: transparent; /* keep full text copyable */
  user-select: all;
}
.order-id--masked::before {
  content: attr(data-trunc);
  position: absolute;
  inset: 0;
  color: var(--chocolate);
  white-space: nowrap;
}

/* Order Items Table */
.order-items-table th {
  background: linear-gradient(180deg, rgba(204, 131, 55, 0.08) 0%, rgba(204, 131, 55, 0.04) 100%);
  color: var(--chocolate);
}
.order-items-table th,
.order-items-table td { border-bottom: 1px solid rgba(168, 155, 147, 0.15); }
.grand-total-row { background: var(--beige); }
.grand-total-row td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}
.badge-success { background: var(--pistachio); color: #fff; }
.badge-secondary { background: var(--beige); color: var(--gray); }
.badge-pending { background: var(--gold); color: #fff; }
.badge-processing { background: var(--gold-light); color: #fff; }
.badge-shipped { background: var(--pistachio); color: #fff; }
.badge-delivered { background: var(--pistachio-dark); color: #fff; }
.badge-cancelled { background: var(--gray); color: #fff; }
.badge-eirsaliye { background: var(--pistachio); color: #fff; }

/* E-İrsaliye Section */
.eirsaliye-section {
  padding: 20px;
  background: var(--beige);
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid rgba(168, 155, 147, 0.15);
}
.eirsaliye-section h2 { font-size: 1.125rem; font-weight: 600; margin: 0 0 16px; color: var(--chocolate); }
.eirsaliye-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.eirsaliye-upload-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eirsaliye-upload-form input[type="file"] {
  max-width: 200px;
  font-size: 0.8125rem;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9375rem;
  animation: toast-in var(--dur-slow) var(--ease-out) both;
  will-change: transform, opacity;
}
.alert-success {
  background: rgba(134, 168, 91, 0.12);
  color: var(--pistachio-dark);
  border: 1px solid rgba(134, 168, 91, 0.4);
}
.alert-error {
  background: rgba(73, 46, 29, 0.06);
  color: var(--chocolate);
  border: 1px solid rgba(73, 46, 29, 0.3);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(168, 155, 147, 0.2);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}
.product-name { font-size: 1.125rem; font-weight: 600; margin: 0 0 4px; color: var(--chocolate); }
.product-subtitle {
  font-size: 0.8rem;
  color: rgba(73, 46, 29, 0.65);
  margin: 0 0 20px;
  font-weight: 400;
}
.product-form .form-row { margin-bottom: 0; }
.product-form .align-center { align-items: flex-end; }

/* Order Detail */
.order-detail-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(168, 155, 147, 0.2);
  box-shadow: var(--shadow-card);
}
.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(168, 155, 147, 0.2);
}
.order-detail-meta { display: flex; flex-direction: column; gap: 12px; }
.order-meta-row { display: flex; align-items: center; gap: 12px; }
.order-meta-label { font-size: 0.8125rem; color: var(--gray); min-width: 100px; }
.order-meta-value { font-weight: 500; color: var(--chocolate); }
.order-note-section {
  padding: 20px;
  background: var(--beige);
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid rgba(168, 155, 147, 0.15);
}
.order-note-section p { margin: 8px 0 0; color: var(--chocolate); }
.order-items-section h2 { font-size: 1.125rem; font-weight: 600; margin: 0 0 16px; color: var(--chocolate); }

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(73, 46, 29, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(168, 155, 147, 0.2);
}

/* Filters */
.filters-form { margin-bottom: 24px; }
.filters-form .form-row { margin-bottom: 0; }

/* Inline forms */
.inline-form { display: inline; margin-right: 8px; }
.inline-form .btn { margin-right: 4px; }

/* Utilities */
.hidden { display: none !important; }
.empty-message { text-align: center; color: var(--gray); padding: 40px 20px; margin: 0; }

/* Cart */
.cart-section .data-table { margin-bottom: 24px; }
.cart-total { font-size: 1.25rem; margin-bottom: 24px; padding: 16px 0; color: var(--chocolate); }
.checkout-form { margin-top: 24px; }

/* Footer */
.site-footer {
  background: var(--beige);
  padding: 24px;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid rgba(168, 155, 147, 0.2);
}
.footer-inner { max-width: 980px; margin: 0 auto; }
.site-footer p { margin: 0; font-size: 0.8125rem; color: var(--gray); }

/* Branding Settings Page */
.branding-hint {
  font-size: 0.9375rem;
  color: var(--gray);
  margin: -8px 0 24px;
}
.branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}
.branding-item {
  padding: 24px;
  background: var(--beige);
  border-radius: var(--radius);
  border: 1px solid rgba(168, 155, 147, 0.2);
}
.branding-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--chocolate);
}
.branding-preview {
  width: 100%;
  height: 120px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(168, 155, 147, 0.2);
}
.branding-preview-favicon { height: 64px; }
.branding-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.branding-preview-placeholder {
  font-size: 0.8125rem;
  color: var(--gray);
}
.branding-form {
  margin-bottom: 12px;
}
.branding-form input[type="file"] {
  margin-bottom: 12px;
  font-size: 0.8125rem;
}
.branding-remove-form {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ */
/* Responsive (mobile-first) */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .main-content {
    padding: 22px 14px 56px;
    animation-duration: var(--dur);
  }

  .header-inner {
    padding: 12px 14px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav-main {
    gap: 10px 14px;
    width: 100%;
    justify-content: space-between;
  }
  .nav-main a {
    font-size: 0.875rem;
    padding: 8px 6px;
  }

  .page-header {
    margin-bottom: 20px;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 20px;
  }

  .order-detail-card {
    padding: 20px;
  }

  .btn {
    min-height: 44px;
    padding: 12px 18px;
  }
  .btn-sm {
    min-height: 40px;
    padding: 10px 14px;
  }

  .login-container { padding: 16px; }
  .login-card { padding: 30px 22px; }
  .login-lang-switcher { top: 16px; right: 16px; }

  .table-wrap {
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 16px;
  }
  .data-table { min-width: 640px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .main-content { padding: 34px 20px 70px; }
  .header-inner { padding: 14px 20px; }
  .data-table { min-width: 760px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .items-list__header { display: none; }
  .item-row { grid-template-columns: 1fr; }
  .item-meta {
    grid-template-columns: 1fr;
    justify-content: start;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Orders list: no horizontal scrolling, use cards */
  .orders-table { display: none; }
  .orders-cards { display: flex; }
  .order-card__actions .btn { width: 100%; }
}
