/* ============================================================
   GOVI PORTAL — بوابة الخدمات (portal.govi.sa)
   الطابع العام أبيض: خلفيات بيضاء، حدود رفيعة، أزرق رسمي للفعل والإشارة
   خط IBM Plex Sans Arabic للوحات، وNoto Kufi Arabic للموقع العام وصفحات الدخول · CSS يدوي بلا إطار (رقم النسخة تلقائي بـfilemtime)
   ============================================================ */

:root {
    /* المحايدات */
    --ink: #111113;
    --ink-2: #3f3f46;
    --muted: #6b6b76;
    --faint: #9d9da8;
    --line: #e8e8ec;
    --line-2: #f0f0f3;
    --subtle: #f7f7f8;
    --surface: #ffffff;
    --card: #ffffff;

    /* العلامة: عودي داكن رسمي + ذهبي (09-24 بطلب المالك — بعد رفض الأسود ثم الأزرق ثم الأخضر) */
    --brand: #5a3424;
    --brand-h: #45271c;
    --brand-soft: #f6efe8;
    --brand-line: #e7d7ca;
    --gold: #c29a52;
    --gold-d: #9a7433;
    --gold-soft: #f5ecdc;
    --oud-grad: linear-gradient(135deg, #1f120d 0%, #3f241a 48%, #6a3f2b 100%);
    --oud-btn: linear-gradient(135deg, #4a2a1d 0%, #6e412c 100%);
    --gold-line: linear-gradient(90deg, #5a3424 0%, #c29a52 50%, #5a3424 100%);

    /* الفعل والإشارة */
    --primary: var(--brand);
    --primary-h: var(--brand-h);
    --accent: #8a5a3c;
    --accent-h: #6f4630;
    --accent-soft: #f6efe8;

    /* أسماء قديمة تستعملها القوالب — تشير للنظام الجديد */
    --teal: var(--accent);
    --teal-h: var(--accent-h);
    --teal-soft: var(--accent-soft);
    --teal-t: var(--accent);
    --navy: var(--ink);
    --grad: var(--primary);

    --ok: #15803d;     --ok-bg: #effaf3;
    --warn: #b45309;   --warn-bg: #fff8eb;
    --bad: #c9302c;    --bad-bg: #fef2f2;
    --info: #2563eb;   --info-bg: #eff4ff;
    --neu: #52525b;    --neu-bg: #f4f4f5;
    --vio: #6d28d9;    --vio-bg: #f5f3ff;

    --r-sm: 8px;
    --r: 10px;
    --r-lg: 14px;
    --r-xl: 18px;

    --sh-1: 0 1px 2px rgba(17, 17, 19, .04);
    --sh-2: 0 6px 20px -10px rgba(17, 17, 19, .14);
    --sh-pop: 0 16px 40px -12px rgba(17, 17, 19, .18), 0 1px 3px rgba(17, 17, 19, .06);

    --side-w: 256px;
    --top-h: 60px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: #dbe6ff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 26px; height: 26px; }

.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grad-text { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--gap, 20px); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 340px; }
.g-main-l { grid-template-columns: minmax(0, 1fr) 320px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* ---------- الأزرار ---------- */
.btn {
    --h: 38px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--h); padding: 0 16px;
    border-radius: 9px; border: 1px solid transparent;
    font-size: 13.5px; font-weight: 600; line-height: 1; white-space: nowrap;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
    user-select: none;
}
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--oud-btn); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-teal { background: var(--accent); color: #fff; }
.btn-teal:hover { background: var(--accent-h); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--sh-1); }
.btn-light:hover { background: var(--subtle); border-color: #dcdce2; }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--subtle); color: var(--ink); }
.btn-soft { background: var(--subtle); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { background: var(--line-2); }
.btn-danger { background: #fff; border-color: #f3d0cf; color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-danger-solid { background: var(--bad); color: #fff; }
.btn-danger-solid:hover { background: #b02925; }
.btn-outline-w { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline-w:hover { background: var(--subtle); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { --h: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-light.is-loading::after, .btn-soft.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--line); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--ink); }

/* ---------- الشارات ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 9px; border-radius: 6px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    background: var(--neu-bg); color: var(--neu);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-vio { background: var(--vio-bg); color: var(--vio); }
.b-teal { background: var(--accent-soft); color: var(--accent-h); }
.b-live::before { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1;
    background: var(--line-2); color: var(--muted);
}
.count.hot { background: var(--primary); color: #fff; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; background: var(--subtle); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 500; }

/* ---------- البطاقات ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-head.bordered { padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.card-title { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-title .i { color: var(--muted); }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.flat { box-shadow: none; }
.card.pad { padding: 20px; }
.card-link { transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.card-link:hover { border-color: #d6d6dc; box-shadow: var(--sh-2); }

.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line-2); color: var(--ink-2); }
.stat-ico .i { width: 17px; height: 17px; }
.stat-ico.warn { background: var(--warn-bg); border-color: #fbe5c0; color: var(--warn); }
.stat-val { font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: -.3px; }
.stat-val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-inline-start: 4px; letter-spacing: 0; }
.stat-lbl { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

/* ---------- الجداول ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
    text-align: start; font-size: 12px; font-weight: 500; color: var(--muted);
    padding: 10px 16px; background: var(--subtle); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child { padding-inline-start: 20px; }
.table th:last-child { padding-inline-end: 20px; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table td:first-child { padding-inline-start: 20px; }
.table td:last-child { padding-inline-end: 20px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fbfbfc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-main { font-weight: 600; color: var(--ink); display: block; }
.table .cell-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }
.table .t-end { text-align: end; }
.table tr.is-link { cursor: pointer; }
.card > .table-wrap:first-child .table th:first-child { border-start-start-radius: var(--r-lg); }
.card > .table-wrap:first-child .table th:last-child { border-start-end-radius: var(--r-lg); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.search { position: relative; display: flex; align-items: center; min-width: 240px; }
.search .i { position: absolute; inset-inline-start: 11px; color: var(--faint); width: 16px; height: 16px; pointer-events: none; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 34px 0 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.search input:focus { outline: 0; border-color: #b9c9f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* ---------- الشرائح المقسّمة والتبويبات ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--subtle); border: 1px solid var(--line); }
.seg button, .seg a { height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: .15s; }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg .on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 17, 19, .08), 0 0 0 1px var(--line); }
.seg .count { height: 18px; min-width: 18px; font-size: 10.5px; }
.seg .on .count { background: var(--primary); color: #fff; }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
    position: relative; padding: 10px 0 12px; font-size: 14px; font-weight: 500; color: var(--muted);
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color .15s;
}
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--ink); font-weight: 600; }
.tabs .on::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--primary); }
.tabs .i { width: 16px; height: 16px; }
.tabs .count { background: var(--line-2); color: var(--muted); }

/* ---------- النماذج ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.label .opt { font-weight: 400; color: var(--faint); font-size: 12px; }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d9da8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; padding-left: 34px; }
.input::placeholder, .textarea::placeholder { color: #b0b0ba; }
.input:hover, .select:hover, .textarea:hover { border-color: #dadae0; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: #b9c9f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.input.is-invalid { border-color: #efb3b1; box-shadow: 0 0 0 3px rgba(201, 48, 44, .08); }
.hint { font-size: 12px; color: var(--muted); }
.error { font-size: 12px; color: var(--bad); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: #b9c9f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.input-group .input { border: 0; box-shadow: none !important; border-radius: 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--subtle); color: var(--muted); font-weight: 500; font-size: 13px; border-inline-start: 1px solid var(--line); white-space: nowrap; }
.input-group .addon:first-child { border-inline-start: 0; border-inline-end: 1px solid var(--line); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #dcdce2; position: relative; transition: background .2s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(-16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.choice {
    display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.choice:hover { border-color: #d6d6dc; }
.choice.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.choice .choice-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line-2); color: var(--ink-2); flex: none; }
.choice .choice-ico .i { width: 17px; height: 17px; }
.choice.on .choice-ico { background: var(--primary); color: #fff; border-color: var(--primary); }
.choice-title { font-weight: 600; font-size: 14px; }
.choice-text { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.choice .tick { margin-inline-start: auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #d0d0d7; display: grid; place-items: center; flex: none; color: transparent; transition: .15s; }
.choice.on .tick { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- التعديل المباشر ---------- */
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); min-height: 54px; }
.kv:last-child { border-bottom: 0; }
.kv-k { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kv-k .i { width: 16px; height: 16px; color: var(--faint); }
.kv-v { font-weight: 600; color: var(--ink); min-width: 0; }
.edit { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px -10px; padding: 6px 10px; border-radius: 8px; cursor: text; transition: background .15s; }
.edit:hover { background: var(--subtle); }
.edit .pen { opacity: 0; color: var(--faint); transition: opacity .15s; width: 15px; height: 15px; }
.edit:hover .pen { opacity: 1; }
.edit-form { display: flex; align-items: center; gap: 8px; }
.edit-form .input, .edit-form .select { height: 36px; }
.saved-flash { animation: savedFlash 1.4s var(--ease); }
@keyframes savedFlash { 0% { background: #e9f0ff; } 100% { background: transparent; } }

/* ---------- التنبيهات داخل الصفحة ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; line-height: 1.7; }
.alert .a-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.alert .a-ico .i { width: 16px; height: 16px; }
.alert-title { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.alert-text { color: var(--ink-2); }
.alert .a-act { margin-inline-start: auto; align-self: center; display: flex; gap: 8px; flex: none; }
.alert .a-x { color: var(--faint); margin-inline-start: 4px; align-self: flex-start; }
.alert .a-x:hover { color: var(--ink); }
.a-info { background: #f8faff; border-color: #dfe8fd; } .a-info .a-ico { background: var(--info-bg); color: var(--info); }
.a-ok { background: #f7fcf9; border-color: #d6efe0; } .a-ok .a-ico { background: var(--ok-bg); color: var(--ok); }
.a-warn { background: #fffcf5; border-color: #f7e2bb; } .a-warn .a-ico { background: var(--warn-bg); color: var(--warn); }
.a-bad { background: #fffafa; border-color: #f6d3d2; } .a-bad .a-ico { background: var(--bad-bg); color: var(--bad); }
.a-teal { background: var(--subtle); border-color: var(--line); } .a-teal .a-ico { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }

/* التنبيه الأهم أعلى الصفحة — واحد فقط */
.banner { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #f3dcb0; box-shadow: inset -3px 0 0 #f59e0b; color: var(--ink-2); }
.banner .b-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); flex: none; }
.banner .b-ico .i { width: 17px; height: 17px; }
.banner strong { color: var(--ink); font-weight: 600; }
.banner .b-sub { color: var(--muted); }
.banner .btn-light { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; }
.banner .btn-light:hover { background: var(--primary-h); }
.banner .b-x { color: var(--faint); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; }
.banner .b-x:hover { background: var(--subtle); color: var(--ink); }

/* ---------- الإشعارات العائمة ---------- */
.toasts { position: fixed; bottom: 20px; left: 20px; z-index: 9000; display: flex; flex-direction: column-reverse; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 14px; background: #fff; color: var(--ink-2); border-radius: 12px; box-shadow: var(--sh-pop); border: 1px solid var(--line); }
.toast .t-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok-bg); color: var(--ok); }
.toast.t-warn .t-ico { background: var(--warn-bg); color: var(--warn); }
.toast.t-bad .t-ico { background: var(--bad-bg); color: var(--bad); }
.toast.t-info .t-ico { background: var(--info-bg); color: var(--info); }
.toast .t-ico .i { width: 14px; height: 14px; }
.toast .t-title { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.toast .t-text { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.toast .t-x { color: var(--faint); margin-inline-start: auto; }
.toast .t-x:hover { color: var(--ink); }
.toast .t-bar { position: absolute; bottom: 0; right: 0; height: 2px; background: var(--line); animation: toastBar linear forwards; }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }
.toast-enter { animation: toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- النوافذ والقوائم المنسدلة ---------- */
.overlay { position: fixed; inset: 0; z-index: 800; background: rgba(17, 17, 19, .28); backdrop-filter: blur(2px); }
.modal-wrap { position: fixed; inset: 0; z-index: 810; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { width: min(480px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--sh-pop); overflow: hidden; border: 1px solid var(--line); }
.modal.lg { width: min(720px, 100%); }
.modal-head { padding: 20px 22px 0; display: flex; gap: 14px; align-items: flex-start; }
.modal-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); color: var(--ink-2); flex: none; }
.modal-ico.bad { background: var(--bad-bg); border-color: #f6d3d2; color: var(--bad); }
.modal-ico.warn { background: var(--warn-bg); border-color: #f7e2bb; color: var(--warn); }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px; background: var(--subtle); border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }
.modal-x { margin-inline-start: auto; color: var(--faint); }
.modal-x:hover { color: var(--ink); }

.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 810; width: min(440px, 100vw); background: #fff; box-shadow: var(--sh-pop); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; }

.dd { position: relative; }
.dd-panel { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 700; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-pop); padding: 5px; }
.dd-panel.start { inset-inline-end: auto; inset-inline-start: 0; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); width: 100%; text-align: start; transition: background .12s; }
.dd-item:hover { background: var(--subtle); color: var(--ink); }
.dd-item .i { width: 16px; height: 16px; color: var(--faint); }
.dd-item.danger, .dd-item.danger .i { color: var(--bad); }
.dd-item .dd-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.dd-item.rich { align-items: flex-start; padding: 9px 10px; }
.dd-item.rich .dd-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.dd-item.rich:hover .dd-ico { background: #fff; border-color: var(--line); }
.dd-sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
.dd-label { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 7px 10px 3px; }

.pop-enter { animation: popIn .14s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---------- التقدّم والمراحل ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.bar.warn > span { background: #f59e0b; }
.bar.bad > span { background: var(--bad); }
.bar.thin { height: 5px; }

.ring { --p: 50; --s: 60px; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font-weight: 600; font-size: 13px; }
.ring.warn { background: conic-gradient(#f59e0b calc(var(--p) * 1%), var(--line-2) 0); }

.steps { display: flex; align-items: flex-start; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; min-width: 0; }
.step::before { content: ""; position: absolute; top: 13px; inset-inline-end: 50%; width: 100%; height: 1.5px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line); color: var(--faint); font-weight: 600; font-size: 12.5px; position: relative; z-index: 1; }
.step .dot .i { width: 14px; height: 14px; }
.step-lbl { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.step-sub { font-size: 11.5px; color: var(--faint); margin-top: -6px; }
.step.done::before, .step.now::before { background: var(--primary); }
.step.done .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.now .dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--line-2); }
.step.done .step-lbl, .step.now .step-lbl { color: var(--ink); }
.step.now .step-lbl { font-weight: 600; }

.timeline { position: relative; }
.tl-item { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; top: 30px; bottom: 2px; right: 13px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); color: var(--ink-2); flex: none; position: relative; }
.tl-ico .i { width: 14px; height: 14px; }
.tl-ico.ok { color: var(--ok); } .tl-ico.teal { color: var(--accent); } .tl-ico.warn { color: var(--warn); }
.tl-ico.vio { color: var(--vio); } .tl-ico.info { color: var(--info); } .tl-ico.bad { color: var(--bad); }
.tl-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.tl-text { font-size: 12.5px; color: var(--muted); }
.tl-time { font-size: 11.5px; color: var(--faint); margin-top: 2px; }

/* ---------- حالات فارغة وتحميل ---------- */
.empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); color: var(--muted); margin-bottom: 6px; }
.empty-ico .i { width: 22px; height: 22px; }
.empty h4 { font-size: 15px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 360px; font-size: 13.5px; }
.skel { background: linear-gradient(90deg, #f1f1f4 0%, #f9f9fb 50%, #f1f1f4 100%); background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eceef2; color: var(--ink); font-weight: 600; font-size: 12px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 60px; height: 60px; font-size: 18px; }
.avatar.neu { background: var(--ink); color: #fff; }
.ico-box { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line-2); color: var(--ink-2); flex: none; }
.ico-box .i { width: 17px; height: 17px; }
.ico-box.teal, .ico-box.vio, .ico-box.info, .ico-box.navy, .ico-box.neu { background: var(--subtle); color: var(--ink-2); }
.ico-box.warn { background: var(--warn-bg); border-color: #fbe5c0; color: var(--warn); }
.ico-box.ok { background: var(--ok-bg); border-color: #d6efe0; color: var(--ok); }
.ico-box.bad { background: var(--bad-bg); border-color: #f6d3d2; color: var(--bad); }
.ico-box.sm { width: 32px; height: 32px; border-radius: 8px; }
.ico-box.sm .i { width: 16px; height: 16px; }

.list > * { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line-2); transition: background .12s; }
.list > *:last-child { border-bottom: 0; }
.list > a:hover { background: #fbfbfc; }
.list-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.list-sub { font-size: 12px; color: var(--muted); }

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.meta-k { font-size: 12px; color: var(--muted); }
.meta-v { font-weight: 600; font-size: 14px; margin-top: 2px; }

.copy { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 7px; background: var(--subtle); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; direction: ltr; }
.copy button { color: var(--faint); }
.copy button:hover { color: var(--ink); }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); background: #fff; font-size: 11px; font-weight: 500; color: var(--muted); font-family: ui-monospace, monospace; }

/* ============================================================
   قشرة اللوحة
   ============================================================ */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.side { position: sticky; top: 0; height: 100vh; z-index: 600; display: flex; flex-direction: column; background: #fbfbfc; border-inline-end: 1px solid var(--line); color: var(--ink-2); }
.side-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; }
.side-brand img { height: 24px; width: auto; }
.side-brand .area { font-size: 11.5px; font-weight: 500; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }

.org-switch { position: relative; margin: 4px 12px 8px; }
.org-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-align: start; transition: border-color .15s, box-shadow .15s; }
.org-btn:hover { border-color: #d6d6dc; box-shadow: var(--sh-1); }
.org-btn .ico-box { width: 30px; height: 30px; border-radius: 8px; }
.org-btn .ico-box .i { width: 15px; height: 15px; }
.org-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.org-type { font-size: 11.5px; color: var(--muted); }
.org-btn .chev { color: var(--faint); width: 15px; height: 15px; margin-inline-start: auto; }
.org-switch .dd-panel { inset-inline: 0; top: calc(100% + 6px); min-width: 0; }

.side-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: none; }
.side-scroll::-webkit-scrollbar { display: none; }
.nav-label { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 16px 10px 6px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; margin-bottom: 1px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: background .12s, color .12s; }
.nav-link .i { width: 17px; height: 17px; color: var(--faint); transition: color .12s; }
.nav-link:hover { background: #f1f1f4; color: var(--ink); }
.nav-link:hover .i { color: var(--ink-2); }
.nav-link.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 17, 19, .06), 0 0 0 1px var(--line); }
.nav-link.on .i { color: var(--ink); }
.nav-link .count { margin-inline-start: auto; background: transparent; color: var(--faint); }
.nav-link .count.hot { background: var(--primary); color: #fff; }

.side-help { margin: 0 12px 12px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.8; }
.side-help strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.side-help a { color: var(--accent); font-weight: 600; }

.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.side-user .who { min-width: 0; flex: 1; }
.side-user .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.side-user .mail { font-size: 11.5px; color: var(--muted); }
.side-user .out { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); transition: .15s; }
.side-user .out:hover { background: #f1f1f4; color: var(--ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 500; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar.scrolled { background: rgba(255, 255, 255, .96); }
.burger { display: none; width: 36px; height: 36px; border-radius: 8px; place-items: center; color: var(--ink); }
.burger:hover { background: var(--subtle); }
.cmd-trigger { display: flex; align-items: center; gap: 10px; height: 36px; width: min(380px, 100%); padding: 0 6px 0 12px; border-radius: 9px; background: var(--subtle); border: 1px solid var(--line); color: var(--faint); font-size: 13px; transition: border-color .15s, background .15s; }
.cmd-trigger:hover { background: #fff; border-color: #d6d6dc; }
.cmd-trigger .kbd { margin-inline-start: auto; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); transition: background .12s, color .12s; }
.icon-btn:hover, .icon-btn.on { background: var(--subtle); color: var(--ink); }
.icon-btn .pip { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; border: 2px solid #fff; line-height: 1; }
.me-btn { display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; border-radius: 999px; transition: background .12s; }
.me-btn:hover { background: var(--subtle); }
.me-btn .avatar { width: 30px; height: 30px; font-size: 11px; }
.me-btn .chev { width: 15px; height: 15px; color: var(--faint); }

.content { padding: 8px 28px 48px; width: 100%; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 22px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); font-weight: 500; margin-bottom: 6px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 13px; height: 13px; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -.2px; line-height: 1.4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 14.5px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* لوحة الإشعارات */
.notif { width: 380px; padding: 0; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.notif-head h4 { font-size: 14.5px; font-weight: 600; }
.notif-tabs { display: flex; gap: 4px; padding: 0 12px 10px; border-bottom: 1px solid var(--line-2); }
.notif-tabs button { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.notif-tabs button.on { background: var(--subtle); color: var(--ink); font-weight: 600; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-day { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 10px 16px 4px; }
.n-item { position: relative; display: flex; gap: 12px; padding: 10px 16px; transition: background .12s; }
.n-item:hover { background: #fbfbfc; }
.n-item .ico-box { width: 32px; height: 32px; border-radius: 8px; }
.n-item .ico-box .i { width: 16px; height: 16px; }
.n-item .ico-box.teal { color: var(--accent); } .n-item .ico-box.vio { color: var(--vio); } .n-item .ico-box.info { color: var(--info); }
.n-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.n-text { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 1px; }
.n-time { font-size: 11px; color: var(--faint); margin-top: 3px; }
.n-item.unread .n-title::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-inline-start: 8px; vertical-align: middle; }
.notif-foot { display: flex; border-top: 1px solid var(--line-2); }
.notif-foot a, .notif-foot button { flex: 1; text-align: center; padding: 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.notif-foot > * + * { border-inline-start: 1px solid var(--line-2); }
.notif-foot a:hover, .notif-foot button:hover { background: var(--subtle); color: var(--ink); }

/* لوحة الأوامر */
.cmdk { width: min(600px, 100%); background: #fff; border-radius: 14px; box-shadow: var(--sh-pop); border: 1px solid var(--line); overflow: hidden; margin-top: 10vh; align-self: start; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.cmdk-input input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; }
.cmdk-input .i { color: var(--faint); }
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 8px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.cmdk-item .i { color: var(--faint); width: 16px; height: 16px; }
.cmdk-item.on { background: var(--subtle); color: var(--ink); }
.cmdk-item.on .i { color: var(--ink); }
.cmdk-foot { display: flex; gap: 16px; padding: 9px 18px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--faint); background: var(--subtle); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 6px; }

.preview-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 500; background: var(--warn-bg); color: var(--warn); border: 1px solid #f7e2bb; }

/* ---------- الرسم البياني ---------- */
.chart { width: 100%; height: 220px; }
.chart .gl { stroke: var(--line-2); stroke-width: 1; }
.chart .bar-r { fill: var(--ink); }
.chart .bar-r.dim { fill: #e4e4e9; }
.chart text { font-size: 11px; fill: var(--faint); font-family: 'IBM Plex Sans Arabic', sans-serif; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--ink); display: inline-block; }
.legend i.dim { background: #e4e4e9; }

/* ---------- الكانبان ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(205px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--subtle); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 6px; font-weight: 600; font-size: 13px; }
.kcol-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.kcol-head .count { background: #fff; border: 1px solid var(--line); color: var(--muted); margin-inline-start: auto; }
.kcard { background: #fff; border-radius: 10px; padding: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, border-color .15s; }
.kcard:hover { box-shadow: var(--sh-2); border-color: #d6d6dc; }
.kcard-title { font-weight: 600; font-size: 13.5px; line-height: 1.5; }
.kcard-org { font-size: 12px; color: var(--muted); }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--faint); }
.kcol.over { background: var(--accent-soft); outline: 1.5px dashed var(--accent); outline-offset: -2px; }
.kcard.dragging { opacity: .45; }
.kcard[draggable="true"] { cursor: grab; }
.kflag { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--warn); background: var(--warn-bg); padding: 4px 8px; border-radius: 6px; }
.kempty { border: 1px dashed #d6d6dc; border-radius: 10px; padding: 20px; text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------- الفاتورة ---------- */
.doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 40px 44px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-logo { height: 28px; }
.doc-title { font-size: 20px; font-weight: 600; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; padding: 24px 0; }
.doc-k { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.doc-totals { margin-inline-start: auto; width: min(340px, 100%); margin-top: 16px; }
.doc-totals .row-between { padding: 7px 0; font-size: 14px; }
.doc-totals .grand { border-top: 1.5px solid var(--ink); margin-top: 6px; padding-top: 12px; font-size: 16px; font-weight: 600; }
.qr { width: 100px; height: 100px; border-radius: 8px; border: 1px solid var(--line); padding: 6px; background: #fff; }
.paid-stamp { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 12px; border-radius: 8px; border: 1px solid #cfeadb; background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: 13px; }

/* ---------- المحادثة ---------- */
.thread { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg.me { margin-inline-start: auto; flex-direction: row-reverse; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.8; }
.msg.me .msg-bubble { background: var(--subtle); border-color: var(--line); color: var(--ink); border-start-end-radius: 4px; }
.msg:not(.me) .msg-bubble { border-start-start-radius: 4px; }
.msg-meta { font-size: 11.5px; color: var(--faint); margin-top: 5px; display: flex; gap: 8px; }
.msg.me .msg-meta { justify-content: flex-end; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 500; }
.file-chip .i { color: var(--muted); }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line-2); background: var(--subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.composer .textarea { min-height: 40px; height: 40px; resize: none; padding-top: 8px; }

/* ============================================================
   الموقع العام
   ============================================================ */
.site { background: #fff; }
/* خلفية الموقع العام بيضاء بالكامل — بلا أقسام ملوّنة ولا نقوش خلفية (09-24 بطلب المالك) */
.site .sec.alt { background: #fff; border-block: 0; }
.site .page-hero::before, .auth .auth-side::before { display: none; }
.auth .auth-side { background: #fff; }

.site, .auth {
    font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    /* محايدات دافئة تنسجم مع العودي */
    --ink: #221814; --ink-2: #45372f; --muted: #6f6158; --faint: #a3958b;
    --line: #ebe3dc; --line-2: #f4efea; --subtle: #faf7f3;
}
.wrap-w { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.s-top { display: none; }
.s-nav { position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.s-nav.solid { background: rgba(255, 255, 255, .96); }
.s-nav .wrap-w { display: flex; align-items: center; gap: 24px; height: 64px; }
.s-nav .logo img { height: 26px; width: auto; }
.s-nav .logo { display: flex; align-items: center; gap: 10px; }
.s-nav .logo .sub { font-size: 12px; font-weight: 600; color: var(--brand); padding: 1px 8px; border-radius: 6px; border: 1px solid var(--brand-line); direction: ltr; }
.s-nav::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gold-line); }
.s-links { display: flex; gap: 2px; margin-inline-start: 12px; }
.s-links a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 14px; transition: color .12s, background .12s; }
.s-links a:hover { color: var(--ink); background: var(--subtle); }
.s-links a.on { color: var(--ink); font-weight: 600; }
.s-act { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-2); transition: .12s; }
.cart-btn:hover { background: var(--subtle); color: var(--ink); }
.cart-btn .pip { position: absolute; top: 3px; left: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; border: 2px solid #fff; }
.s-login { color: var(--ink-2); font-weight: 500; padding: 0 12px; height: 38px; display: inline-flex; align-items: center; border-radius: 9px; }
.s-login:hover { background: var(--subtle); color: var(--ink); }
.s-burger { display: none; color: var(--ink); width: 38px; height: 38px; border-radius: 9px; place-items: center; }
.s-mobile { position: absolute; top: 100%; inset-inline: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; box-shadow: var(--sh-2); }
.s-mobile a { display: block; padding: 12px 4px; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line-2); }

.hero { position: relative; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line-2); }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
    background-size: 48px 48px; mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, #000 20%, transparent 75%);
}
.hero .glow2 { display: none; }
.hero-in { position: relative; z-index: 1; padding: 76px 0 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.eyebrow.dark { color: var(--muted); }
.hero h1 { font-size: 46px; line-height: 1.3; font-weight: 700; margin-top: 14px; letter-spacing: -.8px; color: var(--ink); }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 600px; margin-top: 16px; line-height: 1.9; }
.hero-center { text-align: center; }
.hero-center .lead { margin-inline: auto; }

.finder { margin-top: 32px; max-width: 700px; }
.finder-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.finder-tabs button { height: 32px; padding: 0 14px; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.finder-tabs button .i { width: 15px; height: 15px; }
.finder-tabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 17, 19, .08), 0 0 0 1px var(--line); }
.finder-box { display: flex; align-items: center; gap: 8px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px -18px rgba(17, 17, 19, .25); transition: border-color .15s, box-shadow .15s; }
.finder-box:focus-within { border-color: #b9c9f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1), 0 10px 30px -18px rgba(17, 17, 19, .25); }
.finder-box .i { color: var(--faint); margin-inline-start: 10px; }
.finder-box input { flex: 1; min-width: 0; border: 0; outline: 0; height: 44px; font-size: 16px; color: var(--ink); background: transparent; }
.finder-box .btn { --h: 44px; padding: 0 24px; border-radius: 9px; font-size: 14.5px; }
.finder-tlds { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.finder-tlds b { color: var(--ink); font-weight: 600; margin-inline-end: 6px; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.hfact { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.hfact .i { color: var(--ink-2); width: 17px; height: 17px; }
.hfact strong { color: var(--ink); font-weight: 600; }

.sec { padding: 88px 0; }
.sec.alt { background: var(--subtle); border-block: 1px solid var(--line-2); }
.sec-head { max-width: 680px; margin-bottom: 40px; }
.sec-head.center { text-align: center; margin-inline: auto; }
.sec-head h2 { font-size: 30px; font-weight: 700; line-height: 1.4; margin-top: 8px; letter-spacing: -.4px; }
.sec-head p { font-size: 15.5px; color: var(--muted); margin-top: 10px; line-height: 1.9; }

.svc { position: relative; padding: 26px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .2s var(--ease); }
.svc:hover { border-color: #d6d6dc; box-shadow: var(--sh-2); }
.svc .ico-box { width: 40px; height: 40px; border-radius: 10px; }
.svc .ico-box .i { width: 19px; height: 19px; }
.svc h3 { font-size: 17px; font-weight: 600; margin-top: 4px; }
.svc p { color: var(--muted); font-size: 14px; line-height: 1.85; }
.svc ul { display: flex; flex-direction: column; gap: 8px; }
.svc li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.svc li .i { width: 15px; height: 15px; color: var(--ink); }
.svc .more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.svc .more::after { content: " ←"; }
.svc .price-from { font-size: 13px; color: var(--muted); }
.svc .price-from b { font-size: 17px; color: var(--ink); font-weight: 600; }

.plan { position: relative; padding: 28px 26px; border-radius: 16px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 18px; }
.plan.pop { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--sh-2); }
.plan-tag { position: absolute; top: -11px; inset-inline-start: 24px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.plan-name { font-size: 16px; font-weight: 600; }
.plan-desc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; }
.plan-price b { font-size: 38px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.plan-price span { font-size: 13.5px; color: var(--muted); }
.plan-save { font-size: 12.5px; color: var(--ok); font-weight: 500; min-height: 20px; }
.plan ul { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.plan li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.plan li .i { width: 16px; height: 16px; color: var(--ink); }
.plan li.off { color: var(--faint); }
.plan li.off .i { color: #cfcfd6; }

.how-step { position: relative; padding: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.how-step .n { font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--subtle); border: 1px solid var(--line); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.how-step h4 { font-size: 15px; font-weight: 600; margin-top: 14px; }
.how-step p { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.85; }

.feats > div { padding: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.feats .i { color: var(--ink); width: 20px; height: 20px; }
.feats h4 { font-size: 15px; font-weight: 600; margin-top: 12px; }
.feats p { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.85; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.faq details[open] { border-color: #d6d6dc; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--faint); transition: transform .2s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); color: var(--ink); }
.faq details p { padding: 0 20px 18px; color: var(--muted); line-height: 1.9; font-size: 14px; }

.cta-band { border-radius: 18px; background: var(--subtle); border: 1px solid var(--line); padding: 44px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h3 { font-size: 24px; font-weight: 700; line-height: 1.45; }
.cta-band p { color: var(--muted); margin-top: 6px; font-size: 15px; max-width: 560px; }

.s-foot { position: relative; background: #fff; border-top: 1px solid var(--line); color: var(--muted); padding: 56px 0 26px; font-size: 13.5px; }
.s-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.s-foot h5 { color: var(--ink); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.s-foot li { margin-bottom: 9px; }
.s-foot a:hover { color: var(--ink); }
.s-foot .about { max-width: 320px; line-height: 1.9; margin-top: 14px; }
.s-foot .bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }

.page-hero { background: #fff; border-bottom: 1px solid var(--line-2); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 60% 90% at 80% 0%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 60% 90% at 80% 0%, #000 10%, transparent 70%); }
.page-hero .wrap-w { position: relative; z-index: 1; padding: 52px 0 44px; }
.page-hero h1 { font-size: 32px; font-weight: 700; margin-top: 8px; line-height: 1.4; letter-spacing: -.4px; }
.page-hero p { color: var(--muted); font-size: 15.5px; margin-top: 8px; max-width: 620px; line-height: 1.9; }

.dom-hit { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 14px; background: #fff; border: 1px solid #bfe3cc; box-shadow: 0 0 0 3px var(--ok-bg); flex-wrap: wrap; }
.dom-hit.taken { border-color: var(--line); box-shadow: none; }
.dom-hit .name { font-size: 22px; font-weight: 600; direction: ltr; }
.dom-hit .price b { font-size: 22px; font-weight: 700; }
.dom-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.dom-row:last-child { border-bottom: 0; }
.dom-row .name { font-weight: 600; direction: ltr; font-size: 14.5px; flex: 1; text-align: right; }
.dom-row .name span { color: var(--muted); }
.dom-row.taken .name { color: var(--faint); text-decoration: line-through; text-decoration-color: #d6d6dc; }
.dom-row .price { font-weight: 600; min-width: 120px; text-align: end; }
.dom-row .price s { color: var(--faint); font-weight: 400; font-size: 12.5px; margin-inline-end: 6px; unicode-bidi: isolate; }
.in-cart { color: var(--ok); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

.tld-card { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.tld-card .t { font-size: 20px; font-weight: 600; direction: ltr; text-align: left; }
.tld-card .p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tld-card .p b { color: var(--ink); font-size: 16px; }

.wizard { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.wz-steps { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 2px; }
.wz-step { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.wz-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: 12px; flex: none; }
.wz-step.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 17, 19, .06), 0 0 0 1px var(--line); }
.wz-step.on .n { background: var(--primary); color: #fff; border-color: var(--primary); }
.wz-step.done .n { background: var(--subtle); color: var(--ink); }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.auth-form { display: flex; flex-direction: column; padding: 36px 56px; }
.auth-form .inner { width: min(400px, 100%); margin: auto; }
.auth-side { position: relative; overflow: hidden; background: var(--subtle); border-inline-start: 1px solid var(--line); color: var(--ink); padding: 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 65%); opacity: .7; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { font-size: 30px; font-weight: 700; line-height: 1.45; letter-spacing: -.4px; }
.auth-side .lead { color: var(--muted); font-size: 15.5px; margin-top: 12px; max-width: 440px; line-height: 1.9; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.auth-points > div { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .ico-box { background: #fff; border-color: var(--line); color: var(--ink); }
.auth-points strong { display: block; font-size: 14px; font-weight: 600; }
.auth-points span { color: var(--muted); font-size: 13px; }
.auth-title { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 20px 0; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp .input { height: 52px; text-align: center; font-size: 20px; font-weight: 600; padding: 0; }
.pw-meter { height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.pw-meter span { display: block; height: 100%; background: var(--ok); transition: width .25s; }
.pw-meter span.weak { background: #f59e0b; }

.summary { position: sticky; top: 88px; }
.sum-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.sum-total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 17px; font-weight: 600; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: .15s; font-weight: 500; font-size: 14px; }
.pay-opt:hover { border-color: #d6d6dc; }
.pay-opt.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pay-opt .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cfcfd6; flex: none; display: grid; place-items: center; }
.pay-opt.on .radio { border-color: var(--primary); }
.pay-opt.on .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.pay-logos { margin-inline-start: auto; display: flex; gap: 6px; }
.pay-logos span { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); direction: ltr; }

/* عناصر مساعدة */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; border: 1px dashed #d0d0d7; border-radius: 12px; background: var(--subtle); color: var(--muted); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--ink-2); background: #fff; }
.drop .i { color: var(--ink-2); }
.drop b { color: var(--ink); font-weight: 600; }
.review { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ok-bg); border: 1px solid #cfeadb; color: var(--ok); animation: popIn .4s var(--ease); }

/* الهيرو: البطاقات التوضيحية */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero-visual { position: relative; height: 360px; }
.hv-card { position: absolute; width: 320px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(17, 17, 19, .28); color: var(--ink); }
.hv-1 { top: 0; left: 70px; }
.hv-2 { top: 104px; left: 0; width: 340px; }
.hv-3 { top: 250px; left: 90px; }
.hv-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--subtle); border: 1px solid var(--line-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.hv-ico .i { width: 17px; height: 17px; }
.hv-t { font-weight: 600; font-size: 13.5px; }
.hv-s { font-size: 12px; color: var(--muted); }
.hv-price { font-weight: 600; color: var(--ink); white-space: nowrap; }
.hv-live { font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg); padding: 2px 8px; border-radius: 6px; }
.hv-pct { font-weight: 600; font-size: 16px; }
.hv-bars { display: grid; gap: 10px; margin-top: 12px; }
.hv-bars > div { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }

/* لوحة العميل */
.mini-steps { display: flex; align-items: center; gap: 3px; }
.mini-steps span { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.mini-steps span.done { background: var(--primary); }
.mini-steps span.now { background: var(--accent); }
.mini-steps em { font-style: normal; font-size: 12px; color: var(--muted); margin-inline-start: 8px; }

.renewals { display: flex; flex-direction: column; gap: 2px; }
.rn { display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; transition: background .12s; }
.rn:hover { background: var(--subtle); }
.rn-days { width: 44px; height: 44px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--subtle); border: 1px solid var(--line-2); color: var(--muted); font-size: 10.5px; line-height: 1.1; flex: none; }
.rn-days b { font-size: 15px; color: var(--ink); font-weight: 600; }
.rn-days.hot { background: var(--warn-bg); border-color: #fbe5c0; color: var(--warn); }
.rn-days.hot b { color: var(--warn); }

.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 28px; border-style: dashed; background: transparent; min-height: 250px; }
.add-card:hover { background: var(--subtle); }
.prov { padding: 12px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line-2); }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
.usage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.usage-item { display: flex; align-items: center; gap: 14px; padding: 16px; }
.usage-item .ring { --s: 54px; }
.usage-item .ring span { font-size: 12.5px; }
.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list > div { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 13.5px; }
.check-list .c { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); color: var(--faint); flex: none; }
.check-list .c .i { width: 13px; height: 13px; }
.check-list .done .c { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-list .now .c { background: #fff; }
.check-list .todo { color: var(--faint); }
.danger-zone { border-color: #f3d0cf; }
.danger-zone .card-title { color: var(--bad); }

.proj { display: flex; gap: 16px; padding: 20px; align-items: flex-start; }
.proj-side { width: 210px; flex: none; text-align: end; display: flex; flex-direction: column; align-items: flex-end; }
.proj .next { margin-top: 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.proj .next.act { color: var(--ink); background: var(--warn-bg); border: 1px solid #fbe5c0; padding: 4px 9px; border-radius: 7px; }
.steps.compact .dot { width: 22px; height: 22px; font-size: 11px; }
.steps.compact .dot .i { width: 12px; height: 12px; }
.steps.compact .step::before { top: 10px; }
.steps.compact .step-lbl { font-size: 11.5px; }

.pp { padding: 12px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
.pp b { font-size: 17px; font-weight: 600; color: var(--ink); }
.pp span { font-size: 12.5px; color: var(--muted); }
.pp em { font-style: normal; font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.quote { border-color: #d6d6dc; }
.quote.approved { border-color: #bfe3cc; }
.drawer-in { animation: drawerIn .26s var(--ease); }
.drawer-out { animation: drawerIn .18s var(--ease) reverse; }
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; direction: ltr; unicode-bidi: isolate; }
.table .mono.truncate { text-align: right; }
.rec-type { display: inline-grid; place-items: center; min-width: 48px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--subtle); border: 1px solid var(--line); color: var(--ink); font-size: 11.5px; font-weight: 600; font-family: ui-monospace, monospace; }
.dns-table td { height: 54px; }
.dns-table tr.editing { background: #f8faff !important; }
.dns-table tr.editing td { border-bottom-color: #e1e9fd; }
.dns-table .input, .dns-table .select { height: 34px; font-size: 13px; }
.dns-table tr.fresh { animation: savedFlash 1.6s var(--ease); }
.row-act { opacity: 0; transition: opacity .15s; color: var(--faint); display: inline-flex; vertical-align: middle; }
.table tbody tr:hover .row-act { opacity: 1; }

.dd-item.nav-on { background: var(--subtle); color: var(--ink); font-weight: 600; }
.dd-item.nav-on .i { color: var(--ink); }
.role-pick { height: 32px; width: 150px; font-size: 13px; font-weight: 500; }
.chip { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: 13px; color: var(--muted); transition: .15s; }
.chip:hover { border-color: #d6d6dc; color: var(--ink); }
.chip.on { border-color: var(--primary); background: var(--primary); color: #fff; }
.card-chip { width: 44px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ink); background: var(--subtle); border: 1px solid var(--line); flex: none; direction: ltr; }
.table.pref td { padding-top: 11px; padding-bottom: 11px; }
.q-table .input { height: 36px; }
.q-table td { padding-top: 8px; padding-bottom: 8px; }
.q-table input[type=number] { text-align: left; direction: ltr; }

.donut { width: 160px; height: 160px; border-radius: 50%; margin: 6px auto 0; position: relative; display: grid; place-items: center; }
.donut > div { width: 116px; height: 116px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut b { font-size: 20px; font-weight: 600; }
.donut span { font-size: 12px; color: var(--muted); }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.sw { display: flex; flex-direction: column; gap: 4px; }
.sw span { height: 52px; border-radius: 10px; border: 1px solid var(--line); }
.sw b { font-size: 12.5px; font-weight: 600; }
.sw code { font-size: 11.5px; color: var(--faint); direction: ltr; text-align: right; }

/* ============================================================
   الاستجابة
   ============================================================ */
@media (max-width: 1200px) {
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main, .g-main-l { grid-template-columns: minmax(0, 1fr); }
    .summary { position: static; }
    .usage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-visual { display: none; }
}
@media (max-width: 1024px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; inset-block: 0; right: 0; width: var(--side-w); transform: translateX(105%); transition: transform .26s var(--ease); box-shadow: var(--sh-pop); background: #fff; }
    .side.open { transform: none; }
    .burger { display: grid; }
    .topbar { padding: 0 18px; }
    .content { padding: 4px 18px 40px; }
    .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .s-links { display: none; }
    .s-burger { display: grid; }
    .s-foot .cols { grid-template-columns: 1fr 1fr; }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-side { display: none; }
    .wizard { grid-template-columns: minmax(0, 1fr); }
    .wz-steps { position: static; flex-direction: row; overflow-x: auto; }
    .wz-step { white-space: nowrap; }
}
@media (max-width: 720px) {
    .g-2, .g-3, .g-4 { grid-template-columns: minmax(0, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .cmd-trigger span.t, .cmd-trigger .kbd { display: none; }
    .cmd-trigger { width: 36px; padding: 0; justify-content: center; }
    .top-new span { display: none; }
    .top-new { width: 36px; padding: 0; }
    .page-title { font-size: 20px; }
    .page-head { padding: 14px 0 16px; }
    .kv { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .notif { width: calc(100vw - 24px); position: fixed; top: 56px; inset-inline: 12px; }
    .hero h1 { font-size: 32px; }
    .hero .lead { font-size: 15.5px; }
    .hero-in { padding: 48px 0 52px; }
    .finder-box { flex-wrap: wrap; }
    .finder-box input { width: 100%; }
    .finder-box .btn { width: 100%; }
    .sec { padding: 60px 0; }
    .sec-head h2 { font-size: 24px; }
    .cta-band { padding: 28px 22px; }
    .cta-band h3 { font-size: 20px; }
    .s-foot .cols { grid-template-columns: 1fr; }
    .wrap-w { width: calc(100% - 32px); }
    .page-hero h1 { font-size: 25px; }
    .page-hero .wrap-w { padding: 36px 0 30px; }
    .auth-form { padding: 24px 20px; }
    .doc { padding: 24px 18px; }
    .doc-parties { grid-template-columns: 1fr; }
    .steps .step-lbl { font-size: 11px; }
    .steps .step-sub { display: none; }
    .msg { max-width: 100%; }
    .dom-row { flex-wrap: wrap; }
    .dom-row .name { flex-basis: 100%; }
    .toolbar .search { min-width: 0; flex: 1; }
    .s-login { display: none; }
    .s-nav .logo .sub { display: none; }
    .s-nav .wrap-w { gap: 10px; }
    .modal-foot { flex-wrap: wrap; }
    .modal-foot .btn { flex: 1; }
    .banner { flex-wrap: wrap; }
    .banner .grow { flex-basis: calc(100% - 60px); }
    .banner .btn { flex: 1; }
    .list > * { flex-wrap: wrap; padding: 12px 16px; }
    .list > a > .btn { display: none; }
    .list > * > .grow { flex-basis: calc(100% - 60px); }
    .table { min-width: 640px; }
    .table.pref { min-width: 560px; }
    .q-table { min-width: 700px; }
    .card-head { padding: 16px 16px 0; }
    .card-body { padding: 14px 16px 16px; }
    .card-foot { padding: 12px 16px; flex-wrap: wrap; }
    .toolbar { padding: 12px 16px; }
    .table th:first-child, .table td:first-child { padding-inline-start: 16px; }
    .stat { padding: 14px 16px; }
    .stat-val { font-size: 20px; }
    .tabs { gap: 18px; }
    .usage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .usage-item { flex-direction: column; align-items: flex-start; padding: 14px; }
    .topbar { gap: 6px; padding: 0 12px; }
    .content { padding: 4px 14px 32px; }
    .kanban { grid-auto-columns: 82%; }
    .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .seg::-webkit-scrollbar { display: none; }
    .seg button, .seg a { white-space: nowrap; }
    .dom-hit { padding: 18px; }
    .dom-hit .btn { width: 100%; }
    .proj { padding: 16px; flex-wrap: wrap; }
    .proj-side { width: 100%; align-items: flex-start; text-align: start; }
    .steps.compact .step-lbl { display: none; }
    .grid.g-main-l[style*="260px"] { grid-template-columns: minmax(0, 1fr) !important; }
}

@media print {
    .side, .topbar, .page-actions, .toasts, .no-print { display: none !important; }
    .app { display: block; }
    .content { padding: 0; max-width: none; }
    body { background: #fff; }
    .doc { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
