/* ============================================================
   LeadersOS — Modern Dark Luxury Glassmorphism Design System
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Background Layers (Obsidian Dark) */
  --bg-void: #06080d;
  --bg-primary: #0a0d14;
  --bg-secondary: #10141e;
  --bg-tertiary: #161b28;
  --bg-surface: rgba(16, 21, 33, 0.72);
  --bg-surface-hover: rgba(24, 32, 50, 0.82);
  --bg-surface-active: rgba(32, 42, 65, 0.9);

  /* Glassmorphism System */
  --glass-bg: rgba(13, 17, 27, 0.75);
  --glass-bg-card: rgba(16, 22, 35, 0.65);
  --glass-blur: blur(20px) saturate(190%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-border-hover: 1px solid rgba(99, 102, 241, 0.4);
  --glass-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65), 0 4px 16px rgba(0, 0, 0, 0.35);
  --glass-shadow-lg: 0 24px 60px -15px rgba(0, 0, 0, 0.75), 0 8px 24px rgba(0, 0, 0, 0.45);

  /* Precision Borders */
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(99, 102, 241, 0.35);

  /* Primary Cyber & Luxury Accents */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-light: #a5b4fc;
  --accent-glow: rgba(99, 102, 241, 0.32);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);

  /* Secondary Accents */
  --cyan: #00f0ff;
  --cyan-dim: #0ea5e9;
  --cyan-glow: rgba(0, 240, 255, 0.28);
  --green: #10b981;
  --green-dim: #059669;
  --green-glow: rgba(16, 185, 129, 0.25);
  --yellow: #f59e0b;
  --yellow-glow: rgba(245, 158, 11, 0.25);
  --red: #f43f5e;
  --red-dim: #e11d48;
  --red-glow: rgba(244, 63, 94, 0.28);
  --purple: #a855f7;
  --orange: #f97316;

  /* Typography Colors */
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #030712;

  /* Fonts */
  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Corner Radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms;
  --t-normal: 240ms;
  --t-slow: 400ms;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  background-color: var(--bg-void);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(0, 240, 255, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ---- Custom Scrollbars ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ---- Boot Screen ---- */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
}

.boot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.brand-badge-glamour {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(0, 240, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px var(--accent-glow);
  animation: boot-pulse 2s ease-in-out infinite;
}

.brand-badge-text {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.boot-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 30%, var(--accent-hover) 70%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.boot-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.boot-progress {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.boot-progress-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 999px;
  box-shadow: 0 0 10px var(--accent);
  animation: boot-load 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes boot-load {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

@keyframes boot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--accent-glow); }
  50% { transform: scale(1.04); box-shadow: 0 0 50px var(--cyan-glow); }
}

/* ---- Login Screen ---- */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.15), transparent 60%), var(--bg-void);
  backdrop-filter: blur(20px);
}

.login-card {
  width: 360px;
  max-width: 90vw;
  padding: 36px 32px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--glass-shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.login-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(0, 240, 255, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.login-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-input-wrap {
  width: 100%;
  margin-bottom: 16px;
}

.login-input-wrap input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: all var(--t-fast) var(--ease);
}

.login-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0, 0, 0, 0.55);
}

.login-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: all var(--t-fast) var(--ease);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
}

.login-submit:active {
  transform: translateY(1px);
}

/* ============================================================
   Unified HUB Layout & Navigation
   ============================================================ */
#hub-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-void);
}

/* ---- Sidebar ---- */
#hub-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

.hub-sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.hub-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.hub-brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-brand-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hub-brand-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.hub-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hub-nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 14px 12px 6px;
  margin-top: 4px;
}

.hub-nav-section-title:first-child {
  padding-top: 4px;
  margin-top: 0;
}

.hub-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-md);
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.hub-nav-item .nav-icon {
  font-size: 15px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast) var(--ease);
}

.hub-nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hub-nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.hub-nav-item.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.16) 0%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.hub-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent);
}

/* Sidebar Footer */
.hub-sidebar-footer {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

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

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* ---- Main Content Container ---- */
#hub-main-content {
  flex: 1;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
}

#hub-page-mount {
  flex: 1;
  height: 100%;
  overflow-y: auto;
}

.hub-page-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  animation: page-fade-in 0.3s var(--ease) both;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.hub-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hub-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-page-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

/* ============================================================
   Buttons & Actions
   ============================================================ */
.hub-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.hub-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
}

.hub-btn-primary:active {
  transform: translateY(1px);
}

.hub-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.hub-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.hub-btn-secondary:active {
  transform: translateY(1px);
}

/* ============================================================
   Bento Stats Grid & KPI Cards
   ============================================================ */
.hub-grid {
  display: grid;
  gap: 16px;
}

.hub-card-stat {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}

.hub-card-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.03), transparent 60%);
}

.hub-card-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

.hub-card-stat .stat-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-card-stat .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.hub-card-stat .stat-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--font);
  margin-bottom: 4px;
}

.hub-card-stat .stat-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Dashboard Action Tiles */
.dash-quick-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

.dash-quick-btn:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4);
}

.dash-quick-btn .dash-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  margin-bottom: 6px;
  transition: all var(--t-fast) var(--ease);
}

.dash-quick-btn:hover .dash-btn-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--accent-light);
}

.dash-quick-btn .dash-btn-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dash-quick-btn .dash-btn-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================================
   Filter Tabs & Toolbar (Segmented Controls)
   ============================================================ */
.clients-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hub-filter-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
}

.hub-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}

.hub-filter-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hub-filter-tab.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.hub-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--r-full);
  font-size: 10.5px;
  font-weight: 700;
}

.hub-filter-tab.active .hub-filter-count {
  background: rgba(99, 102, 241, 0.45);
  color: #fff;
}

/* ============================================================
   Tables & Data Cards
   ============================================================ */
.hub-table-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.hub-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.hub-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.hub-table tbody tr {
  transition: background var(--t-fast) var(--ease);
}

.hub-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.hub-table tbody tr:hover td {
  color: var(--text);
}

/* ============================================================
   Badges, Tags & Avatars
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.ativo, .status-badge.pago {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.status-badge.pendente {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.status-badge.inadimplente, .status-badge.atrasado {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.32);
}

.status-badge.inativo, .status-badge.cancelado {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.client-service-tag, .service-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.24);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.client-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.table-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}

.table-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

/* ============================================================
   Inputs, Forms & Modals
   ============================================================ */
.hub-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: var(--font);
  transition: all var(--t-fast) var(--ease);
}

.hub-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0, 0, 0, 0.55);
}

.hub-input::placeholder {
  color: var(--text-muted);
}

/* Select Styling */
select.hub-input option {
  background: var(--bg-secondary);
  color: var(--text);
  padding: 8px;
}

/* Client Premium Card & Dropdown Menu */
.client-premium-card {
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--glass-shadow);
  margin-bottom: 12px;
}

.client-premium-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.65);
}

.client-card-left {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.client-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  flex-shrink: 0;
}

.client-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

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

.client-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.client-card-company {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.client-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.client-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.client-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}

.client-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
}

.client-action-btn.whatsapp {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.client-action-btn.whatsapp:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.client-action-btn.icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.client-action-btn.icon-only:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

/* Dropdown Menu */
.lovable-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: rgba(13, 17, 27, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.lovable-dropdown-menu.active {
  display: flex;
  animation: dropdown-fade 0.15s ease both;
}

@keyframes dropdown-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lovable-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.lovable-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lovable-dropdown-item.destructive {
  color: #fb7185;
}

.lovable-dropdown-item.destructive:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.lovable-dropdown-item.warning {
  color: #fbbf24;
}

.lovable-dropdown-item.warning:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* ============================================================
   Pop-up Modal System (.lovable-modal & .hub-modal-overlay)
   ============================================================ */
.lovable-modal,
.hub-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(5, 3, 14, 0.84) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lovable-modal.active,
.lovable-modal:not(.hidden):not([style*="display: none"]):not([style*="display:none"]).is-open,
.hub-modal-overlay.active,
.hub-modal-overlay:not(.hidden) {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.lovable-modal-content,
.hub-modal-card,
.hub-modal-content {
  background: var(--bg-card, #120e24) !important;
  background-image: linear-gradient(150deg, rgba(26, 20, 50, 0.95), rgba(12, 8, 26, 0.98)) !important;
  border: 1px solid var(--border-medium, rgba(124, 92, 255, 0.3)) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(124, 92, 255, 0.15) !important;
  width: 100% !important;
  max-width: 600px;
  max-height: 88vh !important;
  overflow-y: auto !important;
  padding: 24px 28px !important;
  position: relative !important;
  box-sizing: border-box !important;
  animation: lovable-modal-scale 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lovable-modal-scale {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(14px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lovable-modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.08)) !important;
  padding-bottom: 14px !important;
  margin-bottom: 18px !important;
  background: transparent !important;
}

.lovable-modal-title {
  font-size: 16.5px !important;
  font-weight: 700 !important;
  color: var(--text, #f0eef6) !important;
  letter-spacing: -0.2px !important;
  margin: 0 !important;
}

.lovable-modal-close {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.12)) !important;
  color: var(--text-muted, #9b95b0) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.lovable-modal-close:hover {
  background: rgba(255, 68, 102, 0.18) !important;
  color: var(--red, #ff4466) !important;
  border-color: rgba(255, 68, 102, 0.4) !important;
  transform: rotate(90deg);
}

/* ============================================================
   Mobile Responsiveness
   ============================================================ */
#hub-mobile-header {
  display: none;
}

#sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  #hub-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    z-index: 100;
  }

  #hub-sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-left: -8px;
    border-radius: var(--r-md);
  }

  #hub-layout {
    flex-direction: column;
  }

  #hub-main-content {
    height: calc(100vh - 56px);
  }

  .hub-page-container {
    padding: 16px 16px 36px;
  }

  #hub-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    max-width: 85%;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform var(--t-normal) var(--ease);
  }

  #hub-sidebar.active {
    transform: translateX(0);
    box-shadow: 12px 0 50px rgba(0, 0, 0, 0.85);
  }

  #sidebar-backdrop.active {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9998;
  }
}
