﻿:root {
  --bg: #eef7ff;
  --surface: #ffffff;
  --surface-soft: #f7fbff;
  --border: #d5e6f7;
  --text: #15314b;
  --muted: #5c7894;
  --primary: #2a8cff;
  --primary-deep: #1667c9;
  --accent: #ffb020;
  --success: #0b9b66;
  --danger: #d84141;
  --shadow: 0 18px 40px rgba(30, 88, 144, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: "Segoe UI", "Trebuchet MS", sans-serif; color: var(--text); background: radial-gradient(circle at top left, rgba(255, 176, 32, 0.18), transparent 25%), linear-gradient(180deg, #f6fbff 0%, #ebf6ff 100%); }
img { display: block; max-width: 100%; }
button, input, select, pre { font: inherit; }
.hidden { display: none !important; }
.shell { width: min(100%, 1180px); margin: 0 auto; padding: 20px 16px 48px; }
.checkout-layout, .admin-shell { display: grid; gap: 18px; }
.hero-card, .card, .login-card { background: rgba(255,255,255,.92); border: 1px solid rgba(213,230,247,.95); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-card { border-radius: 28px; padding: 24px; display: grid; gap: 18px; }
.hero-emphasis { background: linear-gradient(140deg, rgba(20,104,201,.96), rgba(42,140,255,.92)); color: #fff; border-color: rgba(255,255,255,.18); }
.hero-clean { text-align: center; justify-items: center; }
.hero-emphasis .hero-copy { color: rgba(255,255,255,.88); max-width: 640px; }
.hero-actions { display: grid; gap: 10px; }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-shell { width: min(100%, 460px); padding: 20px; }
.login-card { border-radius: 28px; padding: 28px; }
h1, h2, h3, p, dl, dt, dd, pre { margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-weight: 700; font-size: .8rem; }
.hero-copy, .section-head p, .toolbar p, .field small, .form-message, .detail-item span { color: var(--muted); }
.card { border-radius: var(--radius-lg); padding: 20px; }
.state-card { text-align: center; padding: 32px 20px; }
.section-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.section-step { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--primary), #7cc2ff); color: #fff; font-weight: 800; flex: 0 0 auto; }
.product-summary { display: grid; gap: 16px; }
.product-image { width: 100%; border-radius: var(--radius-md); aspect-ratio: 1 / 1; object-fit: cover; background: #f2f7fc; }
.product-copy h3 { font-size: 1.2rem; margin-bottom: 10px; }
.payment-line { margin-bottom: 14px; color: var(--primary-deep); font-weight: 800; font-size: .9rem; line-height: 1.4; }
.price-list { display: grid; gap: 10px; }
.price-list div { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.shipping-line dd { color: var(--success); font-weight: 800; }
.total-line { border-top: 1px solid var(--border); padding-top: 12px; font-size: 1.1rem; font-weight: 800; }
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field span, .field strong { font-weight: 700; }
.field input, .filters-grid input, .filters-grid select, .status-select { width: 100%; border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); border-radius: var(--radius-sm); min-height: 52px; padding: 0 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.field input:focus, .filters-grid input:focus, .filters-grid select:focus, .status-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(42, 140, 255, 0.12); }
.checkbox-row, .checkbox-card { display: flex; gap: 12px; align-items: flex-start; }
.checkbox-row input, .checkbox-card input { margin-top: 3px; width: 18px; height: 18px; }
.checkbox-card { background: #fff9ec; border: 1px solid #ffd98b; border-radius: var(--radius-md); padding: 16px; margin-top: 18px; margin-bottom: 18px; color: #6b4b0b; }
.primary-button, .ghost-button, .danger-button { min-height: 56px; border: none; border-radius: 999px; font-weight: 800; cursor: pointer; transition: transform .2s ease, opacity .2s ease, background .2s ease; }
.primary-button { width: 100%; padding: 0 20px; color: #fff; background: linear-gradient(135deg, var(--accent), #ff8a1d); box-shadow: 0 14px 28px rgba(255,146,36,.28); }
.primary-button-blue { background: linear-gradient(135deg, #1c76e8, #29a2ff); box-shadow: 0 14px 28px rgba(28,118,232,.28); }
.ghost-button { background: #e8f3ff; color: var(--primary-deep); padding: 0 18px; text-decoration: none; display: inline-grid; place-items: center; }
.danger-button { background: #fff0f0; color: var(--danger); min-height: 42px; padding: 0 16px; }
.primary-button:hover, .ghost-button:hover, .danger-button:hover { transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.form-message { min-height: 22px; margin-top: 10px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.toolbar { display: grid; gap: 16px; margin-bottom: 18px; }
.filters-grid { display: grid; gap: 10px; }
.compact-field input { min-height: 48px; }
.products-list, .meta-logs-list, .orders-list, .rank-list, .summary-grid { display: grid; gap: 14px; }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.summary-card, .product-item, .product-preview, .meta-log-item, .dashboard-panel, .order-card { display: grid; gap: 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.summary-card strong { font-size: 1.4rem; }
.dashboard-grid { display: grid; gap: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chart-wrap { display: flex; gap: 10px; align-items: end; min-height: 220px; }
.bar-item { display: grid; gap: 8px; justify-items: center; flex: 1; }
.bar { width: 100%; max-width: 54px; border-radius: 16px 16px 6px 6px; background: linear-gradient(180deg, #29a2ff, #1c76e8); min-height: 6px; }
.rank-item { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.status-pill { display: inline-flex; width: fit-content; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; font-weight: 800; }
.status-connected { background: rgba(11,155,102,.14); color: var(--success); }
.status-error { background: rgba(216,65,65,.12); color: var(--danger); }
.status-disabled { background: rgba(92,120,148,.12); color: var(--muted); }
.meta-status-card { display: grid; gap: 12px; }
.product-item img, .product-preview img { width: 92px; height: 92px; object-fit: cover; border-radius: 16px; background: #edf4fb; }
.product-actions, .table-actions, .pixel-actions, .order-head-actions { display: grid; gap: 10px; }
.product-link { display: block; width: 100%; border-radius: 12px; border: 1px dashed var(--border); padding: 10px 12px; background: #fff; color: var(--muted); font-size: .92rem; word-break: break-all; }
.meta-log-item pre { white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px; color: var(--text); font-size: .85rem; }
.meta-log-head, .order-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.meta-log-success { border-color: rgba(11, 155, 102, .35); }
.meta-log-error { border-color: rgba(216, 65, 65, .35); }
.orders-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.order-details-grid, .order-detail-grid { display: grid; gap: 12px; }
.detail-item { display: grid; gap: 6px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.table-wrap { overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.orders-table th, .orders-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.orders-table th { color: var(--muted); font-size: .88rem; }
.status-select { min-width: 150px; min-height: 42px; background: #fff; }
.uploader input { padding: 12px; min-height: auto; }
.modal { position: fixed; inset: 0; background: rgba(10, 24, 40, .55); display: grid; place-items: center; padding: 16px; z-index: 30; }
.modal-card { width: min(100%, 920px); max-height: 90vh; overflow: auto; background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 22px 50px rgba(14, 39, 65, .24); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
@media (min-width: 720px) {
  .shell { padding: 32px 24px 56px; }
  .hero-card { grid-template-columns: 1.4fr auto; align-items: center; }
  .hero-clean { grid-template-columns: 1fr; }
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-summary { grid-template-columns: 180px 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-full { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: 1fr auto; align-items: end; }
  .filters-grid { grid-template-columns: minmax(220px, 1.6fr) 220px 180px 180px 160px 160px; align-items: end; }
  .product-item { grid-template-columns: 92px 1fr auto; }
  .product-preview { grid-template-columns: 92px 1fr; }
  .pixel-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .order-details-grid, .order-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-head-actions { grid-template-columns: 180px auto; align-items: start; }
  .payment-line { white-space: nowrap; }
}

.hero-actions-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .hero-actions-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.installment-line dd {
  color: var(--primary-deep);
  font-weight: 700;
}

.payment-note {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (min-width: 720px) {
  .payment-note {
    white-space: nowrap;
  }
}

.installment-line dd {
  color: var(--primary-deep);
  font-weight: 700;
}

.payment-note {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (min-width: 720px) {
  .payment-note {
    white-space: nowrap;
  }
}
.installment-line dd {
  color: var(--primary-deep);
  font-weight: 700;
}

.payment-note {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #6f84a0;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
}

@media (max-width: 640px) {
  .payment-note {
    font-size: 0.68rem;
    line-height: 1.3;
    max-width: 240px;
  }
}
.price-block {
  display: flex;
  flex-direction: column;
}

.installment-note {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--primary-deep);
  font-weight: 700;
}

.payment-note {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #6f84a0;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .installment-note {
    font-size: 0.8rem;
  }

  .payment-note {
    font-size: 0.68rem;
    max-width: 220px;
  }
}
.price-block {
  display: flex;
  flex-direction: column;
}

.installment-note {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--primary-deep);
  font-weight: 700;
}

@media (max-width: 640px) {
  .installment-note {
    font-size: 0.8rem;
  }
}
.installment-line dt {
  color: var(--muted);
  font-weight: 600;
}

.installment-line dd {
  color: var(--primary-deep);
  font-weight: 800;
}

