/* ============================================================
   SENA Site - corporate website (Laracasts-inspired design)
   Dark purple gradient hero + clean cards + Inter typography
   ============================================================ */

:root {
  --indigo-50:  #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-600: #4f46e5;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  --violet-800: #5b21b6;
  --fuchsia-500: #d946ef;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --dark-bg:  #0b1020;
  --card-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.06);
  --card-hover: 0 2px 4px rgba(15,23,42,.07), 0 16px 40px rgba(15,23,42,.12);
  --grad: linear-gradient(135deg, var(--violet-600), var(--fuchsia-500));
  --grad-soft: linear-gradient(135deg, var(--indigo-600), var(--violet-600));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--slate-800);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--violet-600); text-decoration: none; }
a:hover { color: var(--violet-700); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--slate-500); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-sm { padding: .45rem .9rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.02rem; border-radius: 12px; }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(124,58,237,.45); color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--violet-600);
  border: 1.5px solid var(--violet-600);
}
.btn-outline:hover { background: var(--indigo-50); }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,16,32,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem; }
.brand img { height: 34px; width: auto; }
.brand:hover { color: #fff; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: #cbd5e1;
  padding: .45rem .85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .92rem;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.active { color: #fff; background: var(--grad); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  color: #cbd5e1;
  font-weight: 700;
  font-size: .85rem;
  padding: .4rem .7rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
}
.lang-btn:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(124,58,237,.45), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(217,70,239,.25), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #101736 100%);
  color: #fff;
  padding: 110px 0 90px;
  overflow: hidden;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.hero-glow-1 { width: 420px; height: 420px; background: var(--violet-600); top: -140px; right: -80px; }
.hero-glow-2 { width: 380px; height: 380px; background: var(--fuchsia-500); bottom: -160px; left: -100px; opacity: .3; }
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 860px; }

/* Hero product image slider */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,16,32,.92) 0%, rgba(11,16,32,.75) 50%, rgba(11,16,32,.95) 100%);
  z-index: 1;
}
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .3s;
}
.hero-dot.active {
  background: var(--fuchsia-500);
  transform: scale(1.3);
}
.hero-dot:hover { background: rgba(255,255,255,.6); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: #e9d5ff;
  background: rgba(124,58,237,.2);
  border: 1px solid rgba(124,58,237,.4);
  padding: .4rem 1rem;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 20px;
}
.grad-text {
  background: linear-gradient(90deg, #a78bfa, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub { font-size: 1.15rem; color: #cbd5e1; max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 640px;
  margin: 56px auto 0;
}
.hs-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 18px 10px;
  text-align: center;
}
.hs-item b { display: block; font-size: 1.6rem; font-weight: 900; background: linear-gradient(90deg,#a78bfa,#e879f9); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hs-item span { font-size: .8rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- page head (inner pages) ---------- */
.page-head {
  background:
    radial-gradient(1000px 400px at 80% -20%, rgba(124,58,237,.35), transparent 60%),
    linear-gradient(180deg, #0b1020, #101736);
  color: #fff;
  padding: 70px 0 60px;
  text-align: center;
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900; margin: 8px 0 12px; }
.page-head p { color: #cbd5e1; max-width: 640px; margin: 0 auto; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--slate-50); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; margin: 8px 0 14px; color: var(--slate-900); }
.section-head p { color: var(--slate-500); font-size: 1.05rem; margin: 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violet-600);
  background: var(--indigo-50);
  padding: .35rem .9rem;
  border-radius: 999px;
}
.page-head .eyebrow { background: rgba(124,58,237,.25); color: #ddd6fe; }

/* ---------- grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--card-hover); }

.feature-card { padding: 26px 24px; }
.fc-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--indigo-50);
  color: var(--violet-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; color: var(--slate-900); }
.feature-card p { margin: 0; color: var(--slate-500); font-size: .93rem; }

/* product cards */
.p-card { overflow: hidden; }
.p-img { aspect-ratio: 1/1; background: var(--slate-100); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.p-card:hover .p-img img { transform: scale(1.05); }
.p-img-ph { color: var(--slate-300); font-size: 3rem; }
.p-body { padding: 16px; }
.p-cat {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--violet-600);
  background: var(--indigo-50);
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: 8px;
}
.p-body h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 700; color: var(--slate-900); line-height: 1.35; }
.p-price { font-weight: 900; font-size: 1.05rem; color: var(--violet-700); }

/* service cards */
.svc-card { padding: 26px 24px; }
.svc-card-lg { padding: 32px 30px; }
.sc-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(124,58,237,.35);
}
.svc-card h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 800; }
.svc-card p { margin: 0; color: var(--slate-500); font-size: .93rem; }

/* value cards */
.value-card { padding: 24px 22px; }
.vc-num { font-size: .8rem; font-weight: 900; color: var(--slate-300); letter-spacing: .1em; }
.vc-icon { color: var(--violet-600); font-size: 1.5rem; margin-bottom: 12px; }
.value-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; }
.value-card p { margin: 0; color: var(--slate-500); font-size: .92rem; }

/* mission cards */
.mission-card { padding: 30px 28px; text-align: center; }
.mc-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(124,58,237,.35);
}
.mission-card h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 800; }
.mission-card p { margin: 0; color: var(--slate-500); }

.about-lead { text-align: center; margin-bottom: 48px; }
.about-lead .lead { font-size: 1.35rem; font-weight: 700; color: var(--slate-900); line-height: 1.5; }
.about-lead p:not(.lead) { color: var(--slate-500); font-size: 1.05rem; }

/* CTA banner */
.cta-banner {
  background:
    radial-gradient(800px 300px at 90% -30%, rgba(217,70,239,.4), transparent 60%),
    var(--grad-soft);
  border-radius: 22px;
  padding: 60px 40px;
  text-align: center;
  color: #fff;
}
.cta-banner h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 900; margin: 0 0 12px; }
.cta-banner p { color: #e0e7ff; max-width: 560px; margin: 0 auto 28px; font-size: 1.05rem; }
.cta-banner .btn-primary { background: #fff; color: var(--violet-700); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cta-banner .btn-primary:hover { transform: translateY(-2px); }

/* filter chips */
.filter-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  font-size: .88rem;
  font-weight: 700;
  color: var(--slate-700);
  background: #fff;
  border: 1.5px solid var(--slate-200);
  padding: .45rem 1.1rem;
  border-radius: 999px;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--violet-600); color: var(--violet-600); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- contact ---------- */
.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1.5px solid var(--slate-100);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all .2s ease;
}
.contact-info-card:hover {
  border-color: var(--indigo-100);
  box-shadow: 0 4px 16px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
a.contact-info-card { cursor: pointer; }
.cic-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.cic-body { flex: 1; min-width: 0; }
.cic-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); margin-bottom: 2px; }
.cic-value { font-size: 1rem; font-weight: 700; color: var(--slate-800); }
.cic-arrow { color: var(--slate-300); font-size: .9rem; flex-shrink: 0; transition: transform .15s ease; }
a.contact-info-card:hover .cic-arrow { transform: translateX(-3px); color: var(--violet-600); }

.form-card { padding: 34px 30px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: .85rem; font-weight: 700; color: var(--slate-700); margin-bottom: 6px; }
.input {
  width: 100%;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: .7rem .9rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--slate-800);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--violet-600); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
textarea.input { resize: vertical; }
.form-note { font-size: .8rem; color: var(--slate-500); text-align: center; margin: 14px 0 0; }
.alert-ok {
  display: flex; align-items: center; gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 600;
}

/* ---------- footer ---------- */
/* --- Simple Footer --- */
.site-footer {
  background: var(--dark-bg);
  color: #94a3b8;
  margin-top: 0;
  padding: 0;
}
.footer-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px 0 32px;
  text-align: center;
}
.f-row { width: 100%; }
.f-brand-row .f-brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.f-brand-row .f-desc {
  font-size: .88rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 420px;
  margin: 0 auto;
}
.f-contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.f-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: .85rem;
  color: #cbd5e1 !important;
  transition: all .2s;
}
.f-chip:hover {
  background: rgba(255,255,255,.12);
  color: #fff !important;
  border-color: rgba(255,255,255,.2);
}
.f-social-row { padding-top: 4px; }
.f-social {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.f-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: .95rem;
  color: #94a3b8;
  transition: all .2s;
}
.f-social a:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  text-align: center;
  font-size: .8rem;
  color: #475569;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .f-contact-row { gap: 8px; }
}
@media (max-width: 767px) {
  .dash-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .dash-tab { padding: 8px 14px; font-size: .82rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--dark-bg);
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 70px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); margin-top: 44px; }
  .section { padding: 60px 0; }
  .footer-simple { padding: 36px 0 24px; gap: 16px; }
}

/* ---------- RTL (Dari) ---------- */
[dir="rtl"] .hero-cta .btn i, [dir="rtl"] .cta-banner .btn i { transform: scaleX(-1); }
[dir="rtl"] body { text-align: right; }

/* ============================================================
   Member portal: register / login / directory / chat
   ============================================================ */

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.portal-card { padding: 28px; }
.pc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}
.pc-head i { color: var(--violet-600); }
.pc-sub { color: var(--slate-500); font-size: .9rem; margin: 6px 0 20px; }
.pc-tip {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--indigo-50);
  color: var(--slate-700);
  font-size: .85rem;
  display: flex;
  gap: 8px;
  align-items: center;
}
.pc-tip i { color: var(--indigo-600); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: .82rem; font-weight: 700; color: var(--slate-700); }
.field input {
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
  background: #fff;
}
.field input:focus {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.btn-block { width: 100%; justify-content: center; }

/* member menu (logged-in nav) — click to open, click outside to close */
.member-menu { position: relative; }
.member-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);
  padding: 6px;
  display: none;
  z-index: 60;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.member-menu.open .member-drop { display: block; }
.member-toggle {
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.member-toggle:hover { opacity: .9; }
.member-drop a, .m-logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--slate-700);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all .12s ease;
}
.member-drop a:hover, .m-logout button:hover { background: var(--indigo-50); color: var(--violet-700); }
.member-drop a i, .m-logout button i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .7; }
.member-drop a:hover i, .m-logout button:hover i { opacity: 1; }
.m-logout { border-top: 1px solid var(--slate-100); margin-top: 4px; padding-top: 4px; }
.badge-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--fuchsia-500);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
}

/* directory */
.member-card { padding: 24px; text-align: center; }
.mc-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.mc-co { color: var(--violet-600); font-weight: 700; font-size: .9rem; }
.mc-meta { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; color: var(--slate-500); font-size: .85rem; }
.mc-meta span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.mc-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* chat */
.chat-wrap { overflow: hidden; }

/* chat: conversation list + active conversation */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 520px;
  overflow: hidden;
}
.chat-side {
  border-right: 1px solid var(--slate-100);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
  font-size: .9rem;
}
.chat-convs {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}
.chat-no-conv { padding: 18px 14px; color: var(--slate-400); font-size: .85rem; text-align: center; }
.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-700);
  text-decoration: none;
  transition: background .15s ease;
}
.conv-item:hover { background: var(--slate-50); color: var(--slate-900); }
.conv-item.active { background: var(--indigo-50); color: var(--indigo-700); }
.conv-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.conv-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.conv-name {
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-prev {
  font-size: .76rem;
  color: var(--slate-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-badge { margin-left: auto; flex-shrink: 0; }
.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.chat-main .chat-head { border-left: 1px solid var(--slate-100); }
.chat-main .chat-body { height: auto; flex: 1; }
.chat-main .chat-form { border-left: 1px solid var(--slate-100); }

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-100);
  background: linear-gradient(135deg, var(--slate-50), #fff);
}
.chat-online { color: var(--slate-500); font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.chat-online .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.chat-body {
  height: 420px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fbfcfe;
}
.chat-empty { margin: auto; color: var(--slate-500); font-size: .9rem; }
.msg { max-width: 78%; }
.msg-me { align-self: flex-end; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; font-size: .8rem; margin-bottom: 4px; }
.msg-me .msg-meta { flex-direction: row-reverse; }
.msg-co { color: var(--violet-600); font-weight: 600; }
.msg-time { color: var(--slate-300); font-size: .72rem; }
.msg-bubble {
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: .92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.msg-me .msg-bubble {
  background: var(--grad);
  color: #fff;
  border: 0;
  border-radius: 14px 14px 4px 14px;
}
.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--slate-100);
  background: #fff;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
}
.chat-input:focus { border-color: var(--violet-600); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

/* location picker + photo on the registration form */
.loc-row { display: flex; align-items: center; gap: 12px; }
.loc-status { font-size: .82rem; font-weight: 600; color: var(--slate-500); }
.loc-map {
  height: 300px;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  overflow: hidden;
  z-index: 0;
}
.loc-map .leaflet-control-attribution { font-size: 9px; }
.loc-coords {
  font-size: .82rem;
  font-weight: 700;
  color: var(--violet-600);
  min-height: 18px;
  text-align: center;
}
.file-input {
  border: 1px dashed var(--slate-300);
  border-radius: 10px;
  padding: 10px;
  font-size: .9rem;
  background: var(--slate-50);
  width: 100%;
  cursor: pointer;
}
.field-hint { font-size: .78rem; color: var(--slate-500); }

/* member photo in the directory */
.mc-photo {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--slate-100);
  box-shadow: var(--card-shadow);
}
.mc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-photo-fallback { background: var(--grad); }

/* member avatar in chat */
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-main { min-width: 0; }
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.15);
}
.msg-me { flex-direction: row-reverse; }

@media (max-width: 767px) {
  .portal-grid { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .chat-body { height: 340px; }
  .loc-map { height: 240px; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-side {
    border-right: 0;
    border-bottom: 1px solid var(--slate-100);
    max-height: 240px;
  }
  .chat-convs { flex-direction: row; overflow-x: auto; }
  .conv-item { min-width: 220px; }
  .chat-main .chat-head, .chat-main .chat-form { border-left: 0; }
  .chat-main .chat-body { height: 380px; }
}
[dir="rtl"] .chat-side { border-right: 0; border-left: 1px solid var(--slate-100); }
[dir="rtl"] .chat-main .chat-head, [dir="rtl"] .chat-main .chat-form { border-right: 1px solid var(--slate-100); border-left: 0; }
[dir="rtl"] .conv-badge { margin-right: auto; margin-left: 0; }
@media (max-width: 767px) {
  [dir="rtl"] .chat-side { border-left: 0; border-bottom: 1px solid var(--slate-100); }
  [dir="rtl"] .chat-main .chat-head, [dir="rtl"] .chat-main .chat-form { border-right: 0; }
}

[dir="rtl"] .msg-me .msg-meta { flex-direction: row; }
[dir="rtl"] .msg-bubble { border-radius: 14px 14px 4px 14px; }
[dir="rtl"] .msg-me .msg-bubble { border-radius: 14px 14px 14px 4px; }
[dir="rtl"] .m-logout button, [dir="rtl"] .member-drop a { text-align: right; }

/* member account page */
.stat-card-acct {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}
.stat-card-acct .sc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-card-acct .stat-value { font-size: 1.15rem; font-weight: 800; }
.stat-card-acct .stat-label { font-size: .82rem; color: var(--slate-500); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 767px) { .field-row { grid-template-columns: 1fr; } }

.prod-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--slate-100);
  border-radius: 12px;
  background: var(--slate-50);
}
.prod-row img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--slate-100);
}
.prod-info { flex: 1; min-width: 0; }
.prod-info b { display: block; font-size: .92rem; }

.account-table-wrap { overflow-x: auto; }

/* ============================================================
   Partner Portal Landing Page
   ============================================================ */
.portal-hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(124,58,237,.45), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(217,70,239,.25), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #101736 100%);
  color: #fff;
  padding: 80px 0 60px;
  overflow: hidden;
}
.portal-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.portal-hero-content .eyebrow { background: rgba(124,58,237,.25); color: #ddd6fe; }
.portal-hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 16px 0 16px;
}
.portal-hero-sub { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 28px; }
.portal-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.portal-hero-visual { display: flex; flex-direction: column; gap: 14px; }
.portal-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform .15s ease;
}
.portal-stat-card:hover { transform: translateX(6px); }
.psc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.psc-info { min-width: 0; }
.psc-info b { display: block; font-size: .92rem; color: #fff; }
.psc-info span { font-size: .8rem; color: #94a3b8; }

/* portal steps */
.portal-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}
.portal-step {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}
.ps-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.3rem; font-weight: 900;
  display: grid; place-items: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 16px rgba(124,58,237,.35);
}
.portal-step h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.portal-step p { font-size: .88rem; color: var(--slate-500); }
.ps-arrow {
  color: var(--slate-300);
  font-size: 1.4rem;
  padding-top: 12px;
}

/* portal auth section (hidden by default, revealed on click) */
.portal-auth-section {
  animation: authReveal .4s ease;
}
@keyframes authReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* portal auth (sign up / sign in side by side) */
.portal-auth-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.portal-auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--slate-400);
  font-weight: 700;
  font-size: .85rem;
}
.portal-auth-divider::before,
.portal-auth-divider::after {
  content: '';
  display: block;
  width: 1px;
  height: 60px;
  background: var(--slate-200);
  position: absolute;
}
.portal-card-signup, .portal-card-signin { width: 100%; }

@media (max-width: 991px) {
  .portal-hero .container { grid-template-columns: 1fr; }
  .portal-hero-visual { display: none; }
  .portal-steps { flex-direction: column; gap: 10px; align-items: center; }
  .ps-arrow { transform: rotate(90deg); }
  .portal-auth-wrapper { grid-template-columns: 1fr; gap: 20px; }
  .portal-auth-divider { padding: 0; }
  .portal-auth-divider::before, .portal-auth-divider::after { display: none; }
}

/* ============================================================
   Order Cards (My Orders tab)
   ============================================================ */
.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.orders-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.orders-header h4 i { color: var(--violet-600); }
.orders-count {
  font-size: .82rem;
  font-weight: 700;
  color: var(--slate-500);
  background: var(--slate-100);
  padding: .3rem .8rem;
  border-radius: 999px;
}
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--slate-100);
  background: #fff;
  transition: all .2s ease;
}
.order-card:hover {
  border-color: var(--indigo-100);
  box-shadow: 0 2px 12px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.order-card.cancelled { opacity: .6; }
.oc-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.oc-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.order-card.draft .oc-status-dot { background: var(--slate-300); }
.order-card.confirmed .oc-status-dot { background: #0d6efd; box-shadow: 0 0 0 3px rgba(13,110,253,.15); }
.order-card.shipped .oc-status-dot { background: #6610f2; box-shadow: 0 0 0 3px rgba(102,16,242,.15); }
.order-card.paid .oc-status-dot, .order-card.delivered .oc-status-dot { background: #198754; box-shadow: 0 0 0 3px rgba(25,135,84,.15); }
.order-card.cancelled .oc-status-dot { background: #dc3545; }
.order-card.returned .oc-status-dot { background: #fd7e14; box-shadow: 0 0 0 3px rgba(253,126,20,.15); }
.oc-info { min-width: 0; }
.oc-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.oc-no {
  font-weight: 800;
  font-size: .95rem;
  color: var(--slate-900);
  letter-spacing: .02em;
}
.oc-source {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.oc-source-web { background: #ecfdf5; color: #047857; }
.oc-source-erp { background: #eff6ff; color: #1d4ed8; }
.oc-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .82rem;
  color: var(--slate-500);
}
.oc-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.oc-meta i { font-size: .85rem; opacity: .6; }
.oc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.oc-total {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--slate-900);
  white-space: nowrap;
}
.oc-badge {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.oc-badge-draft { background: var(--slate-100); color: var(--slate-600); }
.oc-badge-confirmed { background: #dbeafe; color: #1d4ed8; }
.oc-badge-shipped { background: #ede9fe; color: #6d28d9; }
.oc-badge-paid { background: #d1fae5; color: #047857; }
.oc-badge-delivered { background: #d1fae5; color: #047857; }
.oc-badge-cancelled { background: #fee2e2; color: #b91c1c; }
.oc-badge-returned { background: #fff3cd; color: #92400e; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--slate-400);
}
.empty-state i { font-size: 3.5rem; display: block; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: .95rem; }

@media (max-width: 575px) {
  .order-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .oc-right { flex-direction: row; align-items: center; gap: 10px; width: 100%; justify-content: space-between; }
}

/* ============================================================
   Partner Dashboard
   ============================================================ */
/* Dashboard Tabs — modern pill style */
.dash-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 6px;
  background: var(--slate-100);
  border-radius: 14px;
}
.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--slate-500);
  border-radius: 10px;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.dash-tab:hover { color: var(--violet-600); background: rgba(255,255,255,.7); }
.dash-tab.active {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.dash-tab i { font-size: 1rem; }
.dash-tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  background: rgba(124,58,237,.12);
  color: var(--violet-600);
}
.dash-tab.active .tab-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* order layout (catalog + cart sidebar) */
.portal-order-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
/* smaller product cards for order grid */
.p-card-sm { font-size: .88rem; }
.p-card-sm .p-body { padding: 12px; }
.p-card-sm .p-body h6 { font-size: .85rem; }
.p-card-sm .p-price { font-size: .92rem; }
.grid-3 .p-card-sm .p-img { aspect-ratio: 4/3; }

/* add-to-cart animation */
.btn-add-cart { transition: all .2s ease; }
.btn-add-cart.btn-success { background: #198754 !important; border-color: #198754 !important; transform: scale(1.05); }

/* cart badge pulse */
@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.cart-pulse { animation: cartPulse .3s ease; }

/* portal order layout responsive */
@media (max-width: 991px) {
  .portal-order-layout { grid-template-columns: 1fr; }
  .portal-cart-sidebar { position: static; border: 1px solid var(--slate-200); }
}

/* alert-success */
.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}
.alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}
[dir="rtl"] .portal-hero-content h1 { line-height: 1.3; }
[dir="rtl"] .ps-arrow { transform: scaleX(-1); }

/* ============================================================
   Dashboard — Profile Hero Card
   ============================================================ */
.dash-profile-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.dpc-bg {
  height: 120px;
  background: var(--grad);
  position: relative;
}
.dpc-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 60%);
}
.dpc-content {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 0 28px 24px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}
.dpc-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.dpc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dpc-avatar i { font-size: 2rem; color: var(--violet-600); }
.dpc-info { flex: 1; min-width: 0; padding-top: 44px; }
.dpc-info h2 { margin: 0 0 4px; font-size: 1.3rem; font-weight: 900; color: var(--slate-900); }
.dpc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
  color: var(--slate-500);
}
.dpc-meta span { display: flex; align-items: center; gap: 5px; }
.dpc-meta i { font-size: .9rem; opacity: .6; }
.dpc-actions {
  display: flex;
  gap: 8px;
  padding-top: 44px;
  flex-shrink: 0;
}
.btn-ghost-light {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  padding: .45rem .9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all .15s ease;
}
.btn-ghost-light:hover { background: rgba(255,255,255,.35); color: #fff; }

/* ============================================================
   Dashboard — Stats Grid
   ============================================================ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1.5px solid var(--slate-100);
  border-radius: 16px;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(15,23,42,.08);
}
.dsc-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.dsc-body { min-width: 0; }
.dsc-value { font-size: 1.2rem; font-weight: 900; color: var(--slate-900); }
.dsc-label { font-size: .8rem; color: var(--slate-500); font-weight: 600; }

/* ============================================================
   Dashboard — Quick Actions
   ============================================================ */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.dash-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1.5px solid var(--slate-100);
  border-radius: 14px;
  text-decoration: none;
  color: var(--slate-800);
  transition: all .2s ease;
}
.dash-action-card:hover {
  border-color: var(--indigo-100);
  box-shadow: 0 4px 16px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
.dac-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.dac-text { flex: 1; min-width: 0; }
.dac-text b { display: block; font-size: .9rem; color: var(--slate-900); margin-bottom: 2px; }
.dac-text span { font-size: .78rem; color: var(--slate-500); }
.dac-arrow { color: var(--slate-300); font-size: .9rem; flex-shrink: 0; transition: transform .15s ease; }
.dash-action-card:hover .dac-arrow { transform: translateX(-4px); color: var(--violet-600); }

/* ============================================================
   Dashboard — Activity List
   ============================================================ */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-section-header h4 i { color: var(--violet-600); }
.dash-link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--violet-600);
  display: flex;
  align-items: center;
  gap: 4px;
}
.dash-link:hover { color: var(--violet-700); }
.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background .15s ease;
}
.dash-activity-item:hover { background: var(--slate-50); }
.dai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dai-dot.draft { background: var(--slate-300); }
.dai-dot.confirmed { background: #0d6efd; }
.dai-dot.shipped { background: #6610f2; }
.dai-dot.paid, .dai-dot.delivered { background: #198754; }
.dai-dot.cancelled { background: #dc3545; }
.dai-body { flex: 1; min-width: 0; }
.dai-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dai-title { font-weight: 700; font-size: .88rem; color: var(--slate-800); }
.dai-amount { font-weight: 800; font-size: .88rem; color: var(--slate-900); white-space: nowrap; }
.dai-amount-green { color: #198754; }
.dai-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.dai-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.ai-badge-draft { background: var(--slate-100); color: var(--slate-600); }
.ai-badge-confirmed { background: #dbeafe; color: #1d4ed8; }
.ai-badge-shipped { background: #ede9fe; color: #6d28d9; }
.ai-badge-paid { background: #d1fae5; color: #047857; }
.ai-badge-cancelled { background: #fee2e2; color: #b91c1c; }
.dai-date { font-size: .78rem; color: var(--slate-400); }
.dash-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--slate-400);
}
.dash-empty i { font-size: 2.5rem; display: block; margin-bottom: 8px; opacity: .4; }
.dash-empty p { font-size: .88rem; margin: 0; }

/* ============================================================
   Dashboard — Settings
   ============================================================ */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  transition: background .15s ease;
}
.settings-item:hover { background: var(--slate-50); }
.si-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--indigo-50);
  color: var(--violet-600);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.si-body { flex: 1; min-width: 0; }
.si-label { display: block; font-size: .75rem; font-weight: 700; color: var(--slate-500); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.si-value { font-size: .95rem; font-weight: 700; color: var(--slate-800); }

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--slate-800);
  transition: all .15s ease;
  border: 1.5px solid transparent;
  background: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.settings-action-btn:hover { background: var(--slate-50); border-color: var(--slate-100); }
.sab-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.sab-text { flex: 1; min-width: 0; }
.sab-text b { display: block; font-size: .9rem; color: var(--slate-900); margin-bottom: 2px; }
.sab-text span { font-size: .78rem; color: var(--slate-500); }
.sab-arrow { color: var(--slate-300); font-size: .85rem; flex-shrink: 0; transition: transform .15s ease; }
.settings-action-btn:hover .sab-arrow { transform: translateX(-4px); color: var(--violet-600); }
.sab-arrow-btn { background: none; border: 0; padding: 0; cursor: pointer; display: grid; place-items: 0; }

@media (max-width: 767px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-actions { grid-template-columns: 1fr; }
  .dpc-content { flex-direction: column; align-items: flex-start; padding: 0 20px 20px; }
  .dpc-actions { padding-top: 12px; width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Products Tab — Form + Grid
   ============================================================ */
.prod-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prod-image-upload {
  position: relative;
  width: 100%;
}
.prod-image-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.prod-image-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 2px dashed var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.prod-image-label:hover {
  border-color: var(--violet-400);
  background: var(--indigo-50);
}
.prod-image-label i {
  font-size: 2rem;
  color: var(--violet-400);
}
.prod-image-label span {
  font-weight: 700;
  color: var(--slate-700);
  font-size: .9rem;
}
.prod-image-label small {
  color: var(--slate-500);
  font-size: .78rem;
}
.prod-image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--slate-100);
}
.prod-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prod-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--slate-700);
}
.prod-hint {
  font-size: .75rem;
  color: var(--slate-400);
  margin-top: 2px;
  display: block;
}
.prod-input {
  width: 100%;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--slate-800);
  background: #fff;
  transition: border .15s ease, box-shadow .15s ease;
  outline: none;
}
.prod-input:focus {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.prod-input::placeholder {
  color: var(--slate-400);
}
.prod-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
[dir="rtl"] .prod-select {
  background-position: left 14px center;
  padding-right: 14px;
  padding-left: 36px;
}
textarea.prod-input {
  resize: vertical;
  min-height: 70px;
}
.prod-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.prod-price-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border .15s ease, box-shadow .15s ease;
}
.prod-price-input:focus-within {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.prod-price-currency {
  padding: 10px 12px;
  background: var(--slate-50);
  font-weight: 700;
  font-size: .85rem;
  color: var(--slate-500);
  border-right: 1px solid var(--slate-200);
}
.prod-price-input .prod-input {
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.prod-price-input .prod-input:focus {
  box-shadow: none;
}
.prod-submit {
  margin-top: 4px;
  padding: 12px;
  font-size: .95rem;
}

/* Product Grid */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.prod-grid-card {
  border: 1.5px solid var(--slate-100);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: all .2s ease;
}
.prod-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,23,42,.08);
}
.prod-grid-card.pending {
  border-color: #fde68a;
}
.pgc-image {
  aspect-ratio: 4/3;
  background: var(--slate-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.pgc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pgc-image > i {
  font-size: 2.5rem;
  color: var(--slate-300);
}
.pgc-status {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.pgc-approved {
  background: rgba(25,135,84,.85);
  color: #fff;
}
.pgc-pending {
  background: rgba(245,158,11,.85);
  color: #fff;
}
.pgc-body {
  padding: 12px 14px;
}
.pgc-body h5 {
  margin: 0 0 6px;
  font-size: .92rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pgc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pgc-category {
  font-size: .75rem;
  font-weight: 700;
  color: var(--violet-600);
  background: var(--indigo-50);
  padding: .15rem .5rem;
  border-radius: 999px;
}
.pgc-price {
  font-size: .88rem;
  font-weight: 900;
  color: var(--slate-900);
}
@media (max-width: 575px) {
  .prod-grid { grid-template-columns: 1fr; }
  .prod-field-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Order Success Overlay (pure CSS — no Bootstrap needed)
   ============================================================ */
.order-success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11,16,32,.65);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.order-success-overlay.show { display: flex; }
.order-success-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  animation: osPopIn .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes osPopIn {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.os-icon {
  font-size: 4.5rem;
  color: #198754;
  margin-bottom: 16px;
  animation: osCheck .5s ease .2s both;
}
@keyframes osCheck {
  from { transform: scale(0); }
  50% { transform: scale(1.2); }
  to { transform: scale(1); }
}
.order-success-card h3 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--slate-900);
}
.order-success-card .muted {
  font-size: .92rem;
  margin-bottom: 18px;
}
.os-order-no {
  margin-bottom: 24px;
}
.os-order-no span {
  display: inline-block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-weight: 800;
  font-size: .95rem;
  padding: .5rem 1.2rem;
  border-radius: 10px;
  letter-spacing: .04em;
}
.os-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ============================================================
   Improved Cart Sidebar (Order from SENA tab)
   ============================================================ */
.portal-cart-sidebar {
  position: sticky;
  top: 80px;
  padding: 0;
  border: 2px solid var(--indigo-100);
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
  overflow: hidden;
}
.portal-cart-sidebar .pc-head {
  padding: 16px 20px;
  background: var(--grad);
  color: #fff;
  font-size: 1rem;
}
.portal-cart-sidebar .pc-head i { color: #fff; }
.portal-cart-sidebar .pc-head .badge { background: rgba(255,255,255,.25); color: #fff; font-size: .75rem; }
.portal-cart-sidebar .stack {
  padding: 12px 16px;
  min-height: 60px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
  transition: background .15s ease;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-info b {
  display: block;
  font-size: .88rem;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.cart-item-info .text-muted {
  font-size: .78rem;
  color: var(--slate-500);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.cart-item-actions .btn {
  padding: .25rem .5rem;
  font-size: .78rem;
  border-radius: 8px;
  line-height: 1;
}
.cart-item-actions b {
  font-size: .88rem;
  min-width: 22px;
  text-align: center;
  color: var(--slate-800);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 2px solid var(--slate-100);
  background: var(--slate-50);
  font-size: 1.05rem;
}
.cart-total-row b:last-child {
  color: var(--violet-700);
  font-size: 1.15rem;
}
.cart-actions {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--slate-100);
}
.cart-actions textarea {
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .88rem;
  font-family: inherit;
  resize: none;
  width: 100%;
}
.cart-actions textarea:focus {
  outline: none;
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.cart-actions .btn-primary {
  margin-top: 8px;
  padding: 10px;
  font-size: .92rem;
  border-radius: 10px;
  width: 100%;
  justify-content: center;
}
.cart-actions .btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}
