/* ============================================================
   Web Control — Design System v3 (Minimalista)
   ============================================================ */

:root {
  --sidebar-w:  256px;
  --topbar-h:   58px;

  /* Paleta */
  --brand:       #4f46e5;
  --brand-dark:  #4338ca;
  --brand-light: #eef2ff;

  --green:  #059669; --green-bg:  #ecfdf5;
  --amber:  #d97706; --amber-bg:  #fffbeb;
  --red:    #dc2626; --red-bg:    #fff1f2;
  --violet: #7c3aed; --violet-bg: #f5f3ff;

  /* Sidebar */
  --sb:      #18181b;
  --sb-text: #a1a1aa;
  --sb-line: rgba(255,255,255,.06);

  /* Superfície */
  --bg:      #f4f4f7;
  --surface: #ffffff;
  --border:  #e4e4e7;
  --border2: #f0f0f2;

  /* Texto */
  --t1: #18181b;
  --t2: #52525b;
  --t3: #a1a1aa;

  /* Forma */
  --r:   12px;
  --r-s: 8px;
  --r-x: 6px;

  /* Sombra */
  --sh0: 0 0 0 1px rgba(0,0,0,.04);
  --sh1: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh2: 0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--t1);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sb);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform .26s cubic-bezier(.4,0,.2,1);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sb-line);
  flex-shrink: 0;
}

.brand-icon {
  width: 38px; height: 38px;
  background: var(--brand);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}

.brand-name {
  display: block; font-size: 14px; font-weight: 700;
  color: #fafafa; letter-spacing: -.2px;
}
.brand-sub {
  display: block; font-size: 10px; font-weight: 500;
  color: #52525b; text-transform: uppercase; letter-spacing: .8px;
}

.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: #3f3f46;
  padding: 14px 8px 5px;
}

.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--r-s);
  color: var(--sb-text); font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 1px; position: relative;
}
.nav-link i { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.05); color: #e4e4e7; }
.nav-link.active {
  background: rgba(79,70,229,.2); color: #a5b4fc; font-weight: 600;
}
.nav-link.active i { color: #818cf8; }
.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 3px; background: #6366f1; border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 12px 14px; border-top: 1px solid var(--sb-line);
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.user-name {
  display: block; font-size: 12.5px; font-weight: 600; color: #d4d4d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { display: block; font-size: 11px; color: #52525b; }

.btn-logout {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 0;
  color: #52525b; transition: all .15s; flex-shrink: 0;
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: #f87171; }

/* ============================================================
   LAYOUT
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh; min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left .26s cubic-bezier(.4,0,.2,1);
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--sh0);
}

.sidebar-toggle {
  display: none; background: none; border: none; padding: 5px 6px;
  font-size: 20px; color: var(--t2); cursor: pointer;
  border-radius: var(--r-x); transition: background .12s; line-height: 1;
}
.sidebar-toggle:hover { background: var(--bg); }

.topbar-title {
  flex: 1; font-size: 13px; font-weight: 500; color: var(--t3);
}
.topbar-actions { display: flex; gap: 8px; }

.main-content { flex: 1; padding: 28px; width: 100%; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-title { font-size: 19px; font-weight: 700; color: var(--t1); letter-spacing: -.3px; }
.page-subtitle { font-size: 13px; color: var(--t3); margin-top: 2px; }

/* ============================================================
   STAT CARDS — minimalistas com borda colorida
   ============================================================ */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--sh1);
  transition: box-shadow .18s, transform .18s;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
}
.stat-card:hover { box-shadow: var(--sh2); transform: translateY(-1px); }

.stat-card-warning::before { background: var(--amber); }
.stat-card-danger::before  { background: var(--red); }
.stat-card-success::before { background: var(--green); }
.stat-card-primary::before { background: var(--brand); }

.stat-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-card-warning .stat-icon { background: var(--amber-bg);  color: var(--amber); }
.stat-card-danger  .stat-icon { background: var(--red-bg);    color: var(--red); }
.stat-card-success .stat-icon { background: var(--green-bg);  color: var(--green); }
.stat-card-primary .stat-icon { background: var(--brand-light); color: var(--brand); }

.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .6px; color: var(--t3); margin-bottom: 4px;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--t1); letter-spacing: -.4px; line-height: 1.1; }
.stat-count { font-size: 12px; color: var(--t3); margin-top: 3px; }

/* ============================================================
   CARDS
   ============================================================ */
.card-custom {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh1); overflow: hidden;
}
.card-header-custom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border2);
}
.card-header-title {
  font-size: 13.5px; font-weight: 600; color: var(--t1);
  display: flex; align-items: center; gap: 7px;
}
.card-header-title i { color: var(--brand); font-size: 14px; }

/* ============================================================
   TABELAS
   ============================================================ */
.table-custom { font-size: 13.5px; margin: 0; width: 100%; border-collapse: collapse; }
.table-custom thead th {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--t3); background: #fafafa;
  border-bottom: 1px solid var(--border); padding: 10px 16px; white-space: nowrap;
}
.table-custom tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border2);
  vertical-align: middle; color: var(--t1);
}
.table-custom tbody tr:last-child td { border-bottom: none; }
.table-custom tbody tr:hover td { background: #fafbff; }
.table-custom tfoot td {
  padding: 11px 16px; background: #fafafa;
  border-top: 1px solid var(--border); font-size: 13.5px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11.5px; font-weight: 600;
}
.badge-status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.badge-pendente  { background: var(--amber-bg);  color: #92400e; }
.badge-pendente::before  { background: var(--amber); }
.badge-paga      { background: var(--green-bg);  color: #065f46; }
.badge-paga::before      { background: var(--green); }
.badge-vencida   { background: var(--red-bg);    color: #7f1d1d; }
.badge-vencida::before   { background: var(--red); }
.badge-cancelada { background: #f4f4f5; color: #71717a; }
.badge-cancelada::before { background: #9ca3af; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: 13.5px; line-height: 1;
  border-radius: var(--r-s); padding: 8px 14px;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}

.btn-primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(79,70,229,.2);
}
.btn-primary:hover {
  background: var(--brand-dark); border-color: var(--brand-dark); color: #fff;
  box-shadow: 0 3px 8px rgba(79,70,229,.3); transform: translateY(-1px);
}
.btn-primary:active { transform: none; }

.btn-success {
  background: var(--green); color: #fff; border-color: var(--green);
}
.btn-success:hover {
  background: #047857; border-color: #047857; color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent; color: var(--t2); border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--t1); }

.btn-outline-primary {
  background: transparent; color: var(--brand); border-color: var(--brand);
}
.btn-outline-primary:hover {
  background: var(--brand-light); color: var(--brand-dark);
}

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

.btn-outline-warning { background: transparent; color: var(--amber); border-color: var(--amber); }
.btn-outline-warning:hover { background: var(--amber-bg); }
.btn-outline-success { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline-success:hover { background: var(--green-bg); }
.btn-outline-danger  { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-danger:hover  { background: var(--red-bg); }

.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-xs { padding: 4px 8px;  font-size: 12px; border-radius: var(--r-x); gap: 4px; }

.btn-login {
  padding: 12px; font-size: 14px; font-weight: 600;
  border-radius: 10px; width: 100%; justify-content: center;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-control, .form-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  padding: 9px 12px;
  font-size: 13.5px; color: var(--t1);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none; appearance: none;
}
.form-control::placeholder { color: var(--t3); }
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-control[readonly] { background: var(--bg); cursor: default; }

.form-label, .field-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--t2); margin-bottom: 6px; letter-spacing: .1px;
}
.req { color: var(--red); margin-left: 2px; }

.input-group-text {
  background: var(--bg); border: 1px solid var(--border);
  border-right: none; border-radius: var(--r-s) 0 0 var(--r-s);
  padding: 9px 11px; font-size: 13.5px; color: var(--t3);
}
.input-group .form-control { border-radius: 0 var(--r-s) var(--r-s) 0; }

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* ============================================================
   FORM SECTIONS (grupos visuais no formulário)
   ============================================================ */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh1);
  overflow: hidden;
}

.form-section-header {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border2);
  background: #fafafa;
  font-size: 13px; font-weight: 600; color: var(--t1);
}
.form-section-header i { color: var(--brand); font-size: 15px; }
.form-section-hint { font-size: 12px; font-weight: 400; color: var(--t3); margin-left: 4px; }

.form-section-body { padding: 18px; }

.field-group { display: flex; flex-direction: column; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.field-hint  { font-size: 12px; color: var(--t3); margin-top: 4px; }
.field-hint-ok { color: var(--green) !important; }

/* Input com ícone de loading */
.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-right: 36px; }
.input-spinner {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--t3);
  display: flex; align-items: center;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .7s linear infinite; }

/* Toggle de checkbox */
.toggle-label {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
}
.toggle-label .form-check-input {
  width: 36px; height: 20px; border-radius: 20px;
  cursor: pointer; flex-shrink: 0; margin-top: 2px;
}
.toggle-text strong { display: block; font-size: 13.5px; color: var(--t1); }
.toggle-text small  { font-size: 12px; color: var(--t3); }

.form-actions { display: flex; gap: 8px; align-items: center; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; color: var(--t3);
}
.empty-state i { font-size: 44px; margin-bottom: 12px; opacity: .25; }
.empty-state p  { font-size: 14px; color: var(--t2); margin: 0; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; color: var(--t3); margin-bottom: 3px;
}
.detail-value { display: block; font-size: 14px; color: var(--t1); }

.status-banner {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px; border-radius: var(--r);
  font-size: 13.5px; font-weight: 500; border-left: 4px solid transparent;
}
.status-banner i { font-size: 16px; }
.status-banner-success  { background: var(--green-bg); color: #065f46; border-color: var(--green); }
.status-banner-danger   { background: var(--red-bg);   color: #7f1d1d; border-color: var(--red); }
.status-banner-warning  { background: var(--amber-bg); color: #92400e; border-color: var(--amber); }
.status-banner-secondary{ background: #f4f4f5; color: #52525b; border-color: #d4d4d8; }

.finance-summary { display: flex; flex-direction: column; gap: 11px; }
.finance-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--t2); }
.finance-row span:last-child { color: var(--t1); font-weight: 500; }
.finance-divider { height: 1px; background: var(--border2); }
.finance-total { font-size: 15px; font-weight: 600; }

/* ============================================================
   ALERTAS
   ============================================================ */
.messages-container { margin-bottom: 20px; }
.alert {
  border-radius: var(--r-s); border: none; font-size: 13.5px; font-weight: 500;
  border-left: 4px solid transparent; padding: 11px 14px;
}
.alert-success { background: var(--green-bg); color: #065f46; border-color: var(--green); }
.alert-danger,
.alert-error   { background: var(--red-bg);   color: #7f1d1d; border-color: var(--red); }
.alert-warning { background: var(--amber-bg); color: #92400e; border-color: var(--amber); }
.alert-info    { background: var(--brand-light); color: #3730a3; border-color: var(--brand); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-body { background: #0f0e1a; min-height: 100vh; }
.login-wrapper { display: flex; min-height: 100vh; }

.login-left {
  flex: 1; padding: 56px;
  background: linear-gradient(145deg, #1a1740 0%, #251e5c 50%, #1a1740 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(79,70,229,.2) 0%, transparent 65%);
  top: -120px; right: -100px;
}
.login-left::after {
  content: ''; position: absolute;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(79,70,229,.12) 0%, transparent 65%);
  bottom: -80px; left: -60px;
}
.login-left-content { position: relative; z-index: 1; max-width: 440px; }

.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 44px; }
.login-brand i { font-size: 28px; color: #818cf8; }
.login-brand span { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }

.login-headline { font-size: 38px; font-weight: 800; color: #e0e7ff; line-height: 1.2; margin-bottom: 16px; letter-spacing: -.5px; }
.login-headline span { color: #a5b4fc; }

.login-desc { font-size: 15px; color: #6b7db3; margin-bottom: 36px; line-height: 1.65; }

.login-features { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #6b7db3; }
.login-features li i { color: #34d399; font-size: 15px; flex-shrink: 0; }

.login-right {
  width: 480px; min-width: 480px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 48px 44px;
}
.login-card { width: 100%; max-width: 380px; }
.login-card-header { text-align: center; margin-bottom: 32px; }
.login-icon {
  width: 62px; height: 62px;
  background: var(--brand-light); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--brand); margin: 0 auto 16px;
}
.login-card-header h2 { font-size: 21px; font-weight: 700; color: var(--t1); margin-bottom: 5px; letter-spacing: -.3px; }
.login-card-header p  { font-size: 14px; color: var(--t2); }

/* ============================================================
   NOTIFICAÇÕES
   ============================================================ */
.notif-wrap { position: relative; }

.notif-btn {
  width: 36px; height: 36px; border-radius: var(--r-s);
  background: none; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--t2); cursor: pointer;
  transition: all .15s; position: relative;
}
.notif-btn:hover { background: var(--bg); color: var(--t1); }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff;
  border-radius: 100px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--sh2); z-index: 300;
  display: none; flex-direction: column;
  overflow: hidden;
}
.notif-dropdown.open { display: flex; }

.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border2);
  font-size: 13px; font-weight: 600; color: var(--t1);
}
.notif-count-label { font-size: 11px; font-weight: 500; color: var(--t3); }

.notif-body { max-height: 320px; overflow-y: auto; }

.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border2);
  transition: background .12s; cursor: pointer; color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }

.notif-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.notif-vencida  .notif-icon { background: var(--red-bg);   color: var(--red); }
.notif-a_vencer .notif-icon { background: var(--amber-bg); color: var(--amber); }

.notif-title {
  font-size: 13px; font-weight: 500; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
.notif-sub { font-size: 11.5px; color: var(--t3); margin: 2px 0 0; }
.notif-info { min-width: 0; flex: 1; }

.notif-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 16px; color: var(--t3);
}
.notif-empty i { font-size: 28px; margin-bottom: 8px; color: var(--green); }
.notif-empty p  { font-size: 13px; margin: 0; color: var(--t2); }

.notif-footer {
  padding: 10px 16px; border-top: 1px solid var(--border2);
  text-align: center;
}
.notif-footer a { font-size: 12.5px; color: var(--brand); font-weight: 500; }
.notif-footer a:hover { text-decoration: underline; }

/* ============================================================
   FILTER BAR — barra de busca moderna
   ============================================================ */
.filter-bar { }

.filter-bar-inner {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 6px 10px;
  box-shadow: var(--sh0);
}

.filter-bar-wide { flex-wrap: wrap; }

.search-field {
  flex: 1; display: flex; align-items: center; gap: 8px;
  min-width: 180px;
}

.search-icon { font-size: 14px; color: var(--t3); flex-shrink: 0; }

.search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 13.5px; color: var(--t1); padding: 4px 0;
  font-family: inherit;
}
.search-input::placeholder { color: var(--t3); }

.search-clear {
  color: var(--t3); font-size: 12px; padding: 2px 4px;
  border-radius: 4px; transition: color .12s;
}
.search-clear:hover { color: var(--t1); }

.filter-divider {
  width: 1px; height: 20px; background: var(--border); flex-shrink: 0;
}

.filter-select {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--t2); cursor: pointer;
  padding: 4px 6px; border-radius: var(--r-x);
  font-family: inherit;
}
.filter-select:focus { background: var(--bg); }

.filter-date {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--t2); cursor: pointer;
  padding: 4px 6px; border-radius: var(--r-x);
  font-family: inherit;
}

/* ============================================================
   INPUT EXTRAS (prefix, suffix, action)
   ============================================================ */
.input-prefix, .input-suffix {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r-s); overflow: hidden;
}
.input-prefix span, .input-suffix span {
  padding: 9px 10px; background: var(--bg); color: var(--t3);
  font-size: 13px; flex-shrink: 0; white-space: nowrap;
}
.input-prefix .form-control, .input-suffix .form-control {
  border: none; border-radius: 0; box-shadow: none; flex: 1;
}
.input-prefix .form-control:focus, .input-suffix .form-control:focus {
  box-shadow: none; border-color: transparent;
}
.input-prefix:focus-within, .input-suffix:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.input-action {
  display: flex; align-items: stretch; gap: 6px;
}
.input-action .form-control { flex: 1; }
.btn-lookup {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-s); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--brand); transition: all .15s;
}
.btn-lookup:hover { background: var(--brand-light); border-color: var(--brand); }
.btn-lookup:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   SECTION DIVIDER LABEL
   ============================================================ */
.section-divider-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: var(--t3);
  padding-bottom: 4px; border-bottom: 1px solid var(--border2);
  width: 100%;
}

/* util */
.text-sm { font-size: 12.5px; }
.link-dark { color: var(--t1); }
.link-dark:hover { color: var(--brand); }
.font-monospace { font-family: ui-monospace, monospace; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .main-content { padding: 20px; }
}

@media (max-width: 767px) {
  .main-content { padding: 14px; }
  .page-title { font-size: 17px; }
  .stat-card { padding: 15px 13px; gap: 11px; }
  .stat-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 9px; }
  .stat-value { font-size: 19px; }
  .stat-label { font-size: 10px; }
  .login-left { display: none; }
  .login-right { width: 100%; min-width: 0; padding: 36px 24px; }
  .table-custom thead th, .table-custom tbody td { padding: 9px 12px; }
}

@media (max-width: 479px) {
  .main-content { padding: 10px; }
  .topbar { padding: 0 12px; }
  .form-section-body { padding: 14px; }
}

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

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #d4d4d8; }
