/* ============================================================
   main.css - CutPlat Pro
   Modern clean industrial — Plus Jakarta Sans
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --c-bg:         #FAFAFA;
  --c-surface:    #FFFFFF;
  --c-border:     #E5E7EB;
  --c-border-mid: #D1D5DB;
  --c-text:       #111827;
  --c-text-2:     #374151;
  --c-text-3:     #6B7280;
  --c-text-4:     #9CA3AF;
  --c-accent:     #F97316;
  --c-accent-h:   #EA6A00;
  --c-accent-l:   #FFF7ED;
  --c-dark:       #0F0F0F;
  --c-success:    #22C55E;
  --c-warn:       #F59E0B;
  --c-error:      #EF4444;
  --c-info:       #3B82F6;

  /* Type scale */
  --f-xs:   0.75rem;
  --f-sm:   0.8125rem;
  --f-base: 0.9375rem;
  --f-md:   1.0625rem;
  --f-lg:   1.25rem;
  --f-xl:   1.5rem;
  --f-2xl:  2rem;
  --f-3xl:  2.75rem;
  --f-4xl:  3.75rem;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 9999px;

  /* Shadow */
  --sh-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh-md: 0 4px 16px rgba(0,0,0,.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,.10);
  --sh-accent: 0 4px 16px rgba(249,115,22,.28);

  /* Transition */
  --t: .18s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--f-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--sp-6); }
.container-sm { max-width: 760px; }
.container-lg { max-width: 1280px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--t);
}
.navbar.scrolled { box-shadow: var(--sh-md); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: 1140px; margin: 0 auto; padding: 0 var(--sp-6);
}
.nav-brand {
  display: flex; align-items: center; gap: var(--sp-2);
  font-weight: 700; font-size: var(--f-md); color: var(--c-text);
}
.nav-brand svg { flex-shrink: 0; }
.nav-links {
  display: flex; align-items: center; gap: var(--sp-1);
}
.nav-link {
  padding: 6px 14px; border-radius: var(--r-full);
  font-size: var(--f-sm); font-weight: 500; color: var(--c-text-2);
  transition: background var(--t), color var(--t);
}
.nav-link:hover, .nav-link.active {
  background: var(--c-border); color: var(--c-text);
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--c-text); padding: var(--sp-2); border-radius: var(--r-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; border-radius: var(--r-full); cursor: pointer;
  border: none; transition: all var(--t); white-space: nowrap;
  text-decoration: none; line-height: 1;
}
.btn-lg { padding: 16px 32px; font-size: var(--f-md); }
.btn-md { padding: 12px 24px; font-size: var(--f-base); }
.btn-sm { padding: 8px 18px; font-size: var(--f-sm); }
.btn-xs { padding: 6px 14px; font-size: var(--f-xs); }

.btn-primary {
  background: var(--c-accent); color: #fff;
  box-shadow: var(--sh-accent);
}
.btn-primary:hover { background: var(--c-accent-h); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-dark { background: var(--c-dark); color: #fff; }
.btn-dark:hover { background: #222; }

.btn-ghost {
  background: transparent; color: var(--c-text-2);
  border: 1.5px solid var(--c-border-mid);
}
.btn-ghost:hover { background: var(--c-border); color: var(--c-text); }

.btn-wa {
  background: #22C55E; color: #fff;
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
}
.btn-wa:hover { background: #16A34A; }

.btn-danger { background: var(--c-error); color: #fff; }
.btn-danger:hover { background: #DC2626; }

.btn-success { background: var(--c-success); color: #fff; }
.btn-info { background: var(--c-info); color: #fff; }

.btn:disabled { opacity: .5; pointer-events: none; }
.btn-icon { padding: 8px; border-radius: var(--r-sm); }

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface); border-radius: var(--r-lg);
  border: 1px solid var(--c-border); box-shadow: var(--sh-sm);
  overflow: hidden;
}
.card-body { padding: var(--sp-6); }
.card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.card-title { font-size: var(--f-md); font-weight: 700; }
.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
}

/* ---------- Form Controls ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: var(--f-sm); font-weight: 600; color: var(--c-text-2);
}
.form-label .required { color: var(--c-error); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--c-border-mid);
  border-radius: var(--r-md); background: var(--c-surface);
  color: var(--c-text); font-size: var(--f-base);
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none; -webkit-appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
.form-control.is-invalid {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.form-hint { font-size: var(--f-xs); color: var(--c-text-3); margin-top: 4px; }
.form-error { font-size: var(--f-xs); color: var(--c-error); margin-top: 4px; display: none; }
.form-control.is-invalid + .form-error,
.form-error.show { display: block; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; gap: var(--sp-4); }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.toggle-group { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.toggle-btn {
  padding: 8px 16px; border: 1.5px solid var(--c-border-mid);
  border-radius: var(--r-full); font-size: var(--f-sm); font-weight: 500;
  cursor: pointer; background: var(--c-surface); color: var(--c-text-2);
  transition: all var(--t);
}
.toggle-btn.active, .toggle-btn:hover {
  border-color: var(--c-accent); color: var(--c-accent);
  background: var(--c-accent-l);
}

/* ---------- Upload Zone ---------- */
.upload-zone {
  border: 2px dashed var(--c-border-mid); border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-6); text-align: center;
  cursor: pointer; transition: all var(--t); background: var(--c-bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--c-accent); background: var(--c-accent-l);
}
.upload-icon { color: var(--c-text-4); margin: 0 auto var(--sp-3); }
.upload-text { font-size: var(--f-base); color: var(--c-text-2); font-weight: 500; }
.upload-hint { font-size: var(--f-xs); color: var(--c-text-3); margin-top: var(--sp-1); }
.upload-preview { margin-top: var(--sp-4); }
.file-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 14px; background: var(--c-bg);
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  margin-top: var(--sp-2);
}
.file-item-name { flex: 1; font-size: var(--f-sm); color: var(--c-text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { font-size: var(--f-xs); color: var(--c-text-3); flex-shrink: 0; }
.file-remove { background: none; border: none; cursor: pointer; color: var(--c-text-3); padding: 4px; border-radius: var(--r-sm); transition: color var(--t); flex-shrink: 0; }
.file-remove:hover { color: var(--c-error); }

/* ---------- Table ---------- */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 14px;
  font-size: var(--f-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-text-3); background: var(--c-bg); border-bottom: 1px solid var(--c-border);
}
td {
  padding: 12px 14px; font-size: var(--f-sm);
  border-bottom: 1px solid var(--c-border); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--c-bg); }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Status Badge ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: var(--f-xs); font-weight: 700; white-space: nowrap;
}

/* ---------- Alert / Toast ---------- */
.alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md);
  font-size: var(--f-sm); line-height: 1.5; margin-bottom: var(--sp-4);
  border-left: 4px solid transparent;
}
.alert-error   { background: #FEF2F2; border-color: var(--c-error);   color: #7F1D1D; }
.alert-warn    { background: #FFFBEB; border-color: var(--c-warn);    color: #78350F; }
.alert-success { background: #F0FDF4; border-color: var(--c-success); color: #14532D; }
.alert-info    { background: #EFF6FF; border-color: var(--c-info);    color: #1E3A5F; }
.alert-close { background: none; border: none; cursor: pointer; margin-left: auto; opacity: .6; flex-shrink: 0; font-size: 18px; line-height: 1; color: inherit; }
.alert-close:hover { opacity: 1; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--c-surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-lg); width: 100%; max-width: 480px;
  transform: translateY(20px); transition: transform var(--t);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: var(--f-md); font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--c-text-3); padding: 6px; border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.modal-close:hover { background: var(--c-border); color: var(--c-text); }
.modal-body { padding: var(--sp-6); }
.modal-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: var(--sp-3);
}

/* ---------- Summary Card ---------- */
.summary-card {
  background: var(--c-dark); color: #fff;
  border-radius: var(--r-xl); padding: var(--sp-6);
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: var(--f-sm);
}
.summary-row:last-child { border-bottom: none; }
.summary-row-label { color: rgba(255,255,255,.6); }
.summary-row-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-total {
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 2px solid rgba(255,255,255,.15);
  display: flex; justify-content: space-between; align-items: center;
}
.summary-total-label { font-size: var(--f-base); font-weight: 600; color: rgba(255,255,255,.8); }
.summary-total-value { font-size: var(--f-xl); font-weight: 800; color: var(--c-accent); }

/* ---------- Hero (Beranda) ---------- */
.hero {
  padding: var(--sp-24) 0 var(--sp-16);
  background: linear-gradient(160deg, #0F0F0F 0%, #1A1A1A 60%, #2D1810 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 0%, rgba(249,115,22,.18) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.3);
  color: var(--c-accent); border-radius: var(--r-full);
  padding: 6px 14px; font-size: var(--f-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-5);
}
.hero-title {
  font-size: clamp(var(--f-2xl), 5vw, var(--f-4xl));
  font-weight: 800; line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: var(--sp-5);
}
.hero-title span { color: var(--c-accent); }
.hero-sub {
  font-size: var(--f-lg); color: rgba(255,255,255,.65);
  max-width: 600px; line-height: 1.7; margin-bottom: var(--sp-8);
}
.hero-cta { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: var(--sp-8); margin-top: var(--sp-12);
  padding-top: var(--sp-8); border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.hero-stat-num { font-size: var(--f-2xl); font-weight: 800; color: var(--c-accent); line-height: 1; }
.hero-stat-label { font-size: var(--f-sm); color: rgba(255,255,255,.5); margin-top: 4px; }

/* ---------- Section ---------- */
.section { padding: var(--sp-16) 0; }
.section-sm { padding: var(--sp-10) 0; }
.section-alt { background: var(--c-bg); }
.section-dark { background: var(--c-dark); color: #fff; }
.section-header { text-align: center; margin-bottom: var(--sp-12); }
.section-label {
  display: inline-block; font-size: var(--f-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--c-accent);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-size: clamp(var(--f-xl), 3vw, var(--f-3xl));
  font-weight: 800; letter-spacing: -.02em; margin-bottom: var(--sp-4);
}
.section-sub {
  font-size: var(--f-md); color: var(--c-text-3); max-width: 560px; margin: 0 auto;
}

/* ---------- Feature Grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.feature-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); padding: var(--sp-6);
  box-shadow: var(--sh-sm); transition: transform var(--t), box-shadow var(--t);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--c-accent-l); display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4); color: var(--c-accent);
}
.feature-title { font-size: var(--f-md); font-weight: 700; margin-bottom: var(--sp-2); }
.feature-desc { font-size: var(--f-sm); color: var(--c-text-3); line-height: 1.7; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); position: relative; }
.steps::before {
  content: ''; position: absolute; top: 24px; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-warn));
  z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--f-md); font-weight: 800; margin: 0 auto var(--sp-4);
  box-shadow: var(--sh-accent);
}
.step-title { font-size: var(--f-sm); font-weight: 700; margin-bottom: var(--sp-2); }
.step-desc { font-size: var(--f-xs); color: var(--c-text-3); }

/* ---------- Page Header ---------- */
.page-header {
  background: var(--c-dark); color: #fff;
  padding: var(--sp-12) 0 var(--sp-8);
}
.page-header-label {
  font-size: var(--f-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-accent); margin-bottom: var(--sp-2);
}
.page-header-title {
  font-size: clamp(var(--f-xl), 3vw, var(--f-2xl));
  font-weight: 800; letter-spacing: -.02em;
}
.page-header-sub { color: rgba(255,255,255,.55); font-size: var(--f-base); margin-top: var(--sp-2); }

/* ---------- Items Table (Kalkulator) ---------- */
.items-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.items-table { min-width: 600px; width: 100%; border-collapse: collapse; }
.items-table th {
  padding: 10px 12px; font-size: var(--f-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-3);
  background: var(--c-bg); border-bottom: 1px solid var(--c-border); white-space: nowrap;
}
.items-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--c-border);
  font-size: var(--f-sm); vertical-align: middle;
}
.items-table tr:last-child td { border-bottom: none; }
.items-table input[type="number"] {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--c-border-mid);
  border-radius: var(--r-sm); background: var(--c-surface);
  font-size: var(--f-sm); font-family: inherit;
  transition: border-color var(--t);
  -moz-appearance: textfield;
}
.items-table input[type="number"]::-webkit-outer-spin-button,
.items-table input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.items-table input[type="number"]:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.items-table .area-cell {
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c-text-2);
  white-space: nowrap; text-align: right;
}
.items-table .row-num { color: var(--c-text-4); font-size: var(--f-xs); font-weight: 600; }

/* ---------- Mode Toggle ---------- */
.mode-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-full); padding: 4px;
  width: fit-content;
}
.mode-btn {
  padding: 7px 20px; border-radius: var(--r-full); font-size: var(--f-sm);
  font-weight: 600; cursor: pointer; background: none; border: none;
  color: var(--c-text-3); transition: all var(--t);
}
.mode-btn.active {
  background: var(--c-surface); color: var(--c-text);
  box-shadow: var(--sh-sm);
}

/* ---------- Print Layout ---------- */
@media print {
  .navbar, .footer, .btn, .mode-bar, .upload-zone,
  .no-print, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .print-header { display: flex !important; }
  .summary-card { background: #f5f5f5 !important; color: #000 !important; border: 1px solid #ccc; }
  .summary-row-label { color: #555 !important; }
  .summary-total-value { color: var(--c-accent) !important; }
  .page-header { background: #f5f5f5 !important; color: #000 !important; }
}
.print-header { display: none; align-items: center; gap: 12px; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--c-dark); color: rgba(255,255,255,.7);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-10); margin-bottom: var(--sp-10); }
.footer-desc { font-size: var(--f-sm); color: rgba(255,255,255,.45); max-width: 300px; line-height: 1.7; margin-top: var(--sp-3); }
.footer-heading { font-size: var(--f-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); margin-bottom: var(--sp-4); }
.footer-list li + li { margin-top: var(--sp-2); }
.footer-list a { font-size: var(--f-sm); color: rgba(255,255,255,.6); transition: color var(--t); }
.footer-list a:hover { color: var(--c-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: var(--sp-6); }
.disclaimer { font-size: var(--f-xs); color: rgba(255,255,255,.3); max-width: 600px; line-height: 1.6; margin-bottom: var(--sp-3); }
.copyright { font-size: var(--f-xs); color: rgba(255,255,255,.3); }

/* ---------- Utility ---------- */
.text-muted  { color: var(--c-text-3); }
.text-accent { color: var(--c-accent); }
.text-sm     { font-size: var(--f-sm); }
.text-xs     { font-size: var(--f-xs); }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'SF Mono', 'Fira Code', monospace; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.d-flex { display: flex; } .gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ---------- Spinner ---------- */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,.1); border-top-color: var(--c-accent);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast Notification ---------- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--c-dark); color: #fff;
  padding: 12px 18px; border-radius: var(--r-lg);
  font-size: var(--f-sm); font-weight: 500;
  box-shadow: var(--sh-lg); pointer-events: all;
  border-left: 4px solid var(--c-accent);
  animation: toast-in .25s ease; max-width: 300px;
}
.toast.success { border-color: var(--c-success); }
.toast.error   { border-color: var(--c-error); }
.toast.warn    { border-color: var(--c-warn); }
@keyframes toast-in { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform: none; } }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center; padding: var(--sp-16) var(--sp-6);
  color: var(--c-text-3);
}
.empty-state svg { margin: 0 auto var(--sp-4); opacity: .4; }
.empty-state-title { font-size: var(--f-lg); font-weight: 700; color: var(--c-text-2); margin-bottom: var(--sp-2); }
.empty-state-desc { font-size: var(--f-sm); max-width: 340px; margin: 0 auto; }

/* ---------- Kalkulator Page ---------- */
.calc-layout { display: grid; grid-template-columns: 1fr 360px; gap: var(--sp-6); align-items: start; }
.calc-sticky { position: sticky; top: 80px; }

/* ---------- Riwayat ---------- */
.history-grid { display: grid; gap: var(--sp-4); }
.history-item {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--sh-sm); transition: box-shadow var(--t);
  cursor: pointer;
}
.history-item:hover { box-shadow: var(--sh-md); }
.history-meta { font-size: var(--f-xs); color: var(--c-text-4); margin-top: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-sticky { position: static; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
}
@media (max-width: 768px) {
  :root { --f-base: 0.9rem; }
  .container { padding: 0 var(--sp-4); }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: rgba(255,255,255,.98); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column; padding: var(--sp-4);
    gap: var(--sp-1);
  }
  .nav-links.open { display: flex; }
  .nav-link { border-radius: var(--r-md); padding: 10px 16px; width: 100%; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .hero { padding: var(--sp-16) 0 var(--sp-12); }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: var(--sp-6); }
  .modal { max-width: 100%; margin: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .hero-title { font-size: var(--f-2xl); }
  .section { padding: var(--sp-12) 0; }
}
