/* miwan — shared styles. Clean, modern SaaS look; no framework. */
:root {
  --green: #0e9f6e;
  --green-dark: #0b7d57;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 10px 30px rgba(15, 23, 42, .05);
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", Tahoma, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); text-decoration: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* nav */
.nav { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.nav .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.nav .links { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; }
/* :not(.btn) keeps these rules from overriding .btn-primary's white-on-green
   colour (specificity 0,2,1 here would otherwise beat the button's 0,1,0). */
.nav .links a:not(.btn) { color: var(--muted); font-weight: 500; }
.nav .links a:not(.btn):hover { color: var(--ink); }

/* buttons */
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; border: 1px solid transparent; font-size: 15px; transition: .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* hero */
.hero { padding: 84px 0 60px; background: radial-gradient(1200px 400px at 50% -10%, #ecfdf5, #fff); text-align: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin: 0 auto 18px; max-width: 760px; }
.hero p.sub { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* sections */
section { padding: 56px 0; }
h2.section { font-size: 30px; letter-spacing: -.02em; text-align: center; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 560px; }

/* grids / cards */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.step .n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: #ecfdf5; color: var(--green-dark); font-weight: 700; align-items: center; justify-content: center; margin-bottom: 10px; }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.price { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: relative; }
.price.popular { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), var(--shadow); }
.price .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.price h3 { font-size: 20px; margin: 0 0 4px; }
.price .amount { font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.price .per { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.price ul { list-style: none; padding: 0; margin: 0 0 20px; }
.price li { padding-block: 6px; padding-inline-start: 26px; position: relative; color: #334155; }
.price li::before { content: "✓"; color: var(--green); position: absolute; inset-inline-start: 0; font-weight: 700; }

/* footer */
footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 40px 0; color: var(--muted); }
footer .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); display: block; margin: 6px 0; }
footer a:hover { color: var(--ink); }

/* forms / auth */
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px;
}
input:focus { outline: 2px solid var(--green); border-color: var(--green); }
.msg { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.ok { background: #ecfdf5; color: var(--green-dark); }
.msg.err { background: #fef2f2; color: #b91c1c; }
.full { width: 100%; }

/* dashboard */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; height: 60px; gap: 16px; }
.credits-pill { margin-inline-start: auto; background: #ecfdf5; color: var(--green-dark); font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 18px 0; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.contact-link { font-weight: 600; }
.social-links { display: flex; gap: 6px; flex-wrap: wrap; min-width: 160px; }
.social-link {
  display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft);
  color: var(--green-dark); font-size: 12px; font-weight: 700;
}
.social-link:hover { border-color: var(--green); background: #ecfdf5; }
.legal { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
@media (max-width: 820px) {
  .grid-3, .grid-4, .prices { grid-template-columns: 1fr; }
  .nav .links a:not(.btn) { display: none; }
}
