/* AutoSocial mockups — shared styles (front, user panel, admin) */
:root {
  --as-primary: #4f46e5;
  --as-primary-dark: #4338ca;
  --as-primary-soft: #eef2ff;
  --as-ink: #0f172a;
  --as-muted: #64748b;
  --as-border: #e2e8f0;
  --as-bg: #f6f7fb;
  --as-fb: #1877f2;
  --as-x: #0f1419;
  --as-ig: #d62976;
  --as-in: #0a66c2;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4f46e5;
  --bs-link-hover-color: #4338ca;
}
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--as-ink); }
.btn-primary { --bs-btn-bg: var(--as-primary); --bs-btn-border-color: var(--as-primary); --bs-btn-hover-bg: var(--as-primary-dark); --bs-btn-hover-border-color: var(--as-primary-dark); --bs-btn-active-bg: var(--as-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--as-primary); --bs-btn-border-color: var(--as-primary); --bs-btn-hover-bg: var(--as-primary); --bs-btn-hover-border-color: var(--as-primary); --bs-btn-active-bg: var(--as-primary); --bs-btn-active-border-color: var(--as-primary); }
.text-primary { color: var(--as-primary) !important; }
.bg-primary-soft { background: var(--as-primary-soft); }
.text-muted { color: var(--as-muted) !important; }
.brand { font-weight: 800; letter-spacing: -.02em; color: var(--as-ink); text-decoration: none; }
.brand .dot { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #4f46e5, #06b6d4); color: #fff; margin-right: 6px; font-size: 16px; }

/* platform badges */
.pf { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; font-size: 14px; flex: none; }
.pf-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.pf-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.pf-fb { background: var(--as-fb); }
.pf-x { background: var(--as-x); }
.pf-ig { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.pf-in { background: var(--as-in); }
.pf-rss { background: #f97316; }
.pf-csv { background: #16a34a; }
.pf-manual { background: #64748b; }

/* ---------- Front site ---------- */
.front-nav { backdrop-filter: blur(8px); background: rgba(255,255,255,.85); border-bottom: 1px solid var(--as-border); }
.hero { padding: 96px 0 72px; background: radial-gradient(1200px 500px at 80% -10%, #e0e7ff 0, transparent 60%), radial-gradient(800px 400px at 0% 0%, #cffafe 0, transparent 55%); }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hero .lead { font-size: 1.2rem; color: var(--as-muted); }
.hero-shot { border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(15,23,42,.25); border: 1px solid var(--as-border); background: #fff; overflow: hidden; }
.hero-shot .bar { height: 30px; background: #f1f5f9; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.hero-shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; display: block; }
.section { padding: 80px 0; }
.section-title { font-weight: 800; letter-spacing: -.02em; }
.eyebrow { text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; font-weight: 700; color: var(--as-primary); }
.feature-card { border: 1px solid var(--as-border); border-radius: 16px; padding: 28px; height: 100%; background: #fff; transition: transform .15s, box-shadow .15s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -12px rgba(15,23,42,.18); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--as-primary-soft); color: var(--as-primary); margin-bottom: 16px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--as-primary); color: #fff; display: grid; place-items: center; font-weight: 700; margin: 0 auto 12px; }
.price-card { border: 1px solid var(--as-border); border-radius: 18px; padding: 32px; height: 100%; background: #fff; position: relative; }
.price-card.featured { border: 2px solid var(--as-primary); box-shadow: 0 20px 50px -20px rgba(79,70,229,.45); }
.price-card .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--as-primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 14px; border-radius: 99px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.price-card ul { list-style: none; padding: 0; }
.price-card li { padding: 6px 0; }
.price-card li i { color: #16a34a; margin-right: 8px; }
.cta-band { background: linear-gradient(135deg, #4f46e5, #0891b2); color: #fff; border-radius: 24px; padding: 56px; }
.front-footer { background: #0f172a; color: #94a3b8; padding: 56px 0 24px; }
.front-footer a { color: #cbd5e1; text-decoration: none; }
.front-footer a:hover { color: #fff; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(135deg, #4f46e5, #0891b2); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
@media (max-width: 991px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- User panel ---------- */
.panel-body { background: var(--as-bg); }
.panel-sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: #fff; border-right: 1px solid var(--as-border); padding: 18px 14px; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.panel-sidebar .nav-link { color: #334155; border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: .95rem; }
.panel-sidebar .nav-link i { font-size: 1.1rem; color: #94a3b8; }
.panel-sidebar .nav-link:hover { background: #f1f5f9; }
.panel-sidebar .nav-link.active { background: var(--as-primary-soft); color: var(--as-primary); }
.panel-sidebar .nav-link.active i { color: var(--as-primary); }
.panel-sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #94a3b8; font-weight: 700; padding: 16px 12px 6px; }
.panel-main { margin-left: 250px; min-height: 100vh; }
.panel-topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--as-border); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 1030; }
.panel-content { padding: 28px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card { border: 1px solid var(--as-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--as-border); font-weight: 600; padding: 14px 18px; border-radius: 14px 14px 0 0 !important; }
.stat-card .label { color: var(--as-muted); font-size: .85rem; font-weight: 500; }
.stat-card .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.stat-card .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.usage-bar { height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.usage-bar > span { display: block; height: 100%; background: var(--as-primary); border-radius: 99px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-danger { background: #fee2e2; color: #991b1b; }
.badge-soft-info { background: #e0f2fe; color: #075985; }
.badge-soft-secondary { background: #f1f5f9; color: #475569; }
.table > :not(caption) > * > * { padding: .8rem 1rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--as-muted); font-weight: 600; background: #f8fafc; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #c7d2fe; display: inline-grid; place-items: center; color: #3730a3; font-weight: 700; font-size: .85rem; }
@media (max-width: 991px) {
  .panel-sidebar { transform: translateX(-100%); }
  .panel-sidebar.show { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .panel-main { margin-left: 0; }
  .panel-content { padding: 18px; }
}

/* compose preview cards */
.preview-tabs .nav-link { color: var(--as-muted); }
.preview-tabs .nav-link.active { color: var(--as-ink); font-weight: 600; }
.post-preview { border: 1px solid var(--as-border); border-radius: 12px; background: #fff; overflow: hidden; }
.post-preview .pp-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.post-preview .pp-text { padding: 0 12px 12px; white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.post-preview .pp-img { aspect-ratio: 1.91/1; background: linear-gradient(135deg, #c7d2fe, #a5f3fc); display: grid; place-items: center; color: #4338ca; font-size: 40px; }
.post-preview.ig .pp-img { aspect-ratio: 1/1; }
.post-preview .pp-link { background: #f1f5f9; padding: 8px 12px; font-size: .8rem; color: var(--as-muted); }
.char-count.over { color: #dc2626; font-weight: 700; }
.drop-zone { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 28px; text-align: center; color: var(--as-muted); background: #f8fafc; cursor: pointer; }
.drop-zone:hover { border-color: var(--as-primary); color: var(--as-primary); }

/* wizard */
.wizard-steps { display: flex; gap: 8px; counter-reset: step; }
.wizard-steps .ws { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--as-border); color: var(--as-muted); font-weight: 500; }
.wizard-steps .ws b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; color: #475569; font-size: .85rem; flex: none; }
.wizard-steps .ws.active { border-color: var(--as-primary); color: var(--as-ink); }
.wizard-steps .ws.active b, .wizard-steps .ws.done b { background: var(--as-primary); color: #fff; }
.select-tile { border: 1px solid var(--as-border); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; gap: 12px; align-items: center; background: #fff; height: 100%; }
.select-tile:hover { border-color: #a5b4fc; }
.btn-check:checked + .select-tile { border-color: var(--as-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.slot-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--as-primary-soft); color: var(--as-primary); font-weight: 600; font-size: .85rem; margin: 2px; }

/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--as-border); border-left: 1px solid var(--as-border); }
.cal-grid > div { border-right: 1px solid var(--as-border); border-bottom: 1px solid var(--as-border); min-height: 112px; padding: 6px; background: #fff; font-size: .8rem; }
.cal-grid .dow { min-height: auto; background: #f8fafc; font-weight: 600; color: var(--as-muted); text-align: center; text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; padding: 8px; }
.cal-grid .muted { background: #fafafa; color: #cbd5e1; }
.cal-grid .today .d { background: var(--as-primary); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-grid; place-items: center; }
.cal-ev { display: flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 6px; margin-top: 4px; font-size: .72rem; background: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; }
.cal-ev .pf { width: 14px; height: 14px; border-radius: 4px; font-size: 9px; }

/* ---------- Admin (x-modern look-alike) ---------- */
.admin-body { background: #eef1f5; }
.admin-topbar { height: 64px; background: linear-gradient(90deg, #1e293b, #334155); color: #fff; display: flex; align-items: center; padding: 0 20px; gap: 16px; position: fixed; inset: 0 0 auto 0; z-index: 1040; }
.admin-topbar a { color: #e2e8f0; }
.admin-sidebar { position: fixed; top: 64px; bottom: 0; left: 0; width: 240px; background: #fff; box-shadow: 1px 0 20px rgba(0,0,0,.08); overflow-y: auto; padding: 12px 0; z-index: 1030; transition: transform .2s; }
.admin-sidebar .user-profile { padding: 14px 20px 16px; border-bottom: 1px solid #eef1f5; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.admin-sidebar .grp > a { display: flex; align-items: center; gap: 12px; padding: 10px 22px; color: #54667a; text-decoration: none; font-weight: 500; font-size: .92rem; }
.admin-sidebar .grp > a i.ic { font-size: 1.1rem; width: 20px; color: #99abb4; }
.admin-sidebar .grp > a .chev { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.admin-sidebar .grp > a:hover, .admin-sidebar .grp.open > a { color: #1e88e5; }
.admin-sidebar .grp.open > a .chev { transform: rotate(90deg); }
.admin-sidebar .grp.active > a { color: #1e88e5; border-left: 3px solid #1e88e5; padding-left: 19px; }
.admin-sidebar .sub { display: none; list-style: none; padding: 0 0 6px 54px; margin: 0; }
.admin-sidebar .grp.open .sub { display: block; }
.admin-sidebar .sub a { display: block; padding: 6px 0; color: #67757c; text-decoration: none; font-size: .87rem; }
.admin-sidebar .sub a:hover, .admin-sidebar .sub a.active { color: #1e88e5; }
.admin-main { margin-left: 240px; padding: 88px 24px 24px; }
.admin-titlebar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-titlebar h3 { color: #455a64; font-weight: 600; font-size: 1.3rem; margin: 0; }
.admin-main .card { border: 0; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-main .card-header { border-radius: 6px 6px 0 0 !important; }
.admin-stat { color: #fff; border-radius: 6px; padding: 20px; display: flex; align-items: center; justify-content: space-between; }
.admin-stat h2 { font-weight: 300; margin: 0; }
.admin-stat i { font-size: 2.4rem; opacity: .6; }
.bg-adm-1 { background: #1e88e5; } .bg-adm-2 { background: #26c6da; } .bg-adm-3 { background: #7460ee; } .bg-adm-4 { background: #fc4b6c; }
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: none; }
  .admin-main { margin-left: 0; }
}

/* ---------- Charts (dataviz reference palette, single series) ---------- */
.viz-root {
  --surface-1: #ffffff;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #8a8984;
  --grid: #ececea;
  --series-1: #2a78d6;
  position: relative;
}
.viz-root svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-root .tick { font-size: 11px; fill: var(--text-muted); }
.viz-root .val { font-size: 11px; fill: var(--text-primary); font-weight: 600; }
.viz-root .bar { fill: var(--series-1); }
.viz-root .hit:hover + .bar, .viz-root .bar.hover { fill: #1f63b5; }
.viz-tip { position: absolute; pointer-events: none; background: #0f172a; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; }
.viz-tip.show { opacity: 1; }
.viz-table summary { font-size: .8rem; color: var(--as-muted); cursor: pointer; margin-top: 6px; }

/* mockup hub */
.hub-card { border: 1px solid var(--as-border); border-radius: 14px; padding: 18px; display: block; text-decoration: none; color: inherit; background: #fff; height: 100%; }
.hub-card:hover { border-color: var(--as-primary); box-shadow: 0 8px 24px -10px rgba(79,70,229,.35); }
.mock-banner { position: fixed; bottom: 14px; right: 14px; z-index: 2000; background: #0f172a; color: #fff; border-radius: 99px; padding: 8px 14px; font-size: .8rem; text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.mock-banner:hover { color: #fff; background: #1e293b; }

/* brand touches */
.form-check-input:checked { background-color: var(--as-primary); border-color: var(--as-primary); }
.form-check-input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 .25rem rgba(79,70,229,.2); }
.card a:not(.btn), .page-head a:not(.btn), .hub-card { text-decoration: none; }

/* ---------- RTL (Arabic) ---------- */
[dir=rtl] body { font-family: "Cairo", "Inter", system-ui, sans-serif; }
[dir=rtl] .panel-sidebar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--as-border); }
[dir=rtl] .panel-main { margin-left: 0; margin-right: 250px; }
[dir=rtl] .admin-sidebar { left: auto; right: 0; }
[dir=rtl] .admin-main { margin-left: 0; margin-right: 240px; }
[dir=rtl] .admin-sidebar .sub { padding: 0 54px 6px 0; }
[dir=rtl] .admin-sidebar .grp.active > a { border-left: 0; border-right: 3px solid #1e88e5; padding-left: 22px; padding-right: 19px; }
[dir=rtl] .admin-sidebar .grp > a .chev { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
[dir=rtl] .admin-sidebar .grp.open > a .chev { transform: rotate(90deg); }
[dir=rtl] .brand .dot { margin-right: 0; margin-left: 6px; }
[dir=rtl] .price-card li i { margin-right: 0; margin-left: 8px; }
@media (max-width: 991px) {
  [dir=rtl] .panel-sidebar { transform: translateX(100%); }
  [dir=rtl] .panel-sidebar.show { transform: none; }
  [dir=rtl] .panel-main { margin-right: 0; }
  [dir=rtl] .admin-sidebar { transform: translateX(100%); }
  [dir=rtl] .admin-sidebar.show { transform: none; }
  [dir=rtl] .admin-main { margin-right: 0; }
}
.cms-content h2, .cms-content h3 { margin-top: 1.5rem; font-weight: 700; }
.panel-sidebar span.nav-link { cursor: default; }

/* printable invoice */
@media print {
    .panel-sidebar, .panel-topbar, .no-print, .flash-messages { display: none !important; }
    .panel-main { margin: 0 !important; }
    .panel-content { padding: 0 !important; }
    .panel-body { background: #fff !important; }
    .invoice-sheet { border: 0 !important; box-shadow: none !important; }
}

/* notifications */
.ntf-menu { width: 340px; max-height: 460px; overflow-y: auto; }
.ntf-unread { background: var(--as-primary-soft); }
.ntf-unread:hover { background: #e0e7ff; }

/* client / partner logos */
.partner-logos img { max-height: 40px; max-width: 140px; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.partner-logos a:hover img { filter: none; opacity: 1; }

/* the site's social links (footer) */
.social-links a { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); color: #cbd5e1; text-decoration: none; transition: background .15s, color .15s; }
.social-links a:hover { color: #fff; background: var(--as-primary); }

/* brand colour for pill tabs (Add source window) */
.nav-pills { --bs-nav-pills-link-active-bg: var(--as-primary); --bs-nav-link-color: var(--as-primary); --bs-nav-link-hover-color: var(--as-primary-dark); }

/* admin top bar: its light link colour must not reach the white dropdown menu */
.admin-topbar .dropdown-menu .dropdown-item { color: #1e293b; }
.admin-topbar .dropdown-menu .dropdown-item:hover { color: var(--as-primary); background: var(--as-primary-soft); }
.admin-topbar .dropdown-menu .dropdown-item.text-danger { color: #dc2626; }
