/* ============================================
   VIRTUAL BOXES - Premium SaaS Design 2026
   Color Palette: Deep Graphite-Blue + Soft Teal
   Style: Modern, Clean, Professional
   ============================================ */

:root {
  /* === Color System === */
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.85);

  /* Ink / Text */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --muted-faint: #cbd5e1;

  /* Lines / Borders */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-subtle: #f1f5f9;

  /* === Primary: Deep Graphite Blue === */
  --primary: #1e3a5f;
  --primary-hover: #0f2847;
  --primary-light: #dbeafe;
  --primary-dark: #0c1f3d;
  --primary-glow: rgba(30, 58, 95, 0.15);

  /* === Accent: Bright Blue === */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.2);

  /* === Teal: Soft Cyan === */
  --teal: #0891b2;
  --teal-hover: #0e7490;
  --teal-light: #ecfeff;
  --teal-glow: rgba(8, 145, 178, 0.15);

  /* === Status Colors === */
  --success: #10b981;
  --success-light: #d1fae5;
  --success-glow: rgba(16, 185, 129, 0.15);

  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-glow: rgba(245, 158, 11, 0.15);

  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-glow: rgba(239, 68, 68, 0.15);

  --info: #6366f1;
  --info-light: #e0e7ff;

  /* === Shadows === */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.1), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 60px -16px rgba(15, 23, 42, 0.16), 0 12px 24px rgba(15, 23, 42, 0.08);
  --shadow-inner: inset 0 2px 4px rgba(15, 23, 42, 0.04);

  /* === Radii === */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* === Typography === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* === Transitions === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(8, 145, 178, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

[hidden],
.icon-sprite {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-in-out);
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6, p, dl, dd {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============================================
   ICONS
   ============================================ */
.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease-out);
}

.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 48px; height: 48px; }

/* ============================================
   TOPBAR / NAVIGATION
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: box-shadow 0.3s var(--ease-in-out);
}

.topbar:hover {
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.9;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 12px -2px var(--primary-glow);
  transition: transform 0.3s var(--ease-bounce);
}

.brand:hover .brand-mark {
  transform: scale(1.05) rotate(-5deg);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s var(--ease-in-out);
  position: relative;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: var(--surface-3);
  color: var(--ink);
  outline: none;
}

.topnav a:hover .icon {
  transform: scale(1.1);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.account-actions form {
  margin: 0;
}

.user-chip {
  max-width: 180px;
  overflow: hidden;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  transition: all 0.2s;
}

.user-chip:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  width: min(100% - 48px, 1440px);
  margin: 0 auto;
  padding: 32px 0 48px;
}

.site-footer {
  width: min(100% - 48px, 1440px);
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.site-credit {
  display: inline-flex;
  gap: 6px;
  padding: 8px 0;
  font-weight: 500;
}

.site-credit span {
  color: var(--ink);
  font-weight: 700;
}

/* ============================================
   MESSAGES
   ============================================ */
.messages {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.message {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  animation: slideInDown 0.4s var(--ease-bounce);
  display: flex;
  align-items: center;
  gap: 12px;
}

.message.error {
  border-left-color: var(--danger);
  background: var(--danger-light);
  color: #991b1b;
}

.message.success {
  border-left-color: var(--success);
  background: var(--success-light);
  color: #065f46;
}

.message.warning {
  border-left-color: var(--warning);
  background: var(--warning-light);
  color: #92400e;
}

/* ============================================
   HERO SECTIONS (Dashboard)
   ============================================ */
.dashboard-hero,
.operator-hero,
.section-hero,
.roadmap-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 140px;
  margin-bottom: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.dashboard-hero::before,
.operator-hero::before,
.section-hero::before,
.roadmap-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 60%);
  border-radius: 50%;
  z-index: -1;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.dashboard-hero h1,
.operator-hero h1,
.section-hero h1,
.roadmap-hero h1 {
  color: #fff;
  margin-bottom: 10px;
}

.dashboard-hero p:not(.eyebrow),
.operator-hero p:not(.eyebrow),
.section-hero p:not(.eyebrow),
.roadmap-hero p:not(.eyebrow) {
  max-width: 640px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.6;
}

.dashboard-hero .eyebrow,
.operator-hero .eyebrow,
.section-hero .eyebrow,
.roadmap-hero .eyebrow {
  color: var(--teal-light);
  font-weight: 600;
}

.section-hero > .icon {
  width: 72px;
  height: 72px;
  color: rgba(255, 255, 255, 0.25);
  transition: all 0.3s var(--ease-out);
}

.section-hero:hover > .icon {
  transform: rotate(8deg) scale(1.05);
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   PANELS & CARDS
   ============================================ */
.panel,
.form,
.search,
.table-shell,
.entry-panel,
.close-panel,
.items-section,
.detail-panel,
.detail-actions-panel,
.summary,
.report,
.item,
.telegram-register-help,
.section-tabs,
.release-timeline,
.roadmap-control-panel,
.roadmap-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-in-out);
}

.panel:hover,
.entry-panel:hover,
.close-panel:hover,
.detail-panel:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.panel,
.entry-panel,
.close-panel,
.detail-panel,
.detail-actions-panel,
.items-section,
.report,
.telegram-register-help,
.roadmap-control-panel,
.roadmap-note {
  margin-bottom: 16px;
  padding: 20px;
}

.panel-heading,
.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -20px -20px 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.panel-heading h2,
.table-title h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-shell {
  overflow-x: auto;
  margin-bottom: 20px;
}

.table-shell .table-title {
  margin: 0;
}

/* ============================================
   TABS
   ============================================ */
.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  padding: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-xl);
  border: none;
}

.section-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s var(--ease-in-out);
}

.section-tabs a:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.section-tabs a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 600;
}

/* ============================================
   FORMS
   ============================================ */
.form,
form.form {
  display: grid;
  gap: 16px;
}

.compact-form,
.duplicate-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form button,
.duplicate-form button,
.duplicate-form label:last-of-type,
.duplicate-form #status-at-row {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: all 0.2s var(--ease-in-out);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="file"] {
  padding: 8px 12px;
  cursor: pointer;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.errorlist {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 13px;
}

/* ============================================
   BUTTONS
   ============================================ */
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-in-out);
  box-shadow: var(--shadow-sm);
}

button:hover,
.button-link:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button:active,
.button-link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

button.secondary,
.button-link.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

button.secondary:hover,
.button-link.secondary:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

button.danger,
.button-link.danger {
  background: var(--danger);
  box-shadow: 0 2px 8px var(--danger-glow);
}

button.danger:hover,
.button-link.danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px var(--danger-glow);
}

button.success,
.button-link.success {
  background: var(--success);
  box-shadow: 0 2px 8px var(--success-glow);
}

.inline-form {
  display: inline;
  margin: 0;
}

.actions,
.toolbar,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ============================================
   SEARCH
   ============================================ */
.search {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) max-content;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
}

/* ============================================
   TABLES
   ============================================ */
table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  padding: 8px 12px;
}

/* Compact table variant */
.data-table--compact th,
.data-table--compact td {
  padding: 8px 10px;
  font-size: 13px;
}

.data-table--compact th {
  padding: 6px 10px;
  font-size: 10px;
}

.data-table--compact tbody tr {
  transition: background 0.12s;
}

.data-table--compact .code-link {
  font-size: 12px;
}

.data-table--compact .status-pill {
  padding: 2px 8px;
  font-size: 11px;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover td {
  background: var(--surface-3);
}

tbody tr:last-child td {
  border-bottom: none;
}

.code-link {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

.code-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ============================================
   METRICS
   ============================================ */
.metric-strip,
.operator-summary,
.roadmap-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card,
.operator-summary article,
.roadmap-metrics div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: all 0.25s var(--ease-in-out);
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.operator-summary article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.metric-card:hover,
.operator-summary article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.metric-card:hover::before {
  width: 5px;
}

.metric-card-blue::before { background: var(--accent); }
.metric-card-green::before { background: var(--success); }
.metric-card-amber::before { background: var(--warning); }
.metric-card-violet::before { background: var(--info); }

.metric-card span,
.operator-summary .icon {
  color: var(--accent);
}

.metric-card small,
.operator-summary small,
.roadmap-metrics span {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-card strong,
.operator-summary strong,
.roadmap-metrics strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================
   LAYOUT GRIDS
   ============================================ */
.dashboard-layout,
.admin-split,
.box-detail-grid,
.operator-workspace,
.roadmap-workspace {
  display: grid;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.dashboard-layout {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.admin-split {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.box-detail-grid,
.operator-workspace {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.roadmap-workspace {
  grid-template-columns: 260px minmax(0, 1fr);
}

/* ============================================
   PVZ LIST
   ============================================ */
.pvz-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.pvz-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all 0.2s var(--ease-in-out);
  cursor: pointer;
}

.pvz-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.pvz-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.pvz-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.pvz-card span {
  color: var(--muted);
  font-size: 12px;
}

.pvz-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.pvz-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.pvz-card dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

/* ============================================
   BADGES & STATUS PILLS
   ============================================ */
.status-pill,
.role-badge,
.pvz-chip,
.quality-badge,
.release-status,
.release-version,
.release-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.status-open,
.role-user,
.quality-good,
.release-status-planned {
  background: var(--success-light);
  color: #065f46;
}

.status-closed,
.role-admin,
.release-status-next,
.release-version {
  background: var(--primary-light);
  color: var(--primary);
}

.status-warning,
.quality-bad,
.release-status-idea {
  background: var(--danger-light);
  color: #991b1b;
}

.role-supervisor,
.quality-unchecked,
.pvz-chip {
  background: var(--surface-3);
  color: var(--ink-soft);
}

/* ============================================
   AVATARS
   ============================================ */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.avatar-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: transform 0.2s var(--ease-bounce);
}

.avatar-mark:hover {
  transform: scale(1.08);
}

.admin-users-table .actions {
  min-width: 160px;
}

/* ============================================
   DETAIL METADATA
   ============================================ */
.detail-meta,
.item-meta {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.detail-meta dt,
.item-meta dt,
.record-meta dt {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.detail-meta dd,
.item-meta dd,
.record-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ============================================
   BOX MANIFEST RIBBON
   ============================================ */
.box-manifest-ribbon {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) repeat(3, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.box-manifest-ribbon div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: all 0.2s;
}

.box-manifest-ribbon div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.box-manifest-ribbon span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.box-manifest-ribbon strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================
   RECORD CARDS (COMPACT & HARMONIOUS)
   ============================================ */
.record-board-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.record-board {
  display: grid;
  gap: 10px;
}

.record-card {
  display: grid;
  /* FIX: Removed huge minmax values. Columns are now sized by content, middle takes remaining space */
  grid-template-columns: minmax(140px, auto) 1fr minmax(80px, auto);
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease-in-out);
  position: relative;
  align-items: center;
}

.record-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  transition: width 0.3s;
}

.record-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

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

.record-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.record-label {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.record-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.3;
}

.record-meta {
  display: grid;
  /* FIX: Changed from fixed 5 columns to auto-fit for better wrapping */
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 4px 12px;
  margin: 0;
}

.record-meta dt {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  margin-bottom: 1px;
}

.record-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ============================================
   PHOTO PREVIEWS (COMPACT)
   ============================================ */
.record-media,
.operator-photo-strip,
.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.record-media {
  /* Using flex from parent */
}

.photo-preview-link,
.file-links a {
  display: grid;
  gap: 2px;
  width: 64px;
  max-width: 64px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: all 0.2s var(--ease-in-out);
}

.photo-preview-link:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.photo-preview-link img {
  display: block;
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  object-fit: cover;
}

.photo-preview-link span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line-subtle);
  margin-top: 4px;
}

.record-actions button,
.record-actions .button-link {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
}

/* ============================================
   ITEM CARDS
   ============================================ */
.item-card-grid,
.roadmap-grid {
  display: grid;
  gap: 16px;
}

.item-card,
.roadmap-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-in-out);
}

.item-card:hover,
.roadmap-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

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

.roadmap-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.roadmap-card-head,
.release-meta,
.release-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.release-meta {
  color: var(--muted);
  font-size: 13px;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.release-progress,
.next-panel-progress {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.release-progress > div,
.next-panel-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.release-progress i,
.next-panel-progress i {
  position: relative;
  overflow: hidden;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  flex: 1;
}

.release-progress i span,
.next-panel-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  transition: width 0.5s var(--ease-out);
}

.release-progress i::after,
.next-panel-progress i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.roadmap-card ul {
  padding-left: 20px;
  margin: 0;
}

/* ============================================
   TIMELINE
   ============================================ */
.release-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.timeline-point {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-3);
}

/* ============================================
   TELEGRAM HELP
   ============================================ */
.telegram-register-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.telegram-register-help ol {
  grid-column: 1 / -1;
  margin-bottom: 0;
  padding-left: 24px;
}

.telegram-bot-link {
  white-space: nowrap;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-form,
.auth-panel,
.auth-link,
.telegram-register-help {
  max-width: 880px;
}

.app-public .topbar {
  justify-content: flex-start;
}

.app-public .topnav {
  justify-content: flex-start;
}

.app-public main {
  width: min(100% - 48px, 920px);
  padding-top: 48px;
}

.app-public h1 {
  margin-bottom: 20px;
}

.app-public .auth-form {
  padding: 28px;
}

.app-public .auth-link {
  margin-top: 16px;
  font-weight: 500;
}

/* ============================================
   BOX DETAIL PAGE - COMPACT
   ============================================ */
.operator-hero {
  min-height: 110px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.operator-hero h1 {
  font-size: 24px;
  margin-bottom: 6px;
}

.operator-hero p:not(.eyebrow) {
  font-size: 14px;
  max-width: 500px;
}

.operator-hero .eyebrow {
  font-size: 11px;
  margin-bottom: 6px;
}

.operator-summary {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.operator-summary article {
  min-height: 60px;
  padding: 10px 14px;
}

.operator-summary .icon {
  width: 18px;
  height: 18px;
}

.operator-summary small {
  font-size: 10px;
}

.operator-summary strong {
  font-size: 18px;
}

.operator-workspace {
  gap: 16px;
  margin-bottom: 16px;
}

.entry-panel,
.close-panel {
  padding: 16px;
  margin-bottom: 12px;
}

.entry-panel .panel-heading {
  margin: -16px -16px 16px;
  padding: 12px 16px;
}

.entry-panel .panel-heading h2 {
  font-size: 16px;
}

.entry-panel .eyebrow {
  font-size: 10px;
  margin-bottom: 4px;
}

.compact-form {
  gap: 12px;
}

.compact-form label {
  font-size: 13px;
}

.compact-form input,
.compact-form textarea,
.compact-form select {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

.compact-form button {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
}

.close-panel {
  text-align: center;
}

.close-panel .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
}

.close-panel h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.close-panel p {
  font-size: 13px;
  margin-bottom: 12px;
}

.close-panel button {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13px;
}

.items-section {
  padding: 16px;
  margin-bottom: 16px;
}

.items-section .table-title {
  margin: -16px -16px 16px;
  padding: 12px 16px;
}

.items-section .table-title h2 {
  font-size: 16px;
}

.items-section .eyebrow {
  font-size: 10px;
  margin-bottom: 4px;
}

.item-card-grid {
  gap: 12px;
}

.item-card {
  padding: 14px;
}

.item-card-head {
  margin-bottom: 10px;
  gap: 8px;
}

.item-card-head .icon {
  width: 18px;
  height: 18px;
}

.item-card-head h3 {
  font-size: 14px;
  margin: 0;
}

.item-meta {
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 6px 12px;
}

.item-meta dt {
  font-size: 12px;
}

.item-meta dd {
  font-size: 13px;
}

.operator-photo-strip {
  gap: 8px;
  margin-top: 10px;
}

.operator-photo-strip .photo-preview-link {
  width: 72px;
  max-width: 72px;
  padding: 4px;
}

.operator-photo-strip .photo-preview-link img {
  height: 54px;
}

.operator-photo-strip .photo-preview-link span {
  font-size: 10px;
}

/* ============================================
   PHOTO MODAL
   ============================================ */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeIn 0.2s;
}

.photo-modal figure {
  overflow: hidden;
  width: min(94vw, 1000px);
  max-height: 90vh;
  margin: 0;
  border-radius: var(--radius-2xl);
  background: var(--ink);
  animation: zoomIn 0.3s var(--ease-bounce);
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.6);
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.photo-modal img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.photo-modal figcaption {
  padding: 14px 20px;
  color: #fff;
  font-weight: 500;
}

.photo-modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border-radius: 50%;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
}

.photo-modal-close:hover {
  transform: scale(1.1);
  background: var(--danger);
  color: #fff;
}

/* ============================================
   UTILITY
   ============================================ */
.muted,
.form-help,
.quality-note {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  font-style: italic;
  color: var(--muted);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

main > section {
  animation: fadeInUp 0.4s var(--ease-out) backwards;
}

main > section:nth-child(1) { animation-delay: 0s; }
main > section:nth-child(2) { animation-delay: 0.06s; }
main > section:nth-child(3) { animation-delay: 0.12s; }
main > section:nth-child(4) { animation-delay: 0.18s; }
main > section:nth-child(5) { animation-delay: 0.24s; }

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible,
.button-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface-3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--muted-light);
  border-radius: 5px;
  border: 2px solid var(--surface-3);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1180px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topnav,
  .account-actions {
    justify-content: flex-start;
  }

  .dashboard-layout,
  .admin-split,
  .box-detail-grid,
  .operator-workspace,
  .roadmap-workspace,
  .record-card {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .operator-summary,
  .roadmap-metrics {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .search,
  .telegram-register-help {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }

  .topbar { padding: 12px 16px; }

  main,
  .app-public main,
  .site-footer {
    width: min(100% - 24px, 1440px);
  }

  .dashboard-hero,
  .operator-hero,
  .section-hero,
  .roadmap-hero {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .section-hero > .icon { display: none; }

  .metric-strip,
  .operator-summary,
  .roadmap-metrics,
  .box-manifest-ribbon,
  .compact-form,
  .duplicate-form,
  .record-meta,
  .detail-meta,
  .item-meta {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .table-title,
  .actions,
  .toolbar,
  .table-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search button,
  button,
  .button-link {
    width: 100%;
  }

  .account-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .account-actions button {
    width: auto;
  }

  /* === AUTH PAGES MOBILE === */
  .app-public main {
    width: 100%;
    padding: 24px 0;
  }

  .app-public h1 {
    font-size: 24px;
    margin-bottom: 16px;
    padding: 0 16px;
  }

  .app-public .auth-form {
    padding: 16px;
    gap: 12px;
  }

  .app-public .auth-form label {
    font-size: 13px;
    gap: 4px;
  }

  .app-public .auth-form input,
  .app-public .auth-form select,
  .app-public .auth-form textarea {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    width: 100%;
  }

  .app-public .auth-form button {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 15px;
    width: 100%;
  }

  .app-public .auth-link {
    padding: 0 16px;
    text-align: center;
    margin-top: 12px;
  }

  .telegram-register-help {
    padding: 16px;
    margin-bottom: 16px;
  }

  .telegram-register-help h2 {
    font-size: 16px;
  }

  .telegram-register-help p {
    font-size: 14px;
  }

  .telegram-register-help ol {
    padding-left: 20px;
    font-size: 13px;
  }

  .telegram-register-help li {
    margin-bottom: 6px;
  }

  .telegram-bot-link {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    min-height: 44px;
  }

  /* === BOX DETAIL MOBILE === */
  .operator-hero {
    padding: 16px;
    min-height: auto;
  }

  .operator-hero .box-showcase {
    display: none;
  }

  .operator-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .operator-summary article {
    min-height: 50px;
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .entry-panel,
  .close-panel,
  .items-section {
    padding: 14px;
  }

  .entry-panel .panel-heading,
  .items-section .table-title {
    margin: -14px -14px 14px;
    padding: 10px 14px;
  }

  .item-card {
    padding: 12px;
  }

  .item-meta {
    grid-template-columns: 100px 1fr;
    gap: 4px 10px;
  }

  .operator-photo-strip {
    gap: 6px;
  }

  .operator-photo-strip .photo-preview-link {
    width: 64px;
    max-width: 64px;
  }

  .operator-photo-strip .photo-preview-link img {
    height: 48px;
  }

  /* === GENERAL MOBILE FIXES === */
  .panel,
  .form,
  .search,
  .table-shell {
    border-radius: var(--radius-lg);
  }

  .form {
    gap: 12px;
  }

  label {
    gap: 4px;
  }

  input,
  textarea,
  select {
    min-height: 44px;
    padding: 10px 12px;
  }

  .messages {
    gap: 8px;
  }

  .message {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: var(--radius);
  }
}

/* ============================================
   ╔═══════════════════════════════════════════╗
   ║     EMPTY STATE WITH 3D MINI BOX          ║
   ╚═══════════════════════════════════════════╝
   ============================================ */

.empty-state-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  margin: 16px 0;
}

.empty-state-content {
  max-width: 400px;
}

.empty-box-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  perspective: 800px;
}

/* Mini 3D Box for empty states */
.box-3d-mini {
  position: relative;
  width: 80px;
  height: 80px;
  transform-style: preserve-3d;
  animation: boxFloatMini 6s ease-in-out infinite;
}

@keyframes boxFloatMini {
  0%, 100% {
    transform: rotateY(0deg) rotateX(-12deg) translateY(0);
  }
  25% {
    transform: rotateY(90deg) rotateX(-12deg) translateY(-8px);
  }
  50% {
    transform: rotateY(180deg) rotateX(-12deg) translateY(-4px);
  }
  75% {
    transform: rotateY(270deg) rotateX(-12deg) translateY(-10px);
  }
  100% {
    transform: rotateY(360deg) rotateX(-12deg) translateY(0);
  }
}

.box-face-mini {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  backface-visibility: visible;
}

.box-face-front-mini {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(8, 145, 178, 0.04) 100%);
  transform: translateZ(40px);
  border-color: rgba(37, 99, 235, 0.3);
}

.box-face-front-mini::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 50%;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--teal-light) 100%);
  border-radius: var(--radius-sm);
  opacity: 0.5;
}

.box-face-back-mini {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.06) 0%, rgba(37, 99, 235, 0.03) 100%);
  transform: rotateY(180deg) translateZ(40px);
}

.box-face-right-mini {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
  transform: rotateY(90deg) translateZ(40px);
}

.box-face-right-mini::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  right: 20%;
  bottom: 20%;
  border: 1.5px dashed rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
}

.box-face-left-mini {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(30, 58, 95, 0.08) 100%);
  transform: rotateY(-90deg) translateZ(40px);
}

.box-face-left-mini::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  right: 20%;
  bottom: 20%;
  border: 1.5px dashed rgba(8, 145, 178, 0.2);
  border-radius: var(--radius-sm);
}

.box-face-top-mini {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(8, 145, 178, 0.06) 100%);
  transform: rotateX(90deg) translateZ(40px);
  border-color: rgba(37, 99, 235, 0.35);
}

.box-face-top-mini::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 15%;
  right: 15%;
  height: 1.5px;
  background: rgba(37, 99, 235, 0.25);
}

.box-face-top-mini::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 15%;
  right: 15%;
  height: 1.5px;
  background: rgba(8, 145, 178, 0.25);
}

.box-face-bottom-mini {
  background: rgba(15, 23, 42, 0.02);
  transform: rotateX(-90deg) translateZ(40px);
  border-color: rgba(30, 58, 95, 0.1);
}

.empty-state-box h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Photo strip mini for table */
.photo-strip-mini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.photo-strip-mini .photo-preview-link {
  width: 48px;
  max-width: 48px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.photo-strip-mini .photo-preview-link img {
  width: 100%;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .empty-state-box {
    padding: 32px 16px;
  }

  .box-3d-mini {
    width: 60px;
    height: 60px;
  }

  .box-face-mini {
    width: 60px;
    height: 60px;
  }

  .box-face-front-mini { transform: translateZ(30px); }
  .box-face-back-mini { transform: rotateY(180deg) translateZ(30px); }
  .box-face-right-mini { transform: rotateY(90deg) translateZ(30px); }
  .box-face-left-mini { transform: rotateY(-90deg) translateZ(30px); }
  .box-face-top-mini { transform: rotateX(90deg) translateZ(30px); }
  .box-face-bottom-mini { transform: rotateX(-90deg) translateZ(30px); }

  .photo-strip-mini .photo-preview-link {
    width: 40px;
    max-width: 40px;
  }

  .photo-strip-mini .photo-preview-link img {
    height: 30px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .topbar,
  .site-footer,
  button,
  .button-link,
  .photo-modal {
    display: none !important;
  }

  body {
    background: white;
  }

  body::before,
  body::after {
    display: none;
  }

  .panel,
  .entry-panel,
  .close-panel,
  .detail-panel {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   COMPACT RECORD CARDS (NEW)
   ============================================ */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-card-compact {
  display: grid;
  grid-template-columns: 0px 1fr;
  gap: 0;
  padding: 14px 18px 14px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  position: relative;
  align-items: center;
  transition: all 0.2s var(--ease-in-out);
}

.record-card-compact:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Аккуратная синяя метка слева */
.record-card-compact::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Синий бейдж с номером */
.record-badge-compact {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  white-space: nowrap;
  z-index: 2;
}

/* Внутренняя сетка карточки */
.record-grid-compact {
  display: grid;
  grid-template-columns: 130px 1.2fr 80px 110px auto;
  gap: 16px;
  align-items: center;
  width: 100%;
}

/* Колонки */
.record-col-compact {
  min-width: 0;
}

/* ШК */
.barcode-text-compact {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-3);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  word-break: break-all;
}

/* Информационный блок */
.record-col-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-row-compact {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.info-row-compact .label-compact {
  color: var(--muted);
  font-size: 12px;
}

.info-row-compact .value-compact {
  color: var(--ink-soft);
  font-weight: 500;
}

.info-row-compact .divider-compact {
  color: var(--muted-faint);
  margin: 0 2px;
}

.info-row-compact.highlight-compact .amount-compact {
  color: var(--success);
  font-weight: 700;
}

/* Фото превью */
.photo-thumbnail-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  overflow: hidden;
  transition: all 0.2s var(--ease-in-out);
}

.photo-thumbnail-compact:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.photo-thumbnail-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumbnail-empty {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* Статус */
.record-col-status {
  display: flex;
  align-items: center;
}

/* Кнопки действий */
.record-col-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-action-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease-in-out);
  text-decoration: none;
}

.btn-action-compact:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-edit-compact:hover {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--accent-light);
}

.btn-delete-compact:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--danger-light);
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
  .record-grid-compact {
    grid-template-columns: 120px 1fr 70px 100px auto;
    gap: 12px;
  }
  
  .barcode-text-compact {
    font-size: 13px;
    padding: 3px 8px;
  }
  
  .photo-thumbnail-compact {
    width: 70px;
    height: 52px;
  }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .record-card-compact {
    padding: 16px;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .record-card-compact::before {
    height: 4px;
    width: 40px;
    top: 0;
    left: 16px;
    transform: none;
    border-radius: 0 0 4px 4px;
  }

  .record-badge-compact {
    position: static;
    transform: none;
    display: inline-block;
    margin-bottom: 12px;
  }

  .record-grid-compact {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .record-col-barcode {
    grid-column: 1 / -1;
  }

  .record-col-info {
    grid-column: 1 / -1;
    order: 2;
  }

  .record-col-photo {
    order: 3;
    display: flex;
    justify-content: center;
  }

  .photo-thumbnail-compact {
    width: 100%;
    max-width: 120px;
    height: 90px;
  }

  .record-col-status {
    order: 4;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .record-col-actions {
    grid-column: 1 / -1;
    order: 5;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line-subtle);
  }
}

/* ============================================
   ╔═══════════════════════════════════════════╗
   ║        LANDING PAGE / HERO SECTION        ║
   ╚═══════════════════════════════════════════╝
   ============================================ */

/* Landing page layout */
.landing-page main {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.landing-section {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
  padding: 48px 0;
}

/* ===== HERO SECTION ===== */
.landing-hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 70% 80%, rgba(8, 145, 178, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.landing-hero-content {
  width: min(100% - 64px, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.landing-hero-text {
  max-width: 560px;
}

.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.landing-hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.landing-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  color: var(--ink);
}

.landing-hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 60%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero-description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 480px;
}

.landing-hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-in-out);
  box-shadow: 0 4px 16px var(--primary-glow);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--line-strong);
  cursor: pointer;
  transition: all 0.25s var(--ease-in-out);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--surface-3);
  color: var(--ink);
  transform: translateY(-2px);
}

/* ===== 3D BOX SCENE ===== */
.landing-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  min-height: 400px;
  position: relative;
}

.box-scene {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glow under the box */
.box-scene::before {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.9; transform: translateX(-50%) scale(1.1); }
}

/* Floating particles around the box */
.box-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

.box-particle:nth-child(1) {
  top: 15%;
  left: 10%;
  animation: particleFloat1 6s ease-in-out infinite;
}

.box-particle:nth-child(2) {
  top: 25%;
  right: 15%;
  width: 6px;
  height: 6px;
  background: var(--teal);
  animation: particleFloat2 7s ease-in-out infinite 0.5s;
}

.box-particle:nth-child(3) {
  bottom: 25%;
  left: 20%;
  width: 10px;
  height: 10px;
  background: var(--primary);
  opacity: 0.3;
  animation: particleFloat3 8s ease-in-out infinite 1s;
}

.box-particle:nth-child(4) {
  bottom: 35%;
  right: 10%;
  width: 5px;
  height: 5px;
  animation: particleFloat1 5s ease-in-out infinite 1.5s;
}

@keyframes particleFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -15px) rotate(90deg); }
  50% { transform: translate(-5px, -25px) rotate(180deg); }
  75% { transform: translate(-15px, -10px) rotate(270deg); }
}

@keyframes particleFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 15px); }
}

@keyframes particleFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, -20px) scale(1.2); }
}

/* 3D Box container */
.box-3d {
  position: relative;
  width: 180px;
  height: 180px;
  transform-style: preserve-3d;
  animation: boxFloat 6s ease-in-out infinite, boxRotate 20s linear infinite;
}

@keyframes boxFloat {
  0%, 100% { transform: translateY(0) rotateY(0deg) rotateX(-15deg); }
  25% { transform: translateY(-20px) rotateY(90deg) rotateX(-15deg); }
  50% { transform: translateY(-10px) rotateY(180deg) rotateX(-15deg); }
  75% { transform: translateY(-25px) rotateY(270deg) rotateX(-15deg); }
}

@keyframes boxRotate {
  from { transform: rotateY(0deg) rotateX(-15deg) translateY(0); }
  to { transform: rotateY(360deg) rotateX(-15deg) translateY(0); }
}

/* Combined animation */
.box-3d {
  animation: boxCombined 8s ease-in-out infinite;
}

@keyframes boxCombined {
  0% {
    transform: rotateY(0deg) rotateX(-12deg) translateY(0);
  }
  25% {
    transform: rotateY(90deg) rotateX(-12deg) translateY(-20px);
  }
  50% {
    transform: rotateY(180deg) rotateX(-12deg) translateY(-8px);
  }
  75% {
    transform: rotateY(270deg) rotateX(-12deg) translateY(-24px);
  }
  100% {
    transform: rotateY(360deg) rotateX(-12deg) translateY(0);
  }
}

/* Box faces */
.box-face {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: rgba(37, 99, 235, 0.6);
  backface-visibility: visible;
}

/* Front face */
.box-face-front {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(8, 145, 178, 0.04) 100%);
  transform: translateZ(90px);
  border-color: rgba(37, 99, 235, 0.3);
}

.box-face-front::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--teal-light) 100%);
  border-radius: var(--radius);
  opacity: 0.5;
}

.box-face-front svg {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  color: var(--primary);
}

/* Back face */
.box-face-back {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.06) 0%, rgba(37, 99, 235, 0.03) 100%);
  transform: rotateY(180deg) translateZ(90px);
}

/* Right face */
.box-face-right {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  transform: rotateY(90deg) translateZ(90px);
}

.box-face-right::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  right: 20%;
  bottom: 20%;
  border: 2px dashed rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
}

/* Left face */
.box-face-left {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(30, 58, 95, 0.1) 100%);
  transform: rotateY(-90deg) translateZ(90px);
}

.box-face-left::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  right: 20%;
  bottom: 20%;
  border: 2px dashed rgba(8, 145, 178, 0.2);
  border-radius: var(--radius);
}

/* Top face */
.box-face-top {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(8, 145, 178, 0.08) 100%);
  transform: rotateX(90deg) translateZ(90px);
  border-color: rgba(37, 99, 235, 0.4);
}

.box-face-top::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(37, 99, 235, 0.3);
}

.box-face-top::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(8, 145, 178, 0.3);
}

/* Bottom face */
.box-face-bottom {
  background: rgba(15, 23, 42, 0.03);
  transform: rotateX(-90deg) translateZ(90px);
  border-color: rgba(30, 58, 95, 0.1);
}

/* Shadow under the box */
.box-shadow-3d {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(15, 23, 42, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(6px);
  animation: shadowScale 8s ease-in-out infinite;
}

@keyframes shadowScale {
  0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  25% { opacity: 0.5; transform: translateX(-50%) scale(0.85); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(0.9); }
  75% { opacity: 0.4; transform: translateX(-50%) scale(0.8); }
}

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header .eyebrow {
  justify-content: center;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: min(100% - 64px, 1200px);
  margin: 0 auto;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.3s var(--ease-in-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  transition: all 0.3s var(--ease-out);
}

.feature-card:hover .feature-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ===== DASHBOARD PREVIEW ===== */
.preview-section {
  padding: 80px 0;
  text-align: center;
}

.preview-window {
  width: min(100% - 64px, 1100px);
  margin: 48px auto 0;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}

.preview-window::before {
  content: '';
  display: block;
  height: 44px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.preview-window::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981;
}

.preview-content {
  padding: 32px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  min-height: 400px;
  background: var(--bg);
}

.preview-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
}

.preview-sidebar-item {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-sidebar-item.active {
  background: var(--primary);
  color: #fff;
}

.preview-main {
  display: grid;
  gap: 16px;
  align-content: start;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.preview-metric {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.preview-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.preview-metric-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-table {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-table-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 100px;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.preview-table-row:first-child {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-table-row:last-child {
  border-bottom: none;
}

/* ===== STATS SECTION ===== */
.stats-section {
  padding: 64px 0;
  background: var(--primary);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  width: min(100% - 64px, 1100px);
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  display: grid;
  gap: 8px;
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 14px;
  opacity: 0.7;
  font-weight: 500;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 32px;
}

/* ===== LANDING FOOTER ===== */
.landing-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.landing-footer .site-credit {
  font-size: 15px;
}

/* ===== RESPONSIVE LANDING ===== */
@media (max-width: 1024px) {
  .landing-hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .landing-hero-text {
    max-width: 100%;
  }

  .landing-hero-cta {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-content {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    flex-direction: row;
    overflow-x: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .landing-hero {
    min-height: auto;
    padding: 60px 0;
  }

  .landing-hero-visual {
    min-height: 300px;
  }

  .box-scene {
    width: 240px;
    height: 240px;
  }

  .box-3d {
    width: 140px;
    height: 140px;
  }

  .box-face {
    width: 140px;
    height: 140px;
  }

  .box-face-front { transform: translateZ(70px); }
  .box-face-back { transform: rotateY(180deg) translateZ(70px); }
  .box-face-right { transform: rotateY(90deg) translateZ(70px); }
  .box-face-left { transform: rotateY(-90deg) translateZ(70px); }
  .box-face-top { transform: rotateX(90deg) translateZ(70px); }
  .box-face-bottom { transform: rotateX(-90deg) translateZ(70px); }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .preview-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .stat-value {
    font-size: 36px;
  }
}
