/* NC INSUMOS MEDICOS - SISTEMA DE ESTILOS PREMIUM - DARK MINIMALIST EDITION */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta Oscura Minimalista con Acento Cian */
  --bg-pure: #ffffff;          /* Conservado para la previsualización de impresión */
  --bg-main: #131720;          /* Fondo gris azulado oscuro principal */
  --bg-card: #1d232f;          /* Fondo de tarjetas gris oscuro */
  --bg-dark: #0b0d12;          /* Gris oscuro profundo para barras secundarias y sidebar */
  --bg-dark-card: #1d232f;     /* Tarjetas de login y popups */
  
  --text-main: #f1f5f9;        /* Texto principal blanco brillante */
  --text-muted: #94a3b8;       /* Texto secundario gris plata */
  --text-light: #64748b;       /* Texto atenuado gris oscuro */
  --text-white: #ffffff;
  
  --border: rgba(255, 255, 255, 0.08); /* Bordes sutiles semi-transparentes */
  --border-dark: #1b1e25;
  
  --accent: #00d2ff;           /* Cian eléctrico */
  --accent-glow: rgba(0, 210, 255, 0.15);
  --accent-dark: #00a8e8;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --font-sans: 'Outfit', 'Inter', sans-serif;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y Estilos Globales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 50% 50%, #202633 0%, #0c0e14 100%) no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* Animaciones */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 4px var(--accent)); }
  50% { opacity: 0.8; filter: drop-shadow(0 0 15px var(--accent)); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header / Navegación */
header.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(10, 11, 14, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8%;
  z-index: 1000;
  transition: var(--transition);
}

header.main-nav.scrolled {
  height: 70px;
  background: rgba(10, 11, 14, 0.95);
  box-shadow: var(--shadow-sm);
}

.logo-container {
  height: 48px;
  display: flex;
  align-items: center;
  color: var(--text-white);
}

.logo-container svg {
  height: 100%;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 35px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  position: relative;
  padding: 5px 0;
}

.nav-links a:hover {
  color: var(--text-white);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  background: var(--text-white);
  color: var(--bg-dark);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--text-white);
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: transparent;
  color: var(--text-white);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 8% 80px 8%;
  background: radial-gradient(circle at 80% 20%, #151b26 0%, var(--bg-main) 70%);
  overflow: hidden;
}

.hero-content {
  max-width: 650px;
  z-index: 2;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-size: 3.8rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -1.5px;
  margin-bottom: 25px;
}

.hero h1 span {
  font-weight: 300;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 550px;
  font-weight: 300;
}

.cta-group {
  display: flex;
  gap: 15px;
}

.btn-primary {
  background: var(--text-white);
  color: var(--bg-dark);
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--text-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--text-white);
  transform: translateY(-2px);
}

/* Animación ECG Interactiva Hero */
.hero-animation {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 48%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.9;
  z-index: 1;
}

.ecg-svg-canvas {
  width: 100%;
  height: auto;
  max-width: 600px;
}

.animated-pulse-path {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 8s linear infinite;
}

.animated-pulse-path.accent {
  stroke: var(--accent);
  stroke-width: 3.5;
  filter: drop-shadow(0 0 10px var(--accent));
  animation: drawLine 6s linear infinite;
}

/* Sección Corporativa: Quiénes Somos */
.section {
  padding: 120px 8%;
  background: var(--bg-main);
  position: relative;
}

.section.alt {
  background: var(--bg-dark);
}

.section-header {
  max-width: 600px;
  margin-bottom: 70px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

/* Grid de Tarjetas de Servicios/Productos */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--text-white);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.card:hover::before {
  transform: scaleX(1);
}

.card.accent::before {
  background: var(--accent);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  font-size: 1.5rem;
  color: var(--text-white);
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--text-white);
  color: var(--bg-dark);
}

.card.accent:hover .card-icon {
  background: var(--accent);
  color: var(--bg-dark);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 15px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.5;
}

/* Banner de Calidad Médica */
.quality-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-white);
  padding: 80px 8%;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 60px 8%;
  position: relative;
  overflow: hidden;
}

.quality-banner::after {
  content: '';
  position: absolute;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,210,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.quality-text {
  max-width: 600px;
}

.quality-text h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.quality-text p {
  color: var(--text-muted);
  font-weight: 300;
}

.quality-stats {
  display: flex;
  gap: 50px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
}

.stat-num span {
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 10px;
}

/* Formulario de Contacto */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 20px;
}

.contact-info p {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 30px;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.info-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.info-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.info-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-control option {
  background-color: #1a1f29 !important;
  color: #ffffff !important;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer Público */
footer.main-footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 80px 8% 40px 8%;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo-container {
  color: var(--text-white);
  margin-bottom: 25px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 20px;
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-white);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PORTAL DE AUTENTICACIÓN (LOGIN)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #050607 0%, var(--bg-main) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,210,255,0.06) 0%, transparent 60%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 45px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.auth-header {
  text-align: center;
  margin-bottom: 35px;
}

.auth-header .logo-container {
  justify-content: center;
  color: var(--text-white);
  height: 55px;
  margin-bottom: 20px;
}

.auth-header h2 {
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

.auth-card label {
  color: var(--text-muted);
}

.auth-card .form-control {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text-white);
}

.auth-card .form-control:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-accent {
  width: 100%;
  background: var(--text-white);
  color: var(--bg-dark);
  padding: 12px;
  border: 1px solid var(--text-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn-accent:hover {
  background: transparent;
  color: var(--text-white);
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
}

.auth-footer a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--text-white);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   PANEL DE CONTROL DE ADMINISTRACIÓN (DASHBOARD)
   ========================================================================== */
.dash-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--bg-main);
}

/* Sidebar */
.dash-sidebar {
  width: 260px;
  background: var(--bg-dark);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  border-right: 1px solid var(--border);
}

.dash-logo-box {
  height: 80px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-white);
}

.dash-menu {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.dash-menu-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.dash-menu-item.active a, .dash-menu-item a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-white);
}

.dash-menu-item.active a {
  border-left: 3px solid var(--accent);
  padding-left: 13px;
  color: var(--accent);
}

.dash-footer-box {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--accent);
  border: 1px solid var(--border);
}

.user-info-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
}

.user-info-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-logout {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 4px;
  font-weight: 500;
}

/* Main Content Wrapper */
.dash-main {
  flex-grow: 1;
  margin-left: 260px;
  padding: 40px;
  min-height: 100vh;
}

.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.dash-topbar h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.dash-topbar .date-stamp {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Resumen Cards (Metrics) */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.metric-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.metric-data h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-white);
  margin-top: 5px;
}

.metric-data p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 210, 255, 0.05);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Dashboard Views (Content boxes) */
.dash-view-box {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.dash-view-box.active {
  display: block;
}

/* Dashboard Tables */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.table-header-box {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dash-table th {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.dash-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-white);
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.badge-role {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-role.admin {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-role.secretaria {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.badge-role.empleado {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.action-btns {
  display: flex;
  gap: 8px;
}

.btn-icon-danger {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   MODULO GENERADOR DE PRESUPUESTO (ADMIN PANEL)
   ========================================================================== */
.budget-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.budget-grid > div {
  min-width: 0;
}

.budget-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.budget-form-card h3 {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  font-size: 1.2rem;
  color: var(--text-white);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.row-3 {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 15px;
}

/* dynamic items list */
.items-list-container {
  margin: 25px 0;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.items-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.items-list-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.budget-item-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px 40px;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

/* Budget Preview Section */
.budget-preview-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.preview-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   DOCUMENTO FISICO DEL PRESUPUESTO (REPRESENTACIÓN A4 MUESTRA)
   ========================================================================== */
.budget-sheet-wrapper {
  background: #ffffff;          /* FIJO: El documento físico impreso siempre es blanco */
  border: 1px solid #c8d2db;
  box-shadow: var(--shadow-md);
  border-radius: 4px;
  padding: 40px;
  color: #000000;              /* FIJO: Texto siempre negro para legibilidad e impresión */
  font-family: 'Outfit', 'Inter', Arial, sans-serif;
  font-size: 13px;
  min-height: 842px;           /* Proporción A4 */
  width: 100%;
  max-width: 595px;            /* Proporción A4 */
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header del Presupuesto (Igual a la imagen) */
.sheet-header {
  background: #000000;
  color: #ffffff;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.sheet-logo-mark {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sheet-logo-svg {
  height: 52px;
  color: #ffffff;
}

.sheet-logo-svg svg {
  height: 100%;
  width: auto;
}

.sheet-cuit {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffffff;
}

/* Info del Cliente y Fecha */
.sheet-info-block {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.sheet-client-box {
  max-width: 60%;
}

.sheet-title-label {
  background: #000000;
  color: #ffffff;
  padding: 8px 30px;
  font-weight: 700;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.sheet-client-details {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  color: #000000;
}

.sheet-date-box {
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: #000000;
}

/* Campos de Paciente, Médico y Expediente */
.sheet-metadata-block {
  border-left: 2px solid #000000;
  padding-left: 15px;
  margin-bottom: 35px;
}

.sheet-meta-row {
  margin-bottom: 8px;
  font-size: 13px;
  color: #000000;
}

.sheet-meta-row strong {
  font-weight: 700;
}

/* Tabla de Productos del Presupuesto */
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.sheet-table th {
  background: #000000;
  color: #ffffff;
  padding: 10px 15px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  text-align: left;
  letter-spacing: 0.5px;
}

.sheet-table th:first-child {
  width: 70px;
  text-align: center;
}

.sheet-table th:last-child {
  width: 180px;
  text-align: right;
}

.sheet-table td {
  padding: 12px 15px;
  font-size: 12px;
  font-weight: 500;
  vertical-align: top;
  line-height: 1.4;
  color: #000000;
}

.sheet-table td:first-child {
  text-align: center;
  font-weight: 700;
}

.sheet-table td:last-child {
  text-align: right;
  white-space: pre-line;
  font-weight: 600;
}

.sheet-table tr {
  border-bottom: 1px solid #ffffff; /* invisibles por defecto como en la muestra */
}

/* Marca y Son Texto */
.sheet-brand-box {
  margin-top: 15px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 25px;
  color: #000000;
}

.sheet-total-text {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 40px;
  letter-spacing: 0.5px;
  color: #000000;
}

.sheet-bottom-line {
  border-bottom: 3px solid #000000;
  margin-top: auto;
  padding-top: 20px;
}

/* ==========================================================================
   DISEÑO RESPONSIVO
   ========================================================================== */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    padding-top: 140px;
    text-align: center;
  }
  .hero-content {
    margin-bottom: 50px;
  }
  .hero-animation {
    position: relative;
    width: 100%;
    height: 300px;
    transform: none;
    top: 0;
  }
  .cta-group {
    justify-content: center;
  }
  .contact-section {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .budget-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header.main-nav {
    padding: 0 4%;
  }
  .nav-links {
    display: none; 
  }
  /* Sidebar responsive como menú drawer lateral */
  .dash-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -260px !important;
    width: 260px !important;
    height: 100vh !important;
    z-index: 3000 !important;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5) !important;
  }
  .dash-sidebar.active {
    left: 0 !important;
  }
  .dash-sidebar .dash-logo-box span,
  .dash-sidebar .dash-menu-item span,
  .dash-sidebar .user-info-name,
  .dash-sidebar .user-info-role,
  .dash-sidebar .btn-logout span {
    display: inline !important;
  }
  .mobile-sidebar-close {
    display: block !important;
  }
  .mobile-dash-sidebar-toggle {
    display: block !important;
  }
  .dash-main {
    margin-left: 0 !important;
    padding: 20px 15px !important;
    width: 100% !important;
  }
  .sheet-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN (PARA GENERAR PDF EXACTO A4)
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }
  
  .budget-sheet-wrapper, .budget-sheet-wrapper * {
    visibility: visible;
  }
  
  .budget-sheet-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .sheet-header {
    background-color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .sheet-title-label {
    background-color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet-table th {
    background-color: #000000 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==========================================================================
   HERO CAROUSEL / SLIDER EXTRA STYLES
   ========================================================================== */
.hero-animation-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-label {
  margin-top: 25px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.partner-badge-wrapper {
  text-align: center;
  padding: 45px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(15px);
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}

.medtronic-logo-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  transition: var(--transition);
}

.medtronic-logo-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ==========================================================================
   MOBILE MENU & RESPONSIVE IMPROVEMENTS
   ========================================================================== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  padding: 5px;
  z-index: 100;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 7, 10, 0.98);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  width: 80%;
  max-width: 300px;
  position: relative;
}

.mobile-nav-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-white);
  transition: var(--transition);
}

.mobile-nav-menu a:hover {
  color: var(--accent);
}

.mobile-menu-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero {
    padding: 100px 4% 40px 4% !important;
  }

  .hero h1 {
    font-size: 2.2rem !important;
    letter-spacing: -1px !important;
    line-height: 1.2 !important;
  }
  
  .hero p {
    font-size: 0.95rem !important;
  }

  .section-header h2 {
    font-size: 1.8rem !important;
  }
  
  .section {
    padding: 60px 4% !important;
  }
  
  .contact-section {
    padding: 0 !important;
  }
}

/* Evitar desbordamiento horizontal y saltos de página laterales */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Grid de Medtronic adaptativo */
.medtronic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Escalar SVG en móviles para que no rompan la caja */
.hero-slide svg {
  width: 100% !important;
  height: auto !important;
  max-height: 240px;
  max-width: 320px;
}

/* Responsivo adicional para celulares */
@media (max-width: 768px) {
  .medtronic-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .hero-animation-carousel {
    height: 250px;
  }
}

/* ==========================================================================
   ESTILOS ADICIONALES PARA INTL-TEL-INPUT (TELÉFONO CON BANDERAS)
   ========================================================================== */
.iti {
  width: 100% !important;
  display: block !important;
}

.iti__country-list {
  background-color: #121419 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  font-family: var(--font-sans) !important;
}

.iti__country:hover, .iti__country.iti__highlight {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.iti__selected-dial-code {
  color: #ffffff !important;
}

.iti__country-name {
  color: #ffffff !important;
}

.iti__search-input {
  background-color: #06070a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   ESTILOS ADICIONALES PARA LOGIN: PESTAÑAS, RECOBRO Y OJITO
   ========================================================================== */
.auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}

.auth-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-toggle-icon {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  user-select: none;
  z-index: 10;
}

.password-toggle-icon:hover {
  color: var(--accent);
}

.password-input-wrapper input {
  padding-right: 45px !important;
}

.auth-forgot-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 8px;
  cursor: pointer;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

