* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --bg: #ffffff;
  --bg2: #f8f8f7;
  --bg3: #f1f0ee;
  --bg4: #e8e7e4;
  --text: #0a0a0a;
  --text2: #4a4a47;
  --text3: #8a8a85;
  --border: #e0deda;
  --border2: #c8c7c2;
  --accent: #0a0a0a;
  --accent2: #2a2a2a;
  --green: #166534;
  --green-bg: #f0fdf4;
  --red: #991b1b;
  --red-bg: #fef2f2;
  --amber: #92400e;
  --amber-bg: #fffbeb;
  --blue: #1e40af;
  --blue-bg: #eff6ff;
  --purple: #6b21a8;
  --purple-bg: #faf5ff;
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'DM Mono', monospace;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.dark {
  --bg: #0f0f0e;
  --bg2: #181817;
  --bg3: #222220;
  --bg4: #2c2c29;
  --text: #f0efec;
  --text2: #b8b8b3;
  --text3: #686864;
  --border: #2c2c29;
  --border2: #3c3c38;
  --accent: #f0efec;
  --accent2: #d0d0cc;
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.1);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.1);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.1);
  --purple: #c084fc;
  --purple-bg: rgba(192, 132, 252, 0.1);
}

body, input, button, select, textarea, table, th, td {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 13.5px;
}

h1, h2, h3, h4, h5, h6, .card-title, .page-title, .modal-title, .nav-text {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.app {
  display: flex;
  height: 100vh;
  overflow: hidden
}

.sidebar {
  width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s
}

.sidebar.collapsed { width: 56px }

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.logo-mark svg { width: 14px; height: 14px; fill: var(--bg) }

.logo-text {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0 }

.nav-section { padding: 4px 0 }

.nav-label {
  padding: 6px 12px 2px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  margin: 1px 8px;
  transition: background 0.15s;
  color: var(--text2);
  position: relative;
  white-space: nowrap
}

.nav-item:hover { background: var(--bg3); color: var(--text) }

.nav-item.active { background: var(--accent); color: var(--bg) }

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8 }

.nav-item.active svg { opacity: 1 }

.nav-text { font-size: 13px; font-weight: 400; overflow: hidden }

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  line-height: 1.6
}

.nav-item.active .nav-badge { background: rgba(255,255,255,0.3); color: #fff }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--border) }

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer
}

.user-card:hover { background: var(--bg3) }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0
}

.user-info { overflow: hidden; flex: 1 }

.user-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.user-role { font-size: 10px; color: var(--text3); white-space: nowrap }

.main { flex: 1; overflow: hidden; display: flex; flex-direction: column }

.topbar {
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  flex-shrink: 0
}

.topbar-title { font-size: 15px; font-weight: 500; flex: 1 }

.search-wrap { position: relative; flex: 1; max-width: 320px }

.search-input {
  width: 100%;
  padding: 6px 10px 6px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border 0.15s;
  font-family: var(--font)
}

.search-input:focus { border-color: var(--border2) }

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3)
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: var(--font)
}

.btn-primary { background: var(--accent); color: var(--bg) }
.btn-primary:hover { opacity: 0.88 }

.btn-secondary {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border)
}
.btn-secondary:hover { background: var(--bg3) }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red)
}
.btn-danger:hover { opacity: 0.8 }

.btn-sm { padding: 5px 10px; font-size: 12px }

.btn-icon {
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: var(--text2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s
}
.btn-icon:hover { background: var(--bg3); color: var(--text) }

.content { flex: 1; overflow-y: auto; padding: 20px }

.page { display: none }
.page.active { display: block }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap
}

.page-title { font-size: 20px; font-weight: 500; letter-spacing: -0.4px }
.page-subtitle { font-size: 13px; color: var(--text3); margin-top: 2px }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px
}

.stat-value {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -1px;
  font-family: var(--font-mono)
}

.stat-change {
  font-size: 11px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px
}

.stat-up { color: var(--green) }
.stat-down { color: var(--red) }

.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow)
}

.card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px
}

.card-title { font-size: 13px; font-weight: 500; color: var(--text) }

.card-body { padding: 20px }

.chart-wrap { position: relative; width: 100%; height: 220px }

table { width: 100%; border-collapse: collapse }

th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border)
}

td {
  padding: 12px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle
}

tr:last-child td { border-bottom: none }
tr:hover td { background: var(--bg2) }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500
}

.badge-green { background: var(--green-bg); color: var(--green) }
.badge-red { background: var(--red-bg); color: var(--red) }
.badge-amber { background: var(--amber-bg); color: var(--amber) }
.badge-blue { background: var(--blue-bg); color: var(--blue) }
.badge-purple { background: var(--purple-bg); color: var(--purple) }
.badge-gray { background: var(--bg3); color: var(--text3) }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block
}

.pipeline {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 10px
}

.pipeline-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex: 0 0 250px;
  display: flex;
  flex-direction: column
}

.pipeline-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.pipeline-label { font-size: 12px; font-weight: 500 }

.pipeline-count {
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg3);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text3)
}

.pipeline-cards {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  flex: 1
}

.lead-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s
}

.lead-card:hover { border-color: var(--border2); box-shadow: var(--shadow) }

.lead-name { font-size: 13px; font-weight: 500; margin-bottom: 3px }
.lead-company { font-size: 11px; color: var(--text3) }
.lead-value { font-size: 11px; font-family: var(--font-mono); color: var(--text2); margin-top: 2px }

.lead-detail {
  font-size: 10px;
  color: var(--text3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis
}

.lead-tags {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between
}

.lead-stage-select {
  font-size: 10px;
  padding: 2px 4px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text2);
  outline: none;
  cursor: pointer
}

.lead-followup {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent
}

.lead-followup:hover { background: var(--bg3); border-color: var(--border) }

.lead-followup.has-date {
  background: var(--blue-bg);
  color: var(--blue);
  font-weight: 500
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.modal-overlay.open { display: flex }

.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border)
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.modal-title { font-size: 16px; font-weight: 500 }

.modal-body { padding: 20px 24px }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px
}

.form-group { margin-bottom: 16px }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text2)
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border 0.15s;
  font-family: var(--font)
}

.form-input:focus { border-color: var(--border2) }
.form-input::placeholder { color: var(--text3) }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a8a85'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px
}

.tab {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text3);
  transition: all 0.15s;
  font-weight: 400;
  margin-bottom: -1px
}

.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500 }
.tab:hover:not(.active) { color: var(--text2) }

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  outline: none;
  font-family: var(--font);
  cursor: pointer
}

.activity-feed { display: flex; flex-direction: column; gap: 0 }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border)
}

.activity-item:last-child { border-bottom: none }

.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px
}

.activity-content { flex: 1 }
.activity-text { font-size: 13px; color: var(--text); line-height: 1.5 }
.activity-meta { font-size: 11px; color: var(--text3); margin-top: 2px }

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border)
}

.task-item:last-child { border-bottom: none }

.task-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s
}

.task-check.done { background: var(--accent); border-color: var(--accent) }

.task-check.done::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--bg);
  clip-path: polygon(20% 50%, 45% 75%, 80% 20%, 90% 30%, 45% 90%, 10% 60%)
}

.task-text { flex: 1; font-size: 13px }
.task-text.done { text-decoration: line-through; color: var(--text3) }
.task-due { font-size: 11px; color: var(--text3) }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text3) }
.empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.4 }
.empty-text { font-size: 13px }

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  transform: translateY(60px);
  transition: transform 0.3s;
  box-shadow: var(--shadow-lg)
}

.notification.show { transform: translateY(0) }

.funnel { display: flex; flex-direction: column; gap: 4px }

.funnel-item { display: flex; align-items: center; gap: 10px }

.funnel-bar-wrap {
  flex: 1;
  background: var(--bg3);
  border-radius: 20px;
  height: 10px;
  overflow: hidden
}

.funnel-bar {
  height: 100%;
  border-radius: 20px;
  background: var(--accent);
  transition: width 0.6s
}

.funnel-label { font-size: 11px; color: var(--text3); width: 100px; text-align: right }
.funnel-val { font-size: 11px; font-family: var(--font-mono); width: 30px; text-align: right; color: var(--text2) }

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg)
}

.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px }

.login-title { font-size: 22px; font-weight: 500; letter-spacing: -0.5px; margin-bottom: 4px }

.login-subtitle { font-size: 13px; color: var(--text3); margin-bottom: 24px }

.login-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  margin: 12px 0;
  position: relative
}

.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border)
}

.login-divider::before { left: 0 }
.login-divider::after { right: 0 }

.demo-btn {
  width: 100%;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s
}

.demo-btn:hover { background: var(--bg4) }

.google-btn {
  width: 100%;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.google-btn:hover { background: #f8f9fa }

.tooltip-wrap { position: relative; display: inline-flex }

.tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent2);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50
}

.tooltip-wrap:hover .tooltip { opacity: 1 }

@media(max-width:900px) {
  .stats-grid { grid-template-columns: repeat(2,1fr) }
  .grid-2 { grid-template-columns: 1fr }
  .sidebar { width: 56px }
  .sidebar .nav-text,
  .sidebar .logo-text,
  .sidebar .user-info,
  .sidebar .nav-label,
  .sidebar .nav-badge { display: none }
}

@media(max-width:600px) {
  .stats-grid { grid-template-columns: 1fr 1fr }
}

/* Import Modal */
.import-drop-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--bg2);
  position: relative
}

.import-drop-zone:hover,
.import-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--bg3)
}

.import-drop-zone.drag-over { transform: scale(1.01) }

.import-drop-zone .drop-icon { font-size: 36px; margin-bottom: 8px; transition: transform 0.3s }
.import-drop-zone:hover .drop-icon { transform: translateY(-4px) }
.import-drop-zone .drop-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px }
.import-drop-zone .drop-subtitle { font-size: 12px; color: var(--text3) }
.import-drop-zone .drop-browse { color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 500 }
.import-drop-zone input[type=file] { display: none }

.import-file-info { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 12px }
.import-file-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--green-bg); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0 }
.import-file-details { flex: 1; overflow: hidden }
.import-file-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.import-file-size { font-size: 11px; color: var(--text3) }
.import-file-remove { cursor: pointer; color: var(--text3); transition: color 0.15s }
.import-file-remove:hover { color: var(--red) }

.import-preview { margin-top: 16px; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg) }
.import-preview table { font-size: 12px }
.import-preview th { position: sticky; top: 0; background: var(--bg2); z-index: 1; font-size: 10px; padding: 8px 10px }
.import-preview td { padding: 8px 10px; font-size: 12px }

.import-mapping { margin-top: 16px }
.import-mapping-title { font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 8px }
.import-mapping-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center }
.import-mapping-arrow { color: var(--text3); font-size: 12px; text-align: center }
.import-mapping select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg2); color: var(--text); font-size: 12px; font-family: var(--font) }

.import-stats { display: flex; gap: 12px; margin-top: 12px }
.import-stat { flex: 1; padding: 10px; border-radius: var(--radius); text-align: center }
.import-stat-val { font-size: 18px; font-weight: 600; font-family: var(--font-mono) }
.import-stat-label { font-size: 10px; color: var(--text3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px }

.import-progress { width: 100%; height: 4px; background: var(--bg3); border-radius: 20px; overflow: hidden; margin-top: 12px }
.import-progress-bar { height: 100%; background: var(--accent); border-radius: 20px; transition: width 0.4s ease }

.import-step-indicator { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px }
.import-step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg3); transition: all 0.2s }
.import-step-dot.active { background: var(--accent); transform: scale(1.2) }
.import-step-dot.done { background: var(--green) }

/* Top Scrollbar System for Tables */
.top-scrollbar-wrapper {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 10;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
  margin-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #a1a1aa var(--bg2);
}

.top-scrollbar-wrapper::-webkit-scrollbar {
  height: 8px;
}
.top-scrollbar-wrapper::-webkit-scrollbar-track {
  background: var(--bg2);
  border-radius: 4px;
}
.top-scrollbar-wrapper::-webkit-scrollbar-thumb {
  background: #a1a1aa;
  border-radius: 4px;
}
.top-scrollbar-wrapper::-webkit-scrollbar-thumb:hover {
  background: #71717a;
}

.top-scrollbar-inner {
  height: 1px;
  pointer-events: none;
}

.leads-table-container::-webkit-scrollbar,
.card::-webkit-scrollbar,
.card-body::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.leads-table-container::-webkit-scrollbar-track,
.card::-webkit-scrollbar-track,
.card-body::-webkit-scrollbar-track {
  background: var(--bg2);
  border-radius: 4px;
}
.leads-table-container::-webkit-scrollbar-thumb,
.card::-webkit-scrollbar-thumb,
.card-body::-webkit-scrollbar-thumb {
  background: #a1a1aa;
  border-radius: 4px;
}
.leads-table-container::-webkit-scrollbar-thumb:hover,
.card::-webkit-scrollbar-thumb:hover,
.card-body::-webkit-scrollbar-thumb:hover {
  background: #71717a;
}

/* Leads Table */
.leads-table-container { display: none; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); overflow-x: auto; }
.leads-table-container.active { display: block; }
.l-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.l-table th { text-align: left; padding: 12px 16px; background: var(--bg2); color: var(--text3); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.l-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text2); }
.l-table tr:hover { background: var(--bg2); }

.view-toggle { display: flex; background: var(--bg2); padding: 4px; border-radius: 8px; gap: 4px; }
.view-toggle-btn { padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: none; background: transparent; color: var(--text3); transition: all 0.2s; }
.view-toggle-btn.active { background: var(--bg); color: var(--accent); box-shadow: var(--shadow); }

/* Calendar */
.calendar-wrapper { display: flex; gap: 24px; height: calc(100vh - 120px); }
.calendar-sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }
.mini-calendar { font-size: 12px; color: #3c4043; }
.mini-calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 0 8px; }
.mini-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-day-head { font-weight: 500; color: #70757a; padding: 4px 0; }
.mini-day { padding: 6px 0; cursor: pointer; border-radius: 50%; transition: background 0.2s; }
.mini-day:hover { background: #f1f3f4; }
.mini-day.active { background: #e8f0fe; color: #1a73e8; font-weight: 600; }
.mini-day.today { background: #1a73e8; color: #fff; font-weight: 600; }
.calendar-main { flex: 1; background: #fff; border: 1px solid #dadce0; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.calendar-toolbar { padding: 12px 16px; border-bottom: 1px solid #dadce0; display: flex; justify-content: space-between; align-items: center; }
.calendar-day { background: #fff; min-height: 100px; padding: 4px; display: flex; flex-direction: column; gap: 2px; position: relative; transition: background 0.2s; }
.calendar-day:hover { background: #f8f9fa; }
.calendar-day.today .day-num { background: #1a73e8; color: #fff; }
.calendar-day.other-month { color: #70757a; background: #fff; opacity: 0.5; }
.calendar-event { padding: 2px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; display: flex; align-items: center; gap: 4px; margin: 1px 0; transition: box-shadow 0.2s; }
.calendar-event:hover { box-shadow: 0 1px 2px rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15); }
.event-meeting { background: #e8f0fe; color: #1a73e8; }
.event-task { background: #fef7e0; color: #f29900; }
.event-general { background: #e6f4ea; color: #1e8e3e; }

.calendar-sidebar-section { border-top: 1px solid #dadce0; padding-top: 16px; }
.section-title { font-size: 11px; font-weight: 600; color: #70757a; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.calendar-list-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; color: #3c4043; }
.calendar-list-item:hover { background: #f1f3f4; }
.calendar-checkbox { width: 16px; height: 16px; border-radius: 3px; border: 2px solid #1a73e8; background: #1a73e8; display: flex; align-items: center; justify-content: center; }
.calendar-checkbox::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }

select, textarea { font-family: var(--font) }

.detail-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px }
.detail-tab { padding: 8px 14px; font-size: 12px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text3); transition: all .15s; font-weight: 400; margin-bottom: -1px }
.detail-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500 }
.detail-tab:hover:not(.active) { color: var(--text2) }
.detail-panel { display: none }
.detail-panel.active { display: block }
.detail-section { background: var(--bg2); border-radius: var(--radius); padding: 12px; margin-bottom: 10px }
.detail-section-title { font-size: 11px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px }

.timeline-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px }
.timeline-item:last-child { border-bottom: none }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 4px }
.timeline-dot.green { background: var(--green) }
.timeline-dot.amber { background: var(--amber) }
.timeline-dot.red { background: var(--red) }
.timeline-dot.blue { background: var(--blue) }

.billing-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px }
.billing-row:last-child { border-bottom: none }

.query-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 8px }
.query-card:last-child { margin-bottom: 0 }

/* FullCalendar Overrides */
:root {
  --fc-border-color: #dadce0;
  --fc-daygrid-event-dot-width: 8px;
  --fc-today-bg-color: transparent;
}

#fullCalendar { font-family: var(--font); }
.fc-header-toolbar { padding: 8px 16px !important; margin-bottom: 0 !important; border-bottom: 1px solid #dadce0; }
.fc-toolbar-title { font-size: 20px !important; font-weight: 400 !important; color: #3c4043 !important; }
.fc-button { background: #fff !important; border: 1px solid #dadce0 !important; color: #3c4043 !important; text-transform: capitalize !important; font-weight: 500 !important; font-size: 14px !important; box-shadow: none !important; }
.fc-button:hover { background: #f1f3f4 !important; }
.fc-button-active { background: #e8f0fe !important; color: #1a73e8 !important; border-color: #d2e3fc !important; }
.fc-col-header-cell { padding: 8px 0 !important; font-size: 11px; font-weight: 500; color: #70757a; text-transform: uppercase; }
.fc-daygrid-day-number { padding: 4px !important; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; margin: 4px auto !important; font-size: 12px; font-weight: 500; border-radius: 50%; }
.fc-day-today .fc-daygrid-day-number { background: #1a73e8; color: #fff; }
.fc-event { border: none !important; padding: 2px 4px !important; margin: 1px 2px !important; font-size: 12px !important; border-radius: 4px !important; }
.event-meeting { background-color: #e8f0fe !important; color: #1a73e8 !important; border-left: 3px solid #1a73e8 !important; }
.event-task { background-color: #fef7e0 !important; color: #f29900 !important; border-left: 3px solid #f29900 !important; }
.event-general { background-color: #e6f4ea !important; color: #1e8e3e !important; border-left: 3px solid #1e8e3e !important; }

/* Scrollable Date Section - show ~3 items initially, scrollable for remaining */
.fc-daygrid-day-events {
  max-height: 84px !important;
  overflow-y: auto !important;
  padding-bottom: 2px;
}
.fc-daygrid-day-events::-webkit-scrollbar {
  width: 4px;
}
.fc-daygrid-day-events::-webkit-scrollbar-track {
  background: transparent;
}
.fc-daygrid-day-events::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.fc-daygrid-day-events::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#eventModalHeader { cursor: grab; }
#eventModalHeader:active { cursor: grabbing; }


/* ============================================================
   RBAC – Role-Based Access Control Styles
   ============================================================ */

/* --- Role portal badge in page headers --- */
.role-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-superadmin-portal {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-admin-portal {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-employee-portal {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Dark mode portal badges */
.dark .badge-superadmin-portal { background: rgba(124,58,237,0.15); color: #c084fc; border-color: rgba(196,167,253,0.25); }
.dark .badge-admin-portal { background: rgba(37,99,235,0.15); color: #60a5fa; border-color: rgba(147,197,253,0.25); }
.dark .badge-employee-portal { background: rgba(22,163,74,0.15); color: #4ade80; border-color: rgba(134,239,172,0.25); }

/* --- Sidebar role badge (footer) --- */
.user-role-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 1px;
}

.role-superadmin {
  background: #f3e8ff;
  color: #6b21a8;
}

.role-admin {
  background: #eff6ff;
  color: #1e40af;
}

.role-employee {
  background: #f0fdf4;
  color: #166534;
}

.dark .role-superadmin { background: rgba(124,58,237,0.18); color: #c084fc; }
.dark .role-admin { background: rgba(37,99,235,0.18); color: #60a5fa; }
.dark .role-employee { background: rgba(22,163,74,0.18); color: #4ade80; }

/* --- Demo login buttons with role colors --- */
.demo-btn {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  text-align: left;
}

.demo-btn:hover { background: var(--bg3); color: var(--text); }

.demo-btn-superadmin {
  border-color: #e9d5ff;
  background: #fdf4ff;
  color: #6b21a8;
}
.demo-btn-superadmin:hover { background: #f3e8ff; color: #581c87; }

.demo-btn-admin {
  border-color: #bfdbfe;
  background: #f0f9ff;
  color: #1e40af;
}
.demo-btn-admin:hover { background: #dbeafe; color: #1e3a8a; }

.demo-btn-employee {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.demo-btn-employee:hover { background: #dcfce7; color: #14532d; }

.demo-role-icon { font-size: 13px; }
.demo-hint { margin-left: auto; font-size: 10px; opacity: 0.7; font-family: var(--font-mono); }

.dark .demo-btn-superadmin { background: rgba(124,58,237,0.1); border-color: rgba(196,167,253,0.3); color: #c084fc; }
.dark .demo-btn-superadmin:hover { background: rgba(124,58,237,0.2); }
.dark .demo-btn-admin { background: rgba(37,99,235,0.1); border-color: rgba(147,197,253,0.3); color: #60a5fa; }
.dark .demo-btn-admin:hover { background: rgba(37,99,235,0.2); }
.dark .demo-btn-employee { background: rgba(22,163,74,0.1); border-color: rgba(134,239,172,0.3); color: #4ade80; }
.dark .demo-btn-employee:hover { background: rgba(22,163,74,0.2); }

/* --- Super Admin system banner --- */
.sa-system-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #fdf4ff 0%, #f0f9ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
  color: #4a4a47;
}

.dark .sa-system-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(37,99,235,0.08) 100%);
  border-color: rgba(196,167,253,0.2);
  color: var(--text2);
}

.sa-banner-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sa-dot-green { background: #16a34a; box-shadow: 0 0 0 2px rgba(22,163,74,0.2); }

.sa-banner-separator {
  flex: 1;
}

/* --- Stat card accent variant --- */
.stat-card-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #2a2a2a 100%);
  color: var(--bg);
  border-color: transparent;
}

.stat-card-accent .stat-label { color: rgba(255,255,255,0.7); }
.stat-card-accent .stat-value { color: #fff; }
.stat-card-accent .stat-change { color: rgba(255,255,255,0.6); }

/* --- Extra stat/badge colors --- */
.red10 { background-color: var(--red10); }
.red30 { background-color: var(--red30); }

/* --- Red soft button variant --- */
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(153,27,27,0.2);
}
.btn-danger:hover { background: #fee2e2; }
.dark .btn-danger { background: rgba(248,113,113,0.1); color: #f87171; border-color: rgba(248,113,113,0.25); }

/* --- User management table action button --- */
.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}

/* --- Table extra utility --- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 16px; background: var(--bg2); color: var(--text3); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg2); }

/* ============================================================
   ATTENDANCE WIDGET
   ============================================================ */
.attendance-widget {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.attendance-widget-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  gap: 24px;
  flex-wrap: wrap;
}

.attendance-left {
  flex: 1;
  min-width: 180px;
}

.attendance-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}

.attendance-clock-display {
  font-size: 42px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--accent);
  line-height: 1;
  letter-spacing: 2px;
}

.attendance-date {
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}

.attendance-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.attendance-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
  transition: all 0.3s ease;
}
.attendance-status-pill.clocked-in {
  background: rgba(34,197,94,0.1);
  color: #22c55e;
  border-color: rgba(34,197,94,0.2);
}

.status-dot-attendance {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}
.status-dot-attendance.active {
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.25); }
}

.attendance-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  min-width: 140px;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.attendance-btn.clock-out {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* ============================================================
   EMPLOYEE MANAGEMENT PAGE
   ============================================================ */

/* Clocked-in row indicator */
.emp-clocked-in-row td:first-child {
  border-left: 3px solid #22c55e;
}

.emp-avatar-row {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2, #a855f7));
  color: white;
  flex-shrink: 0;
}

.emp-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Employee Detail Modal Tabs */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.detail-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.detail-tab:hover { color: var(--text1); }
.detail-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg);
}

.detail-panel { display: none; }
.detail-panel.active { display: block; }

.detail-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text3);
  margin-bottom: 4px;
}

/* Payroll payslip row */
.payslip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 8px;
  font-size: 13px;
}

/* Attendance status badge in table */
.att-status-present { color: #22c55e; font-weight: 600; }
.att-status-partial  { color: #f59e0b; font-weight: 600; }
.att-status-absent   { color: #ef4444; font-weight: 600; }

/* work mini card */
.work-mini-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
}
.work-mini-card .card-lead-name { font-weight: 600; color: var(--text1); margin-bottom: 3px; }
.work-mini-card .card-lead-meta { color: var(--text3); }

/* task item in employee modal */
.task-emp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.task-emp-item:last-child { border-bottom: none; }

/* ============================================================
   RESPONSIVE DESIGN & MOBILE DRAWER NAVIGATION
   ============================================================ */

/* Sidebar Backdrop for Mobile Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Table Wrappers for Touch Scrolling */
.table-wrap, .table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

/* Media Queries: Large Tablets & Laptops (max 1024px) */
@media (max-width: 1024px) {
  .topbar { padding: 0 14px; }
  .content { padding: 16px; }
}

/* Media Queries: Mobile & Portrait Tablets (max 768px) */
@media (max-width: 768px) {
  .app {
    position: relative;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    width: 250px !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .topbar {
    padding: 0 10px;
    gap: 8px;
  }
  .search-wrap {
    max-width: 180px;
  }
  .topbar-title {
    font-size: 14px;
  }
  .content {
    padding: 12px;
  }

  /* Grid Layouts for Mobile */
  .grid-4, .grid-3, .stats-grid, [style*="grid-template-columns: repeat(4"], [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .grid-2, [style*="grid-template-columns: 2fr 1fr"], [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Tables Scrollable */
  table {
    min-width: 600px;
  }

  /* Modals Fit Screen */
  .modal-card, .login-card {
    width: 94% !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 18px !important;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Media Queries: Small Smartphones (max 480px) */
@media (max-width: 480px) {
  .grid-4, .grid-3, .stats-grid, [style*="grid-template-columns: repeat(4"], [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  .topbar-title {
    display: none;
  }
  .search-wrap {
    max-width: 130px;
  }
  .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }
  .login-card {
    padding: 16px;
  }
}

