:root {
  --ink: #14202b;
  --ink-soft: #5b6b7b;
  --bg: #f7f9fb;
  --card: #ffffff;
  --line: #e3e9ef;
  --brand: #0e7a5f;
  --brand-dark: #0a5c48;
  --brand-soft: #e6f4ef;
  --gold: #c9a227;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 32, 43, 0.08), 0 8px 24px rgba(20, 32, 43, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.container.wide { max-width: 1280px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.price { color: var(--brand-dark); }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 700;
}
.brand-name { font-size: 1.2rem; }
.brand-tag { font-size: 0.75rem; color: var(--ink-soft); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-size: 0.92rem; font-weight: 500; }
.nav a:hover { color: var(--brand); }
.lang-toggle {
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* Hero */
.hero {
  background: linear-gradient(160deg, #0e2a22 0%, #0e7a5f 90%);
  color: #fff;
  padding: 84px 0 72px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin: 0 0 14px; }
.hero-sub { max-width: 640px; margin: 0 auto 28px; font-size: 1.1rem; opacity: 0.92; }
.hero-points { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-points span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px; padding: 7px 16px; font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer;
  border-radius: 10px; padding: 11px 22px;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; margin-top: 16px; }
.btn-ghost {
  background: transparent; color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-ghost:hover { background: var(--brand-soft); }

/* Sections & cards */
.section { padding: 64px 0; }
.section.alt { background: #eef3f0; }
.section h2 { font-size: 1.7rem; margin-top: 0; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid3 .card { margin-bottom: 0; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 10px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.tab.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

/* Dropzone */
.dropzone {
  display: block; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 36px 20px; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dz-icon { font-size: 2rem; }
.dz-hint { font-weight: 600; margin-top: 6px; }
.dz-types { font-size: 0.85rem; margin-top: 4px; }
.dz-filename { margin-top: 10px; font-weight: 700; color: var(--brand-dark); }

textarea, input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: var(--card);
}
textarea:focus, input:focus { outline: none; border-color: var(--brand); }

.error {
  background: #fdecea; color: var(--danger);
  border-radius: 10px; padding: 10px 14px; margin-top: 14px; font-size: 0.92rem;
}

/* Quote result */
.stats { display: flex; gap: 16px; margin-bottom: 22px; }
.stat {
  flex: 1; text-align: center; background: var(--brand-soft);
  border-radius: var(--radius); padding: 18px;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--brand-dark); }
.stat-label { color: var(--ink-soft); font-size: 0.85rem; }

.field { margin-bottom: 22px; }
.field > label { display: block; font-weight: 700; margin-bottom: 10px; }

.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; padding: 11px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--bg);
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.seg-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tier-card {
  text-align: center; padding: 16px 12px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--card); cursor: pointer; font-family: inherit;
  transition: border-color 0.15s ease;
}
.tier-card:hover { border-color: #9fc9bc; }
.tier-card.active { border-color: var(--brand); background: var(--brand-soft); }
.tier-name { font-weight: 700; font-size: 1.05rem; }
.tier-time { color: var(--ink-soft); font-size: 0.82rem; margin: 2px 0 8px; }
.tier-rate { font-size: 0.85rem; color: var(--ink-soft); }
.tier-rate b { color: var(--ink); font-size: 1rem; }
.tier-total { margin-top: 8px; font-weight: 700; color: var(--brand-dark); }

.total-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 16px 22px;
  font-size: 1.1rem; font-weight: 700; margin-bottom: 26px;
}
.total-amount { font-size: 1.5rem; }

.order-form { display: grid; gap: 12px; }

/* Vision */
.vision { text-align: center; }
.vision-sub { font-weight: 700; color: var(--brand-dark); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0; text-align: center;
  color: var(--ink-soft); font-size: 0.85rem;
}

/* Order page */
.order-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.order-ref { margin: 2px 0 18px; font-size: 1.6rem; }
.status-pill {
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  background: var(--brand-soft); color: var(--brand-dark);
  white-space: nowrap;
}
.status-delivered { background: #e8f8e8; color: #1e7d32; }
.order-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 30px;
}
.order-grid > div { display: grid; gap: 2px; }
.order-grid .muted { font-size: 0.8rem; }

.timeline { display: flex; margin: 10px 0 26px; }
.tl-step { flex: 1; text-align: center; position: relative; }
.tl-step::before {
  content: ""; position: absolute; top: 9px; inset-inline-start: -50%;
  width: 100%; height: 3px; background: var(--line);
}
.tl-step:first-child::before { display: none; }
.tl-step.done::before { background: var(--brand); }
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--line); margin: 0 auto 8px; position: relative; z-index: 1;
  border: 3px solid var(--bg);
}
.tl-step.done .tl-dot { background: var(--brand); }
.tl-label { font-size: 0.8rem; line-height: 1.4; }

/* Office */
.table-card { padding: 0; overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.orders-table th, .orders-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.orders-table th { background: var(--bg); font-size: 0.78rem; text-transform: uppercase; color: var(--ink-soft); }
.orders-table tr:last-child td { border-bottom: none; }
.status-form select {
  padding: 6px 10px; border-radius: 8px; border: 1.5px solid var(--line);
  font-family: inherit; background: var(--card); cursor: pointer;
}
.note-card { background: #fdf8e7; border-color: #ecdc9e; }

/* Workbench */
.wb-section { padding-top: 34px; }
.badge {
  background: var(--gold); color: #fff; border-radius: 6px;
  font-size: 0.65rem; padding: 3px 8px; vertical-align: middle; letter-spacing: 1px;
}
.wb-header { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: start; }
.wb-header h1 { margin: 0 0 6px; font-size: 1.5rem; }
.wb-stats { display: flex; gap: 12px; }
.wb-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 18px; text-align: center; min-width: 90px;
}
.wb-stat-v { font-weight: 700; font-size: 1.2rem; color: var(--brand-dark); }
.wb-stat-l { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; }
.wb-progressbar {
  height: 8px; border-radius: 999px; background: var(--line);
  margin: 18px 0 26px; overflow: hidden;
}
.wb-bar { height: 100%; width: 0; background: var(--brand); transition: width 0.3s ease; }

.wb-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .wb-layout { grid-template-columns: 1fr; } }
.wb-side .card { padding: 18px; }
.wb-side h3 { margin-top: 0; font-size: 1rem; }

.wb-seg {
  background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  cursor: pointer; transition: border-color 0.15s ease;
}
.wb-seg.active { border-color: var(--brand); box-shadow: var(--shadow); }
.wb-seg.approved { opacity: 0.75; border-color: #bfe3d5; background: #f4faf7; }
.wb-src {
  font-size: 0.92rem; color: var(--ink-soft);
  padding-bottom: 10px; border-bottom: 1px dashed var(--line); margin-bottom: 12px;
  text-align: left;
}
.wb-final { font-weight: 600; color: var(--brand-dark); }

.wb-opt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.wb-opt:hover { border-color: #9fc9bc; }
.wb-opt.chosen { border-color: var(--brand); background: var(--brand-soft); }
.wb-opt.warned { border-style: dashed; }
.opt-key {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 6px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
}
.wb-opt.chosen .opt-key { background: var(--brand); }
.opt-text { flex: 1; min-width: 200px; }
.opt-badges { display: flex; gap: 6px; }
.conf, .term-ok {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft);
  white-space: nowrap;
}
.term-ok { background: var(--brand-soft); color: var(--brand-dark); border-color: #bfe3d5; }
.opt-warn { width: 100%; font-size: 0.78rem; color: #9a6c00; }
.wb-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

.term-table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.term-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.term-table td:first-child { color: var(--ink-soft); direction: ltr; text-align: left; }
.kbd-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.kbd-list li { margin-bottom: 8px; }
kbd {
  background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 2px 7px; font-size: 0.78rem; font-family: inherit;
}
.wb-why { background: var(--brand-soft); border-color: #bfe3d5; }
.wb-done { text-align: center; padding: 40px; }

/* Modal & stamp */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 32, 27, 0.6);
  display: grid; place-items: center; padding: 20px;
}
.modal-box {
  background: var(--card); border-radius: var(--radius);
  padding: 40px; max-width: 460px; text-align: center; box-shadow: var(--shadow);
}
.stamp-visual { display: grid; place-items: center; margin-bottom: 18px; }
.stamp-ring {
  width: 190px; height: 190px; border-radius: 50%;
  border: 4px double #1b4ea3; color: #1b4ea3;
  display: grid; place-items: center; align-content: center; gap: 6px;
  font-weight: 700; font-size: 0.85rem; padding: 18px; text-align: center;
  transform: rotate(-8deg);
  opacity: 0.85;
}
.stamp-en { font-size: 0.65rem; letter-spacing: 2px; }
.stamp-lic { font-size: 0.7rem; }

@media (max-width: 700px) {
  .header-inner { flex-direction: column; height: auto; padding: 10px 0; gap: 8px; }
  .hero { padding: 56px 0 48px; }
  .stats { flex-direction: column; }
  .timeline { flex-wrap: wrap; gap: 12px 0; }
  .tl-step { flex-basis: 33%; }
}
