/* Dropeate Dashboard */
:root {
  --brand: #0096FF;
  --brand-hover: #007ACC;
  --navy: #001C44;
  --sidebar-w: 260px;
  --bg: #f4f7fb;
  --white: #fff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* Auth pages */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--navy) 0%, #003366 100%);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.auth-card-wide { max-width: 560px; }

.auth-logo {
  display: block;
  height: 40px;
  margin: 0 auto 24px;
}

.auth-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 8px;
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.auth-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.auth-form textarea { resize: vertical; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-footer a { color: var(--brand); font-weight: 600; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* Role selector */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.role-option input { display: none; }

.role-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.role-option input:checked + .role-card {
  border-color: var(--brand);
  background: #e3f4ff;
}

.role-option input:checked + .role-card .role-icon {
  background: var(--brand);
  color: var(--white);
}

.role-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: #e3f4ff;
}

.role-card strong { display: block; margin-bottom: 4px; }

.role-card small { color: var(--muted); font-size: 0.75rem; line-height: 1.4; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}

.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline { background: transparent; border: 2px solid var(--brand); color: var(--brand); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #e0f2fe; color: #075985; }

.demo-accounts {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.demo-accounts h3 { font-size: 0.95rem; margin-bottom: 8px; }
.demo-accounts p { margin-bottom: 4px; }

/* Dashboard layout */
.dashboard-body { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  display: block;
}

.sidebar-logo__img {
  height: 36px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
}

.sidebar-logo:hover .sidebar-logo__img {
  transform: scale(1.03);
}

.sidebar-role {
  padding: 0 20px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  transition: background 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(0,150,255,0.2);
  color: var(--white);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.page-header h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 24px; }

.card-header-bar { margin-bottom: 16px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.icon-nav { width: 18px; height: 18px; opacity: 0.85; }
.icon-stat { width: 22px; height: 22px; }
.icon-sm { width: 16px; height: 16px; }
.icon-btn { width: 16px; height: 16px; }
.icon-role { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--brand); }
.icon-empty { width: 48px; height: 48px; margin: 0 auto 16px; color: #cbd5e1; stroke-width: 1.25; }
.icon-user { width: 18px; height: 18px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-nav a span { flex: 1; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue { background: #e0f2fe; color: #0284c7; }
.stat-icon-violet { background: #ede9fe; color: #7c3aed; }
.stat-icon-green { background: #dcfce7; color: #16a34a; }
.stat-icon-amber { background: #fef3c7; color: #d97706; }
.stat-icon-cyan { background: #cffafe; color: #0891b2; }
.stat-icon-pink { background: #fce7f3; color: #db2777; }

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,150,255,0.15);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-meta strong { display: block; font-size: 0.85rem; }
.user-meta small { color: rgba(255,255,255,0.5); font-size: 0.72rem; word-break: break-all; }

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.btn-logout:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.stat-label { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 24px;
}

.card-header h2,
.card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #002855 100%);
}

.sidebar-nav a.active {
  background: rgba(0,150,255,0.22);
  color: var(--white);
  font-weight: 600;
}

.sidebar-nav a.active .icon-nav { opacity: 1; color: #4db8ff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-state p { margin-bottom: 16px; max-width: 360px; margin-left: auto; margin-right: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.data-table tr:hover td { background: #fafbfc; }

.actions { white-space: nowrap; }
.inline-form { display: inline; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-secondary { background: #f3f4f6; color: #4b5563; }

.text-success { color: var(--success); font-weight: 600; }

.empty-state a:not(.btn) { color: var(--brand); }
.empty-state .btn {
  margin-top: 4px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}
.empty-state .btn-primary {
  background: var(--brand);
}
.empty-state .btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff !important;
}

.empty-state-actions {
  margin-top: 4px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input,
.filter-bar select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  min-width: 180px;
}

/* Product grid (vendedor catalog) */
.product-grid-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card-dash {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 28, 68, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card-dash:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 28, 68, 0.1);
}

.product-card-media {
  position: relative;
  height: 148px;
  overflow: hidden;
}

.product-card-dash.cat-electronica .product-card-placeholder {
  background: linear-gradient(145deg, #0f2744 0%, #0096FF 55%, #4db8ff 100%);
}

.product-card-dash.cat-hogar .product-card-placeholder {
  background: linear-gradient(145deg, #78350f 0%, #d97706 55%, #fbbf24 100%);
}

.product-card-dash.cat-moda .product-card-placeholder {
  background: linear-gradient(145deg, #581c87 0%, #a855f7 55%, #ec4899 100%);
}

.product-card-dash.cat-default .product-card-placeholder {
  background: linear-gradient(145deg, var(--navy) 0%, var(--brand) 60%, #4db8ff 100%);
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
}

.product-card-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15), transparent 55%);
  pointer-events: none;
}

.product-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-product { width: 48px; height: 48px; stroke-width: 1.25; opacity: 0.95; }

.product-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 50px;
}

.product-stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #166534;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 10px;
  border-radius: 50px;
}

.product-stock-badge.low {
  color: #92400e;
  background: #fef3c7;
}

.product-imported-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 5px 10px;
  border-radius: 50px;
}

.product-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.product-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #eef2f7;
}

.product-stat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.product-stat-wide {
  grid-column: 1 / -1;
  padding-top: 4px;
  border-top: 1px solid #e8edf3;
  margin-top: 2px;
}

.icon-stat {
  width: 16px;
  height: 16px;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.icon-xs { width: 12px; height: 12px; }

.product-stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1px;
}

.product-stat strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1.3;
}

.product-stat-wide strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.import-form {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.import-price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.import-price-label span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.price-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.price-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 150, 255, 0.12);
}

.price-prefix {
  padding: 0 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.import-form input.sale-price-input {
  width: 100%;
  padding: 10px 12px 10px 6px;
  border: none;
  border-radius: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: transparent;
}

.import-form input.sale-price-input:focus {
  outline: none;
}

.margin-preview {
  text-align: right;
  min-width: 88px;
}

.margin-preview-label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.margin-preview-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #16a34a;
  line-height: 1.2;
}

.margin-preview-pct {
  font-size: 0.68rem;
  color: #15803d;
  font-weight: 600;
}

.import-btn {
  padding: 11px 16px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.product-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-card-footer.imported .btn-outline {
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .import-price-row { grid-template-columns: 1fr; }
  .margin-preview { text-align: left; }
}

/* Order form */
.order-form label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 0.85rem; }
.order-form input,
.order-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.order-item-row input { width: 80px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }

.ship-form { display: flex; gap: 6px; align-items: center; }
.ship-form input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; width: 100px; }

.status-form { display: flex; gap: 6px; align-items: center; }
.status-form select { padding: 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; padding: 16px; }
  .role-selector { grid-template-columns: 1fr; }
  .sync-promo { flex-direction: column; }
  .sync-hero { flex-direction: column; text-align: center; }
}

/* Store sync module */
.sync-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #e3f4ff 0%, #f0f7ff 100%);
  border: 1px solid #bae6fd;
}

.sync-promo-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sync-promo-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-promo { width: 28px; height: 28px; }

.sync-promo h2 { font-size: 1.1rem; margin-bottom: 6px; }
.sync-promo p { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }

.sync-promo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sync-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--navy) 0%, #003366 100%);
  color: var(--white);
  border: none;
}

.sync-hero h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--white);
}

.sync-hero p { color: rgba(255,255,255,0.8); font-size: 0.9rem; max-width: 560px; }

.icon-hero { width: 24px; height: 24px; color: #4db8ff; }

.sync-hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.sync-hero-stats strong { color: var(--white); font-size: 1.1rem; }

.platform-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.platform-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.platform-tab:hover { border-color: var(--brand); color: var(--brand); }

.platform-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.platform-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--white);
  padding: 4px;
  flex-shrink: 0;
}

.platform-icon.sm {
  width: 28px;
  height: 28px;
  padding: 3px;
}

.card h2 .platform-icon,
.card h2 .platform-icon.sm {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  margin-bottom: 2px;
}

.platform-tab.active .platform-icon {
  background: rgba(255, 255, 255, 0.95);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--white);
}

.platform-badge.sm { width: 28px; height: 28px; font-size: 0.65rem; }

.platform-shopify { background: #96bf48; }
.platform-woo { background: #7f54b3; }
.platform-wp { background: #21759b; }
.platform-default { background: var(--muted); }

.store-list { display: flex; flex-direction: column; gap: 16px; }

.store-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.store-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.store-item-head strong { display: block; font-size: 0.95rem; }
.store-item-head small { color: var(--muted); font-size: 0.75rem; word-break: break-all; }

.store-sync-msg { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: live-dot-pulse 1.8s ease infinite;
  vertical-align: middle;
}

@keyframes live-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.store-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid var(--brand);
}

.store-form label { margin-bottom: 12px; }

.help-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.help-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.help-step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.help-step p { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 768px) {
  .help-steps { grid-template-columns: 1fr; }
}

.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* Earnings module */
.earnings-module { padding: 28px; }

.earnings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.earnings-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.earnings-sub { font-size: 0.85rem; color: var(--muted); }

.earnings-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #dcfce7;
  color: #166534;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
}

.earnings-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.earnings-kpi {
  padding: 18px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.earnings-kpi-profit {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}

.ek-label { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.ek-value { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.ek-cost { color: #dc2626; }
.ek-hint { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

.earnings-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.earnings-chart-wrap h3,
.earnings-top h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.earnings-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 180px;
  padding-top: 8px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chart-bar-wrap {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.earnings-bar {
  width: 70%;
  max-width: 48px;
  background: linear-gradient(to top, #16a34a, #4ade80);
  border-radius: 6px 6px 0 0;
  min-height: 8px;
  transition: height 0.3s ease;
}

.chart-label { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.chart-amount { font-size: 0.65rem; color: #16a34a; font-weight: 700; text-align: center; }

.earnings-empty {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 24px;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
}

.earnings-rank { list-style: none; }

.earnings-rank li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.earnings-rank li:last-child { border-bottom: none; }

.rank-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-info { flex: 1; min-width: 0; }
.rank-info strong { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info small { color: var(--muted); font-size: 0.75rem; }

.rank-profit {
  font-weight: 800;
  color: #16a34a;
  font-size: 0.95rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .earnings-kpis { grid-template-columns: 1fr 1fr; }
  .earnings-grid { grid-template-columns: 1fr; }
}

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

/* Withdrawals module */
.withdraw-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #001C44 0%, #003366 100%);
  color: var(--white);
  border: none;
  margin-bottom: 24px;
}

.wb-label { font-size: 0.85rem; opacity: 0.8; display: block; margin-bottom: 6px; }
.wb-amount { font-size: 2.2rem; font-weight: 800; display: block; letter-spacing: -0.02em; }
.wb-hint { font-size: 0.75rem; opacity: 0.65; display: block; margin-top: 6px; }

.withdraw-balance-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.withdraw-balance-stats div span { display: block; font-size: 0.72rem; opacity: 0.7; margin-bottom: 4px; }
.withdraw-balance-stats div strong { font-size: 1.1rem; }

.withdraw-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.withdraw-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.withdraw-tabs a.active,
.withdraw-tabs a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.payout-list { list-style: none; margin-bottom: 16px; }
.payout-list li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.payout-list strong { display: block; font-size: 0.9rem; }
.payout-list small { color: var(--muted); font-size: 0.75rem; }

.payout-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.payout-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fafbfc;
}

.payout-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.payout-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.payout-details dt { color: var(--muted); font-weight: 600; }
.payout-details dd { margin: 0; }

.payout-fields.hidden { display: none; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.checkbox-label input { width: auto; margin: 0; }

.withdraw-admin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.withdraw-admin-form input[type="text"] {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
}

.withdraw-admin-form select {
  padding: 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.payout-cell small { line-height: 1.5; }

.earnings-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

@media (max-width: 768px) {
  .withdraw-balance { flex-direction: column; text-align: center; }
  .earnings-header-actions { align-items: center; }
}
