/* MFZ Studio Fuel Dongle - Light Modern Theme */
:root {
  --bg: #f8f9fb;
  --bg2: #f0f2f6;
  --surface: #ffffff;
  --surface2: #fafbfc;
  --text: #111318;
  --text2: #2e333a;
  --muted: #5a5f68;
  --muted2: #788088;
  --border: #dbdee2;
  --border2: #c8ccd2;
  --orange: #d45305;
  --orange2: #e8650a;
  --orange-light: #fff5ed;
  --orange-glow: rgba(212,83,5,.14);
  --yellow: #ca8a04;
  --green: #15803d;
  --green-light: #f0fdf4;
  --red: #ef4444;
  --red-light: #fef2f2;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 200;
  background: linear-gradient(90deg, #e8650a, #eab308, #16a34a, #eab308, #e8650a);
}

a { color: var(--orange); text-decoration: none; transition: color .12s; }
a:hover { color: #d45305; }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container { width: min(1100px, 94vw); margin: 0 auto; padding: 0 4px; }
.page-head { padding: 20px 0; }

/* Header */
.topbar {
  position: sticky; top: 4px; z-index: 100;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; min-height: 50px;
}
.brand {
  display: flex; align-items: center; gap: 8px; color: var(--text);
  font-weight: 700; font-size: 14px; min-width: 0;
}
.brand:hover { color: var(--text); }
.logo {
  width: 34px; height: 34px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #1a1d26; color: var(--orange); font-weight: 900; font-size: 14px;
  flex-shrink: 0; box-shadow: 0 2px 8px var(--orange-glow);
}
.brand small { display: block; color: var(--muted); font-size: 10px; }
.brand strong { display: block; line-height: 1.2; }
.nav-main-center { position: absolute; left: 50%; transform: translateX(-50%); }
.navlinks { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; border: none; cursor: pointer;
  transition: all .12s; line-height: 1.3; white-space: nowrap;
}
.btn-primary, .btn.primary { background: var(--orange); color: #fff; box-shadow: 0 2px 10px var(--orange-glow); }
.btn-primary:hover, .btn.primary:hover { background: #d45305; color: #fff; transform: translateY(-1px); }
.btn-gold { background: #1a1d26; color: #fff; }
.btn-gold:hover { background: #2a2e38; color: #fff; }
.btn-soft { background: var(--surface); color: var(--text2); border: 1px solid var(--border2); }
.btn-soft:hover { border-color: var(--orange); color: var(--orange); }
.btn-wa { background: var(--green-light); color: #065f46; border: 1px solid #bbf7d0; }
.btn-wa:hover { background: #d1fae5; }
.btn-dark { background: #1a1d26; color: #fff; }
.btn-dark:hover { background: #2a2e38; }
.btn-main {
  background: #1a1d26; color: #fff; box-shadow: var(--shadow);
}
.btn-main:hover { background: #2a2e38; transform: translateY(-1px); }
.btn-pos { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.btn-pos:hover { background: #fde68a; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* Flash */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: 13px; font-weight: 500; border-left: 3px solid; }
.flash.success { background: var(--green-light); color: #065f46; border-color: var(--green); }
.flash.error { background: var(--red-light); color: #991b1b; border-color: var(--red); }
.flash.info { background: var(--orange-light); color: #9a3412; border-color: var(--orange); }

/* Hero */
.hero { padding: 24px 0; }
.hero-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.hero h1 {
  font-size: clamp(26px, 4vw, 38px); font-weight: 800;
  line-height: 1.1; letter-spacing: -.02em; margin: 8px 0 12px; color: var(--text);
}
.hero p { color: var(--text2); font-size: 14px; max-width: 600px; line-height: 1.55; }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  background: var(--orange-light); color: var(--orange);
}
.badge-light { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.price-pill {
  background: var(--orange-light); border: 2px solid var(--orange);
  border-radius: var(--radius-lg); padding: 20px 24px; text-align: center; min-width: 140px;
}
.price-pill span { display: block; font-size: 11px; color: #9a3412; font-weight: 600; text-transform: uppercase; }
.price-pill strong { display: block; font-size: 36px; font-weight: 800; color: var(--orange); line-height: 1; margin: 4px 0; }
.price-pill p { font-size: 11px; color: #9a3412; margin-top: 4px; }

/* Sections */
.section { padding: 18px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 20px; font-weight: 700; margin: 0; }
.section-title p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Benefit */
.benefit-card { text-align: center; }
.benefit-card .icon {
  width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--orange-light);
}
.benefit-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.benefit-card p { font-size: 12px; color: var(--muted); }

/* Price */
.price-card { text-align: center; }
.price-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.price-card .price { font-size: 28px; font-weight: 800; color: var(--orange); }
.price-card p { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Video */
.video-card { text-align: center; }
.video-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.video-card p { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* Forms */
.form-wrap { max-width: 720px; margin: 0 auto; }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); margin-top: 16px;
}
.form-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); color: var(--text);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted2); }
.field small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.field textarea { min-height: 80px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hidden { display: none !important; }

.check {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text2); margin: 8px 0; cursor: pointer;
}
.check input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--orange); }

/* Summary */
.summary-box { background: var(--bg2); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.summary-line { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.summary-total { border-top: 2px solid var(--border2); padding-top: 10px; margin-top: 6px; font-size: 16px; font-weight: 700; }

/* Steps */
.steps { text-align: center; }
.step { padding: 12px; }
.step strong { display: block; font-size: 14px; margin-bottom: 4px; }
.step .muted { font-size: 12px; }

/* Notice */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; margin: 12px 0; background: var(--orange-light); border: 1px solid rgba(232,101,10,.15); color: #9a3412; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice.danger { background: var(--red-light); border-color: #fecaca; color: #991b1b; }
.notice.compact { padding: 8px 12px; font-size: 12px; }

/* Invoice */
.invoice { max-width: 800px; margin: 0 auto; }
.invoice-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.invoice-header h1 { font-size: 28px; font-weight: 800; margin: 0; }
.invoice-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.invoice-table th { text-align: left; padding: 10px 12px; background: var(--bg2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--border2); }
.invoice-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.invoice-table tfoot th, .invoice-table tfoot td { border-top: 2px solid var(--text); font-weight: 700; }

/* Tracking */
.tracking-card { background: var(--orange-light); border: 1px solid rgba(232,101,10,.15); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.tracking-label { display: block; font-size: 10px; text-transform: uppercase; font-weight: 700; color: var(--orange); letter-spacing: .04em; }
.tracking-number { display: block; font-size: 20px; font-weight: 800; color: var(--text); margin: 4px 0 8px; font-family: monospace; }

/* Mini Hero */
.mini-hero { padding: 20px 0; text-align: center; }
.mini-hero h1 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; margin-bottom: 8px; }
.mini-hero p { color: var(--muted); font-size: 14px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--orange); line-height: 1; }
.stat-card .stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 16px 0; margin-top: 32px; font-size: 12px; color: var(--muted); text-align: center; }
.footer-admin-link { font-size: 11px; opacity: .5; }
.footer-admin-link:hover { opacity: 1; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }
.mobile-toolbar { display: none; align-items: center; gap: 10px; margin-bottom: 14px; }
.mobile-toolbar h1 { margin: 0; font-size: 18px; }
.side-toggle { display: none; background: none; border: 1px solid var(--border2); border-radius: var(--radius-sm); font-size: 20px; cursor: pointer; color: var(--text); padding: 4px 8px; line-height: 1; }
.sidebar-open .admin-side { display: flex !important; }
.admin-side {
  width: 220px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 14px 0; position: sticky; top: 4px; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 8px; padding: 4px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.side-brand .logo { width: 30px; height: 30px; border-radius: 5px; display: flex; align-items: center; justify-content: center; background: #1a1d26; color: var(--orange); font-weight: 900; font-size: 12px; flex-shrink: 0; }
.side-brand strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; }
.side-brand small { display: block; font-size: 10px; color: var(--muted); }
.admin-side h2 { font-size: 15px; font-weight: 700; padding: 0 12px; margin-bottom: 2px; }
.admin-side .muted { font-size: 11px; padding: 0 12px; margin-bottom: 12px; }
.side-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 12px; font-weight: 500;
  color: var(--text2); transition: all .1s; border-left: 3px solid transparent;
}
.side-link:hover, .side-link.active { background: var(--orange-light); color: var(--orange); border-left-color: var(--orange); }
.admin-main { flex: 1; padding: 20px 24px; min-width: 0; }
.admin-main > h1 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }

/* Settings */
.settings-grid { display: grid; gap: 16px; }
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.settings-section h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.module-toggle {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .12s;
}
.module-toggle:hover { border-color: var(--orange); background: var(--orange-light); }
.module-toggle input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--orange); }
.module-toggle strong { display: block; font-size: 12px; }
.module-toggle small { display: block; font-size: 10px; color: var(--muted); }

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 12px; background: var(--bg2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--border2); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg2); }

/* Status */
.status { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status.ok { background: var(--green-light); color: #065f46; }
.status.warn { background: var(--orange-light); color: #9a3412; }
.status.danger { background: var(--red-light); color: #991b1b; }
.status.neutral { background: var(--bg2); color: var(--text2); }

.toolbar { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.4); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 500px; width: 100%; box-shadow: var(--shadow-md); }
.modal-box img { border-radius: var(--radius-sm); max-height: 400px; object-fit: cover; width: 100%; }
.modal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }

/* Progress bars */
.progress-wrap { height: 8px; background: var(--bg2); border-radius: 4px; margin: 4px 0 10px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--orange2)); transition: width .3s; min-width: 2px; }

/* Table wrapper */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Order detail */
.order-detail { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.detail-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.detail-row strong { color: var(--text); }
.detail-row span { color: var(--text2); text-align: right; }

/* Print */
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  html, body { background: #fff !important; color: #111 !important; font-size: 11px !important; }
  .topbar, .navlinks, .print-actions, .btn, .no-print, .footer { display: none !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .invoice { box-shadow: none !important; border: 0 !important; }
  .invoice-table th, .invoice-table td { border-color: #ccc !important; }
  .invoice-table th { background: #f5f5f5 !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav-main-center { display: none; }
  .order-detail { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-side { display: none; width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); max-height: 50vh; flex-direction: column; }
  .mobile-toolbar { display: flex; }
  .side-toggle { display: inline-block; }
}
@media (max-width: 640px) {
  body { font-size: 13px; }
  .container { width: 96vw; }
  .hero-card { padding: 20px; }
  .hero h1 { font-size: 24px; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .navlinks { gap: 4px; }
  .btn { padding: 7px 12px; font-size: 11px; }
  .invoice-header { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
