/* ============================================================
   Internap — Sistema de Cobros GrupoNEXT
   Sistema de diseño: identidad de red/fibra, no el kit genérico
   de tarjetas Bootstrap.
   ============================================================ */

:root {
  /* Color */
  --ink:        #0B1E33;   /* fondo sidebar / marca */
  --ink-soft:   #14314F;
  --teal:       #12B5A6;   /* acento primario — señal / fibra */
  --teal-dark:  #0C8F84;
  --paper:      #F6F8F9;   /* fondo principal */
  --line:       #E3E8EC;   /* hairlines */
  --ink-text:   #1C2B3A;
  --muted:      #64798C;
  --amber:      #D98E2B;   /* pendiente */
  --coral:      #D9503C;   /* vencido */
  --green:      #1E9E6B;   /* pagado */
  --grey:       #8A97A3;   /* anulado */

  /* Tipografía */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

body {
  background: var(--paper);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: .95rem;
}

h1, h2, h3, h4, h5, h6, .brand-mark {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

/* ---------- Shell: sidebar + contenido ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--ink);
  color: #cfe3ea;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand-mark {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.sidebar .brand-mark svg { flex-shrink: 0; }
.sidebar .brand-sub {
  font-size: .72rem;
  color: #7FA3B0;
  margin-top: 2px;
  letter-spacing: .02em;
}
.sidebar nav {
  flex: 1;
  padding: 14px 10px;
}
.sidebar .nav-link {
  color: #B9CBD3;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: .89rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  transition: background .12s ease, color .12s ease;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--teal); color: #04231F; font-weight: 600; }
.sidebar .nav-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar .sidebar-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
}
.sidebar .sidebar-footer .who { color: #fff; font-weight: 500; }
.sidebar .sidebar-footer a { color: #7FA3B0; text-decoration: none; }
.sidebar .sidebar-footer a:hover { color: var(--teal); }

.app-main { flex: 1; min-width: 0; }
.app-topbar {
  display: none;
}
.app-content {
  max-width: 1180px;
  padding: 30px 34px 50px;
}

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; align-items: center; justify-content: space-between; }
  .sidebar .brand { border: none; padding: 14px 16px; }
  .sidebar nav { display: flex; padding: 0 10px; overflow-x: auto; }
  .sidebar .nav-link { white-space: nowrap; margin-bottom: 0; }
  .sidebar .sidebar-footer { display: none; }
  .app-content { padding: 20px 16px 40px; }
}

/* ---------- Encabezado de página ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}
.page-head .eyebrow {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 2px;
}

/* ---------- Métricas ---------- */
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  height: 100%;
}
.metric .metric-label { color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.metric .metric-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric.accent-amber { border-left: 3px solid var(--amber); }
.metric.accent-coral { border-left: 3px solid var(--coral); }
.metric.accent-green { border-left: 3px solid var(--green); }
.metric.accent-teal  { border-left: 3px solid var(--teal); }

/* ---------- Paneles de tabla (sin sombra genérica de tarjeta) ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel .panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: .92rem;
}
.panel-form { background:#fff; border:1px solid var(--line); border-radius:10px; padding: 22px 24px; }

table.table { margin-bottom: 0; font-size: .89rem; }
table.table thead th {
  background: #FAFBFC;
  color: var(--muted);
  font-weight: 600;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
  padding: 10px 18px;
}
table.table td { padding: 12px 18px; vertical-align: middle; border-color: var(--line); }
table.table td.num, table.table .money { font-variant-numeric: tabular-nums; }
table.table tbody tr:hover { background: #FAFDFC; }

/* ---------- Estados: punto + etiqueta, no la píldora Bootstrap genérica ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status.status-pendiente { color: #96660F; } .status.status-pendiente::before { background: var(--amber); }
.status.status-vencido   { color: var(--coral); } .status.status-vencido::before   { background: var(--coral); }
.status.status-pagado    { color: var(--green); } .status.status-pagado::before    { background: var(--green); }
.status.status-anulado   { color: var(--grey); }  .status.status-anulado::before   { background: var(--grey); }
/* compatibilidad con el badge original usado en varias vistas */
.badge.badge-pendiente, .badge.badge-vencido, .badge.badge-pagado, .badge.badge-anulado {
  font-weight: 500; font-size: .76rem; padding: .38em .65em; border-radius: 20px;
}
.badge.badge-pendiente { background: #FBEDD8; color: #96660F; }
.badge.badge-vencido   { background: #FBE2DE; color: var(--coral); }
.badge.badge-pagado    { background: #DDF3E8; color: var(--green); }
.badge.badge-anulado   { background: #EBEEF0; color: var(--grey); }

/* ---------- Botones ---------- */
.btn-primary { background: var(--teal); border-color: var(--teal); color: #04231F; font-weight: 600; }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-outline-primary { color: var(--teal-dark); border-color: var(--teal); }
.btn-outline-primary:hover { background: var(--teal); border-color: var(--teal); color: #04231F; }
.nav-pills .nav-link.active { background: var(--ink); }
.nav-pills .nav-link { color: var(--muted); }

/* ---------- Login (admin y portal) ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  background: var(--ink);
  background-image: radial-gradient(circle at 15% 20%, rgba(18,181,166,.18), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(18,181,166,.10), transparent 40%);
}
.auth-card {
  max-width: 380px;
  margin: auto;
  background: #fff;
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.auth-mark { display:flex; align-items:center; gap:10px; justify-content:center; margin-bottom: 6px; }
.auth-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; text-align:center; }
.auth-sub { color: var(--muted); font-size: .85rem; text-align:center; margin-bottom: 22px; }
.form-label { font-size: .84rem; font-weight: 500; color: var(--ink-text); }
.form-control:focus, .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 .2rem rgba(18,181,166,.15); }

footer.app-footer { color: var(--muted); font-size: .8rem; padding: 20px 34px 40px; }

/* ---------- Compatibilidad: tarjetas Bootstrap heredan el lenguaje visual ---------- */
.card {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.card.p-3, .card.p-4 { background: #fff; }
h6 { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
