:root{
  /* ===== Professional Light Theme ===== */
  --bg: #f3f5f9;
  --surface: #ffffff;
  --card: #ffffff;
  --card2: #fbfcff;

  --stroke: rgba(15, 23, 42, .12);
  --stroke2: rgba(15, 23, 42, .18);

  --text: rgba(15, 23, 42, .92);
  --muted: rgba(15, 23, 42, .62);

  --shadow: 0 10px 28px rgba(15, 23, 42, .10);
  --shadow2: 0 6px 18px rgba(15, 23, 42, .08);

  --r: 14px;
  --pad: 18px;

  --primary: #1e40af;         /* أزرق رسمي */
  --primary-soft: rgba(30,64,175,.10);
  --focus: rgba(30,64,175,.22);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background: var(--bg);
  font-family: Inter, Cairo, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* تحسينات رسمية بسيطة */
a{ color: inherit; }
:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 10px;
}

.control{ text-align:center; }

.container{
  width:min(1100px, calc(100% - 32px));
  margin-inline:auto;
}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* ===== Background Orbs (مخففة جداً / رسمية) ===== */
.bg-orbs{ position:fixed; inset:0; pointer-events:none; }
.orb{ position:absolute; filter: blur(60px); opacity:.12; }
.o1{ width:340px; height:340px; inset-inline-start: -120px; top:80px; background: rgba(30,64,175,.55); border-radius: 999px; }
.o2{ width:280px; height:280px; inset-inline-end: -120px; top:150px; background: rgba(14,116,144,.50); border-radius: 999px; }
.o3{ width:460px; height:460px; left: 35%; bottom:-240px; background: rgba(100,116,139,.45); border-radius: 999px; }

/* ===== Topbar (رسمي، بدون تدرج قوي) ===== */
.topbar{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.80);
  border-bottom: 1px solid var(--stroke);
}

.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}

.brand{
  display:flex; align-items:center; gap:12px;
  text-decoration:none; color:inherit;
}

.brand__logo{
  width:42px; height:42px;
  display:grid; place-items:center;
  border:1px solid var(--stroke);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow2);
}

.brand__name{ font-weight:800; letter-spacing:.2px; font-size:16px; }
.brand__tag{ display:block; font-size:12px; color:var(--muted); margin-top:2px; }

.topbar__actions{ display:flex; align-items:center; gap:10px; }

/* ===== Select ===== */
.select select{
  appearance:none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding:10px 12px;
  border-radius: 12px;
  outline:none;
  box-shadow: var(--shadow2);
}

/* ===== Buttons (رسمي) ===== */
.btn{
  border:1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  padding:11px 14px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  width: 100%;
  box-shadow: var(--shadow2);
}

.btn:hover{
  transform: translateY(-1px);
  border-color: var(--stroke2);
  box-shadow: var(--shadow);
}

.btn:active{ transform: translateY(0); }

.btn--primary{
  background: var(--primary);
  color: #fff;
  border-color: rgba(30,64,175,.40);
  box-shadow: 0 10px 22px rgba(30,64,175,.18);
}

.btn--primary:hover{
  box-shadow: 0 14px 28px rgba(30,64,175,.22);
}

.btn--ghost{
  background: transparent;
  box-shadow:none;
}

/* ===== Hero ===== */
.hero{ padding: 0 0 28px; }
.hero__title{ font-size: clamp(28px, 4.2vw, 42px); margin: 10px 0 8px; }
.hero__subtitle{ color: var(--muted); margin:0 0 18px; line-height:1.65; max-width: 62ch; }

/* ===== Panel ===== */
.panel{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.86);
  border-radius: calc(var(--r) + 4px);
  box-shadow: var(--shadow);
  padding: var(--pad);
}

.panel__row{
  display:flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.panel__row--actions{
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 14px;
}

@media (max-width: 760px){
  .panel__row{ grid-template-columns:1fr; }
  .panel__row--actions{ grid-template-columns:1fr 1fr; }
}

/* ===== Controls ===== */
.control__label{ color: var(--muted); margin-bottom:8px; font-size: 14px; }

.stepper{
  display:flex; align-items:center; gap:3px;
  border-radius: 14px;
  padding: 10px;
}

.stepper__btn{
  width:44px; height:44px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  cursor:pointer;
  font-size: 22px;
  box-shadow: var(--shadow2);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.stepper__btn:hover{
  transform: translateY(-1px);
  border-color: var(--stroke2);
  box-shadow: var(--shadow);
}

.stepper__btn:active{ transform: translateY(0); }

.stepper__input{
  flex:1;
  height:44px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  padding-inline: 12px;
  font-size: 16px;
  outline:none;
  box-shadow: var(--shadow2);
}

/* ===== Output ===== */
.output{ margin-top: 14px; }

.output__bar{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-bottom: 10px;
}

.pill{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.92);
  color: var(--muted);
  padding:7px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* textarea رسمي وواضح */
.output__textarea{
  width:100%;
  border-radius: 14px;
  border:1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  line-height: 1.9;
  resize: vertical;
  outline:none;
  box-shadow: var(--shadow2);
}

/* ===== Footer ===== */
.footer{
  margin-top: 26px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
}

.footer__inner{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:center;
}

.footer a{ color: var(--muted); text-decoration:none; border-bottom:1px dashed transparent; }
.footer a:hover{ border-bottom-color: var(--muted); }
.sep{ opacity:.6; }

/* ===== Toast (رسمي) ===== */
.toast{
  position: fixed;
  inset-inline-start: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.95);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: var(--shadow);
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}
