/* /var/www/geolens-hub/assets/ds.css — GeoLens Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --bg-elevated: rgba(24, 24, 27, 0.8);
  --border: rgba(63, 63, 70, 0.5);
  --border-hover: rgba(6, 244, 228, 0.3);
  --border-active: #06F4E4;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-accent: #06F4E4;

  --accent: #06F4E4;
  --accent-soft: #83CEBF;
  --accent-glow: rgba(6, 244, 228, 0.15);
  --accent-gradient: linear-gradient(135deg, #06F4E4, #83CEBF);

  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.1);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(6, 244, 228, 0.1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle gradient overlay on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(6, 244, 228, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--text-accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--accent-soft); }

/* === HEADER === */
.ds-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ds-header h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.ds-header .logo { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 800; }
.ds-header .subtitle { color: var(--text-secondary); font-weight: 500; font-size: 1.25rem; }
.ds-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ds-back { color: var(--text-tertiary); font-size: 0.8rem; display: flex; align-items: center; gap: 4px; transition: color var(--duration) var(--ease); }
.ds-back:hover { color: var(--text-accent); }

/* === BUTTONS === */
.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  outline: none;
  white-space: nowrap;
}
.ds-btn:focus-visible { box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent); }

.ds-btn-primary {
  background: var(--accent-gradient);
  color: #09090b;
  border: none;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,0.1);
}
.ds-btn-primary:hover { box-shadow: 0 0 24px rgba(6, 244, 228, 0.25), var(--shadow-md); transform: translateY(-1px); }
.ds-btn-primary:active { transform: translateY(0); box-shadow: 0 0 12px rgba(6, 244, 228, 0.15); }

.ds-btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}
.ds-btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-tertiary); }

.ds-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.ds-btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.ds-btn-danger {
  background: var(--error-bg);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--error);
}
.ds-btn-danger:hover { background: rgba(248, 113, 113, 0.2); border-color: var(--error); }

.ds-btn-sm { padding: 5px 12px; font-size: 0.75rem; }
.ds-btn-xs { padding: 3px 8px; font-size: 0.7rem; }

/* === CARDS === */
.ds-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: all var(--duration) var(--ease);
}
.ds-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

/* === STAT CARDS === */
.ds-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 20px 32px;
}
.ds-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.ds-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0.4;
  transition: opacity var(--duration) var(--ease);
}
.ds-stat:hover { border-color: var(--border-hover); box-shadow: 0 4px 20px rgba(6, 244, 228, 0.06); }
.ds-stat:hover::before { opacity: 1; }
.ds-stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.ds-stat-label { font-size: 0.7rem; color: var(--text-tertiary); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* === INPUTS === */
.ds-input, .ds-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: all var(--duration) var(--ease);
}
.ds-input:focus, .ds-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.ds-input::placeholder { color: var(--text-tertiary); }

/* === TABLES === */
.ds-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.84rem; }
.ds-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
  background: var(--bg-secondary);
}
.ds-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(63, 63, 70, 0.2);
  vertical-align: middle;
}
.ds-table tbody tr { transition: all var(--duration) var(--ease); }
.ds-table tbody tr:hover { background: rgba(6, 244, 228, 0.04); }
.ds-table tbody tr:nth-child(even) { background: rgba(24, 24, 27, 0.4); }
.ds-table tbody tr:nth-child(even):hover { background: rgba(6, 244, 228, 0.04); }

/* === BADGES === */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ds-badge-success { background: rgba(74, 222, 128, 0.15); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.2); }
.ds-badge-error { background: rgba(248, 113, 113, 0.15); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.2); }
.ds-badge-warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.2); }
.ds-badge-info { background: rgba(96, 165, 250, 0.15); color: var(--info); border: 1px solid rgba(96, 165, 250, 0.2); }
.ds-badge-neutral { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border); }
.ds-badge-accent { background: rgba(6, 244, 228, 0.12); color: var(--accent); border: 1px solid rgba(6, 244, 228, 0.2); }

/* Small dot indicator */
.ds-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* === MODALS === */
.ds-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 24px;
  overflow-y: auto;
}
.ds-modal-overlay.active { display: flex; animation: fadeIn 200ms var(--ease); }
.ds-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 800px;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 300ms var(--ease);
}
.ds-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.ds-modal-close:hover { background: var(--error-bg); color: var(--error); border-color: rgba(248,113,113,0.3); }

/* === TOOLBAR === */
.ds-toolbar {
  display: flex;
  gap: 10px;
  padding: 0 32px 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* === PAGINATION === */
.ds-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px 32px 32px;
}
.ds-pagination button {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.ds-pagination button:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); }
.ds-pagination button:disabled { opacity: 0.3; cursor: default; }
.ds-pagination button.active { background: var(--accent); border-color: var(--accent); color: var(--bg-primary); font-weight: 700; }

/* === TOAST === */
.ds-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.ds-toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 300ms var(--ease);
  transition: all 300ms var(--ease);
  border-left: 3px solid var(--text-tertiary);
}
.ds-toast-success { border-left-color: var(--success); }
.ds-toast-error { border-left-color: var(--error); }
.ds-toast-warning { border-left-color: var(--warning); }

/* === EMPTY STATE === */
.ds-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-tertiary);
}
.ds-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.ds-empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.ds-empty-desc { font-size: 0.85rem; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === UTILITY === */
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-accent { color: var(--text-accent); }
.text-muted { color: var(--text-tertiary); }
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8rem; }
.fw-700 { font-weight: 700; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.items-center { align-items: center; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .ds-header, .ds-stats, .ds-toolbar { padding-left: 16px; padding-right: 16px; }
  .ds-header h1 { font-size: 1.1rem; }
  .ds-stat-value { font-size: 1.5rem; }
  .ds-table { font-size: 0.78rem; }
  .ds-table th, .ds-table td { padding: 8px 10px; }
}
