/* assets/css/app.css */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

/* =========================================
   RESET & BASE
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--deep-navy);
  background-color: var(--light-gray);
  overflow-x: hidden;
  letter-spacing: 0.01em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   THEME VARIABLES (aligned to antegreate.com)
   ========================================= */
:root {
  --primary-blue: #2154ff;
  --deep-navy: #0f1b2d;
  --light-gray: #f4f6fb;
  --white: #ffffff;
  --dark-gray: #0f1b2d;
  --text-light: #5c6776;
  --border-color: rgba(15, 27, 45, 0.12);
  --accent-amber: #f2a65a;
  --accent-mint: #17a7a1;
  --surface: #ffffff;
  --surface-muted: #f7f3ee;

  --success: #10b981;
  --danger: #ef4444;

  --shadow: 0 24px 60px rgba(15, 27, 45, 0.12);
  --shadow-sm: 0 12px 30px rgba(15, 27, 45, 0.08);

  --radius: 16px;
  --radius-xl: 24px;

  --sidebar-w: 280px;
  --sidebar-w-collapsed: 84px;

  --panel-bg: var(--white);
  --panel-border: var(--border-color);

  --font-display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  --font-body: "Manrope", "Plus Jakarta Sans", sans-serif;
}

/* Dark mode overrides */
body.dark-mode {
  background-color: #0b1220;
  color: #e5e7eb;
  --text-light: #9ca3af;
  --border-color: rgba(255,255,255,0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 10px 20px rgba(0, 0, 0, 0.35);
  --panel-bg: #0f172a;
  --panel-border: rgba(255,255,255,0.12);
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--deep-navy);
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 { color: var(--white); }

p { font-size: 1rem; color: var(--text-light); }
a { color: var(--primary-blue); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #163ec2; }

/* =========================================
   BUTTONS (compatible with your dashboard/views)
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--primary-blue);
  color: var(--white);
}
.btn-primary:hover {
  background-color: #163ec2;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(33, 84, 255, 0.28);
}
.btn-secondary {
  background-color: var(--deep-navy);
  color: var(--white);
}
.btn-secondary:hover {
  background-color: #0b1523;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 27, 45, 0.26);
}
.btn-outline {
  background-color: transparent;
  color: var(--deep-navy);
  border: 1px solid rgba(15, 27, 45, 0.3);
}
.btn-outline:hover {
  background-color: var(--deep-navy);
  color: var(--white);
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(33, 84, 255, 0.4);
  outline-offset: 3px;
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  transition: grid-template-columns .22s ease;
}
/* Prevent overflow on small screens */
.main { min-width: 0; }

/* Main */
.main {
  padding: 16px;
  background: linear-gradient(180deg, #f7f3ee 0%, #f4f6fb 55%, #f9fbff 100%);
}
body.dark-mode .main {
  background: linear-gradient(180deg, #0b1220 0%, #0b1324 100%);
}

.topMeta { margin-bottom: 16px; }
.crumbs {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.crumbs a {
  color: inherit;
}
.pageTitle {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--deep-navy);
  margin-top: 4px;
}
body.dark-mode .pageTitle { color: var(--white); }

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: visible;
  width: 100%;
  min-width: 0;
}

.panelHeader {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-direction: column;
  align-items: flex-start;
}
.panelTitle {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--deep-navy);
}
.panelActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
}

.appFooter {
  margin: 32px 0 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

.appFooter a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.input,
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
select {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  color: var(--deep-navy);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: rgba(33, 84, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(33, 84, 255, 0.12);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}
.table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--text-light);
  padding: 10px 14px;
  background: #f1f4f8;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}
.table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: #0f172a;
}
.table tbody tr:hover {
  background: rgba(33, 84, 255, 0.05);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .cell-muted {
  color: var(--text-light);
}
.table .cell-strong {
  font-weight: 600;
}
.table .cell-compact {
  white-space: nowrap;
}
.table .cell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tableCheckbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tableCheckbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary-blue);
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(33, 84, 255, 0.25);
  color: #1739b8;
  background: rgba(33, 84, 255, 0.12);
}
.statusPill.success {
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
}
.statusPill.warning {
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
}
.statusPill.danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.16);
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(33, 84, 255, 0.25);
  color: #1739b8;
  background: rgba(33, 84, 255, 0.08);
}
.statusPill.success {
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
.statusPill.muted {
  border-color: rgba(148, 163, 184, 0.35);
  color: #64748b;
  background: rgba(148, 163, 184, 0.12);
}

/* =========================================
   SIDEBAR (desktop)
   ========================================= */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(165deg, #0b1220 0%, #0f1b2d 45%, #152743 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 18px;
  display: none;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
body.dark-mode .sidebar {
  background: linear-gradient(165deg, #0b1220 0%, #0f1b2d 45%, #152743 100%);
  border-right-color: rgba(255,255,255,0.08);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -20%;
  height: 60%;
  background:
    radial-gradient(420px 280px at 20% 30%, rgba(33, 84, 255, 0.28), transparent 70%),
    radial-gradient(360px 240px at 70% 10%, rgba(23, 167, 161, 0.22), transparent 70%);
  pointer-events: none;
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 166, 90, 0.2), transparent 70%);
  pointer-events: none;
}

/* Brand row */
.brandRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
body.dark-mode .brandRow {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logoBox {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, #2154ff 0%, #17a7a1 70%, #2ee6a6 100%);
  box-shadow: 0 16px 28px rgba(33, 84, 255, 0.32);
  flex: 0 0 auto;
}

.brandText { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brandText strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}
body.dark-mode .brandText strong { color: var(--white); }
.brandText span {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon button */
.iconBtn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, transform .2s ease;
}
body.dark-mode .iconBtn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #ffffff;
}
.iconBtn:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
body.dark-mode .iconBtn:hover { background: rgba(255,255,255,0.16); }

/* Nav */
.nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
  position: relative;
  z-index: 1;
}

.nav a {
  text-decoration: none;
  color: rgba(235, 242, 255, 0.92);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  position: relative;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.nav a:hover {
  background: rgba(33, 84, 255, 0.16);
  border-color: rgba(33, 84, 255, 0.4);
  transform: translateY(-1px);
}
.nav a.active {
  background: linear-gradient(135deg, rgba(33, 84, 255, 0.35), rgba(23, 167, 161, 0.22));
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.35);
}
.nav a.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4fd1ff 0%, #2154ff 100%);
}

.nav .ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex: 0 0 auto;
}
.nav a.active .ico { background: rgba(255,255,255,0.2); color: #ffffff; }

.nav .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* Bottom account */
.sidebarBottom {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.accountBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
body.dark-mode .accountBtn {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
}
.accountBtn:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
body.dark-mode .accountBtn:hover { background: rgba(255,255,255,0.16); }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2154ff 0%, #17a7a1 70%, #2ee6a6 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(33, 84, 255, 0.3);
  flex: 0 0 auto;
}

.accountName {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fbff;
}
body.dark-mode .accountName { color: var(--white); }

/* Account menu */
.accountMenu {
  display: none;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 70px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 20;
}
body.dark-mode .accountMenu {
  background: #0f172a;
  border-color: rgba(255,255,255,0.12);
}
.accountMenu.open { display: block; }

.accountMenuSection { display: none !important; }
.accountMenuSection.is-active { display: block !important; }

.accountMenu a,
.accountMenuBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--dark-gray);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
body.dark-mode .accountMenu a,
body.dark-mode .accountMenuBtn { color: var(--white); }
.accountMenu a:hover,
.accountMenuBtn:hover { background: rgba(15, 27, 45, 0.06); }
body.dark-mode .accountMenu a:hover,
body.dark-mode .accountMenuBtn:hover { background: rgba(255,255,255,0.06); }

.accountMenuSep {
  height: 1px;
  background: var(--border-color);
}
body.dark-mode .accountMenuSep { background: #333333; }

/* =========================================
   COLLAPSED SIDEBAR (clean icon-only)
   ========================================= */
@media (min-width: 1101px) {
  body.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
    padding: 14px 10px;
    overflow: hidden;
  }

  /* Brand becomes compact */
  body.sidebar-collapsed .brandRow {
    background: transparent;
    border: 0;
    padding: 0;
    justify-content: center;
  }
  body.sidebar-collapsed .brandText { display: none !important; }
  body.sidebar-collapsed .brand { width: 100%; justify-content: center; }

  /* Collapse button centered under logo */
  body.sidebar-collapsed #collapseSidebar.iconBtn {
    width: 40px;
    height: 40px;
    margin: 10px auto 14px;
    border-radius: 12px;
  }

  /* Nav becomes icon tiles */
  body.sidebar-collapsed .nav {
    align-items: center;
    gap: 10px;
    padding-top: 6px;
  }

  body.sidebar-collapsed .nav a {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    box-shadow: var(--shadow-sm);
  }
  body.dark-mode.sidebar-collapsed .nav a {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
  }

  body.sidebar-collapsed .nav a:hover {
    box-shadow: var(--shadow);
    border-color: rgba(33, 84, 255, 0.45);
    background: rgba(33, 84, 255, 0.12);
  }

  body.sidebar-collapsed .nav a.active {
    border-color: rgba(33, 84, 255, 0.55);
    background: rgba(33, 84, 255, 0.18);
  }

  body.sidebar-collapsed .nav .ico {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: transparent;
    font-size: 18px;
  }
  body.sidebar-collapsed .nav a.active .ico {
    background: rgba(33, 84, 255, 0.2);
  }

  body.sidebar-collapsed .nav .label { display: none !important; }

  /* Account button becomes icon-only tile */
  body.sidebar-collapsed .accountBtn {
    width: 56px;
    height: 56px;
    padding: 0;
    margin: 0 auto;
    justify-content: center;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }
  body.sidebar-collapsed .accountName { display: none !important; }

  body.sidebar-collapsed .accountMenu {
    left: 10px;
    right: 10px;
    bottom: 78px;
  }
}

/* =========================================
   MOBILE TOPBAR + DRAWER
   ========================================= */
.mobileTopbar {
  display: block;
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .mobileTopbar {
  background: #0f172a;
  border-bottom-color: rgba(255,255,255,0.12);
}
.mobileTopbarInner {
  padding: 12px 12px;
}
.mobileTitle {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.mobileTitle strong {
  font-size: 14px;
  color: var(--deep-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark-mode .mobileTitle strong { color: var(--white); }
.mobileTitle span {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,25,49,0.45);
  backdrop-filter: blur(2px);
  z-index: 70;
}
.overlay.open { display: block; }

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  z-index: 80;
  transform: translateX(-110%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
}
body.dark-mode .drawer {
  background: #0f172a;
  border-color: rgba(255,255,255,0.12);
}

/* =========================================
   PRICING PAGE
   ========================================= */
.pricing-page {
  background: radial-gradient(circle at 18% 18%, rgba(33, 84, 255, 0.18), transparent 40%),
              radial-gradient(circle at 80% 8%, rgba(14, 165, 233, 0.18), transparent 38%),
              linear-gradient(180deg, #f3f4ff 0%, #eef2ff 45%, #ffffff 100%);
}
.pricing {
  padding: 48px 24px 72px;
  max-width: 1200px;
  margin: 0 auto;
}
.pricing-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}
.pricing-hero__eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(33, 84, 255, 0.12);
  color: #1739b8;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.pricing-hero__title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
  color: #0f172a;
}
.pricing-hero__subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.pricing-page .pricing-hero__title,
.pricing-page .price-card__head h3,
.pricing-page .price-card__price,
.pricing-page .price-card__note,
.pricing-page .pricing-compare__header h2,
.pricing-page .pricing-faq h2,
.pricing-page .pricing-faq__item h4 {
  color: #000;
}
.pricing-hero__cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pricing-toolbar {
  display: flex;
  justify-content: center;
  margin: 6px 0 26px;
}
.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(33, 84, 255, 0.2);
  box-shadow: 0 10px 25px rgba(33, 84, 255, 0.12);
}
.pricing-toggle__label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 700;
  transition: color 0.2s ease;
}
.pricing-page[data-billing-cycle="monthly"] .pricing-toggle__label--monthly,
.pricing-page[data-billing-cycle="yearly"] .pricing-toggle__label--yearly {
  color: #1739b8;
}
.pricing-toggle__badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(33, 84, 255, 0.12);
  color: #2154ff;
  font-weight: 700;
  margin-left: 6px;
}
.pricing-switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pricing-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.pricing-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(33, 84, 255, 0.18);
  transition: background 0.2s ease;
}
.pricing-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}
.pricing-switch input:checked + .pricing-switch__track {
  background: rgba(33, 84, 255, 0.4);
}
.pricing-switch input:checked ~ .pricing-switch__thumb {
  transform: translateX(22px);
}
.pricing-switch input:focus-visible + .pricing-switch__track {
  outline: 2px solid rgba(33, 84, 255, 0.6);
  outline-offset: 2px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.pricing-compare {
  margin: 12px 0 32px;
  display: grid;
  gap: 16px;
}
.pricing-compare__header {
  display: grid;
  gap: 6px;
}
.pricing-compare__header h2 {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}
.pricing-compare__header p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}
.pricing-compare__section {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e6eaf2;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.pricing-compare__section summary {
  list-style: none;
}
.pricing-compare__section summary::-webkit-details-marker {
  display: none;
}
.pricing-compare__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  gap: 16px;
  cursor: pointer;
  background: #f1f5f9;
}
.pricing-compare__summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pricing-compare__icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(33, 84, 255, 0.14);
  border: 1px solid rgba(33, 84, 255, 0.25);
}
.pricing-compare__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.pricing-compare__hint {
  display: block;
  font-size: 13px;
  color: #64748b;
}
.pricing-compare__chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid #2154ff;
  border-bottom: 2px solid #2154ff;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.pricing-compare__section[open] .pricing-compare__chevron {
  transform: rotate(-135deg);
}
.pricing-compare__table {
  display: grid;
  gap: 0;
}
.pricing-compare__row {
  display: grid;
  grid-template-columns: minmax(160px, 1.6fr) repeat(3, minmax(80px, 1fr));
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #eef2f7;
  font-size: 14px;
  color: #0f172a;
}
.pricing-compare__row--head {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}
.pricing-compare__cell {
  text-align: center;
  font-weight: 700;
  color: #1739b8;
}
.pricing-compare__cell.is-no {
  color: #94a3b8;
}
@media (max-width: 640px) {
  .pricing-compare__summary {
    padding: 14px 16px;
  }
  .pricing-compare__title {
    font-size: 14px;
  }
  .pricing-compare__hint {
    font-size: 12px;
  }
  .pricing-compare__row {
    grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(46px, 1fr));
    padding: 10px 12px;
    font-size: 12px;
  }
}
.price-card {
  background: #ffffff;
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.price-card__cta {
  display: grid;
  gap: 10px;
}
.price-card--primary {
  border-color: rgba(33, 84, 255, 0.35);
  box-shadow: 0 24px 55px rgba(33, 84, 255, 0.18);
}
.price-card--accent {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 24px 55px rgba(14, 165, 233, 0.18);
}
.price-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(33, 84, 255, 0.12);
  color: #1739b8;
  font-size: 11px;
  font-weight: 700;
}
.pricing-page[dir="rtl"] .price-card__badge {
  right: auto;
  left: 16px;
}
.price-card__head h3 {
  margin: 0 0 6px;
}
.price-card__price {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.price-card__note {
  color: var(--text-light);
  font-size: 13px;
}
.price-card__yearly {
  color: var(--text-light);
  font-size: 13px;
  margin: 6px 0 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: baseline;
}
.price-card__yearly strong {
  color: #0f172a;
  font-weight: 700;
}
.price-card__promo {
  color: #2154ff;
  font-weight: 600;
}
.price-card__features {
  display: grid;
  gap: 8px;
  padding-left: 16px;
  color: #0f172a;
}
.price-card__features li {
  list-style: disc;
  font-size: 14px;
}
.price-card__bundles {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}
.price-card__bundle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(33, 84, 255, 0.08);
  border: 1px solid rgba(33, 84, 255, 0.18);
}
.price-card__compare-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #2154ff;
  text-decoration: none;
  margin: 0 0 14px;
}
.price-card__compare-link:hover {
  text-decoration: underline;
}
.price-card__gif {
  display: flex;
  justify-content: center;
}
.price-card__gif img {
  width: min(240px, 100%);
  height: auto;
  border-radius: 14px;
}
.price-card__paypal {
  display: grid;
  gap: 10px;
}
.pricing-page [data-billing="yearly"] {
  display: none;
}
.pricing-page[data-billing-cycle="yearly"] [data-billing="yearly"] {
  display: grid;
}
.pricing-page[data-billing-cycle="yearly"] [data-billing="monthly"] {
  display: none;
}
.pricing-page[data-billing-cycle="yearly"] .price-card__price[data-billing="yearly"],
.pricing-page[data-billing-cycle="yearly"] .price-card__yearly[data-billing="yearly"] {
  display: flex;
}
.pricing-page[data-billing-cycle="monthly"] .price-card__price[data-billing="yearly"],
.pricing-page[data-billing-cycle="monthly"] .price-card__yearly[data-billing="yearly"] {
  display: none;
}
.pricing-page[data-billing-cycle="monthly"] .price-card__price[data-billing="monthly"],
.pricing-page[data-billing-cycle="monthly"] .price-card__yearly[data-billing="monthly"] {
  display: flex;
}
.paypal-status {
  font-size: 13px;
  color: var(--text-light);
}
.paypal-status.is-error {
  color: #b91c1c;
}
.pricing-faq {
  background: #ffffff;
  border: 1px solid #e6eaf2;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.pricing-faq h2 {
  margin: 0 0 16px;
  font-size: 22px;
}
.pricing-faq__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.pricing-faq__item h4 {
  margin: 0 0 6px;
}
.pricing-faq__item p {
  margin: 0;
  color: var(--text-light);
  font-size: 14px;
}

@media (max-width: 720px) {
  .pricing-hero__title { font-size: 28px; }
  .price-card__badge { right: 12px; }
}

/* LTR drawer comes from left, RTL from right */
html[dir="ltr"] .drawer { left: 0; }
html[dir="rtl"] .drawer { right: 0; transform: translateX(110%); }

html[dir="ltr"] .drawer.open { transform: translateX(0); }
html[dir="rtl"] .drawer.open { transform: translateX(0); }

.drawerHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
}
body.dark-mode .drawerHead { border-bottom-color: #333333; }

.drawerTitle {
  font-size: 16px;
  font-weight: 800;
  color: var(--deep-navy);
}
body.dark-mode .drawerTitle { color: var(--white); }

.drawerBottom {
  margin-top: auto;
  position: relative;
}

/* =========================================
   RTL/LTR SUPPORT
   ========================================= */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .crumbs { text-align: right; }
html[dir="rtl"] .panel { text-align: right; }

/* Keep layout symmetry */
html[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--border-color); }
body.dark-mode html[dir="rtl"] .sidebar { border-left-color: #333333; }

/* Drawer head alignment stays natural */
html[dir="rtl"] .drawerHead { direction: rtl; }

/* =========================================
   RESPONSIVE BREAKPOINTS
   ========================================= */
@media (min-width: 1101px) {
  .app {
    grid-template-columns: var(--sidebar-w) 1fr;
  }
  body.sidebar-collapsed .app {
    grid-template-columns: var(--sidebar-w-collapsed) 1fr;
  }
  .sidebar {
    display: flex;
  }
  .mobileTopbar {
    display: none;
  }
  .main {
    padding: 24px;
  }
  .pageTitle { font-size: 28px; }
  .panel {
    padding: 22px;
    overflow: hidden;
  }
  .panelHeader {
    flex-direction: row;
    align-items: center;
  }
  .panelActions {
    width: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .main { padding: 12px; }
  .panel { padding: 14px; }
  .btn { width: 100%; }
  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table thead,
  .table tbody,
  .table tr {
    width: max-content;
  }
  .pageTitle { font-size: 22px; }
}

/* Login/register inspired skin for app dashboard */
.app-auth-skin {
  font-family: var(--font-body);
  background: radial-gradient(1000px 520px at 12% -10%, rgba(33, 84, 255, 0.18) 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(242, 166, 90, 0.22) 0%, transparent 55%),
              linear-gradient(145deg, #f7f3ee 0%, #f4f6fb 60%, #f9fbff 100%);
}
.app-auth-skin .main {
  background: transparent;
}
.app-auth-skin .panel {
  background: #ffffff;
  border: 1px solid rgba(15, 27, 45, 0.12);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}
.app-auth-skin .brandRow {
  background: #f8fafc;
  border-color: rgba(15, 27, 45, 0.12);
}
.app-auth-skin .mobileTopbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 27, 45, 0.12);
}
.app-auth-skin .drawer {
  background: #ffffff;
  border-color: rgba(15, 27, 45, 0.12);
}
.app-auth-skin .sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(15, 27, 45, 0.12);
  backdrop-filter: blur(18px);
}
html[dir="rtl"] .app-auth-skin .sidebar {
  border-right: 0;
  border-left: 1px solid rgba(15, 27, 45, 0.12);
}
.app-auth-skin .brandRow {
  background: #ffffff;
  border-color: rgba(15, 27, 45, 0.12);
}
.app-auth-skin .nav a {
  color: var(--deep-navy);
}
.app-auth-skin .nav a:hover {
  background: rgba(33, 84, 255, 0.12);
  border-color: rgba(33, 84, 255, 0.35);
}
.app-auth-skin .nav a.active {
  background: rgba(33, 84, 255, 0.18);
  border-color: rgba(33, 84, 255, 0.45);
}
.app-auth-skin .nav a.active::before {
  background: #2154ff;
}
.app-auth-skin .nav .ico {
  background: rgba(33, 84, 255, 0.12);
  color: #1739b8;
}
.app-auth-skin .nav a.active .ico {
  background: rgba(33, 84, 255, 0.22);
  color: #1739b8;
}
.app-auth-skin .iconBtn {
  background: #f8fafc;
  border-color: rgba(15, 27, 45, 0.12);
  color: var(--deep-navy);
}
.app-auth-skin .accountBtn {
  background: #ffffff;
  border-color: rgba(15, 27, 45, 0.12);
  color: var(--deep-navy);
}
.app-auth-skin .accountName,
.app-auth-skin .brandText strong,
.app-auth-skin .brandText span {
  color: var(--deep-navy);
}
.app-auth-skin .accountMenu {
  background: #ffffff;
  border-color: rgba(15, 27, 45, 0.12);
}
.app-auth-skin .accountMenu a,
.app-auth-skin .accountMenuBtn {
  color: var(--deep-navy);
}
.app-auth-skin .accountMenu a:hover,
.app-auth-skin .accountMenuBtn:hover {
  background: rgba(33, 84, 255, 0.08);
}
.app-auth-skin .accountMenuSep {
  background: rgba(15, 27, 45, 0.18);
}

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 18px;
  background: radial-gradient(1000px 520px at 12% -10%, rgba(33, 84, 255, 0.18) 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(242, 166, 90, 0.22) 0%, transparent 55%),
              linear-gradient(145deg, #f7f3ee 0%, #f4f6fb 60%, #f9fbff 100%);
  position: relative;
  overflow: hidden;
}

.auth-shell {
  width: 100%;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  gap: 16px;
}

.auth-card + .auth-card {
  margin-top: 18px;
}

.auth-brand {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
}

.auth-title {
  margin: 0;
  font-size: 1.9rem;
}

.auth-section-title {
  margin: 0;
  font-size: 1.2rem;
}

.auth-section-subtitle {
  margin: 0 0 6px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.auth-subtitle {
  margin: 0;
  color: var(--text-light);
  font-size: 0.98rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .btn {
  width: 100%;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: 6px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.auth-actions form,
.auth-actions a {
  flex: 1 1 180px;
}

.auth-actions .btn {
  width: 100%;
}

.auth-link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.auth-link-row a {
  color: var(--deep-navy);
  font-weight: 600;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--text-light);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15, 27, 45, 0.12);
}

.auth-msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.auth-field-error {
  color: #b91c1c;
  font-size: 0.8rem;
  margin-top: 4px;
}

input.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.auth-msg--error {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.auth-msg--success {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.auth-note {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

.auth-otp {
  letter-spacing: 0.2em;
  text-align: center;
  font-weight: 700;
}

.oauth-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 27, 45, 0.12);
  color: var(--deep-navy);
  text-decoration: none;
  font-weight: 600;
}

.oauth-btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   DASHBOARD HOME HERO
   ========================================= */
.home-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f1b2d 0%, #13243c 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.home-hero-bg::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(33, 84, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.home-hero-bg::after {
  content: "";
  position: absolute;
  bottom: -35%;
  left: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(23, 167, 161, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.home-hero-card {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  padding: 2.4rem 2rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(33, 84, 255, 0.16) 0%, rgba(23, 167, 161, 0.12) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  text-align: start;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  letter-spacing: .18em;
  font-size: .7rem;
  color: rgba(255, 255, 255, 0.85);
  padding: .35rem .65rem;
  border-radius: .6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.home-hero-title {
  margin-top: 1rem;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1.15;
}
.home-hero-subtitle {
  margin-top: .75rem;
  margin-bottom: 1.4rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  max-width: 56ch;
}
.home-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.home-hero-orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(6px);
  opacity: .55;
  pointer-events: none;
  animation: homePulse 4s ease-in-out infinite;
}
.orb-1 {
  right: -140px;
  top: -120px;
  background: radial-gradient(circle, rgba(33, 84, 255, 0.35) 0%, transparent 65%);
}
.orb-2 {
  left: -160px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(23, 167, 161, 0.3) 0%, transparent 65%);
  animation-duration: 5.2s;
}
@keyframes homePulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.06); opacity: .4; }
}

@media (max-width: 768px) {
  .auth-card { padding: 24px; }
  .auth-actions .btn { width: 100%; }
  .home-hero { min-height: 460px; padding: 1.25rem .75rem; }
  .home-hero-card { padding: 1.6rem 1.1rem; }
  .home-hero-title { font-size: 1.7rem; }
  .home-hero-subtitle { font-size: 1rem; }
  .home-hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-orb {
    animation: none;
  }
}
