* { box-sizing: border-box; }
:root { --ink: #17323a; --teal: #347888; --teal-d: #2e6c7b; --muted: #657f86; --line: #e6dfc9; --bg2: #faf7ee; --ok: #1f7a4d; --warn: #a86400; --bad: #b83a2e; }
body { margin: 0; min-height: 100vh; font-family: Cairo, 'Segoe UI', Tahoma, sans-serif; color: var(--ink); background: radial-gradient(circle at 30% 20%, #e6f1f2, var(--bg2) 60%); }
body.center { display: grid; place-items: center; padding: 16px; }
.card { width: min(440px, 100%); padding: 30px 28px 22px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(23, 50, 58, .14); text-align: center; }
.logo { width: 72px; height: 72px; }
h1 { margin: 10px 0 2px; font-size: 24px; color: var(--teal-d); }
h2 { margin: 0 0 12px; font-size: 19px; color: var(--teal-d); }
h3 { margin: 14px 0 8px; font-size: 16px; }
.sub { margin: 0 0 18px; color: var(--muted); font-weight: 700; }
form, .stack { display: flex; flex-direction: column; gap: 12px; text-align: start; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; }
input, select, textarea { min-height: 46px; border-radius: 12px; border: 1px solid #d9d0b6; padding: 0 12px; font-size: 16px; font-family: inherit; background: #fff; color: inherit; }
textarea { padding: 10px 12px; min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(52, 120, 136, .2); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--teal); color: #fff; font: 800 16px inherit; font-family: inherit; cursor: pointer; text-decoration: none; }
button.big { min-height: 54px; font-size: 18px; margin-top: 4px; }
button.ghost, .btn.ghost { background: #eef4f4; color: var(--teal-d); }
button.warn { background: #f59e0b; color: #3b2500; }
button.bad { background: #fbe9e7; color: var(--bad); }
button.sm, .btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
button:disabled { opacity: .55; cursor: default; }
.err { min-height: 22px; color: var(--bad); font-weight: 800; text-align: center; }
.msg { padding: 10px 14px; border-radius: 12px; background: #fff7e6; border: 1px solid #f3d9a4; color: #6b4a00; font-weight: 700; text-align: center; }
.okmsg { color: var(--ok); font-weight: 800; }
.note { margin: 14px 0 0; font-size: 13px; color: #8a9aa0; }
.alt { margin-top: 14px; font-weight: 700; color: var(--muted); }
.alt a, a.link { color: var(--teal-d); font-weight: 800; }

/* صفحات واسعة: الحساب ولوحة الإدارة */
.top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top img { width: 38px; height: 38px; }
.top .t { font-weight: 900; font-size: 18px; color: var(--teal-d); }
.top .sp { flex: 1; }
.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 18px 16px 60px; display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px; box-shadow: 0 6px 20px rgba(23, 50, 58, .06); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fffdf7; }
.plan.on { border-color: #8fc9b2; background: #effaf4; }
.plan b { display: block; font-size: 16px; }
.plan .price { font-size: 20px; font-weight: 900; color: var(--teal-d); margin: 4px 0; }
.plan ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: #eef4f4; color: var(--teal-d); white-space: nowrap; }
.chip.ok { background: #e3f6ec; color: var(--ok); }
.chip.warn { background: #fff1d6; color: var(--warn); }
.chip.bad { background: #fbe9e7; color: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.kv > :nth-child(odd) { color: var(--muted); font-weight: 700; }
.bar { height: 10px; border-radius: 999px; background: #edf0ee; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; min-width: 160px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 8px; border-bottom: 1px solid #f0ead8; text-align: start; vertical-align: top; }
th { color: var(--muted); font-size: 12.5px; font-weight: 800; background: #fbf8ef; position: sticky; top: 0; }
.scroll { overflow-x: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: #eef4f4; color: var(--teal-d); }
.tabs button.on { background: var(--teal); color: #fff; }
.tabs .n { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #3b2500; font-size: 12px; }
.mono { font-family: Consolas, 'Courier New', monospace; direction: ltr; unicode-bidi: isolate; }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #17323a; color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 800; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
dialog { border: 0; border-radius: 18px; padding: 20px; width: min(520px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(23, 50, 58, .35); }
@media (max-width: 600px) { .top .t { font-size: 15px; } .panel { padding: 14px; } }
