:root {
  --green-900: #065A40;
  --green-800: #097654;
  --green-700: #076346;
  --green-500: #097654;
  --green-300: #A8E6CC;
  --blue-900: #0A3769;
  --blue-800: #0E488D;
  --blue-700: #11539F;
  --blue-500: #3C74B5;
  --white: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.58);
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.1);
  --warn: #f2c94c;
  --danger: #ff8a80;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: 'Cairo', system-ui, sans-serif;
  color: var(--white);
  background: linear-gradient(180deg, var(--blue-800) 0%, var(--blue-900) 100%) fixed;
  min-height: 100vh;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--green-300); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5rem; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: .3rem 0 .8rem; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 28px; padding-bottom: 48px; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.note { color: var(--text-soft); font-size: .92rem; }
.center { text-align: center; }

/* Top bar */
.topbar { background: var(--green-800); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; }
.brand { color: var(--white); text-decoration: none; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--green-300); font-size: 1.2rem; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: var(--white); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.nav a.active, .nav a:hover { background: var(--card-strong); }
.nav a.lang { border: 1px solid var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font-family: inherit; font-weight: 700; text-decoration: none; border-radius: 10px; padding: 10px 20px; font-size: 1rem; color: var(--white); transition: transform .08s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-500); box-shadow: 0 6px 18px rgba(9, 118, 84, 0.35); }
.btn-primary:hover { background: #0A8A62; }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-ghost:hover { background: var(--card-strong); }
.btn-link { background: none; color: var(--danger); padding: 4px 8px; font-weight: 600; }
.btn-lg { padding: 14px 28px; font-size: 1.08rem; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Cards & panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel.narrow { max-width: 560px; margin-inline: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--text-soft); margin-bottom: 0; }
.card-link { color: var(--white); text-decoration: none; text-align: center; transition: background .2s, transform .2s; }
.card-link:hover { background: var(--card-strong); transform: translateY(-2px); }
.card-icon { font-size: 2rem; margin-bottom: 6px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--green-500); display: grid; place-items: center; font-weight: 800; margin-bottom: 8px; }
.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); }
.section { margin-top: 40px; }
.section h2 { margin-bottom: 16px; }

.hero { text-align: center; padding: 36px 0 12px; }
.hero h1 { font-size: 2.3rem; }
.hero .lead { font-size: 1.15rem; color: var(--text-soft); max-width: 760px; margin: 8px auto; }
.hero .actions { justify-content: center; }

.chip { display: inline-block; background: var(--card-strong); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: .85rem; margin-bottom: 8px; margin-inline-end: 6px; }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.level-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.level-step span { color: var(--text-soft); font-size: .86rem; }
.level-num { width: 36px; height: 36px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--blue-500); }
.level-1 .level-num { background: #6C8DB8; }
.level-2 .level-num { background: var(--blue-500); }
.level-3 .level-num { background: #12808F; }
.level-4 .level-num { background: var(--green-500); }
.level-5 .level-num { background: #0BA372; }
.levels-compact { margin-bottom: 20px; }
.levels-compact .level-step { padding: 10px; opacity: .55; }
.levels-compact .level-step.passed { opacity: .85; }
.levels-compact .level-step.current { opacity: 1; border-color: var(--green-300); background: var(--card-strong); box-shadow: 0 0 0 2px rgba(168, 230, 204, 0.35); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 6px; }
.form label { font-weight: 600; margin-top: 10px; }
.form small { color: var(--text-muted); }
.form .btn { margin-top: 18px; }
input[type=text], input[type=email], select {
  font-family: inherit; font-size: 1rem; color: var(--white);
  background: rgba(10, 55, 105, 0.65); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px; padding: 11px 14px; width: 100%;
}
select option { background: var(--blue-800); color: var(--white); }
input:focus, select:focus { outline: 2px solid var(--green-300); outline-offset: 1px; }

/* Flash */
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.flash-error { background: rgba(255, 138, 128, 0.15); border: 1px solid rgba(255, 138, 128, 0.5); }
.flash-success { background: rgba(168, 230, 204, 0.15); border: 1px solid rgba(168, 230, 204, 0.5); }
.flash-warn { background: rgba(242, 201, 76, 0.13); border: 1px solid rgba(242, 201, 76, 0.5); }

/* Documents page */
.doc-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.doc-head p { color: var(--text-soft); max-width: 640px; }
.progress-box { min-width: 240px; }
.progress-label { font-weight: 700; margin-bottom: 6px; }
.small-link { display: inline-block; margin-top: 8px; font-weight: 700; }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #12A374, var(--green-300)); border-radius: 999px; }

.axis-block { margin-bottom: 26px; }
.axis-title { padding-inline-start: 12px; border-inline-start: 4px solid var(--green-300); margin-bottom: 12px; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; position: relative; }
.doc-done { border-color: rgba(168, 230, 204, 0.45); background: rgba(9, 118, 84, 0.12); }
.doc .hint { color: var(--text-soft); font-size: .93rem; margin-bottom: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); }
.tag-critical { background: rgba(242, 201, 76, 0.18); border-color: rgba(242, 201, 76, 0.55); }
.tag-ok { background: rgba(168, 230, 204, 0.2); border-color: rgba(168, 230, 204, 0.55); }
.tag-level { background: rgba(60, 116, 181, 0.45); }
.tag-muted { color: var(--text-soft); }
.refs { font-size: .8rem; color: var(--text-muted); margin: 8px 0 0; }

.doc-form { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.file-link { font-weight: 600; word-break: break-all; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chosen { color: var(--green-300); font-size: .9rem; word-break: break-all; }
.questions { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin-top: 5px; accent-color: var(--green-500); flex-shrink: 0; }
.exists-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.exists-choice legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .95rem; }
.radio input { accent-color: var(--green-500); margin: 0; }
.radio:has(input:checked) { background: rgba(9, 118, 84, 0.45); border-color: var(--green-300); }
.hidden { display: none !important; }
.consent { margin-top: 10px; font-size: .9rem; }
.code { direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-all; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: Consolas, monospace; font-size: .88rem; }
.danger-btn { border-color: rgba(235, 87, 87, 0.7) !important; color: #ffb4b4 !important; }

/* Email campaigns (admin) */
.quota-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--card); margin: 12px 0; }
.quota-box p { margin: 8px 0 0; }
.settings-details { margin-top: 10px; }
.settings-details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.camp-counts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 8px; }
.camp-counts b { font-size: 1.25rem; }
.mail-preview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 14px; overflow-x: auto; }
.camp-running { background: rgba(60, 116, 181, 0.55); }
.camp-paused { background: rgba(242, 201, 76, 0.28); }
.camp-done, .camp-rs-sent { background: rgba(9, 118, 84, 0.55); }
.camp-cancelled, .camp-rs-failed { background: rgba(235, 87, 87, 0.3); }
.camp-rs-skipped { background: rgba(255, 255, 255, 0.12); }
.wa-box { border: 1px solid var(--green-300); border-radius: 12px; padding: 12px 16px 16px; margin: 14px 0; }
.wa-box legend { font-weight: 700; padding: 0 8px; color: var(--green-300); }
.wa-vars { margin: 6px 0 10px; padding-inline-start: 22px; }
.wa-bubble { background: rgba(9, 118, 84, 0.4); border: 1px solid rgba(168, 230, 204, 0.5); border-radius: 14px 14px 4px 14px; padding: 12px 14px; max-width: 440px; margin: 8px 0 12px; line-height: 1.7; }
dialog.modal { max-width: min(520px, calc(100vw - 32px)); width: 100%; border: 2px solid var(--green-300); border-radius: 16px; padding: 22px; background: var(--blue-900); color: var(--white); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog.modal h3 { margin-top: 0; }
.doc-actions { margin-top: 12px; }
.remove-form { position: absolute; bottom: 18px; inset-inline-end: 20px; }
.evaluate-bar { text-align: center; background: rgba(9, 118, 84, 0.9); border-color: rgba(168, 230, 204, 0.45); }
.save-bar { position: sticky; bottom: 8px; z-index: 5; background: #097654;padding-block: 12px; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25); }
.save-bar .actions { justify-content: center; margin-top: 0; }
.save-bar .note { margin: 8px 0 0; }
#unsaved { color: #FFE08A; font-weight: 700; }
.doc-missing { border-color: #F2C94C !important; box-shadow: 0 0 0 2px rgba(242, 201, 76, 0.45); }

/* Result */
.result-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.result-hero .org { font-size: 1.2rem; font-weight: 700; margin: 0; }
.gauge { min-width: 200px; text-align: center; padding: 18px 26px; border-radius: 18px; background: rgba(10, 55, 105, 0.6); border: 2px solid var(--green-300); }
.gauge-num { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.gauge-num small { font-size: 1.2rem; color: var(--text-muted); }
.gauge-name { font-size: 1.4rem; font-weight: 800; color: var(--green-300); }
.gauge-score { color: var(--text-soft); }
.axes { display: grid; gap: 12px; }
.axis-row { display: grid; grid-template-columns: 260px 1fr 52px; gap: 12px; align-items: center; }
.axis-pct { font-weight: 700; text-align: end; }
.doc-list { margin: 0; padding-inline-start: 20px; }
.doc-list li { margin: 4px 0; }

.offer { background: linear-gradient(135deg, rgba(9, 118, 84, 0.3), rgba(60, 116, 181, 0.35)); border: 1px solid rgba(168, 230, 204, 0.45); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.offer > p { color: var(--text-soft); }
.price-card { background: rgba(10, 55, 105, 0.55); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.price-card.featured { border-color: var(--green-300); }
.price { font-size: 2rem; font-weight: 800; color: var(--green-300); }
.price-card p { color: var(--text-soft); margin: 0; }

/* Phase 2: login, my assessments, roadmap, admin */
.inline-form { display: inline; margin: 0; }
.nav-btn { background: none; border: 1px solid var(--line); color: var(--white); font-family: inherit; font-weight: 600; font-size: .95rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.nav-btn:hover { background: var(--card-strong); }
.code-input { font-size: 1.6rem !important; letter-spacing: 10px; text-align: center; }
input[readonly] { opacity: .75; }
input[type=password], input[type=search] {
  font-family: inherit; font-size: 1rem; color: var(--white);
  background: rgba(10, 55, 105, 0.65); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px; padding: 11px 14px; width: 100%;
}
.my-card h3 { margin-top: 4px; }
.roadmap-cta { margin: 4px 0 20px; }
.tasks { margin: 0; padding-inline-start: 26px; display: grid; gap: 10px; }
.task { background: rgba(10, 55, 105, 0.45); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.task::marker { color: var(--green-300); font-weight: 800; }
.task { display: list-item; }
.task-main { margin-bottom: 8px; }
.task-main .tags { margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.stat b { display: block; font-size: 1.8rem; color: var(--green-300); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.data th { background: rgba(9, 118, 84, 0.7); font-weight: 700; white-space: nowrap; }
table.data tr:hover td { background: rgba(255, 255, 255, 0.04); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 200px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Phase 3: services & requests */
.svc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 18px; display: flex; flex-direction: column; }
.svc-featured { background: linear-gradient(160deg, rgba(9, 118, 84, 0.22), rgba(60, 116, 181, 0.22)); border-color: rgba(168, 230, 204, 0.4); }
.svc-rec { border-color: var(--green-300); box-shadow: 0 0 0 2px rgba(168, 230, 204, 0.25); }
.svc-badge { position: absolute; top: 14px; inset-inline-end: 14px; }
.svc-icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.svc h3 { font-size: 1.08rem; }
.svc-desc { color: var(--text-soft); font-size: .93rem; }
.svc .check-list { flex: 1; }
.svc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.svc-price { font-size: 1.25rem; font-weight: 800; color: var(--green-300); }
.check-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; font-size: .92rem; }
.check-list li { position: relative; padding-inline-start: 22px; }
.check-list li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--green-300); font-weight: 800; }
.roi { text-align: center; }
.roi-n { font-size: 2.2rem; font-weight: 800; color: var(--green-300); line-height: 1.2; }
.about .methods { color: var(--text-soft); font-weight: 600; letter-spacing: .3px; }
.price-card .btn { margin-top: 12px; }
.selected-service { display: flex; gap: 12px; align-items: center; background: rgba(10, 55, 105, 0.5); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.selected-service .svc-icon { margin: 0; }
.price-inline { color: var(--green-300); font-weight: 700; }
input[type=tel], input[type=number], textarea {
  font-family: inherit; font-size: 1rem; color: var(--white);
  background: rgba(10, 55, 105, 0.65); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px; padding: 11px 14px; width: 100%;
}
optgroup { background: var(--blue-900); color: var(--green-300); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form { position: relative; }
.done-icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--green-500); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.status-form { display: flex; gap: 6px; align-items: center; }
.status-form select { padding: 6px 8px; font-size: .85rem; width: auto; }
.st { font-size: .8rem; padding: 1px 10px; border-radius: 999px; white-space: nowrap; }
.st-new { background: rgba(242, 201, 76, 0.2); }
.st-contacted { background: rgba(60, 116, 181, 0.5); }
.st-won { background: rgba(168, 230, 204, 0.25); }
.st-lost { background: rgba(255, 138, 128, 0.18); }
.price-input { width: 120px !important; padding: 7px 10px !important; }

/* Access limits */
.access-box { display: grid; gap: 8px; background: rgba(10, 55, 105, 0.5); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0 18px; }
.access-types { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.flash a { color: var(--white); font-weight: 800; }

.delivery { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.steps-list { margin: 6px 0 14px; padding-inline-start: 22px; display: grid; gap: 4px; }
.steps-list a { color: var(--green-300); font-weight: 700; }
.mail-form { max-width: 560px; }
.mode-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--green-800); padding: 18px 0; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer a { color: var(--white); }

/* Responsive */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .levels { grid-template-columns: repeat(2, 1fr); }
  .levels-compact { grid-template-columns: repeat(5, 1fr); }
  .levels-compact strong { font-size: .8rem; }
  .doc-head, .result-hero { flex-direction: column; align-items: stretch; }
  .axis-row { grid-template-columns: 1fr 52px; }
  .axis-row .bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 520px) {
  h1, .hero h1 { font-size: 1.6rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .remove-form { position: static; margin-top: 6px; }
  .brand { font-size: .95rem; line-height: 1.3; }
  .topbar-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 4px; }
  .nav a, .nav-btn { padding: 4px 10px; font-size: .85rem; white-space: nowrap; }
  .roi-n { font-size: 1.6rem; }
  .levels-compact { gap: 4px; }
  .levels-compact .level-step { padding: 6px 2px; min-width: 0; }
  .levels-compact .level-num { width: 26px; height: 26px; font-size: .85rem; }
  .levels-compact strong { font-size: .68rem; overflow-wrap: anywhere; }
  .panel { padding: 18px; }
}
.levels > * { min-width: 0; }
