﻿/* ================================================================
   Argon Dashboard — estilos adaptados para Bootstrap 5
   AboxMedicos - Conexus Group
   ================================================================ */

/* ----------------------------------------------------------------
   Variables de color Argon
   ---------------------------------------------------------------- */
:root {
  --argon-primary:   #5e72e4;
  --argon-success:   #2dce89;
  --argon-info:      #11cdef;
  --argon-warning:   #fb6340;
  --argon-danger:    #f5365c;
  --argon-default:   #172b4d;
  --argon-secondary: #f7fafc;
  --argon-sidebar-w: 250px;

  /* Override Bootstrap 5 secondary para que sea el Argon light gray */
  --bs-secondary-bg: #f7fafc;
}

/* bg-secondary Argon = #f7fafc (no el gris oscuro de BS5) */
.bg-secondary {
  background-color: #f7fafc !important;
}

/* ----------------------------------------------------------------
   Loader overlay
   ---------------------------------------------------------------- */
#ab-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* ----------------------------------------------------------------
   Fondos degradados — Auth
   ---------------------------------------------------------------- */
.bg-default {
  background-color: #172b4d !important;
  min-height: 100vh;
}

.fill-default { fill: #172b4d; }

/* Azul brillante de la cabecera login (#019cde) */
.bg-gradient-login {
  background: linear-gradient(87deg, #019cde 0, #019cde 100%) !important;
}

/* ----------------------------------------------------------------
   Gradientes de color (tarjetas, encabezados)
   ---------------------------------------------------------------- */
.bg-gradient-primary {
  background: linear-gradient(87deg, #5e72e4 0, #825ee4 100%) !important;
}
.bg-gradient-success {
  background: linear-gradient(87deg, #2dce89 0, #2dcecc 100%) !important;
}
.bg-gradient-info {
  background: linear-gradient(87deg, #11cdef 0, #1171ef 100%) !important;
}
.bg-gradient-warning {
  background: linear-gradient(87deg, #fb6340 0, #fbb140 100%) !important;
}
.bg-gradient-danger {
  background: linear-gradient(87deg, #f5365c 0, #f56036 100%) !important;
}
.bg-gradient-dark {
  background: linear-gradient(87deg, #212529 0, #31416d 100%) !important;
}
.bg-gradient-default {
  background: linear-gradient(87deg, #172b4d 0, #1a174d 100%) !important;
}

/* ----------------------------------------------------------------
   Separador inclinado (auth page)
   ---------------------------------------------------------------- */
.separator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
}
.separator svg {
  display: block;
  width: 100%;
  height: 70px;
}
.separator-bottom {
  bottom: 0;
}
.separator-skew {
  transform: skewY(-1.5deg);
  transform-origin: bottom right;
}
.zindex-100 {
  z-index: 100;
}

/* Contenedor principal de login: debe quedar POR ENCIMA del separador
   El separador tiene z-index:100 (position:absolute dentro del .header).
   El container con mt--8 tiene position:static → pierde ante el separador.
   Fix: darle position:relative + z-index superior. */
html.auth-layout .main-content > .container {
  position: relative;
  z-index: 200;
  /* Override mt--8 (-8rem): bajamos la tarjeta para que el subtítulo del header quede visible */
  margin-top: -3rem !important;
}

/* Auth layout: reducir padding del header para que la página
   quepa en el viewport sin scroll.
   py-7/py-lg-8 = 128px c/u → demasiado alto.
   Reducimos a 3rem arriba y abajo, y el mb-7 del header-body a 1.5rem. */
html.auth-layout .header {
  padding-top:    3rem !important;
  padding-bottom: 3rem !important;
  min-height: 35vh;
}
html.auth-layout .header-body {
  margin-bottom: 1.5rem !important;
}

/* ----------------------------------------------------------------
   Sección header de la página de login (.header genérico)
   ---------------------------------------------------------------- */
.header {
  position: relative;
  padding-top: 7rem;
  padding-bottom: 7rem;
}

/* ----------------------------------------------------------------
   Sidebar (navbar vertical)
   ---------------------------------------------------------------- */
.sidenav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--argon-sidebar-w);
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1040;
  transition: all 0.3s ease;
  box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
}

.sidenav.navbar-vertical {
  padding-left: 0;
  padding-right: 0;
}

.sidenav .scrollbar-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Encabezado del sidebar con el logo */
.sidenav .sidenav-header {
  height: 5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidenav .navbar-brand-img {
  max-height: 2rem;
}

/* Links de navegación en sidebar */
.sidenav .nav-item > .nav-link {
  color: #525f7f;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.sidenav .nav-item > .nav-link i {
  margin-right: 0.75rem;
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

.sidenav .nav-item > .nav-link:hover {
  color: var(--argon-primary);
  background-color: transparent;
}

.sidenav .nav-item.active > .nav-link {
  color: var(--argon-primary);
}

/* Indicador activo — barra izquierda */
.sidenav .nav-item.active > .nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--argon-primary);
}

.sidenav .nav-item {
  position: relative;
}

/* ----------------------------------------------------------------
   Main content — desplazamiento para el sidebar
   ---------------------------------------------------------------- */
.main-content {
  position: relative;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .main-content {
    margin-left: var(--argon-sidebar-w);
  }
}

/* Auth layout: sin sidebar → sin margin-left */
html.auth-layout .main-content {
  margin-left: 0 !important;
}

/* ----------------------------------------------------------------
   Espaciados extendidos de Argon (no incluidos en Bootstrap 5)
   ---------------------------------------------------------------- */
.py-7  { padding-top: 7rem  !important; padding-bottom: 7rem  !important; }
.py-8  { padding-top: 8rem  !important; padding-bottom: 8rem  !important; }
.pt-7  { padding-top: 7rem  !important; }
.pt-8  { padding-top: 8rem  !important; }
.pb-7  { padding-bottom: 7rem !important; }
.pb-8  { padding-bottom: 8rem !important; }
.mb-7  { margin-bottom: 7rem !important; }
@media (min-width: 992px) {
  .py-lg-8 { padding-top: 8rem !important; padding-bottom: 8rem !important; }
  .pt-lg-9 { padding-top: 9rem !important; }
}

/* ----------------------------------------------------------------
   Top navbar (dentro de main-content)
   ---------------------------------------------------------------- */
#navbar-main {
  background: linear-gradient(87deg, #5e72e4 0, #825ee4 100%);
  padding: 1rem 1.5rem;
  border: 0;
}

#navbar-main .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 0;
  padding-bottom: 0;
}

/* Top navbar — auth layout (transparente) */
.navbar-transparent {
  background: transparent !important;
}

.navbar-transparent .navbar-brand {
  color: #fff;
}

/* ----------------------------------------------------------------
   Avatar circular
   ---------------------------------------------------------------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 0;
  background-color: #dee2e6;
  vertical-align: middle;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-sm {
  width: 36px;
  height: 36px;
}

.avatar-lg {
  width: 58px;
  height: 58px;
  font-size: 1.5rem;
}

/* ----------------------------------------------------------------
   Bootstrap 4 → 5: input-group-prepend/append compat
   ---------------------------------------------------------------- */
.input-group-prepend,
.input-group-append {
  display: flex;
}

.input-group-prepend .input-group-text {
  border-radius: 0.375rem 0 0 0.375rem;
}

.input-group-append .input-group-text {
  border-radius: 0 0.375rem 0.375rem 0;
}

/* ----------------------------------------------------------------
   Input group alternativo (sin bordes, con sombra)
   ---------------------------------------------------------------- */
.input-group-alternative {
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.15), 0 1px 0 rgba(0, 0, 0, 0.02);
  border: 0;
  border-radius: 0.375rem;
  transition: box-shadow 0.15s ease;
  background-color: #fff;
}

.input-group-alternative:focus-within {
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.input-group-alternative .input-group-text {
  background-color: transparent;
  border: 0;
  color: #adb5bd;
  padding-right: 0;
}

.input-group-alternative .form-control {
  border: 0;
  box-shadow: none;
  background-color: transparent;
}

.input-group-alternative .form-control:focus {
  box-shadow: none;
}

/* Estado inválido — se agrega via JS con .addClass("input-invalid") */
.input-group-alternative.input-invalid {
  box-shadow: 0 1px 3px rgba(245, 54, 92, 0.5), 0 1px 0 rgba(0, 0, 0, 0.02) !important;
}
.input-group-alternative.input-invalid .input-group-text {
  color: var(--argon-danger);
}
.input-group-alternative.input-invalid .form-control::placeholder {
  color: rgba(245, 54, 92, 0.6);
}

/* ----------------------------------------------------------------
   Márgenes negativos (estilo Argon para "elevar" tarjetas)
   ---------------------------------------------------------------- */
.mt--8  { margin-top: -8rem !important; }
.mt--7  { margin-top: -6rem !important; }
.mt--6  { margin-top: -4.5rem !important; }
.mt--5  { margin-top: -3rem !important; }
.mb--7  { margin-bottom: -6rem !important; }

/* ----------------------------------------------------------------
   Footer dentro del panel
   ---------------------------------------------------------------- */
.footer {
  padding: 1.25rem 1.5rem;
  background: transparent;
}

/* ----------------------------------------------------------------
   Tarjeta stat (dashboard cards)
   ---------------------------------------------------------------- */
.card-stat .card-body {
  padding: 1.25rem 1.5rem;
}

.card-stat .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #fff;
}

/* ----------------------------------------------------------------
   Colores de texto Argon
   ---------------------------------------------------------------- */
.text-primary  { color: var(--argon-primary)   !important; }
.text-success  { color: var(--argon-success)   !important; }
.text-info     { color: var(--argon-info)      !important; }
.text-warning  { color: var(--argon-warning)   !important; }
.text-danger   { color: var(--argon-danger)    !important; }
.text-default  { color: var(--argon-default)   !important; }

/* Colores Nucleo icon */
.ni.text-primary  { color: var(--argon-primary)   !important; }
.ni.text-success  { color: var(--argon-success)   !important; }
.ni.text-green    { color: var(--argon-success)   !important; }
.ni.text-info     { color: var(--argon-info)      !important; }
.ni.text-warning  { color: var(--argon-warning)   !important; }
.ni.text-yellow   { color: var(--argon-warning)   !important; }
.ni.text-danger   { color: var(--argon-danger)    !important; }
.ni.text-red      { color: var(--argon-danger)    !important; }

/* ----------------------------------------------------------------
   Botón primario Argon (override Bootstrap)
   ---------------------------------------------------------------- */
.btn-primary {
  background: var(--argon-primary);
  border-color: var(--argon-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #4a5fe0;
  border-color: #4a5fe0;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ----------------------------------------------------------------
   Navbar user dropdown
   ---------------------------------------------------------------- */
.navbar-top .dropdown-menu {
  margin-top: 0.5rem;
  border: 0;
  box-shadow: 0 50px 100px rgba(50, 50, 93, 0.1), 0 15px 35px rgba(50, 50, 93, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-top .dropdown-item {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.navbar-top .dropdown-item i {
  margin-right: 0.5rem;
  font-size: 0.875rem;
}

/* ----------------------------------------------------------------
   Sidebar toggler para móviles (botón hamburguesa)
   ---------------------------------------------------------------- */
.navbar-toggler-sidenav {
  border: 0;
  background: transparent;
  padding: 0.25rem 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Overlay para cerrar sidebar en móvil */
.sidenav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1035;
}

.sidenav-overlay.active {
  display: block;
}

@media (max-width: 767px) {
  .sidenav {
    left: calc(-1 * var(--argon-sidebar-w));
  }

  .sidenav.show {
    left: 0;
  }

  .main-content {
    margin-left: 0 !important;
  }
}

/* ----------------------------------------------------------------
   Misc
   ---------------------------------------------------------------- */
body {
  font-family: "Open Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: #525f7f;
  background-color: #f8f9fe;
}

.font-weight-bold { font-weight: 700 !important; }

/* Cards con bordes suaves */
.card {
  box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
  border: 0;
  border-radius: 0.375rem;
}

.card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 0.375rem 0.375rem 0 0;
}

.card-header:first-child {
  border-radius: 0.375rem 0.375rem 0 0;
}

/* Página vacía — placeholder */
.page-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 300px;
  color: #adb5bd;
}

.page-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ================================================================
   Med Layout — Portal Médicos (diseño producción)
   Paleta: #019cde (azul principal), sidebar blanco, fondo gris claro
   ================================================================ */

/* ── Override: paleta primaria medicos ──────────────────────── */
:root {
  --argon-primary: #019cde;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #017ab0 !important;
  border-color:     #017ab0 !important;
  box-shadow: 0 4px 6px rgba(0, 156, 222, 0.25), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* ── Body base medicos ──────────────────────────────────────── */
.med-body {
  background: #f4f6f9;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.med-sidebar {
  width: 220px;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.07);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  transition: left 0.25s ease;
}

.med-sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.med-sidebar-logo a {
  display: block;
}

.med-sidebar-logo img {
  height: 36px;
  max-width: 100%;
}

/* Nav list */
.med-nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.med-nav li > a {
  display: block;
  padding: 11px 20px;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.med-nav li > a:hover {
  background: #f0f8fd;
  color: #019cde;
}

.med-nav li.active > a {
  border-left-color: #019cde;
  color: #019cde;
  font-weight: 700;
  background: #f0f8fd;
}

/* Divisor horizontal dentro del nav */
.med-nav .med-nav-divider {
  height: 0;
  border: 0;
  border-top: 1px solid #efefef;
  margin: 6px 0;
  pointer-events: none;
}

/* Footer del sidebar */
.med-sidebar-bottom {
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.med-logout {
  display: block;
  color: #888;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.med-logout:hover {
  color: #c0392b;
}

.med-logout i {
  margin-right: 6px;
}

/* ── Overlay móvil ──────────────────────────────────────────── */
.med-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1045;
}

.med-overlay.active {
  display: block;
}

/* ── Main content ───────────────────────────────────────────── */
.med-main {
  margin-left: 220px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topnav ─────────────────────────────────────────────────── */
.med-topnav {
  background: #019cde;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
}

.med-hamburger {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.2rem;
  padding: 4px 8px;
  cursor: pointer;
  display: none;
  line-height: 1;
}

.med-topnav-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

/* Búsqueda */
.med-search {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  overflow: hidden;
}

.med-search-input {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.82rem;
  outline: none;
  width: 180px;
}

.med-search-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.med-search-btn {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}

.med-search-btn:hover {
  color: #fff;
}

/* Usuario */
.med-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 8px;
}

.med-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.med-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.med-user-name {
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Page header — banda azul ───────────────────────────────── */
.med-page-header {
  background: #019cde;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 72px;
  flex-shrink: 0;
}

/* Botón blanco para acciones sobre fondo azul */
.med-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #019cde;
  border: 0;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.med-btn-white:hover {
  background: #e8f6ff;
  color: #017ab0;
}

/* ── Content area ───────────────────────────────────────────── */
.med-content {
  flex: 1;
}

.med-page-body {
  padding: 24px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.med-footer {
  padding: 14px 24px;
  color: #aaa;
  font-size: 0.78rem;
  border-top: 1px solid #eaeaea;
  background: #fff;
  margin-top: auto;
}

/* ── Tabla medicos ──────────────────────────────────────────── */
.med-table thead th {
  background: #f8f9fa;
  font-size: 0.74rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  border-top: 0;
  border-bottom: 1px solid #dee2e6;
}

.med-table tbody td {
  font-size: 0.85rem;
  padding: 10px 16px;
  vertical-align: middle;
  color: #444;
  border-color: #f2f2f2;
}

.med-table tbody tr:hover td {
  background: #fafcff;
}

/* Badges de status */
.badge-med {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
  white-space: nowrap;
}

.badge-med-success   { background: #e3f9ed; color: #1a8c48; }
.badge-med-warning   { background: #fff3cd; color: #856404; }
.badge-med-danger    { background: #fde8ea; color: #b02a37; }
.badge-med-info      { background: #e0f4ff; color: #0274a8; }
.badge-med-secondary { background: #f0f0f0; color: #666;    }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  .med-sidebar {
    left: -220px;
  }

  .med-sidebar.show {
    left: 0;
  }

  .med-main {
    margin-left: 0;
  }

  .med-hamburger {
    display: block;
  }
}

/* ================================================================
   Componentes de formulario Argon (compat con diseño producción)
   ================================================================ */

/* Section heading pequeño: INFORMACIÓN, INFORMACIÓN DEL PRODUCTO */
.heading-small {
  padding-top:    0.25rem;
  padding-bottom: 0.25rem;
  font-size:      0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Bootstrap 4 padding-left → BS5 ps-* (compat) */
.pl-lg-4 {
  padding-left: 1.5rem !important;
}

/* Label de campo de formulario */
.form-control-label {
  font-size:     0.875rem;
  font-weight:   600;
  color:         #525f7f;
  margin-bottom: 0.5rem;
  display:       inline-block;
}

/* Input alternativo (sin borde, con sombra suave — igual que producción) */
.form-control-alternative {
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.15),
              0 1px 0   rgba(0,  0,  0,  0.02) !important;
  border: 0 !important;
  transition: box-shadow 0.15s ease;
}

.form-control-alternative:focus {
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11),
              0 1px 3px rgba(0,  0,  0,  0.08) !important;
  outline: 0;
}

/* Indicador de campo requerido (*) en rojo */
.required-field {
  color:       #ff0000;
  font-weight: 600;
  margin-left: 2px;
}

/* Botón azul para controles dentro de input-group (Buscar/Borrar) */
.btn-card-top {
  background:    #019cde;
  color:         #fff;
  border:        0;
  border-radius: 0 4px 4px 0;
  font-size:     0.82rem;
  padding:       6px 14px;
  white-space:   nowrap;
  transition:    background 0.15s;
}

.btn-card-top:hover,
.btn-card-top:focus {
  background: #017ab0;
  color: #fff;
}

/* ── Typeahead / Autocomplete de productos ──────────────────── */
.med-typeahead-wrapper {
  position: relative;
}

.med-typeahead-list {
  position:      absolute;
  top:           100%;
  left:          0;
  right:         0;
  z-index:       1050;
  background:    #fff;
  border:        1px solid #dee2e6;
  border-top:    0;
  border-radius: 0 0 6px 6px;
  max-height:    220px;
  overflow-y:    auto;
  box-shadow:    0 4px 8px rgba(0, 0, 0, 0.08);
}

.med-typeahead-item {
  padding:       8px 14px;
  font-size:     0.85rem;
  color:         #444;
  cursor:        pointer;
  border-bottom: 1px solid #f4f4f4;
  transition:    background 0.1s;
}

.med-typeahead-item:last-child {
  border-bottom: 0;
}

.med-typeahead-item:hover,
.med-typeahead-item.active {
  background: #f0f8fd;
  color:      #019cde;
}

.med-typeahead-empty {
  padding:    10px 14px;
  font-size:  0.82rem;
  color:      #aaa;
  font-style: italic;
}

/* Estado de error en campos */
.form-control.is-invalid {
  border:     1px solid #f5365c !important;
  box-shadow: 0 1px 3px rgba(245, 54, 92, 0.35) !important;
}

.form-control.is-invalid::placeholder {
  color: rgba(245, 54, 92, 0.6);
}

/* ================================================================
   CREAR CUPÓN — lista de cupones
   ================================================================ */

/* Contenedor tabla de cupones */
.coupons-table {
  padding: 0 24px;
}

/* Fila de filtros (Ordenar por / Ver) */
.coupon-filters {
  padding-bottom: 16px;
}

/* Cada item de cupón */
.coupons-row {
  border-top:    1px solid #eee;
  border-bottom: 1px solid #eee;
  padding:       16px 0;
}

.coupons-row + .coupons-row {
  border-top: 0;
}

/* Nombre del producto (negrita, color Argon) */
.coupon-product-name {
  font-weight: 700;
  font-size:   1rem;
  color:       #525f7f;
}

/* Descripción del cupón */
.coupon-desc {
  font-size:  0.875rem;
  color:      #6c757d;
  line-height: 1.45;
}

/* Columna derecha: monto + botón */
.coupon-amount-container {
  text-align: right;
}

/* Monto monetario grande */
.coupon-amount {
  font-size:   1.8rem;
  color:       #525f7f;
  line-height: 1.2;
}

/* Sección inferior: Expira + botón Generar */
.bottom-section {
  padding-top: 10px;
  margin-top:  4px;
}

/* Botón Generar cupón alineado a la derecha */
.coupon-btn {
  text-align: right;
}

/* ================================================================
   TOPNAV — dropdown de usuario
   ================================================================ */

/* Botón disparador: sin estilos de button, hereda area de usuario */
.med-user-btn {
  display:     flex;
  align-items: center;
  gap:         10px;
  background:  transparent;
  border:      0;
  padding:     0;
  cursor:      pointer;
  outline:     none;
}

.med-user-btn:focus,
.med-user-btn:focus-visible {
  outline:    none;
  box-shadow: none;
}

/* Ocultar caret de Bootstrap */
.med-user-btn::after {
  display: none;
}

/* Menú desplegable */
.med-user-dropdown {
  min-width:     200px;
  border:        0;
  border-radius: 6px;
  box-shadow:    0 4px 20px rgba(0, 0, 0, 0.15);
  padding:       8px 0;
  margin-top:    8px;
}

/* Encabezado BIENVENIDO! */
.med-user-dropdown .dropdown-header {
  font-size:      0.7rem;
  letter-spacing: 0.06em;
  color:          #8898aa;
  padding:        6px 16px;
}

/* Divider */
.med-user-dropdown .dropdown-divider {
  margin:       4px 0;
  border-color: #f0f0f0;
}

/* Item Salir */
.med-user-dropdown-item {
  display:     flex;
  align-items: center;
  font-size:   0.875rem;
  color:       #525f7f;
  padding:     8px 16px;
  transition:  background 0.15s;
  text-decoration: none;
}

.med-user-dropdown-item:hover {
  background: #f4f6f9;
  color:      #019cde;
}
