/* OneAI website and portal — one stylesheet, Arabic (rtl) and English (ltr) through logical properties. */
:root {
  --ink: #12212b; --muted: #5b6b77; --line: #d9e2e8; --bg: #f6f8f9; --card: #fff;
  --brand: #0f4c5c; --brand-2: #1b6f80; --accent: #e9c46a; --ok: #1f7a4d; --warn: #9a6700; --bad: #b42318;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 33, 43, .06), 0 4px 16px rgba(16, 33, 43, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand-2); }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
h3 { font-size: 1rem; margin: 0 0 .3rem; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 2rem); }
.main { flex: 1; padding-block: 1.5rem 3rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }

/* Header and footer */
.top { background: #fff; border-block-end: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 1rem; min-height: 3.6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand small { color: var(--muted); font-weight: 500; font-size: .75rem; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav-side { margin-inline-start: auto; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.nav-link { padding: .35rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.nav-link:hover, .nav-link.on { background: #eaf1f3; }
.nav-link.lang { font-weight: 600; }
.inline { display: inline; }
.link-button { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: .35rem .6rem; }
.foot { border-block-start: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }

/* Buttons */
.button { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: .65rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--brand-2); }
.button.secondary { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.button.small { padding: .4rem .75rem; font-size: .9rem; }
.button.danger { background: var(--bad); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-block: 1.2rem; }

/* Sections */
.hero { background: linear-gradient(135deg, #0f4c5c, #1b6f80); color: #fff; margin-block: -1.5rem 2rem; padding-block: 3.5rem; }
.hero .lead { color: #dbeef2; }
.hero .button { background: var(--accent); color: #12212b; }
.hero .button.secondary { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.section-title { margin-block: 2rem 1rem; }
.grid { display: grid; gap: 1rem; align-items: start; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card.wide { margin-block-start: 1rem; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); font-weight: 700; margin-block-end: .4rem; }
.ticks { padding-inline-start: 1.1rem; margin: .3rem 0; }
.ticks li { margin-block: .25rem; }
.plan .price { font-size: 1.2rem; margin: .2rem 0 .6rem; }
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }

/* Forms */
.form { display: grid; gap: .8rem; margin-block-start: 1rem; }
.field { display: grid; gap: .25rem; }
.field span { font-weight: 600; font-size: .92rem; }
.field small { color: var(--muted); }
input, select, textarea { font: inherit; padding: .55rem .65rem; border: 1px solid #b9c7d0; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid #bfe3ea; border-color: var(--brand-2); }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 10px; padding: .7rem .9rem; border: 1px solid; }
.notice.info { background: #eef6f8; border-color: #b6d7de; }
.notice.ok { background: #ecf7f1; border-color: #a8d5bc; color: var(--ok); }
.notice.error { background: #fdf0ef; border-color: #f2b8b3; color: var(--bad); }

/* Portal and back office */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: start; padding: .55rem .7rem; border-block-end: 1px solid var(--line); vertical-align: top; }
th { background: #f0f4f6; font-weight: 600; white-space: nowrap; }
.badge { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; background: #eaf1f3; }
.badge.new, .badge.open, .badge.requested, .badge.queued { background: #fff4d6; color: var(--warn); }
.badge.won, .badge.active, .badge.done, .badge.sent, .badge.closed, .badge.answered { background: #e3f4ea; color: var(--ok); }
.badge.lost, .badge.failed, .badge.rejected, .badge.suspended { background: #fde7e5; color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin-block: 1rem; }
.stat { text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.stat strong { display: block; font-size: 1.6rem; }
.thread { display: grid; gap: .7rem; margin-block: 1rem; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; white-space: pre-wrap; }
.msg.staff { border-inline-start: 4px solid var(--brand); }
.msg header { color: var(--muted); font-size: .85rem; margin-block-end: .3rem; }
.toolbar { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin-block: .8rem; }
.toolbar .field { min-width: 10rem; }
.code { white-space: nowrap; font-family: ui-monospace, Consolas, monospace; background: #f0f4f6; padding: .1rem .35rem; border-radius: 6px; }

@media (max-width: 860px) {
  .grid.two, .grid.three, .grid.four, .steps { grid-template-columns: 1fr; }
  .nav-side { margin-inline-start: 0; }
}
