/* ==========================================================
   Extras: notifications bell, email verification banner, free trial, billing history,
   admin revenue report, public pages (legal / SEO job pages).
   Uses the theme tokens of styles.css (works in light + dark). RTL first.
   ========================================================== */

.extras-muted { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- Notifications bell ---------- */
.notif-bell-wrap { position: relative; display: inline-flex; }
.notif-bell-wrap[hidden] { display: none !important; }
.notif-bell-btn { position: relative; }
.notif-badge {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 18px;
  text-align: center; box-shadow: 0 0 0 2px var(--bg-surface, #fff); pointer-events: none;
}
.notif-badge[hidden] { display: none; }
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 1200;
  width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); display: flex; flex-direction: column;
  background: var(--bg-surface-elevated, var(--bg-surface, #fff)); color: var(--text-main);
  border: 1px solid var(--border-subtle); border-radius: 14px; box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25); overflow: hidden;
}
.notif-dropdown[hidden] { display: none; }
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border-subtle); }
.notif-link-btn, .notif-more-btn { background: none; border: 0; color: var(--primary); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 0.35rem 0.4rem; border-radius: 8px; }
.notif-link-btn:hover, .notif-more-btn:hover { background: var(--primary-light, rgba(37, 99, 235, 0.12)); }
.notif-more-btn { width: 100%; border-top: 1px solid var(--border-subtle); border-radius: 0; padding: 0.6rem; }
.notif-list { overflow-y: auto; overscroll-behavior: contain; }
.notif-item {
  display: flex; gap: 0.65rem; width: 100%; text-align: start; align-items: flex-start; padding: 0.7rem 0.9rem;
  background: none; border: 0; border-bottom: 1px solid var(--border-subtle); color: inherit; font: inherit; cursor: pointer;
}
.notif-item:hover, .notif-item:focus-visible { background: var(--primary-subtle, rgba(37, 99, 235, 0.06)); outline: none; }
.notif-item.unread { background: var(--primary-light, rgba(37, 99, 235, 0.1)); }
.notif-item-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light, rgba(37, 99, 235, 0.12)); color: var(--primary); }
.notif-item-icon svg { width: 17px; height: 17px; }
.notif-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item-text strong { font-size: 0.86rem; line-height: 1.45; }
.notif-item-body { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; overflow-wrap: anywhere; }
.notif-item-time { font-size: 0.72rem; color: var(--text-muted); }
.notif-empty { padding: 1.6rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.notif-empty svg { width: 28px; height: 28px; opacity: 0.6; }
@media (max-width: 560px) {
  .notif-dropdown { position: fixed; top: 64px; inset-inline: 12px; width: auto; }
}

/* ---------- Free trial offer (subscription modal) ---------- */
.trial-offer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem;
  margin-bottom: 1rem; padding: 0.75rem 0.9rem; border-radius: var(--radius-md, 12px);
  background: rgba(16, 185, 129, 0.1); border: 1px dashed rgba(16, 185, 129, 0.45); color: var(--text-main); font-size: 0.86rem;
}
.trial-offer .btn { white-space: nowrap; }

/* ---------- Billing history (account settings modal) ---------- */
.billing-section h4 { margin: 0 0 0.6rem; }
.billing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; max-height: 280px; overflow-y: auto; }
.billing-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border-subtle); border-radius: 10px; }
.billing-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.billing-main strong { font-size: 0.86rem; }
.billing-side { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.billing-status { font-size: 0.74rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; }
.billing-status.ok { background: rgba(16, 185, 129, 0.14); color: var(--tx-emerald, #059669); }
.billing-status.wait { background: rgba(245, 158, 11, 0.15); color: var(--tx-gold, #b45309); }
.billing-status.bad { background: rgba(239, 68, 68, 0.13); color: var(--tx-danger, #dc2626); }
.btn-invoice, .btn-admin-invoice { white-space: nowrap; }
.btn-admin-invoice { font-size: 0.72rem; padding: 0.15rem 0.5rem; margin-inline-start: 0.35rem; }

/* ---------- Admin: verified flag ---------- */
.email-verified-flag { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; margin-inline-start: 0.3rem; }
.email-verified-flag.ok { background: rgba(16, 185, 129, 0.14); color: var(--tx-emerald, #059669); }
.email-verified-flag.no { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); }

/* ---------- Admin: revenue report ---------- */
.rev-report, .rev-settings { margin-top: 1.25rem; }
.rev-report[hidden], .rev-settings[hidden] { display: none; }
.rev-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.7rem; margin: 0.4rem 0 1rem; }
.rev-kpi { padding: 0.7rem 0.85rem; border-radius: 12px; border: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 0.2rem; }
.rev-kpi span { font-size: 0.78rem; color: var(--text-muted); }
.rev-kpi strong { font-size: 1.05rem; }
.rev-kpi small { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.rev-panel { border: 1px solid var(--border-subtle); border-radius: 12px; padding: 0.8rem 0.9rem; min-width: 0; }
.rev-panel h4 { margin: 0 0 0.7rem; font-size: 0.9rem; }
.rev-bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; direction: ltr; }
.rev-bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; height: 100%; }
.rev-bar-value { font-size: 0.6rem; color: var(--text-muted); height: 14px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.rev-bar-col { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; background: var(--primary-subtle, rgba(37, 99, 235, 0.05)); border-radius: 6px 6px 0 0; }
.rev-bar-fill { display: block; width: 100%; background: var(--primary-gradient, #2563eb); border-radius: 6px 6px 0 0; }
.rev-bar-label { font-size: 0.62rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.rev-hbar-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; font-size: 0.8rem; }
.rev-hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-hbar-track { height: 10px; border-radius: 999px; background: var(--primary-subtle, rgba(37, 99, 235, 0.06)); overflow: hidden; }
.rev-hbar-fill { display: block; height: 100%; border-radius: 999px; background: var(--primary-gradient, #2563eb); }
.rev-hbar-value { white-space: nowrap; font-weight: 700; }
.rev-hbar-value small { color: var(--text-muted); font-weight: 500; }
.rev-table-wrap { overflow-x: auto; }
.rev-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.rev-table th, .rev-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-subtle); text-align: start; white-space: nowrap; }
.rev-table th { color: var(--text-muted); font-weight: 700; }
.rev-settings-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem 1rem; padding-top: 0.4rem; }
.rev-settings-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.rev-settings-actions { display: flex; align-items: flex-end; }

/* ---------- Legal modal: link to full pages ---------- */
.legal-full-links { font-size: 0.8rem; color: var(--text-muted); margin: -0.5rem 0 1rem; }
.legal-full-links a { color: var(--primary); font-weight: 700; }

/* ---------- Public pages (layouts/public.blade.php) ---------- */
body.public-page { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-base); color: var(--text-main); font-family: 'Cairo', 'Alexandria', Tahoma, sans-serif; }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 16px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface); position: sticky; top: 0; z-index: 10; }
.public-brand { font-weight: 800; font-size: 1.1rem; color: var(--primary); text-decoration: none; }
.public-nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.public-nav a { color: var(--text-main); text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 0.4rem 0.6rem; border-radius: 8px; }
.public-nav a:hover { background: var(--primary-light, rgba(37, 99, 235, 0.1)); }
.public-theme-btn { background: none; border: 1px solid var(--border-subtle); color: var(--text-main); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }
.public-main { flex: 1 0 auto; width: 100%; max-width: 860px; margin: 0 auto; padding: 1.5rem 16px 2.5rem; box-sizing: border-box; }
.public-footer { border-top: 1px solid var(--border-subtle); padding: 1rem 16px; text-align: center; font-size: 0.82rem; color: var(--text-muted); background: var(--bg-surface); }
.public-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.4rem; }
.public-footer a { color: var(--primary); text-decoration: none; }
.legal-doc, .job-page { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 1.5rem 1.6rem; line-height: 1.9; overflow-wrap: anywhere; }
.legal-doc h1, .job-page h1 { font-size: 1.6rem; margin: 0 0 0.3rem; line-height: 1.4; }
.legal-doc h2, .job-page h2 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; color: var(--primary); }
.legal-doc ul { padding-inline-start: 1.3rem; margin: 0.4rem 0; }
.legal-doc li { margin-bottom: 0.3rem; }
.legal-doc a, .job-page a:not(.btn) { color: var(--primary); }
.legal-updated { color: var(--text-muted); font-size: 0.82rem; margin: 0 0 1rem; }
.job-page-crumbs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.job-page-crumbs a { color: var(--text-muted); }
.job-page-company { font-size: 1.05rem; font-weight: 700; color: var(--text-muted); margin: 0 0 0.8rem; }
.job-page-facts { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.job-page-facts li { padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--border-subtle); font-size: 0.82rem; }
.job-page-facts span { color: var(--text-muted); }
.job-page-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.job-page-actions .btn, .job-page-cta .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.55rem 1.2rem; }
.job-page-text { white-space: normal; }
.job-page-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.job-page-tag { padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--primary-light, rgba(37, 99, 235, 0.1)); color: var(--primary); font-size: 0.8rem; font-weight: 700; }
.job-page-cta { margin-top: 1.6rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--primary-gradient-subtle, rgba(37, 99, 235, 0.08)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.job-page-cta p { margin: 0; font-weight: 600; }
@media (max-width: 560px) { .legal-doc, .job-page { padding: 1.1rem 1rem; border-radius: 12px; } .legal-doc h1, .job-page h1 { font-size: 1.3rem; } }

/* Job card: link to the SEO job page */
.job-page-link { text-decoration: none; }

/* Tailor my CV for this job (resources/views/partials/app/modals/job-tailor.blade.php) */
.jt-dialog { max-width: 760px; width: calc(100% - 32px); }
.jt-dialog .modal-body { padding: 1.25rem 1.5rem; max-height: 68vh; overflow-y: auto; }
.jt-scores { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.jt-score { flex: 1 1 140px; max-width: 220px; text-align: center; padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); background: var(--bg-surface); }
.jt-score strong { display: block; font-size: 2.2rem; line-height: 1.1; margin-top: .25rem; color: var(--text-main); }
.jt-score-label { font-size: .82rem; color: var(--text-muted); }
.jt-after { border-color: var(--accent-emerald); background: rgba(16, 185, 129, .08); }
.jt-after strong.jt-up { color: var(--tx-emerald); }
.jt-arrow { color: var(--text-faint); flex-shrink: 0; }
.jt-hint { text-align: center; font-size: .8rem; color: var(--text-muted); margin: .6rem 0 0; }
.jt-section { margin-top: 1.25rem; }
.jt-section h5 { display: flex; align-items: center; gap: .4rem; font-size: .95rem; margin: 0 0 .5rem; color: var(--text-main); }
.jt-section h5 svg { width: 18px; height: 18px; color: var(--tx-indigo); }
.jt-note { font-size: .8rem; color: var(--text-muted); margin: 0 0 .6rem; line-height: 1.6; }
.jt-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.jt-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: var(--radius-full); border: 1px solid var(--border-subtle); background: var(--bg-input); font-size: .82rem; color: var(--text-soft); cursor: pointer; user-select: none; }
.jt-chip input { accent-color: var(--accent-emerald); margin: 0; }
.jt-chip:has(input:checked) { border-color: var(--accent-emerald); color: var(--tx-emerald); background: rgba(16, 185, 129, .1); }
.jt-chip-ok { cursor: default; border-color: rgba(16, 185, 129, .35); color: var(--tx-emerald); }
.jt-old, .jt-new { padding: .8rem 1rem; border-radius: var(--radius-md); font-size: .88rem; line-height: 1.75; white-space: pre-line; }
.jt-old { background: var(--bg-input); color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, .5); margin-bottom: .5rem; }
.jt-new { background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .25); color: var(--text-main); }
.jt-small { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--text-muted); line-height: 1.7; padding: .75rem 1rem; border-radius: var(--radius-md); background: var(--bg-surface); }
.jt-small svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: .2rem; }
.jt-loading, .jt-empty { text-align: center; padding: 2rem 1rem; color: var(--text-soft); }
.jt-empty svg { width: 42px; height: 42px; color: var(--tx-indigo); }
.jt-empty h4 { margin: .75rem 0 .4rem; color: var(--text-main); }
.jt-empty p { margin: 0 auto 1rem; max-width: 420px; line-height: 1.7; font-size: .9rem; }
.jt-empty-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.jt-spinner { width: 38px; height: 38px; margin: 0 auto 1rem; border-radius: 50%; border: 3px solid var(--border-subtle); border-top-color: var(--accent-indigo); animation: jtSpin .8s linear infinite; }
@keyframes jtSpin { to { transform: rotate(360deg); } }
.jt-footer { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; }
.jt-footer-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 560px) {
  .jt-dialog .modal-body { padding: 1rem; }
  .jt-score strong { font-size: 1.8rem; }
  .jt-footer, .jt-footer-actions { width: 100%; }
  .jt-footer-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Talent pool: company search pane + job seeker modal (public/js/talent-pool.js) */
.tp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tp-title { margin: 0 0 .25rem; font-size: 1.15rem; color: var(--text-main); }
.tp-desc { margin: 0; font-size: .85rem; color: var(--text-muted); line-height: 1.7; max-width: 620px; }
.tp-seg { display: inline-flex; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 3px; }
.tp-seg-btn { border: 0; background: transparent; color: var(--text-soft); padding: .45rem 1rem; border-radius: var(--radius-full); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.tp-seg-btn.active { background: var(--primary); color: #fff; }
.tp-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--accent-emerald); color: #fff; font-size: .72rem; align-items: center; justify-content: center; }
.tp-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr auto; gap: .6rem; margin-bottom: 1rem; }
.tp-filters .btn { white-space: nowrap; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: .9rem; }
.tp-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.tp-card-top { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.tp-headline { margin: 0; font-size: 1rem; color: var(--text-main); overflow-wrap: anywhere; }
.tp-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .3rem; font-size: .8rem; color: var(--text-muted); }
.tp-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.tp-meta svg { width: 14px; height: 14px; }
.tp-match { flex-shrink: 0; text-align: center; border-radius: var(--radius-md); padding: .35rem .6rem; background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .35); }
.tp-match strong { display: block; font-size: 1.15rem; color: var(--tx-emerald); line-height: 1.1; }
.tp-match span { font-size: .7rem; color: var(--text-muted); }
.tp-summary { margin: 0; font-size: .85rem; line-height: 1.75; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tp-roles { margin: 0; padding-inline-start: 1.1rem; font-size: .82rem; color: var(--text-soft); line-height: 1.7; }
.tp-roles small { color: var(--text-muted); }
.tp-skills { display: flex; flex-wrap: wrap; gap: .35rem; }
.tp-skills span { font-size: .75rem; padding: .2rem .55rem; border-radius: var(--radius-full); background: var(--bg-input); border: 1px solid var(--border-subtle); color: var(--text-soft); }
.tp-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: auto; }
.tp-contact-form { display: flex; flex-direction: column; gap: .5rem; }
.tp-contact-form textarea { resize: vertical; min-height: 70px; }
.tp-badge { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 700; padding: .25rem .65rem; border-radius: var(--radius-full); border: 1px solid var(--border-subtle); color: var(--text-soft); }
.tp-st-pending { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); color: var(--tx-orange); }
.tp-st-ok { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .4); color: var(--tx-emerald); }
.tp-st-no { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: var(--tx-danger); }
.tp-empty, .tp-loading { text-align: center; padding: 2rem 1rem; color: var(--text-muted); }
.tp-empty svg { width: 38px; height: 38px; color: var(--tx-indigo); margin-bottom: .5rem; }
.tp-empty p { margin: 0 auto .75rem; max-width: 460px; line-height: 1.7; }
.tp-muted { font-size: .82rem; color: var(--text-muted); margin: .25rem 0 .75rem; line-height: 1.7; }
.tp-pager { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1rem; font-size: .85rem; color: var(--text-muted); }
.tp-sent { margin-bottom: .9rem; }
.tp-sent-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.tp-sent-head small { color: var(--text-muted); font-size: .78rem; }
.tp-sent-ok .tp-card { border-color: rgba(16, 185, 129, .45); }
.tp-contact-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.tp-contact-row a { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 700; color: var(--tx-primary); text-decoration: none; overflow-wrap: anywhere; }
.tp-contact-row svg { width: 15px; height: 15px; }
.tp-cv summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--tx-indigo); }
.tp-cv pre { white-space: pre-wrap; font-family: inherit; font-size: .8rem; line-height: 1.7; color: var(--text-soft); background: var(--bg-input); border-radius: var(--radius-md); padding: .75rem; max-height: 360px; overflow: auto; margin: .5rem 0 0; }
/* job seeker modal */
.tp-dialog { max-width: 680px; width: calc(100% - 32px); }
.tp-dialog .modal-body { padding: 1.25rem 1.5rem; max-height: 72vh; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.tp-switch-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); background: var(--bg-surface); }
.tp-switch-row.on { border-color: rgba(16, 185, 129, .5); background: rgba(16, 185, 129, .06); }
.tp-switch-row strong { color: var(--text-main); }
.tp-switch-row p { margin: .3rem 0 0; font-size: .82rem; line-height: 1.7; color: var(--text-muted); }
.tp-toggle { position: relative; flex-shrink: 0; width: 52px; height: 28px; cursor: pointer; }
.tp-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.tp-toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-subtle); transition: background .2s; }
.tp-toggle span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.tp-toggle input:checked + span { background: var(--accent-emerald); }
.tp-toggle input:checked + span::after { transform: translateX(-24px); }
[dir="ltr"] .tp-toggle input:checked + span::after { transform: translateX(24px); }
.tp-toggle input:disabled + span { opacity: .5; cursor: not-allowed; }
.tp-section-title { display: flex; align-items: center; gap: .4rem; margin: 1rem 0 .4rem; font-size: .95rem; color: var(--text-main); }
.tp-section-title svg { width: 18px; height: 18px; color: var(--tx-indigo); }
.tp-req { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; flex-wrap: wrap; padding: .85rem 1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); margin-bottom: .5rem; }
.tp-req-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.tp-req-main strong { color: var(--text-main); }
.tp-req-sub { font-size: .78rem; color: var(--text-muted); }
.tp-req-msg { margin: .3rem 0 0; font-size: .84rem; color: var(--text-soft); line-height: 1.7; }
.tp-req-link { font-size: .8rem; color: var(--tx-primary); }
.tp-req-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 900px) { .tp-filters { grid-template-columns: 1fr 1fr; } .tp-filters #tpQ { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .tp-filters { grid-template-columns: 1fr; }
  .tp-dialog .modal-body { padding: 1rem; }
  .tp-req-actions, .tp-req-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Resume builder: compact desktop layout ----------
   On laptop screens (~1366x620 usable) the editor header (4-line title + badges + import banner) and the
   preview toolbar (3 wrapped rows + badge strip) used most of the height, leaving a thin strip for the form
   and the CV. Keep the header to one line, merge the toolbar rows, and never squeeze below a usable height. */
@media (min-width: 1201px) {
  .builder-layout { grid-template-columns: minmax(440px, 520px) minmax(0, 1fr); min-height: 500px; }
  .builder-editor-panel, .builder-preview-panel { min-height: 0; }

  .builder-editor-panel .editor-header { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.5rem 0.75rem; }
  .builder-editor-panel .editor-title-wrap { flex: 1 1 auto; min-width: 0; }
  .builder-editor-panel .editor-badge-row,
  .builder-editor-panel .editor-header .page-desc { display: none; }
  .builder-editor-panel .editor-header .page-title { font-size: 1.1rem; line-height: 1.4; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .builder-editor-panel .editor-header-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
  /* Same action as the header's "استيراد سيرة سابقة" button */
  .builder-editor-panel .direct-import-banner { display: none !important; }
  .builder-editor-panel .wizard-content { padding: 1.1rem 1.25rem; }

  .builder-preview-panel .preview-toolbar { padding: 0.55rem 0.85rem; gap: 0.45rem 0.6rem; align-items: center; }
  .builder-preview-panel .toolbar-selectors-cluster { flex: 1 1 100%; gap: 0.4rem 0.6rem; }
  .builder-preview-panel .toolbar-selectors-cluster > div { display: flex; align-items: center; gap: 0.3rem; }
  .builder-preview-panel .toolbar-label span { display: none; } /* icon + tooltip only */
  .builder-preview-panel .pill-select { padding: 0.3rem 0.7rem; font-size: 0.76rem; max-width: 210px; }
  .builder-preview-panel .toolbar-smart-tools,
  .builder-preview-panel .export-actions-group { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .builder-preview-panel .preview-toolbar .btn { padding: 0.32rem 0.6rem; font-size: 0.76rem; min-height: 32px; gap: 0.3rem; }
  .builder-preview-panel .preview-toolbar .btn svg { width: 14px; height: 14px; }
  .builder-preview-panel .ats-pill-badge { padding: 0.25rem 0.65rem; }
  .builder-preview-panel .resume-sheet-wrapper { padding: 1.25rem 1rem; }
}
/* Short laptop screens: the green checklist strip is decoration; give the height to the CV. */
@media (min-width: 1201px) and (max-height: 820px) {
  .builder-preview-panel .ats-compliance-badge-bar { display: none; }
  .builder-editor-panel .editor-header .autosave-status-pill { display: none !important; }
}
@media (min-width: 1201px) {
  /* All six steps visible in the narrower editor column */
  .builder-editor-panel .wizard-stepper { padding: 0.4rem 0.5rem; gap: 0.2rem; }
  .builder-editor-panel .wizard-stepper .step-btn { flex: 1 1 0; min-width: 0; padding: 0.45rem 0.3rem; font-size: 0.78rem; gap: 0.3rem; }
  .builder-editor-panel .wizard-stepper .step-num svg { width: 15px; height: 15px; }
}

/* ---------- Guest sign-up nudge (replaces the login wall on arrival; js/auth-modal.js scheduleGuestNudge) ---------- */
.guest-nudge {
  position: fixed; bottom: 14px; inset-inline: 14px; z-index: 1050; margin-inline: auto; max-width: 860px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
  padding: 0.7rem 0.9rem; border-radius: 14px; background: var(--bg-surface-elevated, var(--bg-surface)); color: var(--text-main);
  border: 1px solid rgba(99, 102, 241, 0.4); box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25); animation: modalFadeIn 0.25s ease;
}
.guest-nudge-text { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600; min-width: 0; }
.guest-nudge-text svg { color: var(--tx-indigo, #6366f1); flex: 0 0 auto; width: 18px; height: 18px; }
.guest-nudge-actions { display: flex; align-items: center; gap: 0.4rem; }
.guest-nudge-close { background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 0.3rem; border-radius: 8px; display: inline-flex; }
.guest-nudge-close:hover { color: var(--text-main); }
.guest-nudge-close svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .guest-nudge { bottom: 8px; inset-inline: 8px; } .guest-nudge-actions { width: 100%; } .guest-nudge-actions .btn { flex: 1; } }

/* ---------- Side drawer performance ----------
   The drawer is ~opaque, so its 24px backdrop blur was invisible but very expensive (re-blurring the whole page
   under it on every frame of the slide animation); the full-screen 8px blur of the backdrop likewise. Same look,
   solid colours, compositor-only animation. */
.side-drawer { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0f172a; will-change: transform; }
.side-drawer-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(15, 23, 42, 0.6); transition: opacity 0.25s ease, visibility 0.25s; }
[data-theme="light"] .side-drawer { background: #ffffff; }
