/* ============================================================
   Club El Jordan — App Styles
   Paleta oficial: #0155C8 #2B97F0 #84E3FF #E20217 #A80236 #FDB616 #FFF05E
   ============================================================ */

:root {
  /* Club palette */
  --club-blue-dark:  #0155C8;
  --club-blue-mid:   #2B97F0;
  --club-blue-light: #84E3FF;
  --club-red:        #E20217;
  --club-red-dark:   #A80236;
  --club-gold:       #FDB616;
  --club-gold-light: #FFF05E;

  /* App tokens */
  --primary:       #0C2461;   /* Navy profundo para sidebar */
  --primary-mid:   #0155C8;
  --accent:        #2B97F0;
  --gold:          #FDB616;
  --gold-light:    #FFF05E;
  --success:       #16a34a;
  --danger:        #E20217;
  --danger-dark:   #A80236;
  --warning:       #e07b00;
  --info:          #2B97F0;

  --sidebar-w:     250px;
  --topbar-h:      58px;
  --bg:            #f0f4f8;
  --card:          #ffffff;
  --text:          #1a2744;
  --text-muted:    #5a6a8a;
  --border:        #dde4ef;
  --radius:        10px;
  --shadow:        0 1px 4px rgba(1,85,200,.08), 0 1px 2px rgba(1,85,200,.05);
  --shadow-lg:     0 6px 24px rgba(1,85,200,.15);
  --transition:    all .2s ease;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ====== SIDEBAR ====== */
#sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(175deg, #0C2461 0%, #0A1F56 60%, #061340 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo area */
#sidebar .sidebar-logo {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(253,182,22,.15);
  flex-shrink: 0;
  background: rgba(0,0,0,.12);
}

#sidebar .sidebar-logo img.site-logo {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
  transition: transform .3s ease;
}
#sidebar .sidebar-logo img.site-logo:hover {
  transform: scale(1.04);
}

#sidebar .sidebar-logo .logo-subtitle {
  font-size: 10px;
  font-weight: 700;
  color: rgba(253,182,22,.7);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
}

/* Nav sections */
#sidebar nav { flex: 1; padding: 10px 0; }

.nav-section-label {
  padding: 14px 20px 5px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(132,227,255,.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 16px;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: var(--transition);
  font-size: 13.5px;
  font-weight: 500;
}
.nav-item:hover {
  color: white;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.nav-item.active {
  color: var(--club-gold);
  background: rgba(253,182,22,.08);
  border-left-color: var(--club-gold);
  font-weight: 600;
}
.nav-item i {
  width: 18px; text-align: center; flex-shrink: 0; font-size: 16px;
}
.nav-item.active i { color: var(--club-gold); }

/* Sidebar user */
.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid rgba(253,182,22,.12);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(0,0,0,.15);
}
.sidebar-user .avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--club-blue-dark), var(--club-blue-mid));
  border: 2px solid rgba(253,182,22,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name {
  font-size: 13px; font-weight: 600; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: 11px; color: rgba(253,182,22,.6);
  font-weight: 500;
}
.sidebar-user a.logout-btn {
  color: rgba(255,255,255,.35);
  font-size: 18px;
  transition: color .2s;
  flex-shrink: 0;
}
.sidebar-user a.logout-btn:hover { color: var(--club-red); text-decoration: none; }

/* ====== TOPBAR ====== */
#topbar {
  position: fixed;
  left: var(--sidebar-w); right: 0; top: 0;
  height: var(--topbar-h);
  background: white;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 900;
  gap: 12px;
  box-shadow: var(--shadow);
}

#menu-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; font-size: 22px;
  color: var(--text); padding: 4px 8px;
  border-radius: 6px;
}
#menu-toggle:hover { background: var(--bg); }

#page-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  flex: 1; display: flex; align-items: center; gap: 8px;
}
#page-title i { color: var(--primary-mid); }

#topbar .topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
#topbar .topbar-logo {
  display: none; /* shown on mobile */
}

/* ====== MAIN CONTENT ====== */
#main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-h));
  flex: 1;
  display: flex;
  flex-direction: column;
}

#content-area { flex: 1; }

/* ====== FOOTER ====== */
#site-footer {
  margin-left: var(--sidebar-w);
  border-top: 2px solid var(--border);
  background: white;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

#site-footer .footer-logo img {
  height: 52px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(1,85,200,.15));
}

#site-footer .footer-info {
  text-align: center;
  flex: 1;
}
#site-footer .footer-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}
#site-footer .footer-info strong {
  color: var(--primary-mid);
  font-weight: 700;
}

#site-footer .footer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
#site-footer .footer-badge .dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ====== Sidebar overlay (mobile) ====== */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999;
}

/* ====== CARDS ====== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: white;
}
.card-header h5 {
  font-size: 14px; font-weight: 700; margin: 0; flex: 1;
  display: flex; align-items: center; gap: 7px; color: var(--text);
}
.card-header h5 i { color: var(--primary-mid); }
.card-body { padding: 20px; }

/* ====== STAT CARDS ====== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.stat-income::before  { background: var(--success); }
.stat-card.stat-expense::before { background: var(--danger); }
.stat-card.stat-balance::before { background: var(--club-blue-dark); }
.stat-card.stat-pending::before { background: var(--club-gold); }

.stat-card .stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 22px; font-weight: 800; color: var(--text); line-height: 1;
  margin-bottom: 8px;
}
.stat-card .stat-value.text-success { color: var(--success); }
.stat-card .stat-value.text-danger  { color: var(--danger); }
.stat-card .stat-value.text-info    { color: var(--info); }
.stat-card .stat-icon {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  opacity: .07;
}
.stat-card .stat-footer {
  font-size: 11px; color: var(--text-muted);
}
.stat-card-inner { display: flex; justify-content: space-between; align-items: flex-start; }

/* ====== TABLES ====== */
.table-wrapper { overflow-x: auto; }
table.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: #f5f8ff;
  padding: 10px 14px;
  text-align: left; font-weight: 700; font-size: 11px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f7f9ff; }
.data-table .td-actions { white-space: nowrap; text-align: right; }

/* ====== BADGES ====== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.badge-success   { background: #dcfce7; color: #15803d; }
.badge-danger    { background: #ffe4e6; color: #9f1239; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-info      { background: #dbeafe; color: #1d4ed8; }
.badge-secondary { background: #f1f5f9; color: var(--text-muted); }
.badge-primary   { background: #eff6ff; color: var(--club-blue-dark); }
.badge-gold      { background: #fef9c3; color: #854d0e; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 7px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); white-space: nowrap; line-height: 1.2;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--primary-mid); color: white; }
.btn-primary:hover { background: #0148a8; }
.btn-accent    { background: var(--accent); color: white; }
.btn-accent:hover { background: #1880d4; }
.btn-gold      { background: var(--gold); color: #1a1a1a; }
.btn-gold:hover { background: #e8a200; }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover { opacity: .88; }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover  { background: var(--danger-dark); }
.btn-warning   { background: var(--warning); color: white; }
.btn-outline   { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); border-color: #b0bdd4; }
.btn-ghost     { background: transparent; color: var(--text-muted); padding: 6px 10px; }
.btn-ghost:hover   { background: var(--bg); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 7px; border-radius: 6px; }

/* ====== FORMS ====== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 7px; background: white;
  color: var(--text); font-size: 14px;
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,151,240,.12); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 576px) { .form-row { grid-template-columns: 1fr; } }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a8a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ====== MODAL ====== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,25,70,.55);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white; border-radius: 14px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(1,85,200,.2);
  animation: modalIn .2s ease;
}
.modal-box.modal-lg { max-width: 820px; }
@keyframes modalIn {
  from { transform: translateY(-16px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(to right, #f7f9ff, white);
}
.modal-header h5 {
  font-size: 15px; font-weight: 700; flex: 1; color: var(--text);
}
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
  background: #f9fbff;
}

/* ====== TOASTS ====== */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: white; border-radius: 10px;
  padding: 12px 16px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 380px;
  border-left: 4px solid var(--info);
  animation: toastIn .3s ease;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--gold); }
.toast .toast-icon { font-size: 16px; flex-shrink: 0; }
.toast .toast-msg  { font-size: 13px; line-height: 1.4; flex: 1; color: var(--text); }
.toast .toast-close { color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 2px; }
@keyframes toastIn {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 {
  font-size: 20px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.page-header h2 i { color: var(--primary-mid); }

/* ====== FILTERS BAR ====== */
.filters-bar {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  box-shadow: var(--shadow);
}
.filters-bar .filter-group { display: flex; flex-direction: column; gap: 4px; }
.filters-bar .filter-group label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.filters-bar .form-control { width: auto; min-width: 140px; }

/* ====== PAGINATION ====== */
.pagination {
  display: flex; gap: 4px; align-items: center;
  justify-content: center; padding: 16px 0; flex-wrap: wrap;
}
.page-btn {
  padding: 6px 12px; border-radius: 6px; border: 1.5px solid var(--border);
  background: white; color: var(--text); cursor: pointer; font-size: 13px;
  transition: var(--transition); font-weight: 500;
}
.page-btn:hover { background: #f0f5ff; border-color: var(--accent); }
.page-btn.active { background: var(--primary-mid); color: white; border-color: var(--primary-mid); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; opacity: .25; color: var(--primary-mid); }
.empty-state p { font-size: 14px; }

/* ====== LOADING ====== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%; animation: spin .75s linear infinite;
  margin: 32px auto; display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== CHART CONTAINER ====== */
.chart-container { position: relative; height: 260px; }

/* ====== ENTRY/GASTO COLORS ====== */
.tipo-entrada { color: var(--success); font-weight: 600; }
.tipo-gasto   { color: var(--danger);  font-weight: 600; }
.monto-entrada { color: var(--success); font-weight: 700; }
.monto-gasto   { color: var(--danger);  font-weight: 700; }

/* ====== ALERT ====== */
.alert {
  padding: 12px 16px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-danger  { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

/* ====== ACCORDION ====== */
.accordion-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
  box-shadow: var(--shadow);
}
.accordion-header {
  padding: 14px 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  background: white; font-weight: 600; font-size: 13px;
  transition: var(--transition);
}
.accordion-header:hover { background: #f7f9ff; }
.accordion-header.open { background: #f0f5ff; border-bottom: 1px solid var(--border); }
.accordion-header .chevron { transition: transform .2s; color: var(--text-muted); }
.accordion-header.open .chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 16px 18px; background: #fbfcff; }
.accordion-body.open { display: block; }

/* ====== COMPROBANTES ====== */
.comp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin-top: 12px;
}
.comp-item {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: white;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.comp-preview {
  height: 100px; display: flex; align-items: center; justify-content: center;
  background: #f5f8ff;
}
.comp-preview img { max-height: 100%; max-width: 100%; object-fit: cover; }
.comp-preview .file-icon { font-size: 36px; color: var(--text-muted); }
.comp-info { padding: 8px; font-size: 11px; }
.comp-info .comp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.comp-actions { padding: 6px 8px; border-top: 1px solid var(--border); display: flex; gap: 4px; }

/* ====== MISC UTILS ====== */
.text-muted   { color: var(--text-muted); }
.text-small   { font-size: 12px; }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ====== LOGIN PAGE ====== */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0C2461 0%, #0155C8 50%, #0a3a8a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  position: relative; overflow: hidden;
}
.login-wrapper::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(43,151,240,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(253,182,22,.12) 0%, transparent 50%);
  pointer-events: none;
}
.login-card {
  background: white; border-radius: 18px;
  padding: 40px 36px; width: 100%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  position: relative; z-index: 1;
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo img.site-logo {
  max-width: 130px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 2px 8px rgba(1,85,200,.2));
}
.login-logo h1 {
  font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 2px;
}
.login-logo p { font-size: 13px; color: var(--text-muted); }

.login-card .btn-primary {
  background: linear-gradient(135deg, var(--club-blue-dark), var(--primary-mid));
  box-shadow: 0 4px 12px rgba(1,85,200,.3);
}
.login-card .btn-primary:hover {
  background: linear-gradient(135deg, #0148a8, #0155C8);
  box-shadow: 0 6px 16px rgba(1,85,200,.4);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #sidebar-overlay.open { display: block; }
  #topbar { left: 0; padding: 0 16px; }
  #topbar .topbar-logo { display: flex; align-items: center; }
  #topbar .topbar-logo img { height: 32px; width: auto; }
  #menu-toggle { display: flex; }
  #main-content { margin-left: 0; padding: 16px; }
  #site-footer { margin-left: 0; padding: 16px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .filters-bar { flex-direction: column; }
  .filters-bar .form-control { width: 100%; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
  #site-footer { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ====== PERFIL ====== */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, #0C2461 0%, #0155C8 100%);
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.profile-avatar-lg {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 3px solid rgba(253,182,22,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
}

.profile-hero-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  background: rgba(253,182,22,.2);
  border: 1px solid rgba(253,182,22,.5);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

.profile-hero-meta {
  margin-top: 10px;
  font-size: 13px;
  opacity: .65;
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card-body {
  padding: 24px;
}

.form-control-readonly {
  background: var(--bg);
  cursor: default;
  color: var(--text-muted);
}

.btn-block {
  width: 100%;
  padding: 11px;
  justify-content: center;
}

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 8px;
}

.topbar-user-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.sidebar-user:hover {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .profile-hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
  .profile-grid { grid-template-columns: 1fr; }
}
