/* FindLeb — auth, account area and admin components (loaded after app.css). Logical properties → RTL-safe. */

/* ---------- Arabic / RTL ---------- */
[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, -apple-system, sans-serif; letter-spacing: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .logo { letter-spacing: 0; }
[dir="rtl"] .i[style*="scaleX"] { transform: none !important; }
[dir="rtl"] .see-all .i, [dir="rtl"] .pager .i, [dir="rtl"] .drawer-link .i[href="#i-arrow-r"] { transform: scaleX(-1); }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="number"], [dir="rtl"] .code-input { direction: ltr; text-align: end; }
.lang-switch { font-weight: 700; }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: start center; padding: clamp(20px, 5vw, 56px) 16px; }
.auth-card { width: 100%; max-width: 440px; } .auth-card.auth-wide { max-width: 640px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 4px; } .auth-card > .muted { margin-bottom: 18px; }
.btn-block { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-size: .88rem; color: var(--ink-500); }
.auth-links a, .link-btn { color: var(--brand-600); font-weight: 700; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Area shell (account + admin) ---------- */
.area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 18px 40px; }
.area > aside, .area-main { min-width: 0; }
@media (min-width: 900px) { .area { grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 26px; } }
.area-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.area-nav::-webkit-scrollbar { display: none; }
.area-nav a { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md); font-weight: 700; font-size: .92rem; color: var(--ink-600); background: var(--surface); border: 1px solid var(--line-soft); }
.area-nav a[aria-current="page"] { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.area-nav a .i { width: 18px; height: 18px; }
.area-nav .count { background: var(--red-100); color: #8f1d22; border-radius: var(--r-pill); font-size: .7rem; padding: 1px 7px; font-weight: 800; }
@media (min-width: 900px) { .area-nav { flex-direction: column; overflow: visible; position: sticky; top: 84px; } }
.area-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.area-head h1 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.area-main > .panel + .panel, .area-main > * + .panel { margin-top: 16px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-xs); display: block; }
.stat-card small { display: block; color: var(--ink-500); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card b { display: block; font-size: 1.7rem; font-family: var(--font-display, inherit); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card.accent { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; border: 0; } .stat-card.accent small { color: rgba(255,255,255,.8); }
a.stat-card:hover { border-color: var(--brand-500); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); background: var(--bg-soft, #f6f8fc); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; } .table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.badge-warn { background: #fff4d6; color: #8a5a00; } .badge-bad { background: var(--red-100); color: #8f1d22; } .badge-muted { background: #eef1f6; color: var(--ink-500); }

/* ---------- Forms / toolbars ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input, .toolbar .select-input { width: auto; min-width: 160px; flex: 1 1 160px; max-width: 320px; }
.form-grid { display: grid; gap: 14px; } @media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.form-grid .full { grid-column: 1 / -1; }
.field-group small.hint { display: block; margin-top: 4px; color: var(--ink-500); font-size: .8rem; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; } .check input { width: 18px; height: 18px; accent-color: var(--brand-500); }
.btn-danger { background: var(--red-500, #e5484d); color: #fff; } .btn-danger:hover { filter: brightness(.92); }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.empty-state { text-align: center; padding: 34px 16px; color: var(--ink-500); }
.empty-state h3 { color: var(--ink-900); margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; } .kv dt { color: var(--ink-500); font-weight: 700; } .kv dd { margin: 0; }

/* ---------- Business cards / photos ---------- */
.biz-list { display: grid; gap: 12px; }
.biz-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 12px; }
.biz-row .thumb { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--brand-50); display: grid; place-items: center; font-weight: 800; color: var(--brand-700); }
.biz-row .grow { flex: 1; min-width: 0; } .biz-row h3 { font-size: 1rem; margin: 0 0 2px; } .biz-row .meta { color: var(--ink-500); font-size: .84rem; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.photo-grid figure { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-soft); aspect-ratio: 1; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid form { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; }

/* ---------- Pager / tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .86rem; }
.tabs a[aria-current="page"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.price-tag { font-weight: 800; color: var(--brand-700); }
/* Sponsored homepage banners */
.promo-strip { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.promo { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 12 / 5; background: var(--ink-900); box-shadow: var(--shadow-sm); }
.promo img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.promo-text { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(5,10,25,.82)); display: grid; gap: 2px; }
.promo-text b { font-size: 1.1rem; } .promo-text small { opacity: .9; }
.promo-tag { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; background: rgba(255,255,255,.9); color: var(--ink-700); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); }
.callout { background: var(--brand-50); border: 1px solid var(--brand-100, #dfe5ff); border-radius: var(--r-md); padding: 12px 14px; font-size: .92rem; }
