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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  height: 100vh;
}

#app {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
}

#sidebar {
  background: #1a1a2e;
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-header h2 { font-size: 22px; margin-bottom: 12px; }

.summary-card {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.summary-label { display: block; font-size: 11px; opacity: 0.7; margin-bottom: 2px; }
.summary-value { display: block; font-size: 16px; font-weight: 700; }

#sidebar-nav {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }

#main {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#chat-header {
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

#chat-header h1 { font-size: 22px; }
.subtitle { font-size: 14px; color: #666; margin-top: 4px; }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.message {
  margin-bottom: 16px;
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.user {
  background: #1a1a2e;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 4px;
}

.message.assistant .entry-table { margin-top: 8px; width: 100%; border-collapse: collapse; font-size: 14px; }
.message.assistant .entry-table th, .message.assistant .entry-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #eee; }
.message.assistant .entry-table th { background: #f9f9f9; font-weight: 600; }
.message.assistant .entry-table .debit { color: #2e7d32; }
.message.assistant .entry-table .credit { color: #c62828; }

.message.loading {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #999;
}

#input-area {
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  overflow-y: auto;
}

#quick-actions {
  display: flex;
  gap: 8px;
}

.quick-btn {
  padding: 10px 20px;
  border: 1px solid #e0e0e0;
  background: #f9f9f9;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.quick-btn:hover { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }

.hidden { display: none !important; }

#text-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

#message-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}

#send-btn {
  padding: 10px 24px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#modal {
  background: #fff;
  border-radius: 12px;
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

#modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

#modal-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

#modal-body { padding: 20px; }
#modal-footer { padding: 16px 20px; border-top: 1px solid #e0e0e0; display: flex; gap: 8px; justify-content: flex-end; }

.btn-primary { padding: 10px 20px; background: #2e7d32; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn-secondary { padding: 10px 20px; background: #f0f0f0; border: 1px solid #e0e0e0; border-radius: 6px; cursor: pointer; }
.btn-danger { padding: 10px 20px; background: #c62828; color: #fff; border: none; border-radius: 6px; cursor: pointer; }

/* Reports panel */
#reports-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 200; transition: opacity 0.25s;
}

#reports-panel {
  position: fixed; top: 0; right: -560px;
  width: 540px; height: 100vh;
  background: #f4f5f7;
  z-index: 201;
  display: flex; flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

#reports-panel.open { right: 0; }

.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; background: #1a1a2e; color: #fff;
}

.panel-header h2 { font-size: 16px; font-weight: 600; }
.panel-header button {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 18px; cursor: pointer; padding: 4px;
}
.panel-header button:hover { color: #fff; }

.panel-tabs {
  display: flex; gap: 0;
  background: #fff; border-bottom: 1px solid #e2e4e8;
  padding: 0 20px;
}

.panel-tabs button {
  padding: 10px 16px;
  background: none; border: none;
  font-size: 13px; font-weight: 500;
  color: #6b7280; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.panel-tabs button:hover { color: #1a1a2e; }
.panel-tabs button.active {
  color: #1a1a2e; border-bottom-color: #1a1a2e;
}

.panel-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}

.panel-tab { display: none; }
.panel-tab.active { display: block; }

.panel-body table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 6px;
  overflow: hidden; font-size: 13px;
}

.panel-body th {
  text-align: left; padding: 8px 10px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: #6b7280; background: #f9fafb;
  border-bottom: 1px solid #e2e4e8;
}

.panel-body td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e4e8;
}

.panel-body tr:last-child td { border-bottom: none; }
.panel-body tr:hover td { background: #f9fafb; }

.panel-body .debit { color: #2e7d32; font-weight: 600; }
.panel-body .credit { color: #c62828; font-weight: 600; }
.panel-body .tag {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 3px; text-transform: uppercase;
}
.panel-body .tag-conf { background: #e8f5e9; color: #2e7d32; }
.panel-body .tag-draft { background: #fff3e0; color: #e65100; }
.panel-body .tag-rejected { background: #ffebee; color: #c62828; }
.panel-body .tag-void { background: #f3e5f5; color: #6a1b9a; }
.panel-body .empty {
  text-align: center; padding: 32px; color: #6b7280; font-size: 13px;
}

.panel-body .summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-body .card {
  background: #fff; border-radius: 6px;
  padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.panel-body .card h3 {
  font-size: 11px; font-weight: 600;
  color: #6b7280; margin-bottom: 2px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.panel-body .card .value { font-size: 22px; font-weight: 700; }
.panel-body .card .value.pos { color: #2e7d32; }
.panel-body .card .value.neg { color: #c62828; }

.panel-body .line-item {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
  border-bottom: 1px dashed #e2e4e8;
}
.panel-body .line-item:last-child { border-bottom: none; }
.panel-body .line-item .amt { font-weight: 600; }

/* Confirm dialog */
#confirm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 300; display: flex; align-items: center; justify-content: center;
}

#confirm-dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 14px;
  width: 380px; max-width: 90vw;
  z-index: 301;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
}

#confirm-dialog.hidden { display: none; }

#confirm-body {
  padding: 28px 24px 20px;
  text-align: center;
}

#confirm-icon {
  font-size: 36px; margin-bottom: 12px;
}

#confirm-msg {
  font-size: 15px; line-height: 1.5; color: #333;
}

#confirm-footer {
  display: flex; gap: 8px; justify-content: center;
  padding: 0 24px 24px;
}

#confirm-footer .btn-secondary {
  flex: 1; padding: 10px; font-size: 14px;
}

#confirm-ok-btn {
  flex: 1; padding: 10px; font-size: 14px;
}

.btn-undo {
  background: none; border: 1px solid #e2e4e8;
  color: #c62828; font-size: 14px;
  padding: 2px 8px; border-radius: 4px;
  cursor: pointer; line-height: 1;
  transition: all 0.15s;
}
.btn-undo:hover { background: #c62828; color: #fff; border-color: #c62828; }

.mobile-only { display: none; }

/* ── Catálogo de Cuentas ── */
.cuenta-grupo { margin-bottom: 16px; }
.cuenta-tipo {
  padding: 6px 12px; color: #fff; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; border-radius: 4px 4px 0 0; margin-bottom: 2px;
}
.cuenta-row {
  padding: 5px 8px; font-size: 13px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #f0f0f0; background: #fff;
}
.cuenta-row:hover { background: #f9fafb; }
.cuenta-code {
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px;
  color: #6b7280; min-width: 90px;
}
.cuenta-name { color: #1a1a2e; font-weight: 500; }

@media (max-width: 768px) {
  .cuenta-code { min-width: 72px; font-size: 11px; }
  .cuenta-row { font-size: 12px; padding: 5px 6px; gap: 6px; }
}

/* ── Revisión / Badge ── */
.badge {
  display: inline-block;
  background: #c62828;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 16px;
}

.revision-card {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.revision-card .rev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7280;
}
.revision-card .rev-date { font-weight: 600; color: #333; }
.revision-card .rev-creator { font-style: italic; }
.revision-card .rev-desc {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: #1a1a2e;
}
.revision-card .rev-lines {
  border-top: 1px solid #f0f0f0;
  padding-top: 6px;
  margin-bottom: 10px;
}
.revision-card .rev-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  color: #333;
}
.revision-card .rev-line .debit { color: #2e7d32; font-weight: 600; }
.revision-card .rev-line .credit { color: #c62828; font-weight: 600; }
.revision-card .rev-total {
  border-top: 1px dashed #e2e4e8;
  margin-top: 4px;
  padding-top: 6px;
  font-size: 12px;
  color: #6b7280;
}
.revision-card .rev-actions {
  display: flex;
  gap: 6px;
}
.revision-card .btn-approve {
  flex: 1;
  padding: 8px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.revision-card .btn-approve:hover { opacity: 0.85; }
.revision-card .btn-reject {
  flex: 1;
  padding: 8px;
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.revision-card .btn-reject:hover { opacity: 0.85; }

@media (max-width: 768px) {
  .revision-card { padding: 12px; }
  .revision-card .rev-desc { font-size: 13px; }
  .revision-card .rev-line { font-size: 12px; }
}

/* ── OCR Upload ── */
#ocr-upload {
  padding: 8px 0;
}
#ocr-capture-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
#ocr-preview {
  text-align: center;
}
#ocr-preview-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 10px;
}
#ocr-loading {
  text-align: center;
  padding: 24px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#ocr-status {
  font-size: 14px;
  color: #666;
}
#ocr-result {
  background: #f9fafb;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 14px;
}
.ocr-extracted pre {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 4px;
  padding: 8px;
  font-size: 12px;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 6px 0 10px;
  color: #333;
}
.ocr-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed #eee;
}
.ocr-field:last-child { border-bottom: none; }
.ocr-field span { color: #6b7280; flex-shrink: 0; }
.ocr-field strong { color: #1a1a2e; }
.ocr-field textarea,
.ocr-field input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1a1a2e;
}
.ocr-field textarea {
  resize: vertical;
  min-height: 48px;
}
#ocr-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

/* ── Dashboard ── */
.dash-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.dash-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.dash-card span { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-bottom: 2px; }
.dash-card strong { font-size: 18px; font-weight: 700; }
.dash-card-ing strong { color: #2e7d32; }
.dash-card-gas strong { color: #c62828; }
.dash-card-cost strong { color: #e65100; }
.dash-card-pos strong { color: #2e7d32; }
.dash-card-neg strong { color: #c62828; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-chart-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dash-chart-card h4 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.dash-chart-card canvas {
  width: 100% !important;
  height: 220px !important;
}

@media (max-width: 768px) {
  .dash-summary { grid-template-columns: 1fr 1fr; gap: 6px; }
  .dash-card { padding: 10px; }
  .dash-card strong { font-size: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-chart-card canvas { height: 180px !important; }
}

/* ── Filters & Pagination ── */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-bar input[type="date"] {
  padding: 6px 10px;
  border: 1px solid #e2e4e8;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  font-family: inherit;
  color: #333;
}
.filter-bar .btn-filter {
  padding: 6px 14px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.filter-bar .btn-filter:hover { opacity: 0.85; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
}
.pagination button {
  padding: 6px 14px;
  border: 1px solid #e2e4e8;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}
.pagination button:hover { background: #f0f0f0; }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* Responsive */
@media (max-width: 768px) {
  .mobile-only { display: inline-block; }

  body { overflow: hidden; }

  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100dvh;
    overflow: hidden;
  }

  #sidebar {
    padding: 8px 12px;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 56px;
  }

  .sidebar-header h2 { display: none; }

  #summary-content {
    display: flex;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
  }

  .summary-card {
    padding: 6px 12px;
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 80px;
  }

  .summary-label { font-size: 12px; }
  .summary-value { font-size: 18px; }

  #sidebar-nav {
    flex-direction: row;
    margin-top: 0;
    flex-shrink: 0;
  }
  .nav-link {
    padding: 6px 10px;
    font-size: 14px;
    white-space: nowrap;
  }

  #main { height: auto; min-height: 0; }

  #chat-header { padding: 12px 16px; flex-shrink: 0; }
  #chat-header h1 { font-size: 20px; }
  .subtitle { font-size: 14px; }

  #chat-messages { padding: 12px 16px; flex: 1; min-height: 0; overflow-y: auto; }
  .message { max-width: 95%; padding: 14px 16px; font-size: 16px; }

  #input-area { padding: 12px 16px; flex-shrink: 0; max-height: 50vh; overflow-y: auto; }
  #quick-actions { gap: 8px; flex-wrap: wrap; }
  .quick-btn { padding: 14px 16px; font-size: 15px; flex: 1; text-align: center; min-width: 0; }

  #message-input { font-size: 16px; padding: 12px 14px; }
  #send-btn { padding: 12px 24px; font-size: 16px; }

  #reports-panel { width: 100vw; right: -100vw; height: 100dvh; }
  #reports-panel.open { right: 0; }

  .panel-body { padding: 12px; }
  .panel-body table { font-size: 13px; }
  .panel-body th, .panel-body td { padding: 8px 10px; }
  .panel-body .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .panel-body .card { padding: 12px; }
  .panel-body .card .value { font-size: 20px; }

  .panel-tabs { padding: 0 12px; }
  .panel-tabs button { padding: 12px 14px; font-size: 13px; }

  .filter-bar input[type="date"] { font-size: 13px; padding: 8px 10px; flex: 1; min-width: 0; }
  .filter-bar .btn-filter { font-size: 13px; padding: 8px 14px; }
  .pagination { font-size: 13px; }
  .pagination button { font-size: 13px; padding: 8px 16px; }

  #modal { width: 95vw; max-height: 90vh; }
  #modal-header { padding: 12px 16px; }
  #modal-body { padding: 14px; }
  #modal-footer { padding: 12px 16px; flex-direction: column; }
  #modal-footer button { width: 100%; }

  #confirm-dialog { width: 90vw; }
  #confirm-body { padding: 24px 20px 16px; }
  #confirm-icon { font-size: 30px; }
  #confirm-msg { font-size: 14px; }
  #confirm-footer { padding: 0 20px 20px; flex-direction: column; }
  #confirm-footer button { width: 100%; }
}

@media (max-width: 480px) {
  #sidebar { padding: 8px 10px; gap: 6px; }
  .summary-card { padding: 8px 12px; min-width: 72px; }
  .summary-value { font-size: 16px; }
  .summary-label { font-size: 11px; }
  #chat-header { padding: 10px 12px; }
  #chat-header h1 { font-size: 18px; }
  .subtitle { font-size: 13px; }
  #chat-messages { padding: 10px 12px; }
  .message { padding: 12px 14px; font-size: 15px; max-width: 98%; }
  .quick-btn { font-size: 14px; padding: 12px 10px; }
  #input-area { padding: 10px 12px; }
  .panel-body .summary-grid { grid-template-columns: 1fr; }
  .panel-tabs button { padding: 10px 8px; font-size: 12px; }
  .panel-body table { font-size: 12px; }
  .panel-body th, .panel-body td { padding: 6px 8px; }
}

/* ── Classification Box ── */
.classification-box {
  background: #f0f7ff;
  border: 1px solid #b3d4fc;
  border-radius: 8px;
  padding: 14px;
  margin: 8px 0;
  font-size: 14px;
}
.classification-box strong {
  color: #1a1a2e;
}
.classify-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c0c0c0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 6px;
  max-height: 200px;
}
.classify-btn {
  padding: 8px 20px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.classify-btn:hover {
  opacity: 0.85;
}

/* ── Admin Panel ── */
.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  padding: 12px 12px 4px;
  font-weight: 600;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e4e8;
  margin-bottom: 12px;
}

.admin-form-card {
  background: #f8f9fb;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}

.admin-form-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #1a1a2e;
}

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

.form-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}

.cuenta-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.btn-sm {
  background: none;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 13px;
}

.btn-sm:hover {
  background: #f0f0f0;
}

.config-card {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  padding: 20px;
}

.config-card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: #1a1a2e;
}

.config-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* ── Sidebar user & logout ── */
.sidebar-logout-btn {
  margin-top: 8px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e4e8;
  border-radius: 6px;
  color: #dc2626;
  background: #fff;
  transition: all 0.2s ease;
  font-family: inherit;
}
.sidebar-logout-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.sidebar-logout-btn:active {
  background: #fee2e2;
  transform: scale(0.98);
}
