/* لونج ديجيتال — منطقة العميل (حسابي).
   ملف لوحده بيتحمّل في صفحة الحساب بس: شريط جانبي للتنقّل + مساحة عمل
   بكروت. كل القواعد تحت #acc أو بادئة .ac-/.auth- عشان ما تلمسش باقي
   الموقع اللي بيستخدم نفس الكلاسات (.co و.pill و.form) بشكل تاني.
   الألوان من متغيرات site.css (--primary و--accent بيتحقنوا من اللوحة). */

:root {
  --ac-ok-bg:   #E3F3EA;
  --ac-ok-ink:  #17774D;
  --ac-warn-bg: #FDF0D8;
  --ac-warn-ink:#8F5405;
  --ac-bad-bg:  #FBE6E3;
  --ac-bad-ink: #A52A21;
  --ac-info-bg: #E5F0F5;
  --ac-info-ink:#0F5A73;
  --ac-line:    #E3E9ED;
  --ac-r:       16px;
  --ac-lift:    0 1px 2px rgba(12,27,36,.04), 0 2px 10px rgba(12,27,36,.03);
  --ac-pop:     0 18px 48px rgba(12,27,36,.16), 0 2px 6px rgba(12,27,36,.06);
}

.ac-page { padding: 30px 0 72px; min-height: 70vh; }
#acc, #acc.ag-wide { max-width: none; margin: 0; }

/* ===== التحميل ===== */
.ac-boot { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 320px; color: var(--ink-3); font-size: 15px; }
.ac-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--rule); border-top-color: var(--primary); animation: ac-spin .8s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
#acc .empty { padding: 48px 0; }
#acc > .empty, .acc-body > .empty { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 240px; }
#acc > .empty::before, .acc-body > .empty:not(:has(*))::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--rule); border-top-color: var(--primary); animation: ac-spin .8s linear infinite; }

/* ===== الهيكل: شريط جانبي + مساحة عمل ===== */
.ac-app { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 28px; align-items: start; }
.ac-side { position: sticky; top: 92px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--ac-line); border-radius: 20px; box-shadow: var(--ac-lift); overflow: hidden; }
.ac-main { min-width: 0; }

.ac-user { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid var(--ac-line); background: linear-gradient(180deg, #F6FAFB, var(--card)); }
.ac-avatar { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 19px; background: linear-gradient(135deg, var(--primary), var(--deep)); box-shadow: inset 0 -3px 0 var(--accent); }
.ac-user-txt { min-width: 0; }
.ac-user-name { font-family: var(--display); font-weight: 700; font-size: 15.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-user-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ac-user-sub .mono { font-size: 12.5px; }
.ac-verified { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; flex: none; }
.ac-verified .ag-ico { width: 11px; height: 11px; stroke-width: 3; }
.ac-unverified { color: var(--ac-warn-ink); font-weight: 600; }

.ac-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.ac-nav-label { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); padding: 10px 12px 4px; }
.ac-nav-btn { appearance: none; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2); font-family: var(--display); font-size: 14.5px; font-weight: 600; text-align: start; cursor: pointer; transition: background .15s, color .15s; position: relative; white-space: nowrap; }
.ac-nav-btn .ag-ico { width: 19px; height: 19px; color: var(--ink-3); transition: color .15s; }
.ac-nav-btn:hover { background: var(--paper); color: var(--ink); }
.ac-nav-btn:hover .ag-ico { color: var(--ink-2); }
.ac-nav-btn.on { background: #E9F2F6; color: var(--primary-2); }
.ac-nav-btn.on .ag-ico { color: var(--primary); }
.ac-nav-btn.on::before { content: ''; position: absolute; inset-inline-start: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.ac-nav-btn .grow { flex: 1; }
.ac-cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--body); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper-2); color: var(--ink-2); }
.ac-cnt.hot { background: var(--accent); color: var(--ink); }
.ac-cnt.bad { background: var(--bad); color: #fff; }

.ac-side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--ac-line); display: grid; gap: 2px; }
.ac-side-foot .ac-nav-btn { font-size: 14px; }
.ac-side-foot .ac-out:hover { background: var(--ac-bad-bg); color: var(--ac-bad-ink); }
.ac-side-foot .ac-out:hover .ag-ico { color: var(--ac-bad-ink); }

/* ===== رأس الصفحة ===== */
#acc .pane-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 22px; }
#acc .pane-head h3 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 800; line-height: 1.35; }
#acc .pane-head .grow { flex: 1; min-width: 0; }
#acc .pane-head .grow > .muted { margin-top: 3px; font-size: 14.5px; }
#acc .pane-head .grow > .pill { margin-top: 8px; display: inline-flex; }
.pane-sub { color: var(--ink-3); font-size: 14.5px; margin-top: 4px; line-height: 1.7; }
.ac-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 2px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ac-back .ag-ico { width: 17px; height: 17px; }
.ac-back:hover { color: var(--primary); }

/* ===== أزرار داخل الحساب ===== */
#acc .btn { border-radius: 10px; }
#acc .btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }
#acc .btn .ag-ico { width: 17px; height: 17px; }
#acc .btn-ghost { background: var(--card); border-color: var(--rule); color: var(--ink); }
#acc .btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--card); }
#acc .btn-soft { background: #E9F2F6; border-color: transparent; color: var(--primary-2); }
#acc .btn-soft:hover { background: #DCEAF0; border-color: transparent; }
#acc .btn-danger { background: var(--card); border-color: #EBC2BD; color: var(--bad); }
#acc .btn-danger:hover { background: var(--ac-bad-bg); border-color: var(--bad); }

/* ===== الكروت ===== */
#acc .co, .ac-card { background: var(--card); border: 1px solid var(--ac-line); border-radius: var(--ac-r); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--ac-lift); }
.ac-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ac-card-head h4 { font-family: var(--display); font-size: 16.5px; font-weight: 700; }
.ac-card-head .grow { flex: 1; min-width: 0; }
.ac-card-head .muted { font-size: 13.5px; }
.ac-card-head .ag-ico { color: var(--primary); }
.ac-link { background: none; border: 0; padding: 2px 0; color: var(--primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ac-link:hover { color: var(--primary-2); text-decoration: underline; }
.ac-link .ag-ico { width: 16px; height: 16px; }

#acc .co.clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
#acc .co.clickable:hover { border-color: var(--primary); box-shadow: 0 8px 22px rgba(15,90,115,.1); }
#acc .co-top { display: flex; align-items: flex-start; gap: 12px; }
#acc .co-top b { font-family: var(--display); font-size: 16.5px; }
#acc .co-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin-top: 16px; padding: 0; border: 1px solid var(--ac-line); border-radius: 12px; overflow: hidden; background: var(--ac-line); }
#acc .bit { padding: 11px 14px; gap: 3px; font-size: 12.5px; color: var(--ink-3); background: #FAFCFD; }
#acc .bit b { font-size: 15px; color: var(--ink); font-family: var(--display); font-weight: 700; }
#acc .bit.bad b { color: var(--bad); }
#acc .co .actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
#acc .co .err, #acc .co .notice-soft { margin-top: 14px; }
#acc .co > h4, .acc-body > h4 { font-family: var(--display); font-size: 17px; margin: 22px 0 12px; }

/* الشارات: خلفية ناعمة ونقطة بلون الحالة */
#acc .pill, .ac-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 0; border-radius: 999px; font-family: var(--body); font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--paper-2); color: var(--ink-2); line-height: 1.4; }
#acc .pill::before, .ac-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
#acc .pill.ok { background: var(--ac-ok-bg); color: var(--ac-ok-ink); }
#acc .pill.warn { background: var(--ac-warn-bg); color: var(--ac-warn-ink); }
#acc .pill.bad { background: var(--ac-bad-bg); color: var(--ac-bad-ink); }
#acc .pill.info { background: var(--ac-info-bg); color: var(--ac-info-ink); }

/* ملاحظات وتنبيهات */
#acc .notice-soft { display: block; border: 1px solid #D5E6EE; border-inline-start: 1px solid #D5E6EE; background: #F1F7FA; border-radius: 12px; padding: 12px 15px; font-size: 14.5px; color: var(--ink-2); line-height: 1.75; }
#acc .notice-soft > b { color: var(--ink); }
#acc .err { border: 1px solid #F0C9C4; border-inline-start: 1px solid #F0C9C4; background: var(--ac-bad-bg); color: var(--ac-bad-ink); border-radius: 12px; padding: 11px 15px; font-size: 14.5px; margin-top: 14px; }
#acc .hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.7; }
.ac-callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 13px 15px; border-radius: 12px; font-size: 14.5px; line-height: 1.75; background: #F1F7FA; border: 1px solid #D5E6EE; color: var(--ink-2); }
.ac-callout .ag-ico { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--primary); }
.ac-callout.warn { background: #FEF7EA; border-color: #F3DDB0; }
.ac-callout.warn .ag-ico { color: var(--gold); }
.ac-pend { margin: 0 0 16px; align-items: center; flex-wrap: wrap; }
.ac-pend .grow { flex: 1 1 220px; }
.ac-pend .actions { display: flex; gap: 8px; margin: 0; }
.ac-callout.bad { background: var(--ac-bad-bg); border-color: #F0C9C4; color: var(--ac-bad-ink); }
.ac-callout.bad .ag-ico { color: var(--bad); }
.ac-callout.ok { background: var(--ac-ok-bg); border-color: #C3E5D2; }
.ac-callout.ok .ag-ico { color: var(--ok); }

/* شريط تأكيد الرقم / دخول الإدارة */
#acc .notice.warn, .ac-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 20px; padding: 15px 18px; border-radius: var(--ac-r); background: linear-gradient(90deg, #FEF4E0, #FFF9EE); border: 1px solid #F1D9A6; border-inline-start: 1px solid #F1D9A6; color: #6E4306; font-size: 14.5px; }
#acc .notice.warn > div:first-child { flex: 1 1 320px; }
#acc .notice.warn .form { flex: 1 1 100%; grid-template-columns: minmax(0, 260px); margin: 0; }
#acc .notice.warn > div:empty { display: none; }

/* ===== النماذج ===== */
#acc .form { gap: 16px 18px; max-width: none; }
#acc .f label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
#acc .f input, #acc .f textarea, #acc .f select { border: 1px solid #CFDAE0; border-radius: 10px; padding: 11px 13px; font-size: 15px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
#acc .f input:hover, #acc .f textarea:hover, #acc .f select:hover { border-color: #AFC0C9; }
#acc .f input:focus, #acc .f textarea:focus, #acc .f select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15,90,115,.1); }
#acc .f input:disabled { background: var(--paper); color: var(--ink-2); }
#acc .f input[type=file] { padding: 9px; background: var(--paper); border-style: dashed; cursor: pointer; }
#acc .f .hint { margin-top: 0; }
#acc .pw-row { position: relative; }
#acc .pw-row input { padding-inline-end: 64px; }
#acc .pw-eye { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
#acc .pw-eye:hover { background: var(--ac-info-bg); }
.ac-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ac-line); }

/* ===== نظرة عامة ===== */
.ac-hello { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 22px; }
.ac-hello .grow { flex: 1; min-width: 240px; }
.ac-hello-date { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.ac-hello h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin-top: 2px; }
.ac-hello p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }

.ac-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ac-kpi { appearance: none; text-align: start; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--ac-line); border-radius: var(--ac-r); box-shadow: var(--ac-lift); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.ac-kpi:hover { border-color: #B9CDD6; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(12,27,36,.07); }
.ac-kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ac-kpi-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ac-info-bg); color: var(--primary); flex: none; }
.ac-kpi-ico .ag-ico { width: 19px; height: 19px; }
.ac-kpi.warn .ac-kpi-ico { background: var(--ac-warn-bg); color: var(--gold); }
.ac-kpi.bad .ac-kpi-ico { background: var(--ac-bad-bg); color: var(--bad); }
.ac-kpi.ok .ac-kpi-ico { background: var(--ac-ok-bg); color: var(--ok); }
.ac-kpi-label { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.ac-kpi-val { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ac-kpi-val small { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-inline-start: 4px; }
.ac-kpi-cap { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-kpi.bad .ac-kpi-val { color: var(--bad); }

.ac-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.ac-col { display: grid; gap: 0; min-width: 0; }

.ac-todo { display: grid; gap: 8px; }
.ac-todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid transparent; font-size: 14.5px; }
.ac-todo-item .ac-todo-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ac-warn-bg); color: var(--gold); }
.ac-todo-item.bad .ac-todo-ico { background: var(--ac-bad-bg); color: var(--bad); }
.ac-todo-item.bad { background: #FEF6F5; border-color: #F6D8D4; }
.ac-todo-item .grow { flex: 1; min-width: 0; line-height: 1.6; }
.ac-todo-item .grow b { display: block; font-family: var(--display); font-size: 14.5px; }
.ac-todo-item .grow span { font-size: 13.5px; color: var(--ink-3); }
.ac-todo-item .btn { flex: none; }
.ac-allgood { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--ac-ok-bg); color: var(--ac-ok-ink); font-size: 14.5px; font-weight: 600; }
.ac-allgood .ag-ico { width: 22px; height: 22px; }

.ac-corows { display: grid; }
.ac-corow { appearance: none; font: inherit; color: inherit; text-align: start; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 13px 4px; border: 0; border-top: 1px solid var(--ac-line); background: none; cursor: pointer; width: 100%; }
.ac-corow:first-child { border-top: 0; padding-top: 2px; }
.ac-corow:hover .ac-corow-name { color: var(--primary); }
.ac-corow-name { font-family: var(--display); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.ac-corow-sub { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-corow-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ac-corow-end .ac-meter { width: 110px; }

.ac-mono { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 18px; background: var(--primary); }
.ac-mono.t1 { background: linear-gradient(135deg, #0F5A73, #072A38); }
.ac-mono.t2 { background: linear-gradient(135deg, #3FB3D3, #0F5A73); }
.ac-mono.t3 { background: linear-gradient(135deg, #F0A422, #B86E0C); }
.ac-mono.t4 { background: linear-gradient(135deg, #1F8F5F, #0F5A4A); }
.ac-mono.t5 { background: linear-gradient(135deg, #5B717D, #0C1B24); }
.ac-mono.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }

.ac-meter { height: 6px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.ac-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.ac-meter.warn > span { background: var(--accent); }
.ac-meter.bad > span { background: var(--bad); }

.ac-side-card .ac-card-head { margin-bottom: 10px; }
.ac-sup-state { display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--display); font-size: 15px; }
.ac-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); flex: none; }
.ac-dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(31,143,95,.16); animation: ac-pulse 2.2s ease-in-out infinite; }
@keyframes ac-pulse { 50% { box-shadow: 0 0 0 7px rgba(31,143,95,.06); } }
.ac-side-card p { color: var(--ink-3); font-size: 13.5px; margin-top: 6px; line-height: 1.7; }
.ac-side-card .actions { margin-top: 14px; display: grid; gap: 8px; }
.ac-side-card .actions .btn { width: 100%; }
.ac-quick { display: grid; gap: 2px; }
.ac-quick a, .ac-quick button { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font: inherit; font-size: 14.5px; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: start; width: 100%; }
.ac-quick a:hover, .ac-quick button:hover { background: var(--paper); color: var(--primary); }
.ac-quick .ag-ico { color: var(--ink-3); width: 18px; height: 18px; }
.ac-quick .grow { flex: 1; }
.ac-quick .chev { width: 16px; height: 16px; color: var(--rule); }

/* ===== كارت الشركة ===== */
.cc { position: relative; }
.cc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.cc-title h3 { font-size: 18px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.cc-title .dom-row { margin-top: 4px; }
.cc-title .muted { font-size: 13.5px; margin-top: 3px; }
.cc-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#acc .cc .co-meta { margin-top: 18px; }
.cc-life { margin-top: 12px; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.cc-life .ac-meter { flex: 1; }
.cc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ac-line); }
.cc-foot .spacer { margin-inline-start: auto; }
#acc .cc .renew-offer { margin-top: 16px; padding: 16px 18px; border-radius: 12px; background: #FFF9EE; border: 1px solid #F1DDB5; font-size: 14.5px; }
#acc .cc .renew-offer > b { display: block; font-family: var(--display); font-size: 16px; margin-bottom: 4px; }
#acc .cc .renew-offer .co-meta { background: var(--card); }
#acc .cc .renew-offer .actions { margin-top: 14px; }

/* دومين الشركة */
#acc .dom-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#acc .dom-link { font-size: 13.5px; color: var(--primary); text-decoration: none; font-weight: 500; }
#acc .dom-link:hover { text-decoration: underline; }
#acc .cred-copy { padding: 2px 10px; font-size: 12px; border-radius: 7px; }

/* بيانات الدخول الأولى */
#acc .cred-box { margin-top: 16px; padding: 14px 16px; border: 1px dashed #BFD2DB; border-radius: 12px; background: #F6FAFC; }
#acc .cred-line code { background: var(--card); border-color: var(--ac-line); }

/* قائمة «المزيد» */
.ac-menu { position: relative; }
.ac-menu-btn { appearance: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 9px; background: var(--card); color: var(--ink-2); cursor: pointer; }
.ac-menu-btn:hover, .ac-menu.open .ac-menu-btn { border-color: var(--primary); color: var(--primary); }
.ac-menu-pop { position: absolute; inset-inline-end: 0; bottom: calc(100% + 6px); z-index: 30; min-width: 230px; padding: 6px; background: var(--card); border: 1px solid var(--ac-line); border-radius: 14px; box-shadow: var(--ac-pop); display: none; }
.ac-menu.open .ac-menu-pop { display: grid; gap: 2px; }
.ac-menu-pop button { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; text-align: start; cursor: pointer; }
.ac-menu-pop button:hover { background: var(--paper); color: var(--primary); }
.ac-menu-pop .ag-ico { width: 18px; height: 18px; color: var(--ink-3); }

/* ===== الفواتير ===== */
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ac-chip { appearance: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ac-chip:hover { border-color: var(--primary); color: var(--primary); }
.ac-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ac-chip .n { font-size: 12px; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; }

.inv { padding: 0; overflow: hidden; }
#acc .co.inv { padding: 0; }
.inv-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 20px; }
.inv-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); }
.inv.unpaid .inv-ico { background: var(--ac-warn-bg); color: var(--gold); }
.inv.paid .inv-ico { background: var(--ac-ok-bg); color: var(--ok); }
.inv-no { font-family: var(--monof); font-weight: 600; font-size: 15px; direction: ltr; unicode-bidi: isolate; }
.inv-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.inv-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.inv-amt { font-family: var(--display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-amt small { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-inline-start: 3px; }
.inv-body { padding: 4px 20px 18px; border-top: 1px solid var(--ac-line); }
.inv-body .hint { margin-top: 12px; }
.inv-lines { margin-top: 12px; }
#acc .inv .bill-row { padding: 8px 0; font-size: 14.5px; border-bottom: 1px dashed var(--ac-line); }
#acc .inv .bill-row.total { border-bottom: 0; border-top: 0; margin-top: 4px; padding-top: 10px; font-size: 16.5px; }
.inv-toggle { appearance: none; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--ac-line); background: #FAFCFD; color: var(--ink-3); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.inv-toggle:hover { color: var(--primary); background: var(--paper); }
.inv-toggle .ag-ico { width: 16px; height: 16px; transition: transform .2s; }
.inv.open .inv-toggle .ag-ico { transform: rotate(180deg); }
#acc .declare { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--ac-line); border-radius: 14px; background: #FAFCFD; }
.declare-title { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 15.5px; margin-bottom: 14px; }
.declare-title .ag-ico { color: var(--primary); }
#acc .declare > .btn { margin-top: 16px; }

.ac-pay { display: grid; gap: 8px; }
.inv-pay { margin-top: 16px; }
.inv-pay-title { margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.inv-pay .ac-callout { margin-top: 0; align-items: center; flex-wrap: wrap; }
.ac-pay-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--ac-line); border-radius: 12px; background: #FAFCFD; }
.ac-pay-row .ac-pay-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ac-info-bg); color: var(--primary); }
.ac-pay-row b { display: block; font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.ac-pay-row .mono { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; text-align: right; }

/* الملخص (الفواتير) */
.ac-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }

/* ===== الدعم ===== */
.sup-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.sup-card .grow { flex: 1 1 260px; }
.sup-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-card .muted { font-size: 13.5px; margin-top: 3px; }
.sup-emerg { flex: 1 1 100%; }
.tk-list { padding: 6px; }
#acc .co.tk-list { padding: 6px; }
.tk-row { appearance: none; font: inherit; color: inherit; text-align: start; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; width: 100%; padding: 13px 14px; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.tk-row + .tk-row { border-top: 1px solid var(--ac-line); border-radius: 0; }
.tk-row:hover { background: var(--paper); border-radius: 12px; }
.tk-row:hover + .tk-row { border-top-color: transparent; }
.tk-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ac-info-bg); color: var(--primary); }
.tk-row.closed .tk-ico { background: var(--paper-2); color: var(--ink-3); }
.tk-subj { font-family: var(--display); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row .chev { width: 18px; height: 18px; color: var(--ink-3); }

#acc .thread { display: flex; flex-direction: column; gap: 14px; margin: 0 0 18px; }
#acc .msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; max-width: 86%; padding: 0; border: 0; background: none; }
#acc .msg .msg-av { grid-row: span 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--deep)); }
#acc .msg.mine .msg-av { background: linear-gradient(135deg, var(--accent), var(--gold)); color: var(--ink); }
#acc .msg .who { font-family: var(--display); font-size: 13px; color: var(--ink-2); font-weight: 700; margin: 0; }
#acc .msg p { background: var(--card); border: 1px solid var(--ac-line); border-radius: 4px 14px 14px 14px; padding: 12px 15px; font-size: 15px; box-shadow: var(--ac-lift); }
#acc .msg.mine { margin-inline-start: auto; }
#acc .msg.mine p { background: #E9F2F6; border-color: #D3E4EC; border-radius: 14px 4px 14px 14px; }
#acc .msg .when { font-size: 12px; color: var(--ink-3); margin: 0; }
.ac-compose textarea { min-height: 110px; }

/* ===== بيانات الحساب ===== */
.pf-id { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.pf-id .ac-avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
.pf-id .grow { flex: 1 1 240px; min-width: 0; }
.pf-id h3 { font-size: 21px; font-weight: 800; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 13.5px; color: var(--ink-3); }
.pf-facts span { display: inline-flex; align-items: center; gap: 6px; }
.pf-facts .ag-ico { width: 16px; height: 16px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: start; }
.pf-grid > .ac-card, .pf-grid > .co { height: auto; }
#acc .pf-sec { background: var(--card); border: 1px solid var(--ac-line); border-radius: var(--ac-r); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--ac-lift); }
#acc .pf-sec > h4 { font-size: 16.5px; display: flex; align-items: center; gap: 10px; }
#acc .pf-sec > h4 .ag-ico { color: var(--primary); }
#acc .pf-sec > .order-sub { color: var(--ink-3); font-size: 13.5px; margin: 4px 0 16px; }
#acc .pf-sec .form { grid-template-columns: 1fr; }
#acc .pf-sec > .btn { margin-top: 16px; }

/* ===== طلب شركة ===== */
#acc .order-card { border: 1px solid var(--ac-line); border-radius: var(--ac-r); box-shadow: var(--ac-lift); padding: 22px 24px; margin-top: 16px; }
#acc .step-no { background: var(--ink); width: 30px; height: 30px; font-size: 14px; }
#acc .order-intro { color: var(--ink-3); }
#acc .bill { border-radius: 14px; background: #FAFCFD; border-color: var(--ac-line); }
#acc .order-next { border-radius: 14px; }
#acc .done-box { background: var(--card); border: 1px solid var(--ac-line); border-radius: var(--ac-r); padding: 34px 24px 28px; box-shadow: var(--ac-lift); }
#acc .done-box .big { font-size: 46px; }
#acc .keyrow { border-radius: 12px; border-color: #BFD2DB; background: #F6FAFC; }

/* الحالات الفاضية */
.ac-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 44px 20px; background: var(--card); border: 1px dashed #C9D6DD; border-radius: var(--ac-r); }
.ac-empty-art { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 6px; color: var(--primary); background: linear-gradient(135deg, #E9F2F6, #FFF4E0); }
.ac-empty-art .ag-ico { width: 30px; height: 30px; }
.ac-empty b { font-family: var(--display); font-size: 17px; }
.ac-empty p { color: var(--ink-3); font-size: 14.5px; max-width: 48ch; }
.ac-empty .btn { margin-top: 10px; }

/* ===== التوست ===== */
.atoast { position: fixed; inset-block-end: 24px; inset-inline-start: 50%; transform: translate(50%, 10px); display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 18px 12px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600; z-index: 999; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: min(92vw, 520px); box-shadow: var(--ac-pop); }
[dir=rtl] .atoast { transform: translate(50%, 10px); }
.atoast::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5AD39C; }
.atoast.show { opacity: 1; transform: translate(50%, 0); }
.atoast.bad { background: #7E1F18; }
.atoast.bad::before { background: #FFB4AC; }

/* ===== الدخول والتسجيل ===== */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); max-width: 1000px; margin: 12px auto 0; background: var(--card); border: 1px solid var(--ac-line); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px rgba(7,42,56,.12), 0 2px 8px rgba(7,42,56,.05); }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 22px; padding: 40px 38px; color: #E6F1F5; background: radial-gradient(120% 90% at 100% 0%, #147190 0%, var(--primary) 34%, var(--deep) 100%); }
.auth-aside::after { content: ''; position: absolute; width: 380px; height: 380px; inset-inline-start: -160px; bottom: -170px; border-radius: 50%; border: 56px solid rgba(240,164,34,.12); pointer-events: none; }
.auth-aside img { height: 36px; width: auto; align-self: flex-start; }
.auth-aside h2 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 800; color: #fff; margin-top: 18px; line-height: 1.35; }
.auth-aside h2 span { color: var(--accent); }
.auth-aside > p { color: #BFD6DF; font-size: 15px; line-height: 1.8; max-width: 38ch; }
.auth-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.auth-points li b { display: block; color: #fff; font-family: var(--display); font-size: 15px; }
.auth-points li span { color: #A9C4CF; font-size: 13.5px; }
.auth-points .ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: var(--accent); }
.auth-points .ag-ico { width: 18px; height: 18px; }
.auth-aside-foot { margin-top: auto; font-size: 13px; color: #8FB0BD; position: relative; z-index: 1; }

#acc .auth { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 44px 44px 36px; display: flex; flex-direction: column; }
#acc .auth h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
#acc .auth > .muted { font-size: 15px; margin-bottom: 24px; line-height: 1.75; }
#acc .auth .form { grid-template-columns: 1fr; gap: 16px; }
#acc .auth .f input { padding: 13px 14px; font-size: 15.5px; }
#acc .auth #a_code, #acc .auth #a_vcode { text-align: center; font-family: var(--monof); font-size: 24px; letter-spacing: .5em; padding: 12px; direction: ltr; }
#acc .auth .wz-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding-top: 0; border-top: 0; }
#acc .auth .wz-foot .btn { width: 100%; padding: 13px 18px; font-size: 16px; }
#acc .auth .wz-foot .btn-ghost { border-color: var(--rule); }
#acc .auth .linkish { margin: 14px auto 0; font-size: 14px; font-weight: 600; text-decoration: none; }
#acc .auth .linkish:hover { text-decoration: underline; }
#acc .auth > div > .err { margin-top: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 4px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--ac-line); }

.auth-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.auth-step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.auth-step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); font-size: 12.5px; font-family: var(--display); }
.auth-step.on { color: var(--ink); }
.auth-step.on i { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(15,90,115,.12); }
.auth-step.done i { background: var(--ok); color: #fff; }
.auth-step-line { flex: 1; min-width: 14px; height: 2px; border-radius: 2px; background: var(--paper-2); }
.auth-step-line.done { background: var(--ok); }
#acc .auth .agent-pick { padding: 14px; border: 1px solid var(--ac-line); border-radius: 12px; background: #FAFCFD; }

/* ===== تطبيق ويندوز في «برامجي» ===== */
.dk-head { display: flex; align-items: center; gap: 14px; }
.dk-head .grow { flex: 1; min-width: 0; }
.dk-head b { font-family: var(--display); font-size: 16.5px; }
.dk-head .muted { font-size: 13px; margin-top: 2px; }
.dk-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--deep)); box-shadow: inset 0 -3px 0 var(--accent); }
.dk-ico .ag-ico { width: 24px; height: 24px; }
.dk-desc { margin-top: 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.dk-rows { margin-top: 14px; border: 1px solid var(--ac-line); border-radius: 12px; overflow: hidden; }
.dk-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #FAFCFD; }
.dk-row + .dk-row { border-top: 1px solid var(--ac-line); }
.dk-row .grow { flex: 1; min-width: 0; }
.dk-row b { font-family: var(--display); font-size: 14.5px; }
.dk-row .mono { font-size: 12.5px; text-align: right; }
.dk-row .ac-mono { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
@media (max-width: 640px) { .dk-row { flex-wrap: wrap; } .dk-row .btn { width: 100%; } }

/* ===== تفاصيل صغيرة ===== */
a.ac-nav-btn { text-decoration: none; }
.ac-kpi.static { cursor: default; }
.ac-kpi.static:hover { transform: none; border-color: var(--ac-line); box-shadow: var(--ac-lift); }
.inv-body[hidden] { display: none; }
#acc .msg .msg-av .ag-ico { width: 17px; height: 17px; }
.cc.flash { animation: ac-flash 1.6s ease-out; }
@keyframes ac-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent), var(--ac-lift); } 100% { box-shadow: var(--ac-lift); } }
.acc-body > .ac-callout:first-child, .pane-head + .ac-callout { margin: 0 0 16px; }
.acc-body > h4:first-of-type { margin-top: 6px; }

/* ===== الوكيل داخل الهيكل ===== */
.ac-main .ag-hero { margin-top: 0; }

/* ===== مقاسات أصغر ===== */
@media (max-width: 1180px) {
  .ac-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-grid > .ac-col:last-child { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 14px; }
}
@media (max-width: 980px) {
  .ac-page { padding-top: 18px; }
  .ac-app { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ac-side { position: static; border-radius: 18px; }
  .ac-user { padding: 14px 16px; border-bottom: 0; }
  .ac-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 10px 10px; gap: 6px; }
  .ac-nav::-webkit-scrollbar { display: none; }
  .ac-nav-label { display: none; }
  .ac-nav-btn { width: auto; flex: none; padding: 9px 13px; background: var(--paper); font-size: 14px; }
  .ac-nav-btn.on { background: var(--primary); color: #fff; }
  .ac-nav-btn.on .ag-ico { color: #fff; }
  .ac-nav-btn.on::before { display: none; }
  .ac-nav-btn .grow { flex: none; }
  .ac-side-foot { display: none; }
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .auth-aside { padding: 26px 24px; gap: 12px; }
  .auth-aside h2 { margin-top: 6px; font-size: 22px; }
  .auth-aside > p, .auth-points, .auth-aside-foot { display: none; }
  .auth-aside::after { width: 220px; height: 220px; border-width: 36px; bottom: -120px; }
}
@media (max-width: 640px) {
  .ac-kpis, .ac-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ac-kpi { padding: 14px; }
  .ac-kpi-val { font-size: 22px; }
  #acc .co, .ac-card, #acc .pf-sec { padding: 16px; border-radius: 14px; }
  .cc-head { grid-template-columns: auto minmax(0, 1fr); }
  .cc-badges { grid-column: 1 / -1; justify-content: flex-start; }
  .cc-foot .btn { flex: 1 1 auto; }
  #acc .co-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #acc .bit { padding: 10px 12px; }
  #acc .bit b { font-size: 14px; }
  .cc-foot .spacer { margin-inline-start: 0; }
  .ac-todo-item { flex-wrap: wrap; }
  .ac-todo-item .btn { width: 100%; }
  .ac-corow-end .ac-meter { width: 70px; }
  .inv-head { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .inv-end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .inv-body { padding: 4px 16px 16px; }
  .tk-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tk-row .chev { display: none; }
  #acc .msg { max-width: 100%; }
  #acc .auth { padding: 28px 20px 24px; }
  .auth-step span { display: none; }
  .ac-sum .ac-kpi:last-child { grid-column: 1 / -1; }
}
.ag-ico.ag-flip { transform: scaleX(-1); }
