/* ==========================================================================
   PipGPS Pro - DashPro Premium Modern SaaS Styling (Pure Vanilla CSS)
   Complete, standalone stylesheet with zero external CSS framework dependencies
   Inspired by DashPro UI Design
   ========================================================================== */

:root {
  --bg-page: #ECEEF2;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-subtle: #F8F9FD;
  --bg-dark-card: #14172C;

  --primary: #5E48E8;
  --primary-hover: #4E39DC;
  --primary-light: #F0EDFE;
  --primary-glow: rgba(94, 72, 232, 0.25);

  --stat-purple: #5E48E8;
  --stat-blue: #1D68FE;
  --stat-orange: #FE6432;
  --stat-teal: #125867;

  --success: #10B981;
  --success-light: #E7F9F3;
  --danger: #EF4444;
  --danger-light: #FDE8E8;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;

  --text-main: #111827;
  --text-body: #374151;
  --text-muted: #6B7280;
  --text-dim: #9CA3AF;

  --border-color: #F0F2F6;
  --border-strong: #E5E7EB;

  --radius-full: 9999px;
  --radius-3xl: 28px;
  --radius-2xl: 20px;
  --radius-xl: 14px;
  --radius-lg: 10px;

  --shadow-clay: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 2px 8px -2px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 14px 34px -4px rgba(94, 72, 232, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --shadow-btn: 0 8px 20px -3px rgba(94, 72, 232, 0.35);
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  padding: 24px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ================= LAYOUT UTILITIES ================= */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1 1 0%;
}

.shrink-0 {
  flex-shrink: 0;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.items-stretch {
  align-items: stretch;
}

.justify-center {
  justify-content: center;
}

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

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.grid {
  display: grid;
}

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

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

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

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

.gap-1 {
  gap: 4px;
}

.gap-1\.5 {
  gap: 6px;
}

.gap-2 {
  gap: 8px;
}

.gap-2\.5 {
  gap: 10px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.max-w-md {
  max-width: 440px;
}

.max-w-xl {
  max-width: 580px;
}

.max-w-2xl {
  max-width: 680px;
}

.max-w-4xl {
  max-width: 890px;
}

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

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

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

.text-xs {
  font-size: 12px;
  line-height: 16px;
}

.text-sm {
  font-size: 13px;
  line-height: 18px;
}

.text-base {
  font-size: 15px;
  line-height: 22px;
}

.text-lg {
  font-size: 18px;
  line-height: 26px;
}

.text-xl {
  font-size: 20px;
  line-height: 28px;
}

.text-2xl {
  font-size: 24px;
  line-height: 32px;
}

.text-3xl {
  font-size: 30px;
  line-height: 36px;
}

.text-\[10px\] {
  font-size: 10px;
  line-height: 14px;
}

.text-\[11px\] {
  font-size: 11px;
  line-height: 15px;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 800;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace, ui-monospace;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-slate-100 {
  color: #F1F5F9;
}

.text-slate-200 {
  color: #E2E8F0;
}

.text-slate-300 {
  color: #CBD5E1;
}

.text-slate-400 {
  color: #94A3B8;
}

.text-slate-500 {
  color: #64748B;
}

.text-slate-600 {
  color: #475569;
}

.text-slate-700 {
  color: #334155;
}

.text-slate-800 {
  color: #1E293B;
}

.text-slate-900 {
  color: #0F172A;
}

.text-emerald-500 {
  color: #10B981;
}

.text-emerald-600 {
  color: #059669;
}

.text-emerald-700 {
  color: #047857;
}

.text-rose-400 {
  color: #FB7185;
}

.text-rose-500 {
  color: #F43F5E;
}

.text-rose-600 {
  color: #E11D48;
}

.text-purple-600 {
  color: #7C3AED;
}

.bg-white {
  background-color: #FFFFFF;
}

.bg-slate-50 {
  background-color: #F8FAFC;
}

.bg-slate-100 {
  background-color: #F1F5F9;
}

.bg-slate-200 {
  background-color: #E2E8F0;
}

.bg-purple-50 {
  background-color: #F5F3FF;
}

.bg-emerald-50 {
  background-color: #ECFDF5;
}

.bg-rose-50 {
  background-color: #FFF1F2;
}

.border {
  border: 1px solid var(--border-strong);
}

.border-t {
  border-top: 1px solid var(--border-strong);
}

.border-b {
  border-bottom: 1px solid var(--border-strong);
}

.border-slate-100 {
  border-color: #F1F5F9;
}

.border-slate-200 {
  border-color: #E2E8F0;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 10px;
}

.rounded-xl {
  border-radius: 14px;
}

.rounded-2xl {
  border-radius: 20px;
}

.rounded-3xl {
  border-radius: 28px;
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.cursor-pointer {
  cursor: pointer;
}

.select-all {
  user-select: all;
}

.select-none {
  user-select: none;
}

.transition {
  transition: all 0.2s ease;
}

.space-y-4>*+* {
  margin-top: 16px;
}

.space-y-2>*+* {
  margin-top: 8px;
}

.space-y-1\.5>*+* {
  margin-top: 6px;
}

/* ================= APP CONTAINER ================= */
.app-container {
  max-width: 1560px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: var(--radius-3xl);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  min-height: calc(100vh - 48px);
}

@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
    border-radius: var(--radius-2xl);
    min-height: auto;
  }
}

/* ================= SIDEBAR ================= */
.dash-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-sidebar.collapsed {
  width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  border-right: none !important;
  pointer-events: none;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mobile-close-sidebar-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  color: #64748B;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-close-sidebar-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #F8FAFC;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(94, 72, 232, 0.12);
}

.sidebar-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 480px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-wrapper {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CA3AF;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.nav-link:hover {
  background-color: #F8F9FC;
  color: var(--primary);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-link.active svg {
  color: var(--primary);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  color: #9CA3AF;
  transition: color 0.2s;
  flex-shrink: 0;
}

/* Sidebar Promo / OTA Card */
.sidebar-upgrade-card {
  background: var(--bg-dark-card);
  border-radius: 20px;
  padding: 22px 18px 18px;
  position: relative;
  margin-top: 32px;
  color: #FFFFFF;
  box-shadow: 0 12px 24px -6px rgba(20, 23, 44, 0.25);
}

.upgrade-floating-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  position: absolute;
  top: -18px;
  left: 20px;
  box-shadow: 0 6px 14px rgba(94, 72, 232, 0.4);
}

.upgrade-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 2px;
}

.upgrade-desc {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
  line-height: 1.4;
}

.btn-upgrade-pill {
  width: 100%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-upgrade-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ================= MAIN WORKSPACE ================= */
.dash-main {
  flex: 1;
  background: #FAFBFC;
  padding: 32px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.search-pill-container {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 440px;
  width: 100%;
}

.search-pill-input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 11px 48px 11px 20px;
  font-size: 13px;
  color: #1F2937;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.search-pill-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 72, 232, 0.12);
}

.search-pill-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(94, 72, 232, 0.3);
}

.search-pill-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.06);
}

.search-pill-btn svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px;
  max-height: 13px;
  stroke-width: 2.5;
  color: #FFFFFF;
  flex-shrink: 0;
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.admin-handle {
  font-size: 11px;
  color: #9CA3AF;
}

.admin-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: #6B7280;
  margin-top: 2px;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-dash-white {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.btn-dash-white:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.btn-dash-primary {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 18px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.btn-dash-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-dash-primary svg,
.btn-dash-white svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

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

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

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

.stat-card {
  background: #FFFFFF;
  border-radius: var(--radius-2xl);
  padding: 22px 20px;
  border: 1px solid #EDEFF5;
  box-shadow: var(--shadow-clay);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.stat-icon-purple {
  background: var(--stat-purple);
}

.stat-icon-blue {
  background: var(--stat-blue);
}

.stat-icon-orange {
  background: var(--stat-orange);
}

.stat-icon-teal {
  background: var(--stat-teal);
}

.stat-badge-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.stat-badge-trend.positive {
  background: var(--success-light);
  color: #059669;
}

.stat-badge-trend.negative {
  background: var(--danger-light);
  color: #DC2626;
}

.stat-number {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  margin-top: 14px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  margin-top: 2px;
}

/* ================= 2-COLUMN DASH CONTENT ================= */
.dash-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.dash-content-grid:has(> :nth-child(2)) {
  grid-template-columns: 1.6fr 1fr;
}

@media (max-width: 1180px) {
  .dash-content-grid:has(> :nth-child(2)) {
    grid-template-columns: 1fr;
  }
}

.dash-panel {
  background: #FFFFFF;
  border-radius: var(--radius-2xl);
  padding: 24px;
  border: 1px solid #EDEFF5;
  box-shadow: var(--shadow-clay);
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}

/* ================= TABLE ================= */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.custom-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9CA3AF;
  border-bottom: 1px solid #F3F4F6;
}

.custom-table td {
  padding: 14px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #F8F9FA;
  color: #374151;
}

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

.custom-table tr:hover td {
  background: #FAFBFF;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.badge-active {
  background: var(--success-light);
  color: #059669;
}

.badge-expired {
  background: var(--danger-light);
  color: #DC2626;
}

.badge-unlocked {
  background: #F3F4F6;
  color: #6B7280;
}

.filter-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.filter-tab:hover {
  background: #E5E7EB;
  color: #1E293B;
  transform: translateY(-1px);
}

.filter-tab.active {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(94, 72, 232, 0.28);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  border-radius: 9999px;
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  line-height: 1;
  transition: all 0.2s;
}

.filter-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #FFFFFF !important;
}

.user-filter-total {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 11px;
  border-radius: 9999px;
  margin-left: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.stat-card.stat-card-interactive {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.stat-card.stat-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.09), 0 6px 12px -3px rgba(0, 0, 0, 0.04);
}

.stat-card.stat-card-interactive:active {
  transform: translateY(-1px);
}

/* ================= TABLE CELL COMPONENTS ================= */
.user-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.user-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
}

.user-name-title {
  font-size: 13px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-1hp {
  font-size: 10px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  background: #EDE9FE;
  color: var(--primary);
  border: 1px solid #DDD6FE;
  padding: 1px 6px;
  border-radius: 4px;
}

.user-ping-status {
  font-size: 11px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.ping-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ping-indicator-dot.online {
  background: #10B981;
}

.ping-indicator-dot.offline {
  background: #CBD5E1;
}

.token-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.token-code-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  background: #F8F9FC;
  color: #334155;
  border: 1px solid #E2E8F0;
  padding: 5px 10px;
  border-radius: 8px;
  user-select: all;
  letter-spacing: 0.02em;
}

.btn-token-copy {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-token-copy:hover {
  background: #F0EDFE;
  color: var(--primary);
  border-color: #DDD6FE;
}

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

.device-pill-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: #F0EDFE;
  border: 1px solid #DDD6FE;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.device-pill-locked svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.device-reset-btn {
  color: #F43F5E;
  margin-left: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.device-reset-btn:hover {
  color: #E11D48;
  transform: scale(1.15);
}

.device-reset-btn svg {
  width: 13px;
  height: 13px;
}

.device-pill-unlocked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 11px;
  font-weight: 600;
}

.device-pill-unlocked svg {
  width: 13px;
  height: 13px;
  color: #94A3B8;
}

.btn-action-radar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: #F0EDFE;
  color: var(--primary);
  border: 1px solid #DDD6FE;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-radar:hover {
  background: #E0DAFD;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(94, 72, 232, 0.15);
}

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

.table-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-action-extend:hover {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #059669;
  transform: translateY(-1px);
}

.btn-action-edit:hover {
  background: #F0EDFE;
  border-color: #DDD6FE;
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-action-delete:hover {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #E11D48;
  transform: translateY(-1px);
}

/* ================= RIGHT PANEL OTA & RADAR ================= */
.ota-card-box {
  padding: 18px 20px;
  border-radius: 20px;
  background: #F8F9FD;
  border: 1px solid #EDEFF5;
  margin-bottom: 18px;
}

.ota-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ota-version-chip {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: #EAE7FD;
  color: var(--primary);
}

.ota-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 10px;
}

.ota-changelog-preview {
  font-size: 11px;
  color: #475569;
  background: #FFFFFF;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  line-height: 1.5;
  white-space: pre-line;
  max-height: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ota-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #E5E7EB;
}

.ota-action-row .btn-dash-white,
.ota-action-row .btn-dash-primary {
  flex: 1;
  justify-content: center;
  padding: 8px 14px;
  font-size: 12px;
}

.radar-banner-card {
  padding: 20px 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5E48E8 0%, #7B68EE 100%);
  color: #FFFFFF;
  box-shadow: 0 14px 30px -5px rgba(94, 72, 232, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.25s ease;
}

.radar-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -5px rgba(94, 72, 232, 0.45);
}

.radar-banner-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #DDD6FE;
  font-weight: 800;
}

.radar-banner-title {
  font-size: 17px;
  font-weight: 800;
  margin-top: 2px;
  color: #FFFFFF;
}

.radar-banner-desc {
  font-size: 11px;
  color: #EDE9FE;
  margin-top: 4px;
}

.radar-banner-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.radar-banner-card:hover .radar-banner-arrow-btn {
  transform: scale(1.08);
}

.radar-banner-arrow-btn svg {
  width: 20px;
  height: 20px;
}

.btn-quick-add-user {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border-radius: 18px;
  border: 2px dashed #CBD5E1;
  background: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-quick-add-user:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #FAF9FE;
  transform: translateY(-1px);
}

.btn-quick-add-user svg {
  width: 16px;
  height: 16px;
}

/* ================= MODALS ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 530px;
  border: 1px solid #EDEFF5;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 28px 30px;
}

.modal-card.modal-card-sm {
  max-width: 440px;
}

.modal-card.modal-card-md {
  max-width: 530px;
}

.modal-card.modal-card-lg {
  max-width: 600px;
}

.modal-card.modal-card-xl {
  max-width: 880px;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #F0EDFE;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(94, 72, 232, 0.15);
}

.modal-title-text {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.modal-subtitle-text {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  margin-top: 2px;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F3F4F6;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #E5E7EB;
  color: #111827;
  transform: rotate(90deg);
}

.modal-form-content {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-label-caps {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.dash-input {
  width: 100%;
  background: #F9FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  outline: none;
  transition: all 0.2s;
}

.dash-input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 72, 232, 0.12);
}

/* Avatar Upload Row */
.avatar-upload-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 20px;
  background: #F8F9FD;
  border: 1px solid #EDEFF5;
}

.avatar-upload-preview {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  cursor: pointer;
}

.avatar-upload-preview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(94, 72, 232, 0.18);
  transition: opacity 0.2s;
}

.avatar-upload-preview:hover img {
  opacity: 0.85;
}

.avatar-upload-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.avatar-upload-info {
  flex: 1;
}

.input-group-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-group-prefix {
  position: absolute;
  left: 14px;
  font-weight: 700;
  color: #94A3B8;
  font-size: 13px;
  pointer-events: none;
}

.input-group-field input {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px 16px 10px 32px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  outline: none;
  transition: all 0.2s;
}

.input-group-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 72, 232, 0.12);
}

/* Duration Section & Chips */
.duration-section {
  margin-top: 4px;
}

.duration-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.duration-section-selected {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #F0EDFE;
  padding: 3px 10px;
  border-radius: 9999px;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.duration-chip {
  padding: 12px 10px;
  border-radius: 16px;
  border: 1.5px solid #EDEFF5;
  background: #FFFFFF;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.duration-chip:hover {
  border-color: var(--primary);
  background: #FAF9FE;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(94, 72, 232, 0.08);
}

.duration-chip.active {
  border-color: var(--primary) !important;
  background: #F0EDFE !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(94, 72, 232, 0.22) !important;
}

.duration-chip-days {
  font-size: 13px;
  font-weight: 800;
}

.duration-chip-sub {
  font-size: 10px;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 2px;
}

.duration-chip.active .duration-chip-sub {
  color: var(--primary);
}

.duration-chip.col-span-2 {
  grid-column: span 2 / span 2;
}

.text-emerald {
  color: #059669;
}

/* Strict Device Lock Card */
.card-device-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 18px;
  background: #F8F9FD;
  border: 1px solid #EDEFF5;
}

.device-lock-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-lock-title {
  font-size: 13px;
  font-weight: 800;
  color: #1E293B;
}

.badge-safe {
  font-size: 10px;
  font-weight: 800;
  background: #EDE9FE;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 6px;
}

.device-lock-subtitle {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

/* iOS Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ios-switch input:checked+.ios-slider {
  background-color: var(--primary);
}

.ios-switch input:checked+.ios-slider:before {
  transform: translateX(20px);
}

/* Modal Footer */
.modal-footer-dash {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #F0F2F6;
  margin-top: 8px;
}

.modal-footer-dash .btn-dash-white {
  padding: 6px 14px;
  font-size: 12px;
  height: 34px;
  font-weight: 600;
}

.modal-footer-dash .btn-dash-primary {
  padding: 6px 16px;
  font-size: 12px;
  height: 34px;
  font-weight: 700;
}

.modal-footer-dash svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px;
  max-height: 13px;
  flex-shrink: 0;
}

/* APK Release Dropzone */
.apk-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  background: #F8F9FD;
  transition: all 0.2s ease;
}

.apk-dropzone:hover {
  border-color: var(--primary);
  background: #F0EDFE;
  transform: translateY(-1px);
}

.dropzone-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--primary);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropzone-main-text {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.dropzone-ext-tag {
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}

.dropzone-hint-text {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

.dropzone-file-pill {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #EDE9FE;
  border: 1px solid #DDD6FE;
  color: var(--primary);
  font-size: 12px;
  font-family: monospace;
  font-weight: 700;
}

.grid-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.changelog-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.changelog-tip {
  font-size: 10px;
  font-weight: 600;
  color: #94A3B8;
}

.changelog-tags-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag-chip {
  font-size: 11px;
  font-weight: 700;
  background: #F0EDFE;
  color: var(--primary);
  border: 1px solid #DDD6FE;
  padding: 4px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.tag-chip:hover {
  background: #E0DAFD;
  transform: translateY(-1px);
}

.upload-progress-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: #F8F9FD;
  border: 1px solid #EDEFF5;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.progress-pct {
  font-family: monospace;
  color: var(--primary);
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #E2E8F0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5E48E8, #8B5CF6);
  transition: width 0.15s ease;
  border-radius: 9999px;
}

/* ================= TOAST ================= */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #FFFFFF;
  color: #111827;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 420px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.toast svg,
.toast-icon-badge svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.toast-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success .toast-icon-badge {
  background: #ECFDF5;
  color: #10B981;
}

.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-error .toast-icon-badge {
  background: #FEF2F2;
  color: #EF4444;
}

.toast-info {
  border-left: 4px solid var(--primary);
}
.toast-info .toast-icon-badge {
  background: #EEF2FF;
  color: var(--primary);
}

.toast-text {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================= RADAR PULSE ================= */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ================= STAT CARD SVG ICONS ================= */
.stat-icon-circle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

/* ================= TABLE EMPTY & LOADING STATES ================= */
.table-empty-box {
  text-align: center;
  padding: 48px 20px;
  color: #94A3B8;
}

.table-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

.table-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #94A3B8;
}

/* ================= GPS HISTORY MODAL ================= */
.history-modal-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 16px;
  margin-top: 16px;
}

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

.history-map-wrapper {
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #EDEFF5;
  background: #F8FAFC;
}

.history-list-wrapper {
  height: 380px;
  border-radius: 18px;
  border: 1px solid #EDEFF5;
  background: #FFFFFF;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.history-list-header {
  padding: 12px 16px;
  background: #F8F9FD;
  border-bottom: 1px solid #EDEFF5;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-item {
  padding: 11px 16px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  transition: background 0.15s;
}

.history-item:hover {
  background: #F8F9FE;
}

.history-coords {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.history-time {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.badge-latest {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

/* ================= AUDIT LOG MODAL ================= */
.audit-list-container {
  max-height: 420px;
  overflow-y: auto;
  margin-top: 16px;
  border: 1px solid #EDEFF5;
  border-radius: 16px;
  background: #FFFFFF;
}

.audit-log-item {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  transition: background 0.15s;
}

.audit-log-item:hover {
  background: #F8F9FE;
}

.audit-log-item:last-child {
  border-bottom: none;
}

.audit-action-tag {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
}

.audit-log-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #64748B;
  margin-left: 6px;
}

.audit-ip-tag {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.audit-time-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94A3B8;
}

/* ================= MOBILE RESPONSIVE TWEAKS ================= */
@media (max-width: 768px) {
  body {
    padding: 0 !important;
  }

  .app-container {
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100vh;
  }

  .dash-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 82% !important;
    height: 100vh !important;
    z-index: 2000 !important;
    background: #FFFFFF !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
    transform: translateX(-105%) !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    overflow-y: auto !important;
    padding: 24px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    opacity: 1 !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .dash-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .dash-sidebar nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .sidebar-section-title {
    width: 100%;
    margin-top: 16px !important;
    margin-bottom: 6px !important;
    padding-left: 4px !important;
  }

  .nav-link {
    padding: 10px 14px !important;
    font-size: 13px !important;
    margin-bottom: 2px !important;
    border-radius: 12px !important;
  }

  .mobile-close-sidebar-btn {
    display: inline-flex !important;
  }

  .dash-topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .dash-topbar-left {
    max-width: none !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .search-pill-container {
    max-width: none !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .search-pill-input {
    padding: 9px 36px 9px 14px !important;
    font-size: 12px !important;
  }

  .admin-profile-pill {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .admin-avatar-img {
    width: 36px !important;
    height: 36px !important;
  }

  .admin-name {
    font-size: 12px !important;
  }

  .admin-handle {
    font-size: 10px !important;
  }

  .dash-main {
    padding: 16px 14px !important;
    gap: 18px !important;
  }

  .page-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .action-btn-group {
    width: 100%;
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .stat-number {
    font-size: 20px !important;
    margin-top: 10px !important;
  }

  .stat-label {
    font-size: 11px !important;
  }

  .dash-panel {
    padding: 16px 12px !important;
    border-radius: 20px !important;
  }

  .dash-panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .filter-tabs-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .custom-table th,
  .custom-table td {
    padding: 10px 8px !important;
    font-size: 12px !important;
  }

  .modal-card {
    padding: 20px 16px !important;
    border-radius: 22px !important;
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    margin: 10px auto !important;
  }

  .duration-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .duration-chip.col-span-2 {
    grid-column: span 2 !important;
  }
}