/* =====================================================
   FINCONTROL — ESTILOS GLOBAIS
   ===================================================== */
:root {
  /* Paleta Grana Control — navy #1A3C5E · verde #26BFA0 */
  --primary:        #26BFA0;
  --primary-dark:   #1A9E85;
  --primary-light:  #E6F7F4;
  --secondary:      #6B7280;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;
  --revenue-color:  #3B82F6;
  --expense-color:  #EF4444;
  --paid-color:     #10B981;

  --bg:             #F0F4F8;
  --bg-card:        #FFFFFF;
  --border:         #E2E8F0;
  --border-light:   #F1F5F9;
  --text:           #1A3C5E;
  --text-secondary: #4A6580;
  --text-muted:     #94A3B8;

  --sidebar-bg:     #1A3C5E;
  --sidebar-hover:  rgba(255,255,255,0.08);
  --sidebar-active: rgba(38,191,160,0.22);
  --sidebar-accent: #26BFA0;
  --sidebar-text:   #B8D0E8;
  --sidebar-width:  260px;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow:     0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.10), 0 4px 6px -2px rgba(0,0,0,0.05);

  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.2s ease;
  --header-h:   64px;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.hidden { display: none !important; }
.screen { min-height: 100vh; }

/* =====================================================
   TELA DE LOGIN
   ===================================================== */
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #ffffff;
  padding: 16px;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 40px 36px 32px;
  box-shadow: 0 4px 32px rgba(26,60,94,0.13);
  border: 1px solid var(--border);
  width: 100%;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-wrap {
  display: inline-block;
  margin-bottom: 12px;
}

.login-logo-img {
  width: 230px;
  height: auto;
  display: block;
}

.login-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.6;
}
.login-subtitle span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.login-page-footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.login-page-footer strong { color: var(--text-secondary); }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap input { width: 100%; padding-right: 40px; }
.btn-toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: 0.5; transition: opacity 0.2s;
}
.btn-toggle-pass:hover { opacity: 1; }

.login-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}
.login-hint code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--primary);
}

/* =====================================================
   TELA SELETOR DE EMPRESA
   ===================================================== */
#companySelectorScreen {
  background: linear-gradient(135deg, #0D2236 0%, #1A3C5E 50%, #1E5270 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.selector-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 32px;
}

.selector-logo {
  display: flex;
  align-items: center;
}

.selector-logo-img {
  height: 150px;
  width: auto;
  mix-blend-mode: screen; /* fundo preto some no fundo escuro */
}

.selector-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

.selector-body { text-align: center; padding-top: 20px; }
.selector-body h2 { font-size: 28px; font-weight: 700; color: #fff; }
.selector-body p  { color: rgba(255,255,255,0.7); margin-top: 8px; margin-bottom: 40px; }
.text-muted-light { color: rgba(255,255,255,0.65) !important; }

.company-cards-grid { width: 100%; }

.company-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.company-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
}
.company-list-item:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  transform: translateX(4px);
}
.company-list-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.company-list-body {
  flex: 1;
  min-width: 0;
}
.company-list-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.company-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12px;
  opacity: 0.8;
}
.company-list-arrow {
  font-size: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}

/* =====================================================
   LAYOUT PRINCIPAL
   ===================================================== */
#mainApp {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-logo-img {
  height: 120px;
  width: auto;
  flex: 1;
  object-fit: contain;
  mix-blend-mode: screen; /* fundo preto some no fundo dark da sidebar */
}
.sidebar-close {
  display: none;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.sidebar-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section { margin-bottom: 8px; }

.nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 400;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--sidebar-accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.btn-switch-company {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  font-size: 13px;
  transition: var(--transition);
}
.btn-switch-company:hover { background: var(--sidebar-hover); color: #fff; }

/* OVERLAY MOBILE */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
  backdrop-filter: blur(2px);
}

/* MAIN WRAPPER */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* HEADER */
.app-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

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

.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.burger-btn:hover { background: var(--bg); }
.burger-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
}

.company-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
}
.company-pill-icon { font-size: 13px; flex-shrink: 0; }
#headerCompanyName {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.user-badge { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1A3C5E, #26BFA0);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; line-height: 1.3; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--text-muted); }

.btn-logout {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-logout:hover { background: var(--danger-light); color: var(--danger); }

/* PAGE CONTENT */
.page-content {
  flex: 1;
  padding: 28px 28px 48px;
  overflow-x: hidden;
}

/* =====================================================
   COMPONENTES COMUNS
   ===================================================== */

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-actions { display: flex; align-items: center; gap: 10px; }

/* CARDS */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

.mt-4 { margin-top: 20px; }

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stats-compact { margin-bottom: 0; }

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
  font-size: 22px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 18px; font-weight: 700; color: var(--text); white-space: nowrap; }
.stat-sub   { font-size: 10px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stat-revenue .stat-icon  { background: var(--info-light); }
.stat-expense .stat-icon  { background: var(--danger-light); }
.stat-positive .stat-icon { background: var(--success-light); }
.stat-negative .stat-icon { background: var(--danger-light); }
.stat-available .stat-icon{ background: #F0FDF4; }
.stat-revenue  .stat-value { color: var(--info); }
.stat-expense  .stat-value { color: var(--danger); }
.stat-positive .stat-value { color: var(--success); }
.stat-negative .stat-value { color: var(--danger); }
.stat-available.stat-card .stat-value { color: var(--success); }

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* MINI LIST */
.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.mini-item:last-child { border-bottom: none; }
.mini-item:hover { background: var(--bg); }
.mini-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-item-desc { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item-date { font-size: 11px; color: var(--text-muted); }
.mini-item-value { font-size: 13px; font-weight: 700; flex-shrink: 0; margin-left: 12px; }
.mini-item.expense .mini-item-value { color: var(--expense-color); }
.mini-item.revenue .mini-item-value { color: var(--revenue-color); }
.mini-item.paid { opacity: 0.65; }

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  background: #FAFAFA;
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #FAFCFF; }

.table-sm th { padding: 8px 12px; }
.table-sm td { padding: 8px 12px; }

.actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

/* STATEMENT TABLE — compacto para evitar scroll lateral */
.table-statement { font-size: 12px; }
.table-statement th { padding: 8px 8px; font-size: 10px; }
.table-statement td { padding: 7px 8px; }
.table-statement .stmt-row.expense td:nth-child(7) { color: var(--expense-color); font-weight: 600; }
.table-statement .stmt-row.revenue td:nth-child(8) { color: var(--revenue-color); font-weight: 600; }
.table-statement .stmt-row.paid { background: #F0FDF4 !important; }
.table-statement .stmt-row.paid:hover td { background: #ECFDF5 !important; }
.table-statement .code-badge { font-size: 10px; padding: 1px 5px; }
.table-statement .status-badge { font-size: 10px; padding: 2px 7px; }
.table-statement .badge { font-size: 10px; padding: 2px 7px; }
.table-statement .btn-sm { padding: 3px 7px; font-size: 11px; }

/* PAID ROW */
.paid-row td { opacity: 0.7; }
.paid-row .status-badge { font-weight: 600; }

/* =====================================================
   FORMULÁRIOS
   ===================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.form-inline label { font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
  font-size: 13px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38,191,160,0.15);
}
input::placeholder { color: var(--text-muted); }
input.text-right { text-align: right; }

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.checkbox-item input[type="checkbox"] {
  width: auto;
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.filter-bar select, .filter-bar input { width: auto; min-width: 120px; }

/* INFO BOX */
.info-box {
  background: var(--info-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: #1E40AF;
  margin-top: 10px;
}

/* =====================================================
   BOTÕES
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(38,191,160,0.35);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover:not(:disabled) {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) { background: var(--bg); border-color: var(--text-secondary); }

.btn-link {
  background: none;
  color: var(--primary);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn-full { width: 100%; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success  { background: var(--success-light); color: #065F46; }
.badge-danger   { background: var(--danger-light);  color: #991B1B; }
.badge-warning  { background: var(--warning-light); color: #92400E; }
.badge-info     { background: var(--info-light);    color: #1E40AF; }
.badge-primary  { background: var(--primary-light); color: #0E6B58; }
.badge-secondary{ background: var(--bg);            color: var(--text-secondary); border: 1px solid var(--border); }
.badge-warning  { background: var(--warning-light); color: #92400E; }

/* STATUS BADGE */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.status-badge.paid    { background: var(--success-light); color: #065F46; }
.status-badge.pending { background: var(--warning-light); color: #92400E; }

/* CODE BADGE */
.code-badge {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}

/* =====================================================
   TOGGLE SWITCH
   ===================================================== */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-slider {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: var(--transition);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--success);
}
.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(18px);
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 760px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

@keyframes fadeIn  { from { opacity: 0; }    to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =====================================================
   TOAST
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  background: #1E293B;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { background: #065F46; }
.toast-error   { background: #991B1B; }
.toast-warning { background: #92400E; }
.toast-info    { background: #1E40AF; }
.toast-icon    { font-size: 16px; flex-shrink: 0; }

/* =====================================================
   ALERTAS
   ===================================================== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}
.alert-danger { background: var(--danger-light); color: #991B1B; border: 1px solid #FECACA; }

/* =====================================================
   TEXTO UTILITÁRIO
   ===================================================== */
.text-danger   { color: var(--danger) !important; }
.text-info     { color: var(--info) !important; }
.text-success  { color: var(--success) !important; }
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.fw-bold       { font-weight: 700 !important; }

/* =====================================================
   LOADING
   ===================================================== */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 14px;
}

/* =====================================================
   RODAPÉ
   ===================================================== */
.app-footer {
  text-align: center;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.app-footer strong { color: var(--text-secondary); }

/* Rodapé na tela do seletor de empresa */
.screen-footer {
  text-align: center;
  padding: 24px 16px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* =====================================================
   LOGS
   ===================================================== */
.logs-header-meta { font-size: 13px; color: var(--text-muted); align-self: center; }

/* EMPTY STATE BIG */
.empty-state-big {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.6);
}
.empty-state-big p { font-size: 16px; margin-bottom: 8px; }

/* =====================================================
   RESPONSIVO
   ===================================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .sidebar-close { display: flex; }
  .main-wrapper { margin-left: 0 !important; }
  .burger-btn { display: flex; }
  .user-info { display: none; }
}

@media (max-width: 640px) {
  .page-content { padding: 18px 16px 40px; }
  .app-header { padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .company-pill { max-width: 180px; font-size: 11px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 10px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 18px; padding-right: 18px; }
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: 100%; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-box { padding: 28px 20px; }
}

/* ── Filter toggle (Mês/Ano vs Período) ─────────────────────────── */
.filter-toggle {
  display: flex;
  gap: 2px;
  background: var(--border);
  border-radius: 6px;
  padding: 2px;
}
.flt-mode {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.flt-mode.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* ── Emotion card ───────────────────────────────────────────────── */
.stat-emotion {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid var(--border);
}

/* ── Warning info-box ───────────────────────────────────────────── */
.warning-box {
  background: #fff8e1 !important;
  border-left-color: #f59e0b !important;
  color: #92400e !important;
}

/* ── Overdue rows ───────────────────────────────────────────────── */
.overdue-row { background: #fff0f0 !important; }
.overdue-row td { color: #c0392b !important; }
.stmt-row.overdue { background: #fff0f0 !important; }
.stmt-row.overdue td { color: #c0392b !important; }
.mini-item.overdue { border-left: 3px solid #e74c3c !important; background: #fff5f5; }

/* =====================================================
   MODERNIZAÇÃO UI — GRANA CONTROL 2.0
   ===================================================== */

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

:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.15);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-gradient:  linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --neutral-gradient: linear-gradient(135deg, #64748b 0%, #475569 100%);
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  background: #f1f5f9;
}

/* ── Sidebar modernizado ────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.sidebar-brand {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 16px;
  margin-bottom: 8px;
}
.nav-item {
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity .2s;
}
.nav-item:hover::before { opacity: .15; }
.nav-item.active::before { opacity: 1; }
.nav-item a {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.nav-item.active a { font-weight: 600; }

/* ── Header modernizado ─────────────────────────────── */
.header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Botões modernizados ────────────────────────────── */
.btn {
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn:hover::after { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(37,99,235,.45); transform: translateY(-1px); }

.btn-success {
  background: var(--success-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(16,185,129,.4); transform: translateY(-1px); }

.btn-danger {
  background: var(--danger-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239,68,68,.4); transform: translateY(-1px); }

.btn-warning {
  background: var(--warning-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.btn-warning:hover { box-shadow: 0 4px 16px rgba(245,158,11,.4); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,.04);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* ── Inputs modernizados ────────────────────────────── */
.form-input, .form-select, input[type=text], input[type=email],
input[type=password], input[type=number], input[type=date],
select, textarea {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus, .form-select:focus, input[type=text]:focus,
input[type=email]:focus, input[type=password]:focus,
input[type=number]:focus, input[type=date]:focus,
select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-input[readonly], input[readonly] {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
label, .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
  display: block;
}

/* ── Cards modernizados ─────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,.04);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.card-body { padding: 20px; }

/* ── Stat cards modernizados ────────────────────────── */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-md);
  border: none;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.stat-income  { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-left: 4px solid #10b981; }
.stat-card.stat-expense { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-left: 4px solid #ef4444; }
.stat-card.stat-balance { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-left: 4px solid #2563eb; }
.stat-card.stat-emotion { background: linear-gradient(135deg, #fafafa 0%, #f1f5f9 100%); border-left: 4px solid #8b5cf6; }
.stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.stat-value { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub   { font-size: 10px; opacity: .6; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-icon  { font-size: 24px; margin-bottom: 4px; }

/* ── Tabelas modernizadas ───────────────────────────── */
.data-table {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
}
.data-table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  padding: 12px 14px;
  border-bottom: 2px solid #e2e8f0;
}
.data-table tbody tr {
  transition: background .12s;
  border-bottom: 1px solid #f8fafc;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 11px 14px; font-size: 13.5px; vertical-align: middle; }

/* ── Badges / Status modernizados ──────────────────── */
.badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-success, .status-paid   { background: #d1fae5; color: #065f46; }
.badge-danger,  .status-unpaid { background: #fee2e2; color: #991b1b; }
.badge-warning, .status-overdue{ background: #fef3c7; color: #92400e; }
.badge-info                     { background: #dbeafe; color: #1e40af; }
.badge-neutral                  { background: #f1f5f9; color: #475569; }

/* ── Modal modernizado ──────────────────────────────── */
.modal-backdrop {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(15,23,42,.5);
}
.modal-box {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,.8);
  padding: 0;
  overflow: hidden;
  max-width: 540px;
  width: calc(100% - 32px);
}
.modal-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Info boxes modernizadas ────────────────────────── */
.info-box {
  border-radius: var(--radius-sm);
  border-left-width: 4px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.warning-box {
  background: #fffbeb !important;
  border-left-color: #f59e0b !important;
  color: #78350f !important;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border-left-width: 4px;
}

/* ── Page header modernizado ────────────────────────── */
.page-header {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Filter bar modernizada ─────────────────────────── */
.filter-bar {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-toggle {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
.flt-mode {
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.flt-mode.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ── Total receitas/despesas ─────────────────────────── */
.tx-total-single {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 12px;
  margin-bottom: 10px;
}
.tx-total-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.tx-total-value {
  font-size: 14px;
  font-weight: 700;
}

/* ── Multi-select dropdown ───────────────────────────── */
.multiselect-wrap {
  position: relative;
  display: inline-block;
}
.multiselect-btn {
  white-space: nowrap;
}
.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 300;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}
.multiselect-dropdown.hidden { display: none; }
.multiselect-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
  white-space: nowrap;
  line-height: 1.3;
}
.multiselect-item:hover { background: var(--border-light); }
.multiselect-item input { cursor: pointer; accent-color: var(--primary); flex-shrink: 0; }

/* ── Toggle switch modernizado ──────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: var(--transition);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: #2563eb; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Mini list (dashboard) ──────────────────────────── */
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-item {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  transition: var(--transition);
}
.mini-item:hover { background: #f1f5f9; }
.mini-item.overdue {
  border-left: 3px solid #ef4444 !important;
  background: #fff5f5 !important;
}
.mini-item.overdue .mini-desc { color: #b91c1c; }

/* ── Overdue rows ───────────────────────────────────── */
.overdue-row { background: #fff5f5 !important; }
.overdue-row td { color: #b91c1c !important; }
.stmt-row.overdue { background: #fff5f5 !important; }
.stmt-row.overdue td { color: #b91c1c !important; }

/* ── Login/selector screen modernizada ─────────────── */
.login-box, .selector-box {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
}
.login-page, .selector-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  min-height: 100vh;
}

/* ── Avatar modernizado ─────────────────────────────── */
.user-avatar {
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  object-fit: cover;
}

/* ── Progress bar (category table) ─────────────────── */
.cat-bar-wrap {
  background: #f1f5f9;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  min-width: 80px;
}
.cat-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--primary-gradient);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* ── Scrollbar customizado ──────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Animação de entrada ────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .stat-card, .data-table {
  animation: fadeSlideIn .25s ease both;
}

/* ── Login info no header ───────────────────────────── */
.header-login-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(0,0,0,.08);
  line-height: 1.3;
}
.header-login-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  opacity: .7;
}
.header-login-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .header-login-info { display: none; }
}
