/* =====================================================
   OMS ADMIN DASHBOARD - STYLESHEET
   Author: Senior Frontend Dev
   Version: 1.0.0
===================================================== */

/* ---- CSS CUSTOM PROPERTIES (Design Tokens) ---- */
:root {
    /* Colors */
    --primary:        #3B82F6;
    --primary-dark:   #2563EB;
    --primary-light:  #EFF6FF;
    --success:        #22C55E;
    --success-light:  #F0FDF4;
    --warning:        #F59E0B;
    --warning-light:  #FFFBEB;
    --danger:         #EF4444;
    --danger-light:   #FEF2F2;
    --purple:         #A855F7;
    --purple-light:   #FDF4FF;

    /* Neutrals */
    --bg:             #F1F5F9;
    --surface:        #FFFFFF;
    --border:         #E2E8F0;
    --border-hover:   #CBD5E1;

    /* Text */
    --text-primary:   #0F172A;
    --text-secondary: #64748B;
    --text-muted:     #94A3B8;
    --text-white:     #FFFFFF;

    /* Sidebar */
    --sidebar-bg:     #0F172A;
    --sidebar-hover:  #1E293B;
    --sidebar-active: #1D4ED8;
    --sidebar-text:   #94A3B8;
    --sidebar-text-active: #FFFFFF;
    --sidebar-width:  260px;

    /* Spacing */
    --header-h:       68px;
    --card-radius:    16px;
    --btn-radius:     10px;
    --input-radius:   10px;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 4px 20px rgba(0,0,0,.08);
    --shadow-lg:  0 8px 30px rgba(0,0,0,.12);
    --shadow-card: 0 2px 12px rgba(15,23,42,.06);

    /* Transitions */
    --trans-fast: .15s ease;
    --trans-med:  .25s ease;
    --trans-slow: .4s ease;

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --gradient-sidebar: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
}

/* ---- SCREEN READER ONLY ---- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; }
img { display: block; max-width: 100%; }


.nav-group {
  margin-bottom: 6px;
}

.nav-toggle {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  border: none;
  text-align: left;
}

.nav-caret {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.nav-group.open .nav-caret {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  padding-left: 18px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.nav-group.open .nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-subitem {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.nav-subitem:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-subitem.active {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  font-weight: 600;
}

.nav-group.active > .nav-toggle {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}


/* =====================================================
   MAIN WRAPPER
===================================================== */
.main-wrapper {
    /* margin-left: var(--sidebar-width); */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--trans-med);
}

/* =====================================================
   TOP HEADER
===================================================== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 500;
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    box-shadow: var(--shadow-xs);
}
/* =========================
   SIDEBAR
   ========================= */
.sidebar {
  width: 280px;
  min-height: 100vh;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 18px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  left: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.logo-accent {
  color: #60a5fa;
}

/* Tenant card */
.sidebar-tenant-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 20px;
}

.tenant-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tenant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.tenant-meta {
  min-width: 0;
}

.tenant-company {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-domain {
  margin: 4px 0 0;
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-role-wrap {
  margin-top: 12px;
}

.tenant-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
  margin: 18px 10px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 14px;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.badge-pill {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  line-height: 1.2;
}

.nav-item-logout {
  margin-top: 12px;
  color: #fca5a5;
}

.nav-item-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ffffff;
}

/* Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.sf-info {
  min-width: 0;
  flex: 1;
}

.sf-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-role {
  margin: 3px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.sf-more {
  color: #cbd5e1;
  text-decoration: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sf-more:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Header Left */
.header-left { display: flex; align-items: center; gap: 16px; }
.hamburger-btn {
    width: 38px; height: 38px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--trans-fast);
    flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--primary-light); color: var(--primary); }
.page-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.page-breadcrumb { font-size: .7rem; color: var(--text-muted); margin-top: 1px; }
.page-breadcrumb span:not(:last-child)::after { content: ''; }
.page-breadcrumb span { color: var(--text-secondary); }
.page-breadcrumb span:last-child { color: var(--primary); font-weight: 600; }

/* Header Right */
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 7px 12px;
    width: 260px;
    transition: all var(--trans-fast);
}
.search-bar:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.search-icon { color: var(--text-muted); font-size: .85rem; flex-shrink: 0; }
.search-input {
    flex: 1;
    background: none;
    font-size: .8rem;
    color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-muted); }
.search-shortcut {
    font-size: .65rem;
    color: var(--text-muted);
    background: var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    font-weight: 600;
}

/* Date Range Selector */
.date-range-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: .775rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all var(--trans-fast);
    white-space: nowrap;
}
.date-range-selector:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.date-caret { font-size: .65rem; margin-left: 2px; }
.date-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 180px;
    z-index: 600;
    overflow: hidden;
}
.date-dropdown.open { display: block; animation: dropIn .15s ease; }
.date-dropdown ul { padding: 6px; }
.date-option {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: .8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--trans-fast);
}
.date-option:hover { background: var(--primary-light); color: var(--primary); }
.date-option.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--btn-radius);
    font-size: .8rem;
    font-weight: 600;
    transition: all var(--trans-fast);
    white-space: nowrap;
}
.btn-export {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-export:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-primary {
    background: var(--gradient-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59,130,246,.3);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(59,130,246,.4); transform: translateY(-1px); }
.btn-ghost {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }

/* Icon Buttons */
.icon-btn {
    width: 38px; height: 38px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: .9rem;
    border: 1.5px solid var(--border);
    position: relative;
    transition: all var(--trans-fast);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--danger);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    border-radius: 100px;
    padding: 2px 5px;
    border: 2px solid #fff;
}
.icon-btn-sm {
    width: 30px; height: 30px;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: .8rem;
    border: none;
    transition: all var(--trans-fast);
}
.icon-btn-sm:hover { background: var(--border); color: var(--text-primary); }

/* Header Avatar */
.header-avatar {
    width: 36px; height: 36px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--primary-light);
    transition: all var(--trans-fast);
    flex-shrink: 0;
}
.header-avatar:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(59,130,246,.3); }

/* =====================================================
   PAGE CONTENT
===================================================== */
.page-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =====================================================
   STAT CARDS GRID
===================================================== */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Stat Card Base */
.stat-card {
    background: var(--surface);
    border-radius: var(--card-radius);
    padding: 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity var(--trans-med);
}
.stat-card[data-color="blue"]::before  { background: var(--primary); opacity: 1; }
.stat-card[data-color="amber"]::before { background: var(--warning); opacity: 1; }
.stat-card[data-color="green"]::before { background: var(--success); opacity: 1; }
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Gradient Card */
.stat-card-gradient {
    background: var(--gradient-blue);
    border: none;
    color: #fff;
}
.stat-card-gradient::before { display: none; }
.stat-card-gradient .stat-value { color: #fff; }

/* Stat Card Header */
.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-icon-wrap {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Trends */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 100px;
}
.stat-trend.up { background: var(--success-light); color: var(--success); }
.stat-trend.down { background: var(--danger-light); color: var(--danger); }

/* Stat Card Body */
.stat-card-body {}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -.02em;
}
.stat-label {
    font-size: .775rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

/* Stat Card Footer */
.stat-sub { font-size: .72rem; color: var(--text-muted); }
.stat-sub strong { color: var(--text-secondary); font-weight: 600; }

/* Stat Sparkline (decorative) */
.stat-sparkline {
    height: 36px;
    border-radius: 6px;
    opacity: .12;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 6px,
        currentColor 6px,
        currentColor 7px
    );
    margin: 0 -22px -22px;
}
.stat-sparkline.blue { color: var(--primary); }
.stat-sparkline.amber { color: var(--warning); }
.stat-sparkline.green { color: var(--success); }

/* Progress Bar (Revenue Card) */
.stat-progress-bar {
    height: 5px;
    background: rgba(255,255,255,.2);
    border-radius: 100px;
    overflow: hidden;
}
.stat-progress-fill {
    height: 100%;
    background: rgba(255,255,255,.8);
    border-radius: 100px;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* =====================================================
   MAIN GRID (Table + Right Panel)
===================================================== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

/* =====================================================
   CARD BASE STYLES
===================================================== */
.card {
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}
.card-title { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: .72rem; color: var(--text-muted); margin-top: 2px; font-weight: 400; }
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.view-all-link {
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: gap var(--trans-fast);
}
.view-all-link:hover { gap: 8px; }

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border-radius: 8px;
    padding: 4px;
}
.filter-tab {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    transition: all var(--trans-fast);
}
.filter-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.filter-tab:hover:not(.active) { color: var(--text-secondary); }

/* =====================================================
   ORDERS TABLE
===================================================== */
.orders-card { display: flex; flex-direction: column; }
.table-wrapper { overflow-x: auto; }

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}
.orders-table thead tr {
    background: var(--bg);
}
.orders-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    white-space: nowrap;
}
.sort-icon { color: var(--border-hover); margin-left: 4px; font-size: .65rem; cursor: pointer; }
.orders-table td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
.orders-table tbody tr { transition: background var(--trans-fast); }
.orders-table tbody tr:hover { background: var(--bg); }
.orders-table tbody tr:last-child td { border-bottom: none; }

/* Checkbox */
input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

/* Order ID */
.order-id {
    font-weight: 700;
    color: var(--primary);
    font-size: .78rem;
    font-family: 'Courier New', monospace;
}

/* Customer Cell */
.customer-cell { display: flex; align-items: center; gap: 10px; }
.customer-name { font-weight: 600; color: var(--text-primary); font-size: .8rem; }
.customer-sub { font-size: .68rem; color: var(--text-muted); }

/* Platform Badge */
.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 600;
}
.platform-chip.shopify  { background: #F0FDF4; color: #16A34A; }
.platform-chip.woo      { background: #F5F3FF; color: #7C3AED; }
.platform-chip.daraz    { background: #FFF7ED; color: #EA580C; }
.platform-chip.manual   { background: var(--bg); color: var(--text-secondary); }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
}
.status-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-shipped    { background: #EFF6FF; color: #2563EB; }
.status-shipped::before    { background: #2563EB; }
.status-processing { background: #FFFBEB; color: #D97706; }
.status-processing::before { background: #D97706; }
.status-pending    { background: #FEF2F2; color: #DC2626; }
.status-pending::before    { background: #DC2626; }
.status-delivered  { background: #F0FDF4; color: #15803D; }
.status-delivered::before  { background: #15803D; }

/* Amount */
.order-amount { font-weight: 700; color: var(--text-primary); font-size: .825rem; }

/* Action Btn */
.action-btn {
    padding: 5px 10px;
    border-radius: 7px;
    font-size: .7rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    transition: all var(--trans-fast);
}
.action-btn:hover { background: var(--primary); color: #fff; }

/* Table Footer */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-wrap: wrap;
    gap: 10px;
}
.table-count { font-size: .75rem; color: var(--text-muted); }
.table-count strong { color: var(--text-secondary); font-weight: 600; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
    min-width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--trans-fast);
    padding: 0 8px;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-dots { color: var(--text-muted); font-size: .8rem; padding: 0 4px; }

/* =====================================================
   RIGHT PANEL
===================================================== */
.right-panel { display: flex; flex-direction: column; gap: 20px; }

/* =====================================================
   FULFILLMENT CARD
===================================================== */
.fulfillment-card {}

/* Circular Progress */
.circular-progress-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 20px 16px;
}
.circular-progress {
    position: relative;
    width: 160px; height: 160px;
}
.progress-ring { transform: rotate(-90deg); }
.ring-bg {
    fill: none;
    stroke: var(--bg);
    stroke-width: 14;
}
.ring-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 14;
    stroke-linecap: round;
    stroke-dasharray: 408.41; /* 2 * PI * 65 */
    stroke-dashoffset: 408.41;
    transition: stroke-dashoffset 1.5s cubic-bezier(.4,0,.2,1);
    filter: drop-shadow(0 0 6px rgba(59,130,246,.4));
}
.progress-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.progress-pct { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.progress-label { font-size: .65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }

/* Breakdown */
.status-breakdown { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.breakdown-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.breakdown-label { font-size: .75rem; font-weight: 500; color: var(--text-secondary); width: 78px; flex-shrink: 0; }
.breakdown-bar-wrap { flex: 1; height: 5px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.breakdown-bar { height: 100%; border-radius: 100px; width: 0; transition: width 1.2s cubic-bezier(.4,0,.2,1); }
.breakdown-val { font-size: .72rem; font-weight: 700; color: var(--text-secondary); width: 40px; text-align: right; flex-shrink: 0; }

/* =====================================================
   QUICK ACTIONS CARD
===================================================== */
.quick-actions-card {}
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 20px 20px;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: 12px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    transition: all var(--trans-fast);
    cursor: pointer;
}
.quick-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.qa-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform var(--trans-fast);
}
.quick-action-btn:hover .qa-icon { transform: scale(1.1); }
.qa-label { font-size: .72rem; font-weight: 600; color: var(--text-secondary); text-align: center; line-height: 1.3; }

/* =====================================================
   BOTTOM GRID
===================================================== */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

/* =====================================================
   ORDER AGING (PLATFORM LIST)
===================================================== */
.aging-card {}
.platform-list { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 20px; }
.platform-row { display: flex; flex-direction: column; gap: 8px; }

.platform-info { display: flex; align-items: center; gap: 12px; }
.platform-logo {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.platform-logo.shopify { background: #EDF7EE; color: #5B8A3C; }
.platform-logo.woo     { background: #F0ECF8; color: #7B3FBE; }
.platform-logo.daraz   { background: #FFF0E8; color: #FF6600; }
.platform-logo.manual  { background: var(--bg); color: var(--text-secondary); }

.platform-name { font-size: .82rem; font-weight: 700; color: var(--text-primary); display: block; }
.platform-orders { font-size: .68rem; color: var(--text-muted); display: block; }

.platform-bar-wrap { display: flex; align-items: center; gap: 10px; }
.platform-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 100px;
    overflow: hidden;
}
.platform-bar-fill {
    height: 100%;
    border-radius: 100px;
    width: 0;
    transition: width 1.4s cubic-bezier(.4,0,.2,1);
}
.shopify-bar { background: linear-gradient(90deg, #5B8A3C, #7EC845); }
.woo-bar     { background: linear-gradient(90deg, #7B3FBE, #9B59D0); }
.daraz-bar   { background: linear-gradient(90deg, #FF6600, #FF8C40); }
.manual-bar  { background: linear-gradient(90deg, #64748B, #94A3B8); }
.platform-pct { font-size: .72rem; font-weight: 700; color: var(--text-secondary); width: 30px; text-align: right; flex-shrink: 0; }

/* Aging Tags */
.aging-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.aging-tag {
    font-size: .65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    letter-spacing: .02em;
}
.aging-tag.green  { background: var(--success-light); color: #15803D; }
.aging-tag.amber  { background: var(--warning-light); color: #92400E; }
.aging-tag.red    { background: var(--danger-light); color: #991B1B; }

/* Select SM */
.select-sm {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: .75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--trans-fast);
}
.select-sm:hover { border-color: var(--primary); }

/* =====================================================
   MINI BAR CHART (Weekly Volume)
===================================================== */
.mini-chart-card {}
.bar-chart-wrap { padding: 20px 20px 8px; }
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
}
.bar-group { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; }
.bar {
    width: 14px;
    border-radius: 5px 5px 0 0;
    transition: height .8s cubic-bezier(.4,0,.2,1), opacity var(--trans-fast);
    cursor: pointer;
    opacity: .85;
}
.bar:hover { opacity: 1; transform: scaleY(1.03); transform-origin: bottom; }
.bar.orders-bar    { background: var(--primary); }
.bar.fulfilled-bar { background: var(--success); }
.bar-val { font-size: .6rem; color: var(--text-muted); font-weight: 600; }

.bar-labels { display: flex; gap: 6px; }
.bar-day { flex: 1; text-align: center; font-size: .65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; padding: 4px 0; }

/* Trend Chip */
.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}
.trend-chip.up { background: var(--success-light); color: var(--success); }

/* Chart Legend */
.chart-legend {
    display: flex;
    gap: 16px;
    padding: 0 20px 20px;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--text-secondary); font-weight: 500; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* =====================================================
   FOOTER
===================================================== */
.dashboard-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .72rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 6px;
}
.dashboard-footer strong { color: var(--text-secondary); }

/* =====================================================
   TOAST NOTIFICATIONS
===================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    min-width: 280px;
    max-width: 360px;
    pointer-events: all;
    animation: toastIn .3s ease;
    transition: opacity .3s ease, transform .3s ease;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-info    { border-left-color: var(--primary); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-info    .toast-icon { color: var(--primary); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-msg { flex: 1; font-size: .8rem; font-weight: 500; color: var(--text-primary); }
.toast-close { color: var(--text-muted); font-size: .85rem; cursor: pointer; padding: 2px; }
.toast-close:hover { color: var(--text-primary); }
.toast.hiding { opacity: 0; transform: translateX(30px); }

/* =====================================================
   SIDEBAR OVERLAY (Mobile)
===================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; animation: fadeIn .2s ease; }

/* =====================================================
   MODAL
===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
    background: var(--surface);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: .95rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.modal-title i { color: var(--primary); }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: .9rem;
    transition: all var(--trans-fast);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.form-input {
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--input-radius);
    font-size: .8rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: all var(--trans-fast);
    width: 100%;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.form-textarea { resize: vertical; min-height: 80px; }

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dropIn   { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes countUp  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin     { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* =====================================================
   RESPONSIVE - TABLET (< 1200px)
===================================================== */
@media (max-width: 1200px) {
    .stat-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .main-grid { grid-template-columns: 1fr; }
    .bottom-grid { grid-template-columns: 1fr; }
    .right-panel { display: grid; grid-template-columns: 1fr 1fr; }
    .search-bar { width: 200px; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 260px; }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-close-btn { display: flex; }
    .main-wrapper { margin-left: 0; }
    .stat-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .right-panel { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .stat-cards-grid { grid-template-columns: 1fr; }
    .header-right { gap: 6px; }
    .search-bar { display: none; }
    .date-range-selector .date-range-text { display: none; }
    .btn-export span { display: none; }
    .page-content { padding: 14px; gap: 14px; }
    .top-header { padding: 0 14px; }
    .form-row { grid-template-columns: 1fr; }
    .aging-tags { display: none; }
    .right-panel { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .card-header { flex-direction: column; }
    .card-header-actions { width: 100%; justify-content: space-between; }
}




/* customer css */

.customer-page {
  gap: 22px;
}

.customer-alert {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
}

.customer-alert.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.customer-alert.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* stats */
.customer-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.customer-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.customer-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.customer-stat-icon.green { background: #f0fdf4; color: #22c55e; }
.customer-stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.customer-stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.customer-stat-icon.amber { background: #fffbeb; color: #f59e0b; }
.customer-stat-icon.red { background: #fef2f2; color: #ef4444; }
.customer-stat-icon.gray { background: #f3f4f6; color: #6b7280; }

.customer-stat-content {
  min-width: 0;
}

.customer-stat-label {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.customer-stat-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #94a3b8;
}

/* main card */
.customer-table-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.customer-toolbar {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #eef2f7;
  flex-wrap: wrap;
}

.customer-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.customer-chip:hover {
  background: #eef2f7;
}

.customer-chip span {
  background: #e2e8f0;
  color: #64748b;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.customer-chip.active {
  background: #f0fdf4;
  color: #16a34a;
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.customer-chip.active span {
  background: #dcfce7;
  color: #16a34a;
}

.customer-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-search-form {
  margin: 0;
}

.customer-search-box {
  width: 280px;
  height: 46px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.customer-search-box i {
  color: #94a3b8;
}

.customer-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.customer-btn {
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.customer-btn-outline {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.customer-btn-outline:hover {
  background: #f8fafc;
}

.customer-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.customer-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

/* table */
.customer-table-wrap {
  overflow-x: auto;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.customer-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 15px 18px;
  text-align: left;
  white-space: nowrap;
}

.customer-table tbody td {
  padding: 18px;
  border-top: 1px solid #eef2f7;
  vertical-align: middle;
}

.customer-table tbody tr:hover {
  background: #fcfdff;
}

.text-right {
  text-align: right;
}

.customer-empty-state {
  text-align: center;
  padding: 34px 20px !important;
  color: #64748b;
  font-size: 14px;
}

/* customer cell */
.cust-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cust-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cust-meta {
  min-width: 0;
}

.cust-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.cust-loc {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cust-phone {
  font-size: 15px;
  font-weight: 500;
  color: #334155;
}

.cust-orders strong,
.cust-spent strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.cust-orders span,
.cust-spent span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

/* status */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.vip {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.status-pill.returning {
  background: #f5f3ff;
  color: #8b5cf6;
  border: 1px solid #ddd6fe;
}

.status-pill.risky {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.status-pill.new {
  background: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
}

/* risk */
.risk-score-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.risk-score-text {
  min-width: 42px;
  font-size: 14px;
  font-weight: 800;
}

.risk-score-text.low { color: #22c55e; }
.risk-score-text.medium { color: #f59e0b; }
.risk-score-text.high { color: #ef4444; }

.risk-progress {
  width: 88px;
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.risk-progress-bar {
  height: 100%;
  border-radius: 999px;
}

.risk-progress-bar.low { background: #22c55e; }
.risk-progress-bar.medium { background: #f59e0b; }
.risk-progress-bar.high { background: #ef4444; }

/* tags */
.cust-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cust-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.cust-tag.green { background: #dcfce7; color: #15803d; }
.cust-tag.blue { background: #dbeafe; color: #2563eb; }
.cust-tag.purple { background: #ede9fe; color: #7c3aed; }
.cust-tag.red { background: #fee2e2; color: #dc2626; }
.cust-tag.orange { background: #ffedd5; color: #ea580c; }

/* actions */
.cust-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-action {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-action.call { color: #3b82f6; }
.icon-action.whatsapp { color: #22c55e; }
.icon-action.view { color: #64748b; }
.icon-action.more { color: #64748b; }

.icon-action:hover {
  background: #f8fafc;
}

.icon-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* dropdown */
.cust-more-wrap {
  position: relative;
}

.cust-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: none;
  z-index: 50;
}

.cust-more-wrap.open .cust-more-menu {
  display: block;
}

.cust-more-item {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.cust-more-item:hover {
  background: #f8fafc;
}

.cust-more-item.danger {
  color: #dc2626;
}

.cust-more-item.danger:hover {
  background: #fef2f2;
}

/* footer */
.customer-table-footer {
  padding: 16px 20px;
  border-top: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.customer-footer-left {
  font-size: 14px;
  color: #64748b;
}

.customer-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-pill {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

.page-pill.disabled {
  opacity: 0.45;
}

/* view modal */
.customer-view-modal {
  max-width: 700px;
}

.customer-view-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.customer-view-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-view-name {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.customer-view-segment {
  margin-top: 5px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

.customer-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.customer-view-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.customer-view-item.full {
  grid-column: 1 / -1;
}

.customer-view-item label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.customer-view-item p {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

/* responsive */
@media (max-width: 1500px) {
  .customer-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .customer-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .customer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-toolbar-actions {
    justify-content: flex-start;
  }

  .customer-search-box {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .customer-view-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .customer-stats-grid {
    grid-template-columns: 1fr;
  }

  .customer-table-card {
    border-radius: 18px;
  }

  .customer-toolbar {
    padding: 14px;
  }

  .customer-table-footer {
    padding: 14px;
  }
}



/* =========================================================
   INTEGRATIONS PAGE CSS
   Sidebar + Topbar are already included globally
========================================================= */

.integrations-page,
.page-content.integrations-page {
  gap: 24px;
}

/* =========================================================
   PAGE HEADER
========================================================= */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left {
  min-width: 0;
}

.page-main-title {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0;
}

.page-subtitle {
  margin-top: 8px;
  max-width: 760px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn-primary,
.btn-secondary,
.btn-cancel,
.btn-connect {
  border: none;
  outline: none;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #f8fafc;
}

.btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
}

.btn-connect:hover {
  transform: translateY(-1px);
}

.btn-primary svg,
.btn-secondary svg,
.btn-cancel svg,
.btn-connect svg {
  width: 16px;
  height: 16px;
}

/* =========================================================
   STATS GRID
========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -35px;
  top: -35px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.025);
}

.stat-card::before {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: 24px;
  bottom: -36px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.018);
}

.stat-card.blue-card {
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  border-color: transparent;
}

.stat-card.blue-card::after,
.stat-card.blue-card::before {
  background: rgba(255, 255, 255, 0.08);
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.stat-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-box svg {
  width: 22px;
  height: 22px;
}

.stat-icon-box.blue {
  background: #eff6ff;
  color: #2563eb;
}

.stat-icon-box.green {
  background: #f0fdf4;
  color: #22c55e;
}

.stat-icon-box.red {
  background: #fef2f2;
  color: #ef4444;
}

.stat-icon-box.white {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-badge svg {
  width: 10px;
  height: 10px;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.badge-red {
  background: #fee2e2;
  color: #dc2626;
}

.badge-white {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.stat-value {
  position: relative;
  z-index: 1;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
  margin-bottom: 6px;
}

.blue-card .stat-value {
  color: #ffffff;
}

.stat-label {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.blue-card .stat-label {
  color: rgba(255, 255, 255, 0.78);
}

.stat-helper {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

.stat-helper strong {
  color: #475569;
}

.blue-card .stat-helper {
  border-top-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
}

.blue-card .stat-helper strong {
  color: #ffffff;
}

/* =========================================================
   BOTTOM GRID
========================================================= */
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

/* =========================================================
   CARD BASE
========================================================= */
.table-card,
.activity-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.table-card-header,
.activity-card-header {
  padding: 22px 22px 0;
}

.table-card-title,
.activity-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.table-card-subtitle,
.activity-card-subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  color: #94a3b8;
}

/* =========================================================
   TABLE TOOLBAR
========================================================= */
.table-toolbar {
  padding: 16px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  overflow-x: auto;
}

.filter-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.filter-tab:hover {
  color: #334155;
}

.filter-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.table-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.table-search svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
}

.table-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #334155;
  width: 160px;
}

.table-search input::placeholder {
  color: #94a3b8;
}

/* =========================================================
   RULES TABLE
========================================================= */
.rules-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.rules-table-wrap table,
.rules-table-wrap table thead,
.rules-table-wrap table tbody {
  width: 100%;
}

.rules-table-wrap table {
  border-collapse: collapse;
  min-width: 980px;
}

.rules-table-wrap thead th {
  background: #f8fafc;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.rules-table-wrap thead th:first-child,
.rules-table-wrap tbody td:first-child {
  padding-left: 22px;
}

.rules-table-wrap thead th:last-child,
.rules-table-wrap tbody td:last-child {
  padding-right: 22px;
}

.rules-table-wrap tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.rules-table-wrap tbody tr:hover {
  background: #fafcff;
}

.rules-table-wrap tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 13px;
  color: #334155;
  white-space: nowrap;
}

.cb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rules-table-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
}

.rule-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.rule-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-icon svg {
  width: 15px;
  height: 15px;
  color: #2563eb;
}

.rule-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.rule-desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: #94a3b8;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.active {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.active .dot {
  background: #22c55e;
}

.status-badge.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.inactive .dot {
  background: #94a3b8;
}

.status-badge.error {
  background: #fee2e2;
  color: #dc2626;
}

.status-badge.error .dot {
  background: #ef4444;
}

.trigger-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 700;
}

.action-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 170px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
}

.last-run-text {
  font-size: 12.5px;
  color: #64748b;
}

.menu-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.menu-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.menu-btn svg {
  width: 14px;
  height: 14px;
}

/* =========================================================
   TABLE FOOTER
========================================================= */
.table-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.table-footer-info {
  font-size: 12.5px;
  color: #94a3b8;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.page-btn:hover {
  background: #f8fafc;
}

.page-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* =========================================================
   DONUT / ACTIVITY
========================================================= */
.donut-wrap {
  padding: 24px 22px 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut-container {
  position: relative;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.donut-svg {
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 12;
}

.donut-seg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.donut-pct {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
}

.donut-label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.donut-legend {
  flex: 1;
  min-width: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-info {
  flex: 1;
  min-width: 0;
}

.legend-name {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.legend-count {
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
}

.incident-section {
  padding: 18px 22px 22px;
}

.incident-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 14px;
}

.view-all-link {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

.incident-item {
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.incident-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.incident-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.incident-icon-wrap svg {
  width: 14px;
  height: 14px;
  color: #ef4444;
}

.incident-body {
  flex: 1;
  min-width: 0;
}

.incident-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.incident-desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: #94a3b8;
}

.incident-time {
  margin-top: 5px;
  font-size: 10.5px;
  color: #94a3b8;
}

/* =========================================================
   MODALS
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box.sm {
  max-width: 520px;
}

.modal-header {
  padding: 26px 26px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-title-area {
  min-width: 0;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.modal-subtitle {
  margin-top: 6px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.modal-close:hover {
  background: #f8fafc;
  color: #0f172a;
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 24px 26px 26px;
}

/* Connect store cards */
.connect-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.connect-card {
  position: relative;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 22px 18px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
}

.connect-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.connect-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.connect-card:hover::after {
  opacity: 1;
}

.connect-card-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  font-size: 24px;
}

.cc-woo { background: #fdf2f8; }
.cc-shopify { background: #f0fdf4; }
.cc-daraz { background: #fff7ed; }
.cc-courier { background: #eff6ff; }

.connect-card-name {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.connect-card-desc {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 14px;
}

.connect-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.connect-card:hover .connect-btn {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.modal-helper-text {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.6;
}

/* form modal */
.form-modal-header-accent {
  height: 6px;
  background: linear-gradient(90deg, #1d4ed8, #0ea5e9);
  border-radius: 24px 24px 0 0;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  margin-bottom: 14px;
}

.platform-badge-icon {
  font-size: 16px;
}

.platform-badge-name {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.form-label span {
  color: #ef4444;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

textarea.form-input {
  height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: #94a3b8;
}

.form-divider {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 22px 0 20px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   UTILITIES
========================================================= */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.ml-auto { margin-left: auto; }
.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .connect-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .page-main-title {
    font-size: 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .connect-cards-grid {
    grid-template-columns: 1fr;
  }

  .modal-header,
  .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .table-toolbar,
  .table-card-header,
  .activity-card-header,
  .incident-section,
  .donut-wrap,
  .table-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    width: 100%;
  }

  .table-search-row {
    width: 100%;
  }

  .table-search {
    flex: 1;
    width: 100%;
  }

  .table-search input {
    width: 100%;
  }

  .page-main-title {
    font-size: 21px;
  }

  .modal-box {
    border-radius: 18px;
  }
}



/* product css */

.page-content {
  padding: 24px;
  background: #f8fafc;
  min-height: 100vh;
}

.integration-alert {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
}

.integration-alert.success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.integration-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.page-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.integration-sync-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.step-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
}

.step-dot.done {
  background: #22c55e;
}

.step-dot.active {
  background: #2563eb;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.card-icon-wrap.blue {
  background: #dbeafe;
  color: #2563eb;
}

.card-icon-wrap.green {
  background: #dcfce7;
  color: #16a34a;
}

.card-icon-wrap.orange {
  background: #ffedd5;
  color: #ea580c;
}

.card-label {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.card-value {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.card-meta {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 10px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

.card-badge.neutral {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.table-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.tab-bar {
  display: flex;
  gap: 8px;
  padding: 20px 20px 0;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.tab.active {
  background: #2563eb;
  color: #fff;
}

.tab-count {
  margin-left: 6px;
  font-size: 12px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 440px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 0 14px 0 42px;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.toolbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn,
.btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline {
  background: #fff;
  border: 1px solid #dbe2ea;
  color: #0f172a;
}

.btn-green {
  background: #16a34a;
  border: 1px solid #16a34a;
  color: #fff;
}

.filter-btn:hover,
.btn:hover {
  transform: translateY(-1px);
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.table-wrap table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.table-wrap thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  background: #f8fafc;
}

.table-wrap tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #0f172a;
  vertical-align: middle;
}

.table-wrap tbody tr:hover {
  background: #fafcff;
}

.product-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-icon-wrap {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.empty-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.empty-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.empty-sub {
  max-width: 520px;
  margin: 0 auto;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.type-modal,
.form-modal {
  width: 100%;
  max-width: 860px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.type-modal {
  max-width: 780px;
}

.modal-header,
.form-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title,
.form-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.modal-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-top: 6px;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
}

.modal-body,
.form-body {
  padding: 24px;
}

.info-box {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #475569;
  margin-bottom: 18px;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.type-card:hover,
.type-card.selected {
  border-color: #2563eb;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.12);
}

.type-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.type-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid #e2e8f0;
}

.form-type-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
}

.form-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.form-tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.form-tab.active {
  background: #0f172a;
  color: #fff;
}

.form-panel {
  display: block;
}

.form-grid,
.form-grid-2 {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-col-span-2 {
  grid-column: span 2;
}

.form-section {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  padding: 18px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.required {
  color: #dc2626;
}

.form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 10px 14px;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.product-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid #e2e8f0;
}

.footer-btn-group {
  display: flex;
  gap: 8px;
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  background: #0f172a;
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .type-cards {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .form-col-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 16px;
  }

  .page-title {
    font-size: 24px;
  }

  .table-toolbar,
  .page-header,
  .product-modal-footer,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .footer-btn-group {
    width: 100%;
    flex-direction: column;
  }

  .btn,
  .filter-btn {
    width: 100%;
  }
}

/* 

orders css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

/* .main-wrapper {
  margin-left: 260px;
  min-height: 100vh;
} */

.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.header-subtitle {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  min-width: 280px;
  max-width: 380px;
  width: 100%;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #94a3b8;
}

.search-input {
  width: 100%;
  height: 44px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  padding: 0 14px 0 42px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.search-input:focus,
.filter-select:focus,
.modal-input:focus,
.modal-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

.header-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #475569;
  cursor: pointer;
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.notif-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  position: absolute;
  top: 10px;
  right: 11px;
}

.btn-new-order,
.btn,
.empty-cta {
  height: 44px;
  border: none;
  border-radius: 14px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-new-order {
  background: #2563eb;
  color: #fff;
}

.btn-new-order:hover,
.btn:hover,
.empty-cta:hover {
  transform: translateY(-1px);
}

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

.content {
  padding: 24px;
}

.integration-alert {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
}

.integration-alert.success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.integration-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.integration-sync-bar .btn {
  height: 40px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon.blue {
  background: #dbeafe;
  color: #2563eb;
}

.stat-icon.amber {
  background: #fef3c7;
  color: #f59e0b;
}

.stat-icon.cyan {
  background: #cffafe;
  color: #06b6d4;
}

.stat-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: #94a3b8;
}

.orders-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.card-topbar {
  padding: 20px 22px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 22px 18px;
}

.tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab.active {
  background: #2563eb;
  color: #fff;
}

.tab-count {
  font-size: 12px;
  font-weight: 700;
}

.action-bar {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #0f172a;
}

.btn-outline {
  background: #fff;
  border: 1px solid #dbe2ea;
  color: #0f172a;
}

.btn-outline-blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
}

.btn-outline-green {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.filter-select {
  height: 42px;
  min-width: 150px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 12px;
  font-size: 13px;
  color: #334155;
  outline: none;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #0f172a;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fafcff;
}

.checkbox-cell {
  width: 48px;
}

.order-id {
  font-weight: 700;
  color: #0f172a;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cust-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cust-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.cust-email {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.platform-woocommerce {
  background: #eef2ff;
  color: #4338ca;
}

.platform-shopify {
  background: #ecfdf3;
  color: #15803d;
}

.platform-daraz {
  background: #fff7ed;
  color: #ea580c;
}

.platform-custom {
  background: #eff6ff;
  color: #2563eb;
}

.platform-default {
  background: #f1f5f9;
  color: #475569;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-pending {
  background: #fff7ed;
  color: #c2410c;
}

.status-pending .status-dot {
  background: #f59e0b;
}

.status-processing {
  background: #eff6ff;
  color: #2563eb;
}

.status-processing .status-dot {
  background: #2563eb;
}

.status-shipped {
  background: #ecfeff;
  color: #0891b2;
}

.status-shipped .status-dot {
  background: #06b6d4;
}

.status-delivered {
  background: #ecfdf3;
  color: #15803d;
}

.status-delivered .status-dot {
  background: #22c55e;
}

.status-cancelled {
  background: #fef2f2;
  color: #dc2626;
}

.status-cancelled .status-dot {
  background: #ef4444;
}

.total-val {
  font-weight: 700;
  color: #0f172a;
}

.action-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn:hover {
  background: #f8fafc;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.empty-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.empty-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.empty-sub {
  max-width: 520px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.empty-cta {
  background: #2563eb;
  color: #fff;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

#pagination-info {
  font-size: 13px;
  color: #64748b;
}

.page-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  min-width: 42px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.page-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.page-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #475569;
  font-size: 20px;
  cursor: pointer;
}

.modal-tabs {
  display: flex;
  gap: 10px;
  padding: 18px 24px 0;
  flex-wrap: wrap;
}

.modal-tab {
  border: none;
  background: #f1f5f9;
  color: #475569;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.modal-tab.active {
  background: #0f172a;
  color: #fff;
}

.modal-tab-panel {
  display: none;
}

.modal-tab-panel.active {
  display: block;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.modal-input,
.modal-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .main-wrapper {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 16px;
  }

  .header {
    padding: 16px;
  }

  .header-right,
  .action-bar,
  .pagination-bar,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap {
    max-width: 100%;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .tabs,
  .modal-tabs {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }

  .page-btns {
    justify-content: space-between;
  }
}