/* ==========================================================================
   Ahmed Jafari — additions on top of the original Bentofolio theme (style.css)
   Customer portal, admin, store, forms. Same palette: --primary #4770FF.
   Everything is scoped under .aj to win over Bootstrap defaults.
   ========================================================================== */

:root {
  --aj-text: #1A1F2C;
  --aj-muted: #616670;
  --aj-border: #DBDFE5;
  --aj-soft: #F5F7FA;
  --aj-primary-soft: rgba(71, 112, 255, .08);
  --aj-success: #16a34a;
  --aj-warning: #d97706;
  --aj-danger: #dc2626;
  --aj-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

/* ---------- Header extras ---------- */
.header-area .header-right-info { gap: 10px; }
.header-area .lang-switch {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--aj-border); color: var(--aj-text); font-weight: 700; font-size: 13px; background: #fff;
  transition: all .15s;
}
.header-area .lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.header-area .login-link { color: var(--aj-text); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.header-area .login-link:hover { color: var(--primary); background: var(--aj-primary-soft); }
.header-area .brand-subtitle { font-size: 11px; color: var(--aj-muted); }

/* ---------- Generic helpers ---------- */
.aj .muted { color: var(--aj-muted); }
.aj .ltr { direction: ltr; unicode-bidi: isolate; }
.aj .help { font-size: 12.5px; color: var(--aj-muted); }
.aj .mono, .aj .key-sm { font-family: var(--aj-mono); }
.aj .key-sm { font-size: 13px; color: #1e3a8a; direction: ltr; unicode-bidi: isolate; }
.aj .grid { display: grid; gap: 18px; }
.aj .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aj .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aj .linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.aj .text-grad { color: var(--primary); }

/* ---------- Buttons ---------- */
.aj .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1.2;
  border: 1px solid transparent; transition: all .15s; white-space: nowrap; box-shadow: none;
}
.aj .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.aj .btn-primary:hover { background: #3459e6; border-color: #3459e6; color: #fff; }
.aj .btn-ghost { background: #fff; border-color: var(--aj-border); color: var(--aj-text); }
.aj .btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.aj .btn-dark { background: var(--black); border-color: var(--black); color: #fff; }
.aj .btn-dark:hover { background: #000; color: #fff; }
.aj .btn-danger { background: #fef2f2; border-color: #fecaca; color: var(--aj-danger); }
.aj .btn-danger:hover { background: #fee2e2; color: #b91c1c; }
.aj .btn-success { background: #f0fdf4; border-color: #bbf7d0; color: var(--aj-success); }
.aj .btn-success:hover { background: #dcfce7; }
.aj .btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.aj .btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 12px; }
.aj .btn-block { width: 100%; }

/* ---------- Alerts ---------- */
.aj-alerts { margin-top: 18px; }
.aj .alert { border-radius: 12px; padding: 13px 18px; font-weight: 500; font-size: 14px; border: 1px solid; margin: 0 0 14px; }
.aj .alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.aj .alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.aj .alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.aj .alert ul { margin: 0; padding-inline-start: 1.2em; }

/* ---------- Content box (pages) ---------- */
.aj .content-box-card .card-body { padding: 36px; }
.aj .top-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.aj .section-block { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--aj-border); }
.aj .section-block:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.aj .soft-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; height: 100%; }
.aj .soft-box h4 { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.aj .soft-box p { font-size: 13px; color: var(--aj-muted); margin: 0; line-height: 1.7; }
.aj .icon-tile {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: var(--aj-primary-soft); color: var(--primary); flex-shrink: 0;
}
.aj .checklist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 7px; }
.aj .checklist li { display: flex; gap: 9px; font-size: 14px; color: #334155; }
.aj .checklist li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary); font-size: 11px; margin-top: .45em; }
.aj .chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 8px; background: #f1f5f9; color: #0f172a; font-size: 13px; font-weight: 600; direction: ltr; }
.aj .chip i { color: var(--primary); }
.aj .chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Services list */
.aj .service-row { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; scroll-margin-top: 110px; }
.aj .service-row + .service-row { margin-top: 14px; }
.aj .service-row h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: #0f172a; }
.aj .service-row p { font-size: 14px; color: var(--aj-muted); margin-bottom: 4px; }

/* Expertise items with FA icons (home) */
.aj .expertise-item .image i { font-size: 26px; color: var(--primary); line-height: 1; }
.aj .expertise-item { height: 100%; }

/* Product cards */
.aj .product-tile { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; color: inherit; height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
.aj .product-tile:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(71, 112, 255, .1); transform: translateY(-2px); color: inherit; }
.aj .product-tile h3 { font-size: 17px; font-weight: 700; margin: 0; color: #0f172a; }
.aj .product-tile p { font-size: 13.5px; color: var(--aj-muted); margin: 0; }
.aj .product-tile .price { margin-top: auto; padding-top: 12px; border-top: 1px solid #eef2f6; display: flex; justify-content: space-between; align-items: center; }
.aj .product-tile .price b { font-size: 18px; color: #0f172a; }
.aj .product-tile .price small { display: block; font-size: 11px; color: var(--aj-muted); }

/* Plans */
.aj .plan { border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.aj .plan.featured { border: 2px solid var(--primary); box-shadow: 0 10px 30px rgba(71, 112, 255, .12); }
.aj .plan .amount { font-size: 30px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.aj .plan .btn { margin-top: 10px; }
.aj .tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: var(--aj-primary-soft); color: var(--primary); }

/* FAQ */
.aj .faq details { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.aj .faq summary { cursor: pointer; font-weight: 700; font-size: 15px; color: #0f172a; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.aj .faq summary::-webkit-details-marker { display: none; }
.aj .faq summary::after { content: "+"; color: var(--primary); font-size: 20px; line-height: 1; }
.aj .faq details[open] summary::after { content: "–"; }
.aj .faq details p { margin: 10px 0 0; font-size: 14px; color: var(--aj-muted); }

/* Dark CTA card (same style as the original home) */
.aj .cta-dark { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); border-radius: 16px; color: #fff; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border: 0; }
.aj .cta-dark h2 { color: #fff; font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.aj .cta-dark p { color: rgba(255, 255, 255, .75); margin: 0; font-size: 14.5px; }
.aj .cta-dark .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.aj .cta-dark .btn-ghost:hover { border-color: #fff; color: #fff; }

/* Code window (home) */
.aj .code-window { background: #0f172a; border-radius: 14px; overflow: hidden; direction: ltr; text-align: left; }
.aj .code-window .bar { display: flex; gap: 6px; padding: 10px 14px; background: #1e293b; align-items: center; }
.aj .code-window .bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.aj .code-window .bar span { margin-left: auto; color: #94a3b8; font-family: var(--aj-mono); font-size: 11px; }
.aj .code-window pre { margin: 0; padding: 16px 18px; font-family: var(--aj-mono); font-size: 12.5px; line-height: 1.8; color: #cbd5e1; white-space: pre-wrap; }
.t-c { color: #64748b; } .t-k { color: #c084fc; } .t-s { color: #34d399; } .t-f { color: #38bdf8; } .t-n { color: #fbbf24; }

/* ---------- Forms ---------- */
.aj .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aj .form-grid .full { grid-column: 1 / -1; }
.aj .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.aj .form-grid .field { margin-bottom: 0; }
.aj .field label { font-size: 13.5px; font-weight: 700; color: #334155; }
.aj .input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--aj-border);
  background: #fff; color: var(--aj-text); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s;
}
.aj textarea.input { min-height: 130px; resize: vertical; }
.aj .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(71, 112, 255, .15); }
.aj .input:disabled { background: var(--aj-soft); color: var(--aj-muted); }
.aj .check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: #334155; cursor: pointer; }
.aj .check input { margin-top: .3em; accent-color: var(--primary); }
.aj .hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Auth */
.aj .auth-wrap { display: flex; justify-content: center; padding: 30px 0 10px; }
.aj .auth-card { width: 100%; max-width: 460px; }
.aj .auth-card .card-body { padding: 34px; }
.aj .auth-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.aj .auth-card .sub { color: var(--aj-muted); font-size: 14px; margin-bottom: 22px; }
.aj .auth-alt { text-align: center; margin: 16px 0 0; color: var(--aj-muted); font-size: 14px; }

/* Contact channels */
.aj .channel { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; color: var(--aj-text); margin-bottom: 10px; background: #fff; }
.aj .channel:hover { border-color: var(--primary); color: var(--aj-text); }
.aj .channel small { display: block; color: var(--aj-muted); }

/* ---------- Panel (portal / admin) ---------- */
.aj .panel-side .card-body { padding: 18px; }
.aj .panel-user { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; margin-bottom: 10px; border-bottom: 1px solid #eef2f6; min-width: 0; }
.aj .panel-user > div:last-child { min-width: 0; }
.aj .panel-user strong { display: block; font-size: 15px; color: #0f172a; }
.aj .panel-user small { display: block; font-size: 12px; color: var(--aj-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aj .avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; flex-shrink: 0; overflow: hidden; }
.aj .avatar img { width: 100%; height: 100%; object-fit: cover; }
.aj .panel-nav { display: flex; flex-direction: column; gap: 2px; }
.aj .panel-nav a, .aj .panel-nav .linklike { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #334155; font-weight: 600; font-size: 14px; width: 100%; text-align: start; }
.aj .panel-nav i { width: 18px; text-align: center; color: #94a3b8; }
.aj .panel-nav a:hover, .aj .panel-nav .linklike:hover { background: var(--aj-soft); color: var(--primary); }
.aj .panel-nav a.active { background: var(--aj-primary-soft); color: var(--primary); }
.aj .panel-nav a.active i { color: var(--primary); }
.aj .panel-nav form { margin-top: 8px; padding-top: 8px; border-top: 1px solid #eef2f6; }
.aj .panel-main .card-body { padding: 28px; }
.aj .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.aj .panel-head h1 { font-size: 26px; font-weight: 800; margin: 0; color: #0f172a; }
.aj .panel-head p { margin: 4px 0 0; color: var(--aj-muted); font-size: 14px; }
.aj .kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.aj .kpi { padding: 18px; border-radius: 12px; background: var(--aj-soft); border: 1px solid #eef2f6; color: inherit; display: block; }
.aj .kpi span { color: var(--aj-muted); font-size: 13px; display: flex; gap: 7px; align-items: center; }
.aj .kpi span i { color: var(--primary); }
.aj .kpi strong { display: block; font-size: 26px; font-weight: 800; margin-top: 4px; color: #0f172a; }
.aj .box { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.aj .box h2 { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; gap: 9px; align-items: center; color: #0f172a; }
.aj .box h2 i { color: var(--primary); }
.aj .box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.aj .box-head h2 { margin: 0; }

/* Tables */
.aj .table-wrap { overflow-x: auto; }
.aj table.table { width: 100%; margin: 0; font-size: 13.5px; --bs-table-bg: transparent; }
.aj .table th { color: var(--aj-muted); font-weight: 700; font-size: 12px; padding: 10px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; text-align: start; background: transparent; }
.aj .table td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; background: transparent; }
.aj .table tr:last-child td { border-bottom: 0; }
.aj .table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Badges */
.aj .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; border: 1px solid; white-space: nowrap; line-height: 1.4; }
.aj .badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.aj .b-active, .aj .b-paid { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.aj .b-pending, .aj .b-suspended { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.aj .b-expired, .aj .b-cancelled, .aj .b-disabled { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.aj .b-revoked, .aj .b-failed, .aj .b-refunded { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

/* License */
.aj .keybox { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px 12px; direction: ltr; }
.aj .keybox code { flex: 1; font-family: var(--aj-mono); font-size: 15px; color: #1e3a8a; letter-spacing: .04em; overflow-x: auto; white-space: nowrap; background: none; }
.aj .copy-btn { background: #fff; border: 1px solid var(--aj-border); color: #334155; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.aj .copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.aj .copy-btn.copied { color: var(--aj-success); border-color: var(--aj-success); }
.aj .lic-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; margin-bottom: 10px; }
.aj .lic-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--aj-muted); font-size: 12.5px; margin-top: 4px; }
.aj .dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 22px; margin: 0; font-size: 14px; }
.aj .dl dt { color: var(--aj-muted); font-weight: 500; }
.aj .dl dd { margin: 0; font-weight: 700; color: #0f172a; }
.aj .empty { text-align: center; padding: 40px 16px; color: var(--aj-muted); }
.aj .empty > i { font-size: 38px; color: #cbd5e1; margin-bottom: 12px; display: block; }
.aj .empty h3 { font-size: 18px; color: #0f172a; }

/* Checkout */
.aj .gateway { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--aj-border); border-radius: 12px; cursor: pointer; margin-bottom: 10px; background: #fff; transition: all .15s; }
.aj .gateway:hover { border-color: var(--primary); }
.aj .gateway input { accent-color: var(--primary); }
.aj .gateway > i { font-size: 24px; width: 32px; text-align: center; }
.aj .gateway small { display: block; color: var(--aj-muted); font-size: 12.5px; }
.aj .gateway:has(input:checked) { border-color: var(--primary); background: var(--aj-primary-soft); }

/* Error page */
.aj .error-code { font-size: clamp(64px, 12vw, 120px); font-weight: 800; color: var(--primary); line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .aj .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .aj .content-box-card .card-body, .aj .panel-main .card-body { padding: 20px; }
  .aj .grid-2, .aj .grid-3, .aj .form-grid { grid-template-columns: 1fr; }
  .aj .lic-card { grid-template-columns: auto 1fr; }
  .aj .lic-card > :last-child { grid-column: 1 / -1; }
  .aj .service-row { flex-direction: column; }
  .header-area .login-link { display: none; }
}

/* alias used by portal views */
.aj .icon-box { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--aj-primary-soft); color: var(--primary); flex-shrink: 0; margin: 0; }
.aj .work-experiance-card .date p.ltr { direction: ltr; }

:root { --text-2: #334155; --warning: #d97706; --success: #16a34a; --danger: #dc2626; --font-en: inherit; }

/* Header: stack brand name + subtitle in both directions; keep CTA on one line */
.header-area .brand-lockup { display: inline-flex; flex-direction: column; line-height: 1.25; }
.header-area .brand-lockup .brand-subtitle { display: block; white-space: nowrap; }
.header-area .navbar-brand { display: inline-flex; align-items: center; gap: 10px; }
.header-area .header-right-info .lets-talk-btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.header-area .navbar-info .nav-link { white-space: nowrap; }

/* English header: mirror the Arabic brand lockup sizing */
[dir="ltr"] .header-area .container .navbar-brand { gap: 11px; padding: 0; }
[dir="ltr"] .header-area .container .navbar-brand .logo-emblem { flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(71,112,255,.18)); transition: transform .25s ease; }
[dir="ltr"] .header-area .container .navbar-brand:hover .logo-emblem { transform: translateY(-1px) scale(1.03); }
[dir="ltr"] .header-area .container .navbar-brand .brand-lockup { display: flex; flex-direction: column; justify-content: center; gap: 3px; line-height: 1.1; }
[dir="ltr"] .header-area .container .navbar-brand .brand-name { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; font-weight: 800; line-height: 1.1; color: #0f172a; letter-spacing: -0.2px; }
[dir="ltr"] .header-area .container .navbar-brand .brand-name .primary { font-size: inherit; font-weight: inherit; color: var(--primary); }
[dir="ltr"] .header-area .container .navbar-brand .brand-subtitle { display: inline-flex; align-items: center; gap: 5px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 11px; font-weight: 600; line-height: 1.2; color: #64748b; letter-spacing: .1px; white-space: nowrap; }
[dir="ltr"] .header-area .container .navbar-brand .brand-subtitle::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg,#d97706,#f59e0b); flex-shrink: 0; }
[dir="ltr"] .header-area .navbar-info .nav-link { font-family: 'Bricolage Grotesque', sans-serif; }
[dir="ltr"] .header-area .lets-talk-btn { font-family: 'Bricolage Grotesque', sans-serif; }
@media (max-width: 575.98px) {
  [dir="ltr"] .header-area .container .navbar-brand { gap: 8px; }
  [dir="ltr"] .header-area .container .navbar-brand .logo-emblem { width: 34px; height: 34px; }
  [dir="ltr"] .header-area .container .navbar-brand .brand-name { font-size: 16px; }
  [dir="ltr"] .header-area .container .navbar-brand .brand-subtitle { font-size: 10px; }
}

/* Profile card: centre all text content */
.profile-card .card-body .text { text-align: center; }
.profile-card .card-body .text .card-title { justify-content: center; text-align: center; }
.profile-card .card-body .text p { text-align: center; }
.profile-card .card-body .text .common-button-groups { justify-content: center; }
.profile-card .card-body .text .social-media-icon ul { justify-content: center; }
