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

/* ═══════════════════════════════════════════════════════
   VARIÁVEIS — Apple / Linear / Notion premium
═══════════════════════════════════════════════════════ */
:root {
  /* Marca */
  --primary:        #25B497;
  --primary-light:  rgba(37,180,151,.10);
  --primary-dark:   #1d9980;

  /* Superfícies */
  --bg:             #F5F5F7;   /* cinza Apple */
  --surface:        #FFFFFF;
  --surface-2:      #F9F9FB;
  --border:         rgba(0,0,0,.08);
  --border-strong:  rgba(0,0,0,.13);

  /* Sidebar */
  --sidebar-bg:     #FFFFFF;
  --sidebar-border: #E5E7EB;
  --sidebar-width:  224px;

  /* Texto */
  --text-main:      #1D1D1F;
  --text-muted:     #86868B;
  --text-light:     #AEAEB2;

  /* Status — Apple HIG */
  --green:          #34C759;
  --red:            #FF3B30;
  --orange:         #FF9500;
  --blue:           #007AFF;
  --purple:         #AF52DE;

  --success-bg:     #F0FDF4; --success-text: #15803D;
  --danger-bg:      #FFF1F0; --danger-text:  #D93025;
  --warning-bg:     #FFFBEB; --warning-text: #B45309;
  --info-bg:        #EFF6FF; --info-text:    #1D4ED8;
  --neutral-bg:     #F4F4F5; --neutral-text: #52525B;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 16px 48px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12), 0 32px 64px rgba(0,0,0,.10);

  /* Transição padrão */
  --transition: all .2s ease;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { flex-shrink: 0; }

/* Números tabulares para moeda */
.tabular { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
  display: block;
}

.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-value { height: 40px; width: 80%; margin-bottom: 6px; }
.skeleton-sub   { height: 12px; width: 45%; }
.skeleton-row   { height: 48px; margin-bottom: 4px; border-radius: var(--radius); }

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

/* ═══════════════════════════════════════════════════════
   SIDEBAR — light theme
═══════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
  box-shadow: 1px 0 0 var(--sidebar-border);
}

/* Scrollbar sidebar invisível */
.sidebar::-webkit-scrollbar { width: 0; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo img {
  width: 148px;
  height: auto;
  display: block;
}

/* Compatibilidade: ocultar elementos antigos se existirem */
.sidebar-logo-icon,
.sidebar-logo-text { display: none; }

/* Nav */
.sidebar-nav { flex: 1; padding: 10px 0 8px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 0; }
.nav-group { margin-bottom: 4px; }

.nav-group-label {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9CA3AF;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: #374151;
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
  font-family: inherit;
  line-height: 1;
  min-height: 36px;
  box-shadow: inset 3px 0 0 transparent;
}
.nav-item svg { width: 15px; height: 15px; stroke: currentColor; flex-shrink: 0; }
.nav-item:hover {
  background: #F9FAFB;
  color: #111827;
  text-decoration: none;
}
.nav-item.active {
  color: var(--primary);
  background: #F0FDF9;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

/* Footer */
.sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-footer .nav-item { color: #6B7280; }
.sidebar-footer .nav-item:hover { color: #EF4444; background: #FEF2F2; }

/* Overlay mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ═══════════════════════════════════════════════════════
   TOPBAR (MOBILE)
═══════════════════════════════════════════════════════ */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  align-items: center;
  justify-content: space-between;
}

.topbar-toggle,
.topbar-action {
  width: 44px; height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.topbar-toggle:hover,
.topbar-action:hover { background: var(--bg); }
.topbar-toggle svg,
.topbar-action svg { width: 20px; height: 20px; stroke: currentColor; }

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -.2px;
}

/* ═══════════════════════════════════════════════════════
   CONTEÚDO PRINCIPAL
═══════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* Page header (desktop) */
.page-header {
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.4px;
}

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

.page-header-left { display: flex; align-items: center; gap: 12px; }
.page-header-actions { display: flex; align-items: center; gap: 8px; }

.page-body { padding: 28px 32px; flex: 1; }

/* ═══════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -.1px;
}

.card-body { padding: 20px; }

/* Metric cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════
   BARRA DE PROGRESSO
═══════════════════════════════════════════════════════ */
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════
   TABELAS
═══════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-main);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

/* ═══════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .1px;
}

.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-text);  }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-info    { background: var(--info-bg);    color: var(--info-text);    }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral-text); }
.badge-primary { background: rgba(37,180,151,.1); color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.1px;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active { transform: scale(.97); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(37,180,151,.30);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(37,180,151,.40);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--text-main); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

.btn-sm { padding: 5px 10px; font-size: 12px; min-height: 28px; }
.btn-sm svg { width: 12px; height: 12px; }

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
  border-color: var(--border);
  background: transparent;
  color: var(--text-muted);
  min-height: 32px;
  min-width: 32px;
  justify-content: center;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text-main); }
.btn-icon svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════
   FORMULÁRIOS
═══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--surface);
  outline: none;
  transition: var(--transition);
  line-height: 1.5;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,180,151,.12);
}

input::placeholder { color: var(--text-light); }
textarea { resize: vertical; min-height: 72px; }
select { cursor: pointer; }

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

/* Input com ícone */
.input-wrapper { position: relative; }
.input-wrapper svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--text-light);
  pointer-events: none;
}
.input-wrapper input { padding-left: 36px; }

/* Filtros */
.filters-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filters-bar input,
.filters-bar select { width: auto; min-width: 0; }
.filters-bar .search-input { min-width: 220px; }

/* ═══════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  opacity: 0;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-main); letter-spacing: -.2px; }

.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--surface-2);
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-main); }
.modal-close svg { width: 15px; height: 15px; }

.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   TOAST — slide-up premium
═══════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-md);
  pointer-events: all;
  animation: toastSlideUp .28s cubic-bezier(.34,1.56,.64,1) forwards;
  max-width: 360px;
  min-width: 240px;
  line-height: 1.4;
}
.toast.hiding {
  animation: toastFadeOut .2s ease forwards;
}

.toast svg { width: 16px; height: 16px; flex-shrink: 0; stroke: #fff; }
.toast-close {
  width: 20px; height: 20px;
  background: rgba(255,255,255,.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-left: 4px;
  color: #fff;
}
.toast-close svg { width: 10px; height: 10px; }
.toast-msg { flex: 1; }

.toast-sucesso { background: #1D7A5C; }
.toast-erro    { background: var(--red); }
.toast-aviso   { background: var(--orange); }
.toast-info    { background: var(--blue); }

@keyframes toastSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes toastFadeOut {
  from { transform: translateY(0);   opacity: 1; }
  to   { transform: translateY(8px); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   BANNER OFFLINE
═══════════════════════════════════════════════════════ */
#offline-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--orange);
  color: #fff;
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
#offline-banner.visible { display: flex; }

/* ═══════════════════════════════════════════════════════
   ESTADO VAZIO
═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-icon {
  width: 40px; height: 40px;
  stroke: var(--text-light);
  margin: 0 auto 12px;
  display: block;
}
.empty-state p { font-size: 14px; color: var(--text-light); }

/* ═══════════════════════════════════════════════════════
   BACK LINK
═══════════════════════════════════════════════════════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}
.back-link svg { width: 14px; height: 14px; }
.back-link:hover { color: var(--primary); text-decoration: none; }

/* ═══════════════════════════════════════════════════════
   SECTION TITLE
═══════════════════════════════════════════════════════ */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -.1px;
}

/* ═══════════════════════════════════════════════════════
   ALERTAS
═══════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-danger  { background: var(--danger-bg);  color: var(--danger-text);  border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid #fde68a; }
.alert-info    { background: var(--info-bg);    color: var(--info-text);    border: 1px solid #bfdbfe; }
.alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid #bbf7d0; }

/* ── Compat: alert-danger legacy ── */
.alert-danger.legacy { display: flex; align-items: center; }

/* ═══════════════════════════════════════════════════════
   CARDS DE AÇÃO (Dashboard "Para fazer agora")
═══════════════════════════════════════════════════════ */
.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.action-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.action-card.orange { border-left-color: var(--orange); }
.action-card.blue   { border-left-color: var(--blue); }
.action-card.green  { border-left-color: var(--green); }

.action-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.action-card-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}
.action-card-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════
   PREVISÃO DO MÊS
═══════════════════════════════════════════════════════ */
.previsao-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  gap: 8px;
}
.previsao-linha:last-child { border-bottom: none; }
.previsao-linha.total {
  font-weight: 700;
  font-size: 15px;
  border-top: 2px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
}
.previsao-desc { color: var(--text-main); }
.previsao-data { font-size: 11px; color: var(--text-muted); }
.previsao-val  { font-weight: 600; font-variant-numeric: tabular-nums; }
.previsao-val.neg { color: var(--danger-text); }
.previsao-val.pos { color: var(--success-text); }
.previsao-secao {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 14px 0 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2px;
}

/* ── Previsão 3-cards ─────────────────────────────────── */
.previsao-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.previsao-titulo-sec {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.previsao-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prev-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.prev-card-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.prev-resumo-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
}
.prev-resumo-label { font-size: 13px; color: var(--text-muted); }
.prev-resumo-val   { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prev-progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0 5px;
}
.prev-progress-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.prev-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.prev-footer {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 14px;
}

/* Card 2 — lista de despesas */
.desp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.desp-item:last-of-type { border-bottom: none; }
.desp-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.desp-icon i { width: 14px; height: 14px; }
.desp-info { flex: 1; min-width: 0; }
.desp-nome { font-size: 13px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desp-sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.desp-right { text-align: right; flex-shrink: 0; }
.desp-val  { font-size: 13px; font-weight: 700; color: var(--danger-text); font-variant-numeric: tabular-nums; }
.desp-dia  { font-size: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--text-muted); margin-top: 3px; display: inline-block; }

/* Card 3 — resultado */
.prev-resultado-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  margin: 8px 0 4px;
}
.prev-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: #0A0A0B;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #161618;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.login-logo-icon svg { width: 26px; height: 26px; stroke: #fff; }
.login-logo h1 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; letter-spacing: -.3px; }
.login-logo p  { font-size: 13px; color: rgba(255,255,255,.35); }

.login-card label { color: rgba(255,255,255,.5); font-size: 11.5px; letter-spacing: .5px; }

.login-card input[type="email"],
.login-card input[type="password"] {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: #fff;
}
.login-card input::placeholder { color: rgba(255,255,255,.2); }
.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,180,151,.15);
}

.login-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.login-toggle-row label { color: rgba(255,255,255,.45); font-size: 13px; cursor: pointer; margin: 0; letter-spacing: 0; text-transform: none; }

/* Toggle switch */
.toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-track {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: rgba(255,255,255,.4);
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform .2s, background .2s;
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); background: #fff; }

.login-btn {
  width: 100%;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
}
.login-btn:hover { background: var(--primary-dark); }

.login-error {
  background: rgba(255,59,48,.12);
  color: #FF6B6B;
  border: 1px solid rgba(255,59,48,.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-error.visible { display: flex; align-items: center; gap: 8px; }
.login-error svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   KANBAN
═══════════════════════════════════════════════════════ */
.kanban-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; align-items: start; }

.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.kanban-col.drop-target { background: rgba(37,180,151,.05); border-color: var(--primary); }

.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.kanban-col-title {
  font-size: 13px; font-weight: 600; color: var(--text-main);
  display: flex; align-items: center; gap: 7px;
}
.kanban-col-title svg { width: 14px; height: 14px; }

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card-title { font-size: 13.5px; font-weight: 500; color: var(--text-main); margin-bottom: 8px; line-height: 1.4; }
.kanban-card-meta  { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.kanban-card-actions { display: flex; gap: 6px; }
.kanban-card-actions .btn { flex: 1; justify-content: center; }

/* ═══════════════════════════════════════════════════════
   ROTINA
═══════════════════════════════════════════════════════ */
.tipo-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.tipo-desenvolvimento { background: var(--info-bg);    color: var(--info-text); }
.tipo-atendimento     { background: var(--success-bg); color: var(--success-text); }
.tipo-financeiro      { background: var(--warning-bg); color: var(--warning-text); }
.tipo-marketing       { background: #fdf4ff;           color: #9333ea; }
.tipo-admin           { background: var(--neutral-bg); color: var(--neutral-text); }

.rotina-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.rotina-item:last-child { border-bottom: none; }
.rotina-item.atrasada .rotina-titulo { color: var(--danger-text); }
.rotina-item.concluida .rotina-titulo { text-decoration: line-through; color: var(--text-light); }

.rotina-check {
  width: 17px; height: 17px;
  accent-color: var(--primary);
  cursor: pointer; flex-shrink: 0; margin-top: 2px;
}
.rotina-info { flex: 1; min-width: 0; }
.rotina-titulo { font-size: 13.5px; font-weight: 500; color: var(--text-main); }
.rotina-meta   { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rotina-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.plano-bloco { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plano-bloco:last-child { border-bottom: none; }
.plano-hora  { width: 100px; font-size: 12px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; padding-top: 2px; }
.plano-desc  { flex: 1; }
.plano-titulo { font-size: 13.5px; font-weight: 500; }

.academia-seletor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.academia-label { font-size: 13.5px; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 7px; }
.academia-label svg { width: 16px; height: 16px; stroke: var(--primary); }
.academia-options { display: flex; gap: 8px; flex-wrap: wrap; }
.academia-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border-strong);
  background: none; cursor: pointer; font-size: 13px; font-family: inherit;
  color: var(--text-muted); transition: var(--transition);
}
.academia-btn:hover { border-color: var(--primary); color: var(--primary); }
.academia-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   PROJETO / CLIENTE LOBBY
═══════════════════════════════════════════════════════ */
.lobby-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }

.checklist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.checklist-label { flex: 1; font-size: 13.5px; }
.checklist-label.done { text-decoration: line-through; color: var(--text-light); }

.credencial-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px;
}
.credencial-item:last-child { border-bottom: none; }
.credencial-service { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.credencial-field   { font-size: 12px; color: var(--text-muted); font-family: 'SF Mono','Fira Code',monospace; }
.credencial-actions { display: flex; gap: 4px; flex-shrink: 0; }

.historico-item { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.historico-item:last-child { border-bottom: none; }
.historico-time { font-size: 11px; color: var(--text-light); }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-row  { display: flex; justify-content: space-between; font-size: 13px; }
.info-row-label { color: var(--text-muted); }
.info-row-value { font-weight: 500; color: var(--text-main); text-align: right; }

/* ═══════════════════════════════════════════════════════
   LEMBRETES
═══════════════════════════════════════════════════════ */
.lembrete-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.lembrete-item:last-child { border-bottom: none; }
.lembrete-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.lembrete-texto { flex: 1; font-size: 13.5px; }
.lembrete-texto.done { text-decoration: line-through; color: var(--text-light); }
.lembrete-data { font-size: 12px; color: var(--text-light); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   PLANEJAMENTO — CALENDÁRIO
═══════════════════════════════════════════════════════ */
.cal-grid   { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.cal-header { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; margin-bottom: 6px; }
.cal-header-cell { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-light); padding: 4px 0; }
.cal-day {
  padding: 8px 4px; text-align: center; font-size: 13px;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; transition: var(--transition); line-height: 1;
}
.cal-day:hover { background: var(--surface-2); border-color: var(--border); }
.cal-day.hoje { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day.tem-evento:not(.hoje) { border-color: var(--primary); color: var(--primary); font-weight: 500; }
.cal-day.fim-semana:not(.hoje) { color: var(--text-light); }
.cal-day.outro-mes { color: var(--text-light); cursor: default; opacity: .4; }
.cal-day.outro-mes:hover { background: none; border-color: transparent; }

.evento-item {
  padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 6px;
  font-size: 13px; border-left: 3px solid var(--primary);
  background: rgba(37,180,151,.05); color: var(--text-main);
}

/* Gráfico de barras simples */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.bar-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-chart-bar { width: 100%; background: #bfdbfe; border-radius: 4px 4px 0 0; min-height: 4px; transition: height .4s; }
.bar-chart-bar.atual { background: var(--primary); }
.bar-chart-val { font-size: 10px; color: var(--text-muted); }
.bar-chart-labels { display: flex; gap: 6px; margin-top: 5px; }
.bar-chart-label { flex: 1; text-align: center; font-size: 10.5px; color: var(--text-light); }
.bar-chart-label.atual { color: var(--primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   SCROLLBAR CUSTOMIZADA
═══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-width: 240px; }

  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { display: flex; }
  .page-header { display: none; }
  .page-body { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .kanban-grid { grid-template-columns: 1fr; }
  .lobby-grid { grid-template-columns: 1fr; }
  .filters-bar .search-input { min-width: 0; flex: 1; }

  /* Touch targets mínimo 44px */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .btn-icon { min-height: 44px; min-width: 44px; }

  /* Tabelas viram cards no mobile */
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    padding: 12px;
    box-shadow: var(--shadow-xs);
  }
  tbody td {
    border: none;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
  }
  tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
  }
  tbody tr:hover td { background: none; }

  #toast-container { bottom: 16px; right: 12px; left: 12px; align-items: stretch; }
  .toast { min-width: 0; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .modal { max-height: calc(100vh - 20px); }
  .login-card { padding: 28px 22px; }
  .page-body { padding: 12px; }
}

/* ═══════════════════════════════════════════════════════
   BOTTOM NAVIGATION BAR (mobile ≤768px)
═══════════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  z-index: 400;
  padding: 0 4px;
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9CA3AF;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 2px;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg { width: 20px; height: 20px; stroke: currentColor; }
.bottom-nav-item:hover { color: var(--primary); text-decoration: none; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { stroke: var(--primary); }

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  .main-content { padding-bottom: 60px; }
  #toast-container { bottom: 72px; }
}

/* ═══════════════════════════════════════════════════════
   FLOATING ACTION BUTTON
═══════════════════════════════════════════════════════ */
.fab {
  display: none;
  position: fixed;
  bottom: 76px;
  right: 20px;
  width: 52px; height: 52px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,180,151,.4);
  z-index: 390;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(.92); }
.fab:hover  { box-shadow: 0 6px 20px rgba(37,180,151,.5); }
.fab svg { width: 22px; height: 22px; stroke: #fff; }

@media (max-width: 768px) {
  .fab { display: flex; }
}

/* ═══════════════════════════════════════════════════════
   STATUS ONLINE / OFFLINE (topbar dot)
═══════════════════════════════════════════════════════ */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.online {
  background: #34C759;
  box-shadow: 0 0 0 0 rgba(52,199,89,.5);
  animation: pulse-online 2s infinite;
}
.status-dot.offline {
  background: #9CA3AF;
}
@keyframes pulse-online {
  0%   { box-shadow: 0 0 0 0 rgba(52,199,89,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(52,199,89,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); }
}

/* ═══════════════════════════════════════════════════════
   GLOBAL SEARCH — Spotlight / Linear style
═══════════════════════════════════════════════════════ */
#global-search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 800;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
#global-search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#global-search-box {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
  width: 100%;
  max-width: 560px;
  margin: 0 16px;
  overflow: hidden;
  transform: translateY(-12px) scale(.97);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
#global-search-overlay.open #global-search-box {
  transform: translateY(0) scale(1);
}

#global-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
#global-search-input-wrap svg { width: 18px; height: 18px; stroke: var(--text-muted); flex-shrink: 0; }

#global-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
  padding: 0;
  width: 100%;
}
#global-search-input::placeholder { color: var(--text-light); }

#global-search-kbd {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  cursor: pointer;
}

#global-search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 0;
}

.search-group-label {
  padding: 6px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background .1s;
  text-decoration: none;
  color: var(--text-main);
}
.search-result-item:hover,
.search-result-item.focused {
  background: var(--surface-2);
  text-decoration: none;
}
.search-result-icon {
  width: 32px; height: 32px;
  background: var(--surface-2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-result-icon svg { width: 14px; height: 14px; stroke: var(--text-muted); }
.search-result-name { font-size: 13.5px; font-weight: 500; }
.search-result-sub  { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

#global-search-empty {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
  font-size: 13.5px;
}

#global-search-footer {
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: center;
}
.search-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.search-hint kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 32px;
}
.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.2px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-title svg { width: 16px; height: 16px; stroke: var(--primary); }

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-label { font-size: 13.5px; color: var(--text-main); }
.settings-toggle-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch reutilizável (light mode) */
.sw-toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.sw-toggle input { display: none; }
.sw-track {
  position: absolute; inset: 0;
  background: #D1D5DB;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}
.sw-track::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.sw-toggle input:checked + .sw-track { background: var(--primary); }
.sw-toggle input:checked + .sw-track::after { transform: translateX(18px); }
