/* ==========================================================================
   Tushog.pro Modern Design System
   ========================================================================== */

:root {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #2d3748;
  --bg-input: #111827;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.12);
  --border-color: #374151;
  --border-light: #4b5563;
  --coral: #f43f5e;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background Subtle Pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.04) 0%, transparent 45%);
  z-index: 0;
}

.shell {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
  flex: 1;
}

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

a:hover {
  color: var(--text-main);
}

/* Header & Top Navigation */
.topbar {
  height: 80px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), #047857);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

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

.topnav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.topnav a:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.topnav .nav-cta {
  padding: 8px 18px;
  background: var(--accent);
  color: #042f2e;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.topnav .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

.topnav form {
  margin: 0;
}

.link-button {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.link-button:hover {
  color: var(--coral);
  background-color: rgba(244, 63, 94, 0.1);
}

/* Flash Messages */
.flash-container {
  margin-top: 24px;
}

.flash {
  padding: 14px 20px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  animation: fadeIn 0.25s ease-out;
}

.flash.error {
  background-color: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fca5a5;
}

.flash.success {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

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

/* Typography & Headers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 8px;
}

.mono {
  font-family: var(--font-mono);
}

.hero {
  padding: 64px 0 48px;
  max-width: 800px;
}

.hero h1, h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 12px 0 20px;
  font-weight: 700;
}

.hero h1 em, h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 28px;
}

/* Feature Badges Grid */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge-item svg {
  color: var(--accent);
}

/* Order Search Widget */
.search-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  box-shadow: var(--shadow-md);
}

.search-widget label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.search-input-group {
  display: flex;
  gap: 12px;
}

.search-input-group input {
  flex: 1;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input-group input:focus {
  border-color: var(--accent);
}

/* Announcement Box */
.announcement {
  margin: 0 0 56px;
  padding: 28px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.announcement-heading h2 {
  margin: 4px 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.info-grid div {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.info-grid strong {
  color: var(--accent);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 6px;
}

.info-grid p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.announcement-signoff {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.announcement-signoff strong {
  color: var(--text-main);
}

/* Catalog / Product Section */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 0 0 28px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-lg);
}

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.price {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}

.price small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.product-card h3 {
  font-size: 1.45rem;
  margin: 12px 0 8px;
  letter-spacing: -0.02em;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

.stock-status {
  margin-top: auto;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.stock-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.stock-status.out-of-stock {
  color: var(--coral);
}

.stock-status.out-of-stock::before {
  background-color: var(--coral);
  box-shadow: 0 0 8px var(--coral);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  background: var(--accent);
  color: #042f2e;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.button:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.button.small {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-light);
  color: var(--text-main);
}

.button-full {
  width: 100%;
}

/* Order Details & Confirmation Page */
.narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 0;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.back:hover {
  color: var(--text-main);
}

/* Order Flow Timeline Progress */
.progress-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 40px;
  position: relative;
}

.progress-timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
  transform: translateY(-50%);
}

.timeline-step {
  position: relative;
  z-index: 1;
  background: var(--bg-body);
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.step-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-step.active .step-number {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.timeline-step.active .step-label {
  color: var(--accent);
  font-weight: 600;
}

.timeline-step.completed .step-number {
  border-color: var(--accent);
  background: var(--accent);
  color: #042f2e;
}

/* Confirmation Box */
.confirmation-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.confirmation-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.confirmation-heading strong {
  font-size: 1.4rem;
  flex: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-payment_failed, .status-expired, .status-stock_error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--coral);
  border-color: rgba(244, 63, 94, 0.3);
}

.order-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
  margin: 28px 0;
}

.order-details div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.order-details span {
  color: var(--text-muted);
}

.order-details strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Data Box & Delivery Preview */
.delivery-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.delivery-ready {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.data-preview {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  margin-bottom: 20px;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Account Page Dashboard */
.account-head {
  padding: 48px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

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

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

.stat-card strong {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-top: 6px;
}

.admin-section {
  margin-bottom: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.admin-table {
  width: 100%;
  margin-top: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row div:first-child span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

/* Forms */
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-panel label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-panel input, .form-panel select, .form-panel textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus {
  border-color: var(--accent);
}

.password-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
}

.password-form input {
  flex: 1;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 6vw;
  background: var(--bg-surface);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .order-details {
    grid-template-columns: 1fr;
  }
  .admin-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .password-form {
    flex-direction: column;
  }
  .topbar {
    padding: 0 4vw;
  }
  .shell {
    padding: 0 4vw 60px;
  }
  .hero h1, h1 {
    font-size: 2.6rem;
  }
  .progress-timeline {
    font-size: 0.7rem;
  }
}