/* custom.css - subset de Bootstrap 5.3.3 para ProyectoMedidores (offline)
   Cubre solo las clases que usan los .ejs del proyecto. ~6KB. */

/* ============================================================
   Variables de diseño (paleta centralizada)
   ============================================================ */
:root {
  --color-primary: #0d6efd;
  --color-success: #198754;
  --color-warning: #fd7e14;
  --color-danger: #dc3545;
  --color-info: #0dcaf0;
  --color-purple: #6f42c1;
  --color-bg: #f5f6fa;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-border: #dee2e6;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background: #f5f6fa;
}
a { color: #0d6efd; text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
h1 { font-size: 2.5rem; }
.h3, h3 { font-size: 1.75rem; }
code { background: #f1f3f5; padding: .15rem .35rem; border-radius: .25rem; font-size: .875em; }
pre { display: block; margin-top: 0; margin-bottom: 1rem; padding: 1rem; overflow: auto; background: #f8f9fa; border-radius: .375rem; }
hr { margin: 1rem 0; color: inherit; border: 0; border-top: 1px solid rgba(0,0,0,.1); opacity: 1; }

/* Container */
.container { max-width: 1140px; margin-right: auto; margin-left: auto; padding-right: 12px; padding-left: 12px; }
.container-fluid { width: 100%; margin-right: auto; margin-left: auto; padding-right: 12px; padding-left: 12px; }

/* Grid */
.row { display: flex; flex-wrap: wrap; margin-right: -12px; margin-left: -12px; }
.row > * { padding-right: 12px; padding-left: 12px; box-sizing: border-box; }
.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.g-3 > * { margin-top: var(--bs-gutter-y); }
.col-md-2 { flex: 0 0 auto; width: 16.66667%; }
.col-md-3 { flex: 0 0 auto; width: 25%; }
.col-md-4 { flex: 0 0 auto; width: 33.33333%; }
.col-md-10 { flex: 0 0 auto; width: 83.33333%; }

/* Navbar */
.navbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding-top: .5rem; padding-bottom: .5rem; }
.navbar > .container-fluid { display: flex; flex-wrap: inherit; align-items: center; justify-content: space-between; }
.navbar-expand { flex-wrap: nowrap; }
.navbar-dark { color: rgba(255, 255, 255, .55); }
.navbar-dark .navbar-brand { color: rgba(255, 255, 255, .9); }
.bg-dark { background-color: #212529 !important; }
.navbar-brand { padding-top: .3125rem; padding-bottom: .3125rem; margin-right: 1rem; font-size: 1.25rem; text-decoration: none; font-weight: 600; color: rgba(255, 255, 255, .9); }
.navbar-nav { display: flex; flex-direction: row; padding-left: 0; margin-bottom: 0; list-style: none; }
.nav-item { list-style: none; }
.nav-link { display: block; padding: .5rem 1rem; color: #c2c7d0; text-decoration: none; transition: color .15s ease-in-out; }
.nav-link.text-light { color: #f8f9fa !important; }
.ms-auto { margin-left: auto !important; }
.flex-row { flex-direction: row !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.mb-0 { margin-bottom: 0 !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }

/* Sidebar */
.sidebar { background: #fff; border-right: 1px solid #dee2e6; min-height: calc(100vh - 56px); padding-top: 1rem; }
.sidebar a { display: block; padding: .55rem 1rem; color: #495057; text-decoration: none; border-radius: 0 .25rem .25rem 0; margin-right: 4px; }
.sidebar a:hover { background: #f8f9fa; }
.sidebar a.active { background: #0d6efd; color: #fff; }
.d-none { display: none !important; }
@media (min-width: 768px) {
  .d-md-block { display: block !important; }
}
main { display: block; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

/* Cards */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: #fff; background-clip: border-box; border: 1px solid rgba(0,0,0,.175); border-radius: .375rem; }
.card-body { flex: 1 1 auto; padding: 1rem; }
.card-header { padding: .5rem 1rem; margin-bottom: 0; background-color: rgba(0,0,0,.03); border-bottom: 1px solid rgba(0,0,0,.175); }
.card-footer { padding: .5rem 1rem; background-color: rgba(0,0,0,.03); border-top: 1px solid rgba(0,0,0,.175); }
.h-100 { height: 100% !important; }
.justify-content-between { justify-content: space-between !important; }

/* Stat card */
.stat-card { border-left: 4px solid #0d6efd; }
.stat-card.socios { border-left-color: #198754; }
.stat-card.medidores { border-left-color: #fd7e14; }
.stat-card.corridas { border-left-color: #6f42c1; }
.stat-card .stat-value { font-size: 1.85rem; font-weight: 600; line-height: 1.1; color: #212529; }
.stat-card .stat-label { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

/* Buttons */
.btn { display: inline-block; padding: .375rem .75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: center; vertical-align: middle; cursor: pointer; user-select: none; background-color: transparent; border: 1px solid transparent; border-radius: .375rem; text-decoration: none; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
.btn-lg { padding: .5rem 1rem; font-size: 1.25rem; border-radius: .5rem; }
.btn-primary { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-primary:hover { color: #fff; background-color: #0b5ed7; border-color: #0a58ca; }
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; }
.btn-outline-primary:hover { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-outline-light { color: #f8f9fa; border-color: #f8f9fa; }
.btn-outline-light:hover { color: #212529; background-color: #f8f9fa; border-color: #f8f9fa; }
.w-100 { width: 100% !important; }

/* Forms */
.form-label { margin-bottom: .5rem; }
.form-control { display: block; width: 100%; padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; color: #212529; background-color: #fff; background-clip: padding-box; border: 1px solid #ced4da; border-radius: .375rem; transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; }
.form-control:focus { color: #212529; background-color: #fff; border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.form-control-lg { padding: .5rem 1rem; font-size: 1.25rem; border-radius: .5rem; }
input[type="password"], input[type="text"] { font: inherit; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.p-4 { padding: 1.5rem !important; }

/* Alerts */
.alert { position: relative; padding: 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: .375rem; }
.alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }

/* Badges */
.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .375rem; }
.bg-secondary { background-color: #6c757d !important; }
.bg-light { background-color: #f8f9fa !important; }
.text-light { color: #f8f9fa !important; }
.bg-success { background-color: var(--color-success) !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: var(--color-danger) !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-primary { background-color: var(--color-primary) !important; }
.text-dark { color: #212529 !important; }

/* Text utils */
.text-muted { color: #6c757d !important; }
.text-center { text-align: center !important; }
.text-uppercase { text-transform: uppercase !important; }
.small { font-size: .875em; }
.fw-bold { font-weight: 700 !important; }
.g-2 { --bs-gutter-x: .5rem; --bs-gutter-y: .5rem; }

/* Login card */
.login-card { box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.08); border: 0; }
.login-brand { font-size: 1.5rem; font-weight: 600; }

/* Page header (h1 + subtitle) */
.page-header { margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); }
.page-header h1 { margin-bottom: 0.25rem; }

/* Empty state (cuando no hay datos) */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.empty-state-icon { width: 64px; height: 64px; border: 2px dashed var(--color-border); border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--color-text-muted); }
.empty-state h5 { color: var(--color-text); margin-bottom: .5rem; }
.empty-state p { margin-bottom: 1rem; }

/* Sidebar nav (active state) */
.sidebar a.active { background: var(--color-primary); color: #fff; }

/* Better form layout */
.form-section { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.form-section:last-child { border-bottom: 0; }

/* Card header consistency */
.card-header { font-weight: 500; }

/* Tipos de medidor (badges) */
.badge-tipo-Parque { background: #6f42c1; color: #fff; }
.badge-tipo-Trifásico-Directo { background: #fd7e14; color: #fff; }
.badge-tipo-Trifásico-Indirecto { background: #dc3545; color: #fff; }
.badge-tipo-Monofásico-Directo { background: #198754; color: #fff; }

/* Tablas compactas alineadas */
.table-sm td, .table-sm th { vertical-align: middle; }
