  @import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  :root {
    --bg: #0a0a0f;
    --bg2: #111118;
    --bg3: #16161f;
    --bg4: #1c1c28;
    --card: #1a1a24;
    --card2: #202030;
    --border: #2a2a3a;
    --border2: #333348;
    --blue: #4f8ef7;
    --blue2: #6fa3ff;
    --blue-dim: #1a2a4a;
    --purple: #9d72ff;
    --purple2: #b899ff;
    --purple-dim: #2a1a4a;
    --teal: #2dd4bf;
    --teal-dim: #0f2a28;
    --amber: #f59e0b;
    --amber-dim: #2a1e0a;
    --red: #f87171;
    --red-dim: #2a1010;
    --green: #4ade80;
    --green-dim: #0a2a18;
    --txt: #e8e8f0;
    --txt2: #9494a8;
    --txt3: #5a5a72;
    --font: "Sora", sans-serif;
    --mono: "JetBrains Mono", monospace;
  }
  body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--txt);
    overflow-x: hidden;
    font-size: 14px;
    line-height: 1.6;
  }
  .page {
    display: none;
  }
  .page.active {
    display: block;
  }

  /* NAV */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 40px;
  }
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
  }
  .nav-logo svg {
    width: 28px;
    height: 28px;
  }
  .nav-links {
    display: flex;
    gap: 28px;
    flex: 1;
  }
  .nav-links a {
    color: var(--txt2);
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
  }
  .nav-links a:hover {
    color: var(--txt);
  }
  .nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .btn {
    padding: 7px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
  }
  .btn-ghost {
    background: transparent;
    color: var(--txt2);
    border: 1px solid var(--border2);
  }
  .btn-ghost:hover {
    background: var(--bg3);
    color: var(--txt);
  }
  .btn-primary {
    background: var(--blue);
    color: #fff;
  }
  .btn-primary:hover {
    background: var(--blue2);
    transform: translateY(-1px);
  }
  .btn-lg {
    padding: 12px 28px;
    font-size: 14px;
    border-radius: 10px;
  }

  /* LANDING */
  #landing {
    min-height: 100vh;
    padding-top: 60px;
  }
  .hero {
    text-align: center;
    padding: 80px 32px 60px;
    max-width: 780px;
    margin: 0 auto;
  }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-dim);
    border: 1px solid rgba(79, 142, 247, 0.3);
    color: var(--blue2);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 28px;
  }
  .badge-dot {
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.5;
      transform: scale(1.3);
    }
  }
  h1.hero-title {
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
  }
  .gradient-text {
    background: linear-gradient(135deg, var(--blue2), var(--purple2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .hero-sub {
    font-size: 17px;
    color: var(--txt2);
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
  }
  .hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .stat-item {
    text-align: center;
  }
  .stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--txt);
  }
  .stat-label {
    font-size: 12px;
    color: var(--txt3);
    margin-top: 2px;
  }

  /* DASHBOARD PREVIEW */
  .dashboard-preview {
    margin: 0 32px 60px;
    border-radius: 16px;
    border: 1px solid var(--border2);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  }
  .preview-bar {
    background: var(--bg3);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
  }
  .preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  /* FEATURES */
  .section {
    padding: 72px 32px;
    max-width: 1100px;
    margin: 0 auto;
  }
  .section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .section-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
  }
  .section-sub {
    font-size: 15px;
    color: var(--txt2);
    max-width: 520px;
  }
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
  }
  .feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    transition: 0.3s;
  }
  .feature-card:hover {
    border-color: var(--border2);
    background: var(--card2);
    transform: translateY(-3px);
  }
  .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
  }
  .feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
  }
  .feature-card p {
    font-size: 13px;
    color: var(--txt2);
    line-height: 1.65;
  }

  /* TESTIMONIALS */
  .testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
  }
  .testi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
  }
  .testi-stars {
    color: var(--amber);
    font-size: 14px;
    margin-bottom: 12px;
  }
  .testi-text {
    font-size: 13px;
    color: var(--txt2);
    line-height: 1.7;
    margin-bottom: 16px;
  }
  .testi-author {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .testi-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
  }
  .testi-name {
    font-size: 13px;
    font-weight: 500;
  }
  .testi-role {
    font-size: 11px;
    color: var(--txt3);
  }

  /* PRICING */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 48px;
  }
  .pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    position: relative;
  }
  .pricing-card.popular {
    border-color: var(--blue);
    background: var(--blue-dim);
  }
  .pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue);
    color: #fff;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
  }
  .price-amount {
    font-size: 36px;
    font-weight: 700;
    margin: 16px 0 4px;
  }
  .price-period {
    font-size: 13px;
    color: var(--txt2);
  }
  .price-features {
    list-style: none;
    margin: 20px 0 24px;
  }
  .price-features li {
    font-size: 13px;
    color: var(--txt2);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .price-features li::before {
    content: "✓";
    color: var(--green);
    font-weight: 600;
    font-size: 12px;
  }

  /* FAQ */
  .faq-list {
    margin-top: 40px;
    max-width: 720px;
  }
  .faq-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    cursor: pointer;
  }
  .faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
  }
  .faq-a {
    font-size: 13px;
    color: var(--txt2);
    margin-top: 12px;
    line-height: 1.7;
    display: none;
  }
  .faq-item.open .faq-a {
    display: block;
  }
  .faq-toggle {
    color: var(--txt3);
    font-size: 18px;
    transition: 0.2s;
  }
  .faq-item.open .faq-toggle {
    transform: rotate(45deg);
    color: var(--blue);
  }

  /* FOOTER */
  footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 48px 32px 32px;
    margin-top: 48px;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 40px;
  }
  .footer-brand p {
    font-size: 13px;
    color: var(--txt2);
    margin-top: 10px;
    max-width: 240px;
    line-height: 1.7;
  }
  .footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--txt3);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
  }
  .footer-col a {
    display: block;
    font-size: 13px;
    color: var(--txt2);
    text-decoration: none;
    margin-bottom: 8px;
    cursor: pointer;
  }
  .footer-col a:hover {
    color: var(--txt);
  }
  .footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--txt3);
  }

  /* ======= DASHBOARD ======= */
  #dashboard {
    display: none;
    flex-direction: row;
    height: 100vh;
    padding-top: 60px;
  }
  #dashboard.active {
    display: flex;
  }
  .sidebar {
    width: 220px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
    overflow-y: auto;
  }
  .sidebar-section {
    margin-bottom: 24px;
  }
  .sidebar-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--txt3);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0 8px;
    margin-bottom: 8px;
  }
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
    font-size: 13px;
    color: var(--txt2);
    margin-bottom: 2px;
  }
  .sidebar-item:hover {
    background: var(--bg3);
    color: var(--txt);
  }
  .sidebar-item.active {
    background: var(--blue-dim);
    color: var(--blue2);
    border: 1px solid rgba(79, 142, 247, 0.2);
  }
  .sidebar-item i {
    font-size: 16px;
  }
  .sidebar-badge {
    margin-left: auto;
    background: var(--blue);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 100px;
  }

  .main-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
  }
  .dash-sub {
    display: none;
  }
  .dash-sub.active {
    display: block;
  }

  /* TOPBAR */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }
  .topbar-left h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
  }
  .topbar-left p {
    font-size: 12px;
    color: var(--txt2);
    margin-top: 2px;
  }
  .topbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--txt2);
    min-width: 180px;
  }
  .search-box i {
    font-size: 14px;
  }
  .notif-btn {
    width: 36px;
    height: 36px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 16px;
    color: var(--txt2);
  }
  .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
  }
  .avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  /* METRIC CARDS */
  .metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
  .metric-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
  }
  .metric-label {
    font-size: 11px;
    color: var(--txt3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .metric-label i {
    font-size: 14px;
  }
  .metric-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
  }
  .metric-change {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .up {
    color: var(--green);
  }
  .down {
    color: var(--red);
  }

  /* CHARTS */
  .charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }
  .chart-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
  }
  .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }
  .chart-title {
    font-size: 14px;
    font-weight: 600;
  }
  .chart-subtitle {
    font-size: 11px;
    color: var(--txt3);
    margin-top: 2px;
  }
  .tab-pills {
    display: flex;
    gap: 4px;
    background: var(--bg3);
    border-radius: 6px;
    padding: 3px;
  }
  .tab-pill {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: var(--txt2);
    transition: 0.15s;
  }
  .tab-pill.active {
    background: var(--card);
    color: var(--txt);
  }

  /* AI INSIGHTS */
  .ai-card {
    background: linear-gradient(135deg, #1a1a30, #16162a);
    border: 1px solid rgba(157, 114, 255, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
  }
  .ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }
  .ai-icon {
    width: 36px;
    height: 36px;
    background: var(--purple-dim);
    border: 1px solid rgba(157, 114, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  .ai-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--purple2);
  }
  .ai-sub {
    font-size: 11px;
    color: var(--txt3);
    margin-top: 1px;
  }
  .ai-alerts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .ai-alert {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 14px;
    border-left: 3px solid;
  }
  .ai-alert.warn {
    border-color: var(--amber);
  }
  .ai-alert.danger {
    border-color: var(--red);
  }
  .ai-alert.info {
    border-color: var(--blue);
  }
  .ai-alert-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .ai-alert-text {
    font-size: 11px;
    color: var(--txt2);
    line-height: 1.5;
  }
  .ai-alert-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 8px;
  }
  .badge-warn {
    background: var(--amber-dim);
    color: var(--amber);
  }
  .badge-danger {
    background: var(--red-dim);
    color: var(--red);
  }
  .badge-info {
    background: var(--blue-dim);
    color: var(--blue2);
  }

  /* TABLE */
  .table-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
  }
  .table-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }
  table {
    width: 100%;
    border-collapse: collapse;
  }
  th {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--txt3);
    text-align: left;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: var(--bg3);
  }
  td {
    padding: 12px 20px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--txt);
  }
  tr:last-child td {
    border-bottom: none;
  }
  tr:hover td {
    background: var(--bg3);
  }
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
  }
  .status-ok {
    background: var(--green-dim);
    color: var(--green);
  }
  .status-low {
    background: var(--amber-dim);
    color: var(--amber);
  }
  .status-out {
    background: var(--red-dim);
    color: var(--red);
  }
  .sku {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--txt3);
  }

  /* RECENT ACTIVITY */
  .row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }
  .activity-list {
    list-style: none;
  }
  .activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .activity-item:last-child {
    border-bottom: none;
  }
  .activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
  }
  .activity-body {
    flex: 1;
  }
  .activity-text {
    font-size: 12px;
    color: var(--txt);
  }
  .activity-time {
    font-size: 11px;
    color: var(--txt3);
    margin-top: 2px;
  }

  /* NOTIF PANEL */
  .notif-list {
    list-style: none;
  }
  .notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    transition: 0.15s;
  }
  .notif-item:hover {
    background: var(--bg3);
  }
  .notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
  }
  .notif-content {
    flex: 1;
  }
  .notif-title {
    font-size: 13px;
    font-weight: 500;
  }
  .notif-desc {
    font-size: 12px;
    color: var(--txt2);
    margin-top: 2px;
  }
  .notif-time {
    font-size: 11px;
    color: var(--txt3);
    margin-top: 4px;
  }
  .notif-unread {
    width: 7px;
    height: 7px;
    background: var(--blue);
    border-radius: 50%;
    margin-top: 4px;
  }

  /* ANALYTICS PAGE */
  .analytics-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
  .chart-tall {
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 0;
  }
  .bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
    min-height: 4px;
  }
  .bar:hover {
    filter: brightness(1.2);
  }
  .bar-label {
    font-size: 10px;
    color: var(--txt3);
  }
  .bar-val {
    font-size: 10px;
    color: var(--txt2);
    font-weight: 500;
  }
  .donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .donut-legend {
    flex: 1;
  }
  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
  }
  .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
  }

  /* PRODUCT PAGE */
  .product-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
  }
  .input-field {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--txt);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
  }
  .input-field:focus {
    border-color: var(--blue);
  }
  select.input-field {
    cursor: pointer;
  }
  .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  .product-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.2s;
    cursor: pointer;
  }
  .product-item:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
  }
  .product-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
  }
  .product-body {
    padding: 14px;
  }
  .product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .product-sku {
    font-size: 10px;
    color: var(--txt3);
    font-family: var(--mono);
    margin-bottom: 8px;
  }
  .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--blue2);
  }
  .product-stock {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
  }

  /* MODAL */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
  }
  .modal-overlay.open {
    display: flex;
  }
  .modal {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 16px;
    padding: 28px;
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
  }
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  .modal-title {
    font-size: 16px;
    font-weight: 600;
  }
  .modal-close {
    cursor: pointer;
    font-size: 20px;
    color: var(--txt2);
    background: none;
    border: none;
    color: var(--txt2);
  }
  .form-group {
    margin-bottom: 16px;
  }
  .form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--txt2);
    margin-bottom: 6px;
    display: block;
  }
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* TOAST */
  .toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .toast {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
  @keyframes slideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
  .toast-icon {
    font-size: 16px;
  }
  .toast-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 16px;
    color: var(--txt3);
  }
  .progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    margin-top: 8px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 100px;
    animation: progressShrink 3s linear forwards;
  }
  @keyframes progressShrink {
    from {
      width: 100%;
    }
    to {
      width: 0%;
    }
  }

  /* SKELETON */
  .skeleton {
    background: linear-gradient(
      90deg,
      var(--bg3) 25%,
      var(--bg4) 50%,
      var(--bg3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
  }
  @keyframes shimmer {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }

  /* SUPPLIER PAGE */
  .supplier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .supplier-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: 0.2s;
  }
  .supplier-card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
  }
  .supplier-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
  }
  .supplier-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .supplier-info {
    font-size: 12px;
    color: var(--txt2);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .supplier-info i {
    font-size: 13px;
  }
  .supplier-stats {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .s-stat {
    text-align: center;
    flex: 1;
  }
  .s-stat-val {
    font-size: 14px;
    font-weight: 700;
  }
  .s-stat-label {
    font-size: 10px;
    color: var(--txt3);
    margin-top: 2px;
  }

  /* SETTINGS */
  .settings-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }
  .settings-nav {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    height: fit-content;
  }
  .settings-nav-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--txt2);
    transition: 0.15s;
    margin-bottom: 2px;
  }
  .settings-nav-item.active {
    background: var(--blue-dim);
    color: var(--blue2);
  }
  .settings-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
  }
  .settings-section {
    margin-bottom: 28px;
  }
  .settings-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .settings-row:last-child {
    border-bottom: none;
  }
  .settings-row-label h4 {
    font-size: 13px;
    font-weight: 500;
  }
  .settings-row-label p {
    font-size: 12px;
    color: var(--txt2);
    margin-top: 2px;
  }
  .toggle {
    width: 42px;
    height: 24px;
    background: var(--border2);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
  }
  .toggle.on {
    background: var(--blue);
  }
  .toggle::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.2s;
  }
  .toggle.on::after {
    transform: translateX(18px);
  }

  /* BRANCH PAGE */
  .branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .branch-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: 0.2s;
  }
  .branch-map-preview {
    height: 80px;
    background: var(--bg3);
    border-radius: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid var(--border);
  }
  .branch-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .branch-addr {
    font-size: 12px;
    color: var(--txt2);
    margin-bottom: 12px;
  }
  .branch-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .branch-metric {
    background: var(--bg3);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
  }
  .branch-metric-val {
    font-size: 13px;
    font-weight: 700;
  }
  .branch-metric-label {
    font-size: 10px;
    color: var(--txt3);
  }

  /* INVENTORY PAGE */
  .inv-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
  }
  .inv-table th:first-child,
  .inv-table td:first-child {
    padding-left: 20px;
  }
  .stock-bar-wrap {
    width: 100px;
    background: var(--bg3);
    border-radius: 100px;
    height: 6px;
    overflow: hidden;
  }
  .stock-bar-fill {
    height: 100%;
    border-radius: 100px;
  }

  /* SCROLLBAR */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 100px;
  }

  /* RESPONSIVE SIMPLE */
  @media (max-width: 900px) {
    .features-grid,
    .testi-grid,
    .pricing-grid {
      grid-template-columns: 1fr;
    }
    .sidebar {
      width: 60px;
      padding: 12px 8px;
    }
    .sidebar-item span,
    .sidebar-label,
    .sidebar-badge {
      display: none;
    }
    .sidebar-item {
      justify-content: center;
    }
    .metrics-grid,
    .ai-alerts,
    .analytics-metrics {
      grid-template-columns: 1fr 1fr;
    }
    .charts-row,
    .row-2col {
      grid-template-columns: 1fr;
    }
    .products-grid {
      grid-template-columns: 1fr 1fr;
    }
    .supplier-grid,
    .branch-grid {
      grid-template-columns: 1fr;
    }
    .settings-layout {
      grid-template-columns: 1fr;
    }
  }

  .chart-card {
  height: 320px;
}

.chart-card canvas {
  width: 100% !important;
  height: 240px !important;
}

.main-content {
  overflow-x: hidden;
}

.charts-row {
  align-items: stretch;
}