/* ═══════════════════════════════════════════════════════════════
   CoolERP.SaaS — Complete Design System CSS
   Multi-Tenant Refrigeration Service ERP Platform
   Version: 1.1.0 — Responsive Fix
   ═══════════════════════════════════════════════════════════════ */

/* ─── FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:wght@600;700;800&display=swap');

/* ─── CSS VARIABLES (Design Tokens) ─── */
:root {
  --bg:             #0B0F1A;
  --surface:        #111827;
  --surface-alt:    #1A2235;
  --card:           #161E2E;
  --card-hover:     #1C2640;
  --border:         #1E293B;
  --border-light:   #2A3752;
  --text:           #E8ECF4;
  --text-muted:     #8B9DC3;
  --text-dim:       #5A6B8A;
  --primary:        #3B82F6;
  --primary-glow:   rgba(59, 130, 246, 0.15);
  --primary-20:     rgba(59, 130, 246, 0.20);
  --primary-33:     rgba(59, 130, 246, 0.33);
  --accent:         #06D6A0;
  --accent-glow:    rgba(6, 214, 160, 0.12);
  --accent-20:      rgba(6, 214, 160, 0.20);
  --accent-33:      rgba(6, 214, 160, 0.30);
  --warning:        #F59E0B;
  --warning-glow:   rgba(245, 158, 11, 0.12);
  --warning-20:     rgba(245, 158, 11, 0.20);
  --warning-33:     rgba(245, 158, 11, 0.30);
  --danger:         #EF4444;
  --danger-glow:    rgba(239, 68, 68, 0.12);
  --danger-20:      rgba(239, 68, 68, 0.20);
  --danger-33:      rgba(239, 68, 68, 0.30);
  --purple:         #8B5CF6;
  --purple-glow:    rgba(139, 92, 246, 0.12);
  --purple-20:      rgba(139, 92, 246, 0.20);
  --purple-33:      rgba(139, 92, 246, 0.30);
  --cyan:           #22D3EE;
  --cyan-glow:      rgba(34, 211, 238, 0.12);
  --cyan-20:        rgba(34, 211, 238, 0.20);
  --cyan-33:        rgba(34, 211, 238, 0.30);
  --font-body:      'DM Sans', sans-serif;
  --font-display:   'Playfair Display', serif;
  --font-mono:      'JetBrains Mono', monospace;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      16px;
  --radius-2xl:     20px;
  --radius-full:    9999px;
  --sidebar-width:       260px;
  --sidebar-collapsed:   72px;
  --topbar-height:       64px;
}


/* ─── RESET & BASE ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }
img { max-width: 100%; display: block; }


/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(59,130,246,0.3); }
  50%      { box-shadow: 0 0 20px rgba(59,130,246,0.6); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.3); opacity: 1; }
}

.animate-in   { animation: fadeIn 0.5s ease both; }
.animate-in-1 { animation: fadeIn 0.5s ease 0.05s both; }
.animate-in-2 { animation: fadeIn 0.5s ease 0.10s both; }
.animate-in-3 { animation: fadeIn 0.5s ease 0.15s both; }
.animate-in-4 { animation: fadeIn 0.5s ease 0.20s both; }
.animate-in-5 { animation: fadeIn 0.5s ease 0.25s both; }
.animate-in-6 { animation: fadeIn 0.5s ease 0.30s both; }
.animate-in-7 { animation: fadeIn 0.5s ease 0.35s both; }
.animate-in-8 { animation: fadeIn 0.5s ease 0.40s both; }

.slide-in     { animation: slideInLeft 0.4s ease both; }
.scale-in     { animation: scaleIn 0.35s ease both; }


/* ═══════════════════════════════════════════════════════════════
   LAYOUT SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.app-container {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html.sidebar-is-collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

.page-wrapper {
  padding: 28px;
  background: var(--bg);
  min-height: calc(100vh - var(--topbar-height));
}

/* ─── Grid Utilities ─── */
.grid { display: grid; gap: 16px; }
.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }
.grid-5  { grid-template-columns: repeat(5, 1fr); }
.grid-6  { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-7  { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.grid-auto-320 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-auto-280 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-300 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }

.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }

/* Spacing */
.mb-2 { margin-bottom: 2px; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.p-0 { padding: 0; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }
.pt-14 { padding-top: 14px; }
.pt-16 { padding-top: 16px; }
.px-0 { padding-left: 0; padding-right: 0; }
.py-0 { padding-top: 0; padding-bottom: 0; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.w-full { width: 100%; }


/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(6,214,160,0.06) 0%, transparent 50%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--card), var(--surface));
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  animation: fadeIn 0.5s ease both;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px var(--primary-glow);
}

.login-logo svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-align: center;
}

.login-title span {
  color: var(--primary);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.role-selector {
  display: flex;
  border-radius: 12px;
  background: var(--surface-alt);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.role-selector-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.role-selector-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Form Fields */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-of-type {
  margin-bottom: 24px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}

.form-label svg, .form-label i {
  width: 13px;
  height: 13px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  color: var(--text-dim);
}

.form-input-wrap {
  position: relative;
}

.form-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.4;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-20);
}

.form-input::placeholder {
  color: var(--text-dim);
  font-size: 12px;
}

.form-input-wrap .form-input {
  padding-left: 42px;
}

.form-input--no-icon {
  padding-left: 14px;
}

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B7B9B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

select.form-input:focus {
  border-color: var(--primary);
}

textarea.form-input {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.form-input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--surface-alt);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #2563EB);
  color: #fff;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.login-btn:hover {
  box-shadow: 0 8px 32px rgba(59,130,246,0.4);
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
}


/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: width, transform;
}

html.sidebar-is-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}
html.sidebar-is-collapsed .sidebar .sidebar-brand-text { display: none; }
html.sidebar-is-collapsed .sidebar .nav-label { display: none; }
html.sidebar-is-collapsed .sidebar .sidebar-brand { padding: 20px 12px; justify-content: center; }
html.sidebar-is-collapsed .sidebar .sidebar-nav-item { padding: 12px; justify-content: center; }
html.sidebar-is-collapsed .sidebar .sidebar-toggle-btn { padding: 10px 8px; }
html.sidebar-is-collapsed .sidebar .sidebar-toggle-wrap { padding: 12px 8px; }

.sidebar-brand {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.sidebar-brand-text {
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-brand-name {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.2;
}

.sidebar-brand-role {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}

.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--surface-alt);
}

.sidebar-nav-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-nav-item .nav-label {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, width 0.3s ease;
  opacity: 1;
}

.sidebar-toggle-wrap {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
  background: var(--border);
}

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

/* Mobile sidebar overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}


/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-notif {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.topbar-notif:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.topbar-notif svg {
  width: 16px;
  height: 16px;
}

.topbar-notif-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--surface);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.topbar-user:hover {
  border-color: var(--primary-33);
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.topbar-username {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-logout {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.topbar-logout:hover {
  color: var(--danger);
  border-color: var(--danger-33);
}

.topbar-logout svg {
  width: 16px;
  height: 16px;
}


/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════ */
.stat-card {
  background: linear-gradient(135deg, var(--card) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card:hover.color-primary { border-color: var(--primary); }
.stat-card:hover.color-accent  { border-color: var(--accent); }
.stat-card:hover.color-warning { border-color: var(--warning); }
.stat-card:hover.color-danger  { border-color: var(--danger); }
.stat-card:hover.color-purple  { border-color: var(--purple); }
.stat-card:hover.color-cyan    { border-color: var(--cyan); }

.stat-card-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}

.stat-card-glow.color-primary { background: var(--primary); }
.stat-card-glow.color-accent  { background: var(--accent); }
.stat-card-glow.color-warning { background: var(--warning); }
.stat-card-glow.color-danger  { background: var(--danger); }
.stat-card-glow.color-purple  { background: var(--purple); }
.stat-card-glow.color-cyan    { background: var(--cyan); }

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

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

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

.stat-card-icon.color-primary {
  background: linear-gradient(135deg, var(--primary-20), rgba(59,130,246,0.08));
  border: 1px solid var(--primary-33);
  color: var(--primary);
}
.stat-card-icon.color-accent {
  background: linear-gradient(135deg, var(--accent-20), rgba(6,214,160,0.08));
  border: 1px solid var(--accent-33);
  color: var(--accent);
}
.stat-card-icon.color-warning {
  background: linear-gradient(135deg, var(--warning-20), rgba(245,158,11,0.08));
  border: 1px solid var(--warning-33);
  color: var(--warning);
}
.stat-card-icon.color-danger {
  background: linear-gradient(135deg, var(--danger-20), rgba(239,68,68,0.08));
  border: 1px solid var(--danger-33);
  color: var(--danger);
}
.stat-card-icon.color-purple {
  background: linear-gradient(135deg, var(--purple-20), rgba(139,92,246,0.08));
  border: 1px solid var(--purple-33);
  color: var(--purple);
}
.stat-card-icon.color-cyan {
  background: linear-gradient(135deg, var(--cyan-20), rgba(34,211,238,0.08));
  border: 1px solid var(--cyan-33);
  color: var(--cyan);
}

.stat-card-change {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
}

.stat-card-change.up { color: var(--accent); }
.stat-card-change.down { color: var(--danger); }
.stat-card-change svg { width: 14px; height: 14px; }

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.1;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════
   CARDS (Generic)
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
}

.card--hover {
  transition: all 0.3s ease;
  cursor: pointer;
}

.card--hover:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.card-title--sm {
  font-size: 14px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-section {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge--md {
  padding: 5px 14px;
  font-size: 12px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0.9;
  display: inline-block;
  flex-shrink: 0;
}

.badge--active, .badge--completed, .badge--approved, .badge--available, .badge--valid {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-33);
}
.badge--active .badge-dot, .badge--completed .badge-dot, .badge--approved .badge-dot,
.badge--available .badge-dot, .badge--valid .badge-dot {
  background: var(--accent);
}

.badge--in-progress, .badge--normal, .badge--on-job, .badge--business {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary-33);
}
.badge--in-progress .badge-dot, .badge--normal .badge-dot,
.badge--on-job .badge-dot, .badge--business .badge-dot {
  background: var(--primary);
}

.badge--pending, .badge--high, .badge--under-review, .badge--warning {
  background: var(--warning-glow);
  color: var(--warning);
  border: 1px solid var(--warning-33);
}
.badge--pending .badge-dot, .badge--high .badge-dot,
.badge--under-review .badge-dot, .badge--warning .badge-dot {
  background: var(--warning);
}

.badge--emergency, .badge--rejected, .badge--suspended, .badge--expired, .badge--danger {
  background: var(--danger-glow);
  color: var(--danger);
  border: 1px solid var(--danger-33);
}
.badge--emergency .badge-dot, .badge--rejected .badge-dot,
.badge--suspended .badge-dot, .badge--expired .badge-dot, .badge--danger .badge-dot {
  background: var(--danger);
}

.badge--waiting-parts, .badge--trial, .badge--enterprise, .badge--assigned-body {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid var(--purple-33);
}
.badge--waiting-parts .badge-dot, .badge--trial .badge-dot,
.badge--enterprise .badge-dot, .badge--assigned-body .badge-dot {
  background: var(--purple);
}

.badge--assigned, .badge--in-stock, .badge--starter, .badge--cyan {
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid var(--cyan-33);
}
.badge--assigned .badge-dot, .badge--in-stock .badge-dot,
.badge--starter .badge-dot, .badge--cyan .badge-dot {
  background: var(--cyan);
}

.badge--on-leave, .badge--na, .badge--muted {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge--on-leave .badge-dot, .badge--na .badge-dot, .badge--muted .badge-dot {
  background: var(--text-dim);
}

.badge--purple {
  background: rgba(139,92,246,0.12); color: #8B5CF6; border: 1px solid rgba(139,92,246,0.25);
}
.badge--purple .badge-dot { background: #8B5CF6; }


/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
}

.btn svg { width: 16px; height: 16px; }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--sm svg { width: 14px; height: 14px; }
.btn--lg { padding: 12px 24px; font-size: 15px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: #2563EB; }
.btn--success { background: var(--accent); color: #000; }
.btn--success:hover { background: #05B88A; }
.btn--outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn--outline:hover { background: var(--surface-alt); border-color: var(--primary); }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-alt); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #DC2626; }

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-icon:hover { border-color: var(--primary-33); color: var(--primary); }
.btn-icon svg { width: 14px; height: 14px; }
.btn-icon--approve { background: var(--accent-glow); border-color: var(--accent-33); color: var(--accent); }
.btn-icon--approve:hover { background: var(--accent-20); }
.btn-icon--reject { background: var(--danger-glow); border-color: var(--danger-33); color: var(--danger); }
.btn-icon--reject:hover { background: var(--danger-20); }
.btn-icon--edit { color: var(--primary); }
.btn-icon--edit:hover { background: var(--primary-glow); border-color: var(--primary-33); }
.btn-icon--delete { color: var(--danger); }
.btn-icon--delete:hover { background: var(--danger-glow); border-color: var(--danger-33); }
.btn-icon--view { color: var(--cyan); }
.btn-icon--view:hover { background: var(--cyan-glow); border-color: var(--cyan-33); }


/* ═══════════════════════════════════════════════════════════════
   SEARCH BOX
   ═══════════════════════════════════════════════════════════════ */
.search-box {
  position: relative;
  width: 100%;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus { border-color: var(--primary); }
.search-box input::placeholder { color: var(--text-dim); }


/* ═══════════════════════════════════════════════════════════════
   TABLES — Fully responsive with horizontal scroll
   ═══════════════════════════════════════════════════════════════ */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  width: 100%;
}

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

.table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.table th.text-center { text-align: center; }
.table th.text-right { text-align: right; }

.table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td.text-center { text-align: center; }
.table td.text-right { text-align: right; }

.table tbody tr {
  transition: background 0.2s;
}

.table tbody tr:hover {
  background: var(--surface-alt);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr.selected { background: var(--primary-glow) !important; }

.cell-mono { font-family: var(--font-mono); font-size: 12px; }
.cell-primary { color: var(--primary); }
.cell-cyan { color: var(--cyan); }
.cell-accent { color: var(--accent); }
.cell-warning { color: var(--warning); }
.cell-muted { color: var(--text-muted); }
.cell-dim { color: var(--text-dim); font-size: 12px; }
.cell-bold { font-weight: 600; }
.cell-value { font-weight: 700; color: var(--accent); }


/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */
.progress-bar {
  height: 6px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.progress-bar-fill.color-primary { background: linear-gradient(90deg, var(--primary), rgba(59,130,246,0.7)); }
.progress-bar-fill.color-accent  { background: linear-gradient(90deg, var(--accent), rgba(6,214,160,0.7)); }
.progress-bar-fill.color-danger  { background: linear-gradient(90deg, var(--danger), rgba(239,68,68,0.7)); }
.progress-bar-fill.color-warning { background: linear-gradient(90deg, var(--warning), rgba(245,158,11,0.7)); }
.progress-bar-fill.color-purple  { background: linear-gradient(90deg, var(--purple), rgba(139,92,246,0.7)); }


/* ═══════════════════════════════════════════════════════════════
   CHART CONTAINERS
   ═══════════════════════════════════════════════════════════════ */
.chart-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-period-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chart-period-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: all 0.2s;
}

.chart-period-btn.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary-33);
}

.chart-period-btn:hover:not(.active) {
  background: var(--surface-alt);
}

.chart-value-large {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-display);
}

.chart-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.chart-trend.up { color: var(--accent); }
.chart-trend.down { color: var(--danger); }
.chart-trend svg { width: 14px; height: 14px; }

.chart-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.chart-footer span {
  font-size: 11px;
  color: var(--text-dim);
}


/* ═══════════════════════════════════════════════════════════════
   DONUT CHART
   ═══════════════════════════════════════════════════════════════ */
.donut-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
}

.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-wrap circle { transition: all 0.8s ease; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center-value { font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.donut-center-label { font-size: 10px; color: var(--text-muted); }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; }
.donut-legend-left { display: flex; align-items: center; gap: 8px; }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.donut-legend-label { font-size: 12px; color: var(--text-muted); }
.donut-legend-count { font-size: 12px; font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════
   STATS STRIP
   ═══════════════════════════════════════════════════════════════ */
.stats-strip-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}

.stats-strip-item.border-primary { border-left-color: var(--primary); }
.stats-strip-item.border-cyan    { border-left-color: var(--cyan); }
.stats-strip-item.border-warning { border-left-color: var(--warning); }
.stats-strip-item.border-accent  { border-left-color: var(--accent); }
.stats-strip-item.border-danger  { border-left-color: var(--danger); }

.stats-strip-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
}

.stats-strip-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ═══════════════════════════════════════════════════════════════
   LIFECYCLE FLOW
   ═══════════════════════════════════════════════════════════════ */
.lifecycle-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lifecycle-step { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.lifecycle-step-label {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-dim);
  white-space: nowrap;
}

.lifecycle-step-label.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary-33);
}

.lifecycle-arrow svg { width: 14px; height: 14px; color: var(--text-dim); }


/* ═══════════════════════════════════════════════════════════════
   TECHNICIAN CARDS
   ═══════════════════════════════════════════════════════════════ */
.tech-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.tech-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.tech-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }

.tech-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.tech-avatar.color-primary { background: var(--primary-20); color: var(--primary); }
.tech-avatar.color-accent  { background: var(--accent-20); color: var(--accent); }
.tech-avatar.color-purple  { background: var(--purple-20); color: var(--purple); }
.tech-avatar.color-cyan    { background: var(--cyan-20); color: var(--cyan); }
.tech-avatar.color-warning { background: var(--warning-20); color: var(--warning); }

.tech-name { font-size: 15px; font-weight: 700; }
.tech-phone { font-size: 12px; color: var(--text-muted); }
.tech-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.skill-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tech-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.tech-stat-value { font-size: 18px; font-weight: 700; font-family: var(--font-display); }
.tech-stat-value.color-primary { color: var(--primary); }
.tech-stat-value.color-warning { color: var(--warning); }
.tech-stat-label { font-size: 10px; color: var(--text-dim); margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════
   WARRANTY DECISION ENGINE
   ═══════════════════════════════════════════════════════════════ */
.decision-engine {
  background: linear-gradient(135deg, var(--card), var(--surface-alt));
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
}

.decision-engine-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.decision-engine-title svg { width: 16px; height: 16px; color: var(--warning); }

.decision-rule {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.decision-rule-name { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.decision-rule-name.color-accent { color: var(--accent); }
.decision-rule-name.color-primary { color: var(--primary); }
.decision-rule-name.color-purple { color: var(--purple); }
.decision-rule-code { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 8px; word-break: break-all; }
.decision-rule-result { font-size: 12px; font-weight: 600; }


/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert--danger { background: var(--danger-glow); border: 1px solid var(--danger-33); }
.alert--warning { background: var(--warning-glow); border: 1px solid var(--warning-33); }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--danger svg { color: var(--danger); }
.alert--warning svg { color: var(--warning); }
.alert-title { font-size: 13px; font-weight: 600; }
.alert--danger .alert-title { color: var(--danger); }
.alert--warning .alert-title { color: var(--warning); }
.alert-desc { font-size: 12px; color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   AMC CONTRACT CARDS
   ═══════════════════════════════════════════════════════════════ */
.amc-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.amc-card-glow { position: absolute; top: 0; right: 0; width: 100px; height: 100px; border-radius: 0 0 0 100%; opacity: 0.5; }
.amc-card-glow.glow-active { background: var(--accent-glow); }
.amc-card-glow.glow-expired { background: var(--danger-glow); }
.amc-card-id { font-family: var(--font-mono); font-size: 12px; color: var(--primary); margin-bottom: 4px; }
.amc-card-customer { font-size: 16px; font-weight: 700; }

.amc-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.amc-card-detail-label { font-size: 11px; color: var(--text-dim); }
.amc-card-detail-value { font-size: 12px; font-weight: 600; margin-top: 2px; }
.amc-card-detail-value.accent { font-size: 14px; font-weight: 700; color: var(--accent); }
.amc-progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.amc-progress-label { font-size: 11px; color: var(--text-muted); }
.amc-progress-pct { font-size: 11px; font-weight: 700; color: var(--primary); }
.amc-units-info { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.amc-units-info svg { width: 14px; height: 14px; }


/* ═══════════════════════════════════════════════════════════════
   REPORT CARDS
   ═══════════════════════════════════════════════════════════════ */
.report-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
}

.report-card:hover { transform: translateY(-2px); }
.report-card:hover.hover-accent { border-color: var(--accent); }
.report-card:hover.hover-primary { border-color: var(--primary); }
.report-card:hover.hover-purple { border-color: var(--purple); }
.report-card:hover.hover-warning { border-color: var(--warning); }
.report-card:hover.hover-cyan { border-color: var(--cyan); }
.report-card:hover.hover-danger { border-color: var(--danger); }

.report-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.report-card-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-card-icon svg { width: 20px; height: 20px; }
.report-card-title { font-size: 14px; font-weight: 700; }
.report-card-desc { font-size: 11px; color: var(--text-muted); }
.report-export-tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.export-tag { padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 600; background: var(--surface-alt); color: var(--text-dim); border: 1px solid var(--border); }


/* ═══════════════════════════════════════════════════════════════
   SETTINGS ITEMS
   ═══════════════════════════════════════════════════════════════ */
.settings-item {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-item:hover { border-color: var(--primary); }
.settings-item-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; background: var(--primary-glow); border: 1px solid var(--primary-33); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.settings-item-icon svg { width: 20px; height: 20px; }
.settings-item-title { font-size: 14px; font-weight: 700; }
.settings-item-desc { font-size: 12px; color: var(--text-muted); }
.settings-item-arrow { margin-left: auto; color: var(--text-dim); flex-shrink: 0; }
.settings-item-arrow svg { width: 16px; height: 16px; }


/* ═══════════════════════════════════════════════════════════════
   PRICING CARDS
   ═══════════════════════════════════════════════════════════════ */
.pricing-card {
  background: var(--card);
  border-radius: var(--radius-2xl);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.pricing-card--popular { box-shadow: 0 0 40px rgba(59,130,246,0.1); }
.pricing-card--popular.border-primary { border-color: var(--primary); }
.pricing-card--popular.border-purple  { border-color: var(--purple); }
.pricing-popular-tag { position: absolute; top: 16px; right: -28px; padding: 4px 36px; font-size: 10px; font-weight: 700; transform: rotate(45deg); text-transform: uppercase; letter-spacing: 0.1em; color: #fff; }
.pricing-popular-tag.bg-primary { background: var(--primary); }
.pricing-plan-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pricing-plan-name.color-cyan   { color: var(--cyan); }
.pricing-plan-name.color-primary { color: var(--primary); }
.pricing-plan-name.color-purple { color: var(--purple); }
.pricing-price { font-size: 32px; font-weight: 800; font-family: var(--font-display); margin-bottom: 2px; }
.pricing-price span { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.pricing-yearly { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; }
.pricing-limits { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; display: grid; gap: 6px; }
.pricing-limits strong { font-weight: 600; color: var(--text); }
.pricing-features { border-top: 1px solid var(--border); padding-top: 16px; }
.pricing-feature { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--text-muted); }
.pricing-feature svg { width: 14px; height: 14px; flex-shrink: 0; }


/* ═══════════════════════════════════════════════════════════════
   LIST ITEMS
   ═══════════════════════════════════════════════════════════════ */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.list-item:last-child { border-bottom: none; }
.list-item-title { font-size: 13px; font-weight: 600; }
.list-item-sub { font-size: 12px; color: var(--text-muted); }
.list-item-value { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.tech-list-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tech-list-item:last-child { border-bottom: none; }
.tech-list-avatar { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--primary-20), var(--cyan-20)); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.tech-list-name { font-size: 13px; font-weight: 600; }
.tech-list-meta { font-size: 12px; color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}

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

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  animation: scaleIn 0.25s ease both;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title { font-size: 18px; font-weight: 700; font-family: var(--font-display); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); transition: color 0.2s; padding: 4px; margin: -4px -4px 0 0; }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 20px; height: 20px; }

.modal form, .modal > form {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

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

.modal-form-full { grid-column: 1 / -1; }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.form-section-divider {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-divider .section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar .search-box {
  flex: 1;
  min-width: 200px;
}


/* ═══════════════════════════════════════════════════════════════
   MINI SVG CHART
   ═══════════════════════════════════════════════════════════════ */
.mini-chart svg {
  display: block;
  width: 100%;
}


/* ═══════════════════════════════════════════════════════════════
   CONFIRM DIALOG
   ═══════════════════════════════════════════════════════════════ */
.confirm-overlay { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); padding: 16px; }
.confirm-overlay.active { display: flex; }
.confirm-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; max-width: 400px; width: 100%; text-align: center; animation: scaleIn 0.2s ease; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.confirm-icon { font-size: 40px; margin-bottom: 12px; }
.confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.confirm-msg { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { padding: 12px 20px; border-radius: 10px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; animation: slideInRight 0.3s ease; box-shadow: 0 8px 24px rgba(0,0,0,0.2); min-width: 260px; max-width: 100%; word-break: break-word; }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast--success { background: var(--accent); color: #fff; }
.toast--error { background: var(--danger); color: #fff; }
.toast--info { background: var(--primary); color: #fff; }


/* ═══════════════════════════════════════════════════════════════
   MISC UTILITY
   ═══════════════════════════════════════════════════════════════ */
.action-group { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.empty-state-msg { font-size: 13px; margin-bottom: 20px; }

.tabs { display: flex; gap: 2px; margin-bottom: 20px; border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn { padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; background: none; border: none; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all 0.2s; font-family: var(--font-body); white-space: nowrap; flex-shrink: 0; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text); }

.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: 0.3s; }
.toggle-slider:before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

.copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; border: none; background: transparent; cursor: pointer; color: var(--text-dim); transition: all 0.15s; vertical-align: middle; margin-left: 2px; padding: 0; flex-shrink: 0; }
.copy-btn:hover { background: var(--primary-glow); color: var(--primary); }
.copy-btn svg { width: 13px; height: 13px; }
.copyable { display: inline-flex; align-items: center; gap: 2px; }
.opacity-hover { opacity: 0.7; transition: opacity 0.2s; }
.opacity-hover:hover { opacity: 1; }
.grid-7 { display: grid; gap: 8px; }

.origin-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.origin-tag svg, .origin-tag i { width: 11px; height: 11px; }
.origin-tag--internal { background: rgba(34,211,238,0.12); color: var(--cyan); border: 1px solid rgba(34,211,238,0.25); }
.origin-tag--external { background: rgba(139,92,246,0.12); color: #8B5CF6; border: 1px solid rgba(139,92,246,0.25); }

.ac-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--card); border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.ac-item { padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.ac-item:hover { background: var(--bg); }
.ac-item:last-child { border-bottom: none; }
.ac-item strong { color: var(--primary); }
.ac-item small { display: block; font-size: 11px; color: var(--text-dim); margin-top: 2px; }

#filter-panel { overflow: hidden; transition: max-height 0.3s ease-out, padding 0.3s; max-height: 0; padding-top: 0; padding-bottom: 0; background: var(--bg); border-bottom: 1px solid var(--border); }
#filter-panel.is-open { max-height: 500px; padding: 16px; }

.bulk-mode .col-select { display: table-cell !important; }
.col-select { display: none; }
.photo-gallery { display: flex; flex-wrap: wrap; gap: 8px; }

.hidden { display: none !important; }
.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; }

/* Theme Toggle */
.theme-toggle { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-alt); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: all 0.2s; flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon, :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }


/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE THEME
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:             #F1F5F9;
  --surface:        #FFFFFF;
  --surface-alt:    #F8FAFC;
  --card:           #FFFFFF;
  --card-hover:     #F1F5F9;
  --border:         #E2E8F0;
  --border-light:   #CBD5E1;
  --text:           #0F172A;
  --text-muted:     #475569;
  --text-dim:       #94A3B8;
  --primary:        #2563EB;
  --primary-glow:   rgba(37,99,235,0.10);
  --primary-20:     rgba(37,99,235,0.15);
  --primary-33:     rgba(37,99,235,0.25);
  --accent:         #059669;
  --accent-glow:    rgba(5,150,105,0.08);
  --accent-20:      rgba(5,150,105,0.12);
  --accent-33:      rgba(5,150,105,0.20);
  --warning:        #D97706;
  --warning-glow:   rgba(217,119,6,0.08);
  --warning-20:     rgba(217,119,6,0.12);
  --warning-33:     rgba(217,119,6,0.20);
  --danger:         #DC2626;
  --danger-glow:    rgba(220,38,38,0.08);
  --danger-20:      rgba(220,38,38,0.12);
  --danger-33:      rgba(220,38,38,0.20);
  --purple:         #7C3AED;
  --purple-glow:    rgba(124,58,237,0.08);
  --purple-20:      rgba(124,58,237,0.12);
  --purple-33:      rgba(124,58,237,0.20);
  --cyan:           #0891B2;
  --cyan-glow:      rgba(8,145,178,0.08);
  --cyan-20:        rgba(8,145,178,0.12);
  --cyan-33:        rgba(8,145,178,0.20);
}

[data-theme="light"] .sidebar { box-shadow: 2px 0 8px rgba(0,0,0,0.04); }
[data-theme="light"] .topbar { box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
[data-theme="light"] .stat-card { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
[data-theme="light"] .card, [data-theme="light"] .tech-card, [data-theme="light"] .amc-card,
[data-theme="light"] .report-card, [data-theme="light"] .pricing-card { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
[data-theme="light"] .table-container { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
[data-theme="light"] .modal { box-shadow: 0 25px 60px rgba(0,0,0,0.15); }
[data-theme="light"] .login-card { box-shadow: 0 20px 50px rgba(0,0,0,0.08); }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #CBD5E1; }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Single consolidated block
   (No duplicate breakpoints — each breakpoint appears ONCE)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Large screens (1400px+) ─── */
@media (min-width: 1400px) {
  .page-wrapper { padding: 36px; }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ─── Laptop (max 1200px) ─── */
@media (max-width: 1200px) {
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Tablet (max 1024px) — auto-collapse sidebar ─── */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }
  .sidebar .sidebar-brand-text,
  .sidebar .nav-label { display: none; }
  .sidebar .sidebar-brand { justify-content: center; padding: 20px 12px; }
  .sidebar .sidebar-nav-item { justify-content: center; padding: 12px; }
  .sidebar-toggle-wrap { display: none; }
  .main-content,
  html.sidebar-is-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
  }

  .page-wrapper { padding: 22px; }
  .topbar { padding: 0 18px; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Mobile (max 768px) — sidebar hidden, full width ─── */
@media (max-width: 768px) {
  /* Sidebar: off-screen slide-in */
  .sidebar {
    width: 280px !important;
    transform: translateX(-100%);
    z-index: 200;
    height: 100%;
    position: fixed;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  html.sidebar-is-collapsed .sidebar {
    width: 280px !important;
  }
  .sidebar .sidebar-brand-text,
  .sidebar .nav-label { display: block !important; }
  .sidebar .sidebar-brand { justify-content: flex-start !important; padding: 20px 22px !important; }
  .sidebar .sidebar-nav-item { justify-content: flex-start !important; padding: 11px 16px !important; }
  .sidebar-toggle-wrap { display: none !important; }

  /* Main: full width */
  .main-content,
  html.sidebar-is-collapsed .main-content {
    margin-left: 0 !important;
  }

  .page-wrapper { padding: 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .page-title { font-size: 18px; }

  /* Topbar */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 15px; flex: 1; }
  .topbar-username { display: none; }
  .topbar-user { padding: 6px; }

  /* Grids → single column */
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6,
  .grid-2-1, .grid-auto-320, .grid-auto-280, .grid-auto-300 {
    grid-template-columns: 1fr;
  }
  .grid-7 { grid-template-columns: repeat(2, 1fr); }

  /* Stat cards compact */
  .stat-card { padding: 16px 18px; }
  .stat-card-value { font-size: 22px; }
  .stat-card-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stat-card-icon svg { width: 17px; height: 17px; }

  .stats-strip-item { padding: 10px 12px; }
  .stats-strip-value { font-size: 16px; }

  /* Cards */
  .card { padding: 18px; }
  .chart-card { padding: 18px; }
  .chart-value-large { font-size: 20px; }
  .tech-card { padding: 18px; }
  .amc-card { padding: 18px; }
  .report-card { padding: 18px; }
  .pricing-card { padding: 20px; }
  .decision-engine { padding: 18px; }
  .settings-item { padding: 14px; gap: 12px; }
  .settings-item-icon { width: 36px; height: 36px; border-radius: 10px; }

  /* Tables: horizontal scroll wrapper */
  .table-container {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .table th, .table td { padding: 10px 12px; font-size: 12px; }

  /* Filter bar stacks */
  .filter-bar { flex-direction: column; }
  .filter-bar .search-box { min-width: 100%; }

  /* Modal: full width */
  .modal-overlay { padding: 10px; }
  .modal { max-width: 100% !important; max-height: 94vh; border-radius: 16px; }
  .modal-header { padding: 18px 20px 14px; }
  .modal form, .modal > form { padding: 18px 20px; }
  .modal-footer { padding: 14px 20px; }
  .modal-form-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 16px; }

  /* Form inputs: larger touch targets */
  .form-input { padding: 12px 14px; font-size: 14px; }
  .form-input-wrap .form-input { padding-left: 42px; }
  select.form-input { padding-right: 34px; }
  textarea.form-input { min-height: 80px; }

  /* Lifecycle flow */
  .lifecycle-flow { padding: 12px; }

  /* Tech stats */
  .tech-stats { gap: 8px; }
  .tech-stat-value { font-size: 16px; }

  /* Tabs scroll */
  .tabs { gap: 0; }
  .tab-btn { padding: 10px 14px; font-size: 12px; }

  /* Toast */
  .toast-container { right: 10px; left: 10px; top: 70px; }
  .toast { min-width: auto; }

  /* Donut smaller */
  .donut-wrap { width: 130px; height: 130px; }
  .donut-center-value { font-size: 18px; }

  /* Login card */
  .login-card { padding: 28px 24px; margin: 12px; }
  .login-title { font-size: 22px; }

  /* AMC grid stays 2-col on mobile — items are small enough */
  .amc-card-grid { grid-template-columns: 1fr 1fr; }

  /* Empty state */
  .empty-state { padding: 40px 16px; }
  .empty-state-icon { font-size: 36px; }
}

/* ─── Small phone (max 480px) ─── */
@media (max-width: 480px) {
  .page-wrapper { padding: 12px; }
  .topbar { height: 56px; }

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

  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 20px; }
  .stat-card-label { font-size: 11px; }
  .stat-card-icon { width: 32px; height: 32px; }

  .card { padding: 14px; }
  .chart-card { padding: 14px; }
  .pricing-card { padding: 16px; }
  .pricing-price { font-size: 26px; }

  .btn { padding: 8px 14px; font-size: 12px; }
  .btn--lg { padding: 10px 18px; font-size: 14px; }
  .btn-icon { width: 26px; height: 26px; }

  .login-card { padding: 24px 18px; }
  .login-title { font-size: 20px; }
  .login-logo { width: 52px; height: 52px; border-radius: 14px; }
  .login-logo svg { width: 26px; height: 26px; }

  .modal-overlay { padding: 6px; }
  .modal { border-radius: 12px; }
  .modal-header { padding: 14px 16px 12px; }
  .modal form, .modal > form { padding: 14px 16px; }
  .modal-footer { padding: 12px 16px; }
  .modal-title { font-size: 15px; }

  .confirm-box { padding: 20px; }
  .confirm-title { font-size: 15px; }
  .confirm-msg { font-size: 12px; }

  .table th, .table td { padding: 8px 10px; font-size: 11px; }
  .action-group { gap: 2px; }

  .chart-header { flex-direction: column; align-items: flex-start; }
  .chart-period-btns { width: 100%; }
  .chart-period-btn { flex: 1; text-align: center; }
  
 
}

/* ═══════════════════════════════════════════════════════════════
   LIFECYCLE FLOW — Responsive Fix + Clickable Links
   APPEND this to the END of your style.css
   ═══════════════════════════════════════════════════════════════ */
 
/* Lifecycle Responsive Fix */
a.lifecycle-step-label {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
a.lifecycle-step-label:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary-33);
}

@media (max-width: 1024px) {
    .lifecycle-flow.mb-24 {
        padding: 12px;
        gap: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .lifecycle-flow.mb-24::-webkit-scrollbar { display: none; }
    .lifecycle-flow.mb-24 .lifecycle-step-label { padding: 5px 10px; font-size: 10px; white-space: nowrap; }
    .lifecycle-flow.mb-24 .lifecycle-arrow svg { width: 12px; height: 12px; }
}

@media (max-width: 768px) {
    .lifecycle-flow.mb-24 { flex-wrap: wrap; gap: 8px; justify-content: flex-start; overflow-x: visible; padding: 12px; }
    .lifecycle-flow.mb-24 .lifecycle-arrow { display: none; }
    .lifecycle-flow.mb-24 .lifecycle-step { flex-shrink: 0; }
    .lifecycle-flow.mb-24 .lifecycle-step-label { padding: 7px 14px; font-size: 11px; border-radius: 20px; white-space: nowrap; }
    .lifecycle-flow.mb-24 .lifecycle-step-label.active { box-shadow: 0 0 0 2px var(--primary-33); }
}

@media (max-width: 480px) {
    .lifecycle-flow.mb-24 { gap: 6px; padding: 10px; }
    .lifecycle-flow.mb-24 .lifecycle-step-label { padding: 5px 10px; font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOMER DETAIL — Mobile Fixes
   APPEND this to END of style.css
   ═══════════════════════════════════════════════════════════════ */

/* Stats: 2 columns on mobile */
@media (max-width: 768px) {
    .grid-7 {
        grid-template-columns: 1fr 1fr;
    }

    /* Quick Actions + Sidebar comes FIRST on mobile */
    .cd-layout {
        display: flex;
        flex-direction: column;
    }
    .cd-layout > div:last-child {
        order: -1;
    }

    /* Page header actions: icon only */
    .page-header-actions .btn {
        padding: 6px 8px;
        font-size: 0;
        gap: 0;
    }
    .page-header-actions .btn i,
    .page-header-actions .btn svg {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }

    /* Stats strip compact for 2-col */
    .grid-7 .stats-strip-item {
        padding: 10px 12px;
    }
    .grid-7 .stats-strip-value {
        font-size: 18px;
    }
    .grid-7 .stats-strip-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .grid-7 {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .grid-7 .stats-strip-item {
        padding: 8px 10px;
    }
    .grid-7 .stats-strip-value {
        font-size: 16px;
    }
}

/* All stats cards: 2 columns on mobile */
@media (max-width: 768px) {
    .grid-4,
    .grid-5,
    .grid-6,
    .grid-7 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TABLE TOOLS — Column Filter, Bulk Select, Import
   APPEND this to END of style.css
   ═══════════════════════════════════════════════════════════════ */

/* Bulk action bar */
#bulkActionBar {
    animation: slideInRight 0.3s ease;
}

/* Column filter label hide on mobile */
@media (max-width: 768px) {
    .col-filter-label { display: none; }

    #bulkActionBar {
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        padding: 8px 14px !important;
        gap: 8px !important;
        border-radius: 10px !important;
    }
    #bulkActionBar .btn { font-size: 10px !important; padding: 4px 8px !important; }
    #bulkCount { font-size: 11px !important; min-width: auto !important; }
}

/* Import dropzone hover */
#importModal_Customers [id$="_dropzone"]:hover,
#importModal_Units [id$="_dropzone"]:hover,
#importModal_Vehicles [id$="_dropzone"]:hover,
#importModal_Services [id$="_dropzone"]:hover {
    border-color: var(--primary) !important;
    background: var(--primary-glow);
}