/* ==========================================================================
   TERRINORTE E.I.C.E. - MANUAL DE IDENTIDAD VISUAL OFICIAL
   Girardota - Antioquia
   
   Especificaciones del Manual:
   - Verde Primario: #005027 (RGB 59, 178, 113 / CMYK 72, 0, 70, 0)
   - Amarillo/Oro: #ffc200 (RGB 255, 194, 0 / CMYK 0, 27, 93, 0)
   - Verde Claro Secundario: #3bb271
   - Verde Oscuro Fondo: #00381b
   - Tipografía Principal: 'Fjalla One', sans-serif
   - Tipografía Secundaria/Slogan: 'Varela Round', sans-serif
   - Tipografía Interfaz/Cuerpo: 'Inter', system-ui, sans-serif
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Inter:wght@300;400;500;600;700&family=Varela+Round&display=swap');

:root {
  /* ==========================================================================
     DESIGN TOKENS (MANUAL DE IDENTIDAD INSTITUCIONAL TERRINORTE)
     ========================================================================== */
  --color-primary: #005027;
  --color-primary-dark: #00381b;
  --color-primary-light: #3bb271;
  --color-primary-subtle: #e8f5ed;

  --color-secondary: #ffc200;
  --color-secondary-hover: #e5ad00;
  --color-secondary-light: #fff8e0;
  --color-secondary-subtle: #fef0c7;

  /* Typography */
  --font-heading: 'Fjalla One', sans-serif;
  --font-body: 'Varela Round', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Form & UI Tokens */
  --color-bg-page: #f8fafc;
  --color-surface: #ffffff;
  --color-text-main: #1f2937;
  --color-text-muted: #525a66;
  --color-text-light: #9ca3af;
  --color-border: #e2e8f0;
  --color-border-focus: var(--color-primary);

  /* Legacy Aliases */
  --brand-green: var(--color-primary);
  --brand-green-dark: var(--color-primary-dark);
  --brand-green-mid: #0d6e38;
  --brand-green-light: var(--color-primary-light);
  --brand-green-subtle: var(--color-primary-subtle);
  --brand-green-border: #a8d5be;

  --brand-yellow: var(--color-secondary);
  --brand-yellow-hover: var(--color-secondary-hover);
  --brand-yellow-light: var(--color-secondary-light);
  --brand-yellow-subtle: var(--color-secondary-subtle);

  --font-brand-title: var(--font-heading);
  --font-brand-sub: var(--font-body);

  --bg-app: #f2f5f3;
  --bg-surface: #ffffff;
  --text-main: #1f2937;
  --text-muted: #525a66;
  --text-light: #9ca3af;
  --border-ui: #e2e8f0;

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #0284c7;

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 80, 39, 0.04);
  --shadow-md: 0 6px 12px -2px rgba(0, 80, 39, 0.08), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 14px 24px -4px rgba(0, 80, 39, 0.12), 0 8px 12px -4px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 10px 25px rgba(0, 80, 39, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, svg, picture {
  max-width: 100%;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ==========================================================================
   OFFICIAL MEMBRETE GEOMETRY (PAGE 10 OF BRAND MANUAL)
   ========================================================================== */

/* Top Letterhead Geometric Ribbon */
.institutional-membrete-top {
  position: relative;
  background-color: var(--brand-green);
  color: #ffffff;
  padding: 8px 24px;
  font-family: var(--font-brand-sub);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  border-bottom: 3px solid var(--brand-yellow);
}

.institutional-membrete-top::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 100%;
  background-color: var(--brand-yellow);
  clip-path: polygon(28% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.top-contact-list {
  display: flex;
  gap: 24px;
  align-items: center;
  z-index: 2;
  position: relative;
}

.top-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  opacity: 0.95;
}

.top-contact-item i {
  color: var(--brand-yellow);
}

.top-badge-portal {
  z-index: 2;
  position: relative;
  background-color: var(--brand-green-dark);
  color: var(--brand-yellow);
  border: 1px solid rgba(255, 194, 0, 0.4);
  font-family: var(--font-brand-title);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* Header Navigation */
.btn-hamburger {
  display: none;
  background: transparent;
  border: 1.5px solid var(--border-ui);
  border-radius: var(--radius-sm);
  color: var(--brand-green);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.btn-hamburger .hamburger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: var(--brand-green);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.btn-hamburger:hover, .btn-hamburger:active, .btn-hamburger.is-active {
  background-color: var(--brand-green-subtle);
  border-color: var(--brand-green);
}

.main-nav-header {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-ui);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-identity-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  text-decoration: none;
}

.official-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.escudo-crest-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-right: 1.5px solid var(--border-ui);
  padding-right: 16px;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-text-title {
  font-family: var(--font-brand-title);
  font-size: 1.35rem;
  color: var(--brand-green);
  line-height: 1.05;
  letter-spacing: 0.5px;
}

.brand-text-sub {
  font-family: var(--font-brand-sub);
  font-size: 0.78rem;
  color: var(--brand-green-mid);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-brand-sub);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-main);
}

.btn-nav:hover {
  background-color: var(--brand-green-subtle);
  color: var(--brand-green);
}

.btn-nav.active {
  background-color: var(--brand-green);
  color: #ffffff;
}

.btn-nav-accent {
  background-color: var(--brand-yellow);
  color: var(--brand-green-dark);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-nav-accent:hover {
  background-color: var(--brand-yellow-hover);
  color: var(--brand-green-dark);
  transform: translateY(-1px);
}

/* User Profile Widget */
.user-widget-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--brand-green-subtle);
  padding: 4px 14px 4px 6px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--brand-green-border);
}

.user-widget-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--brand-green);
  color: var(--brand-yellow);
  font-family: var(--font-brand-title);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-widget-info {
  display: flex;
  flex-direction: column;
}

.user-widget-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.1;
}

.user-widget-role {
  font-family: var(--font-brand-sub);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* App Main Container */
.app-viewport {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px;
  min-height: calc(100vh - 240px);
}

/* ==========================================================================
   OFFICIAL INSTITUTIONAL LOGIN PORTAL
   ========================================================================== */

.login-stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 260px);
  padding: 10px 0;
}

.login-auth-card {
  width: 100%;
  max-width: 1080px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-ui);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
}

/* Left Brand Side - Official Brand Identity Pattern */
.login-visual-showcase {
  position: relative;
  background: linear-gradient(135deg, var(--brand-green-dark) 0%, var(--brand-green) 60%, var(--brand-green-mid) 100%);
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Layered Geometric Chevron Angle (from Brand Wallpaper & Folder) */
.login-visual-showcase::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background-color: var(--brand-yellow);
  opacity: 0.18;
  transform: rotate(45deg);
  border-radius: 40px;
  pointer-events: none;
}

.login-visual-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.login-isotipo-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ffffff;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.login-isotipo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-slogan-box {
  margin: 20px 0;
}

.brand-compass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 194, 0, 0.2);
  border: 1px solid var(--brand-yellow);
  color: var(--brand-yellow);
  font-family: var(--font-brand-sub);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.brand-slogan-headline {
  font-family: var(--font-brand-title);
  font-size: 2.2rem;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 12px;
}

.brand-slogan-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #d9ede1;
  font-family: var(--font-body);
}

.brand-key-benefits {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-key-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #ffffff;
}

.brand-key-benefits li i {
  color: var(--brand-yellow);
  font-size: 1.1rem;
}

.login-visual-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  color: #d9ede1;
}

/* Right Login Form Side */
.login-form-wrapper {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #ffffff;
}

.login-role-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-ui);
  margin-bottom: 24px;
}

.role-tab-btn {
  flex: 1;
  padding: 12px 14px;
  text-align: center;
  background: transparent;
  border: none;
  font-family: var(--font-brand-sub);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.role-tab-btn.active {
  color: var(--brand-green);
  font-weight: 700;
}

.role-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--brand-green);
  border-radius: var(--radius-pill);
}

.form-title-group {
  margin-bottom: 20px;
}

.form-main-title {
  font-family: var(--font-brand-title);
  font-size: 1.6rem;
  color: var(--brand-green);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.form-sub-title {
  font-family: var(--font-brand-sub);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-field {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-family: var(--font-brand-sub);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.field-input-box {
  position: relative;
}

.field-input-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.05rem;
}

.field-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--border-ui);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(0, 80, 39, 0.12);
}

.field-input-plain {
  padding-left: 14px;
}

.field-input-pwd {
  padding-right: 42px;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 0.95rem;
  z-index: 5;
  transition: color 0.2s ease;
}

.btn-toggle-pwd:hover {
  color: var(--brand-green);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 22px;
  font-size: 0.84rem;
  font-family: var(--font-brand-sub);
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.form-checkbox-label input {
  accent-color: var(--brand-green);
  width: 16px;
  height: 16px;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  font-family: var(--font-brand-sub);
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-mid) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: linear-gradient(135deg, var(--brand-green-dark) 0%, var(--brand-green) 100%);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-brand-sub);
  font-size: 0.88rem;
  font-weight: 600;
  background-color: #ffffff;
  border: 1.5px solid var(--border-ui);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background-color: var(--bg-app);
  border-color: var(--text-light);
}

.btn-accent-action {
  background: linear-gradient(135deg, var(--brand-yellow) 0%, #fab005 100%);
  color: var(--brand-green-dark);
  font-family: var(--font-brand-sub);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-accent-action:hover {
  background: var(--brand-yellow-hover);
  transform: translateY(-1px);
}

.btn-outline-green {
  background: transparent;
  border: 1.5px solid var(--brand-green);
  color: var(--brand-green);
  font-family: var(--font-brand-sub);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-green:hover {
  background-color: var(--brand-green-subtle);
}

/* Quick Demo Trigger Box */
.demo-preset-panel {
  margin-top: 24px;
  padding: 14px;
  background-color: var(--brand-green-subtle);
  border: 1.5px dashed var(--brand-green-border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.demo-preset-header {
  font-family: var(--font-brand-sub);
  font-weight: 700;
  color: var(--brand-green);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-preset-grid {
  display: flex;
  gap: 8px;
}

.demo-preset-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--brand-green-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.demo-preset-card:hover {
  border-color: var(--brand-green);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ==========================================================================
   WIZARD & COCKPIT COMPONENTS
   ========================================================================== */

.page-header-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-ui);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.page-header-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-green), var(--brand-yellow));
}

.page-header-title {
  font-family: var(--font-brand-title);
  font-size: 1.75rem;
  color: var(--brand-green);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.page-header-subtitle {
  font-family: var(--font-brand-sub);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stepper */
.stepper-nav {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-ui);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.stepper-item.active, .stepper-item.completed {
  opacity: 1;
}

.stepper-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-app);
  border: 2px solid var(--border-ui);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand-title);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.stepper-item.active .stepper-circle {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 80, 39, 0.15);
}

.stepper-item.completed .stepper-circle {
  background-color: var(--brand-green-light);
  border-color: var(--brand-green-light);
  color: #ffffff;
}

.stepper-text-title {
  font-family: var(--font-brand-sub);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.stepper-text-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stepper-bar-divider {
  flex: 1;
  height: 2px;
  background-color: var(--border-ui);
  margin: 0 16px;
}

/* Cards */
.ui-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-ui);
  margin-bottom: 24px;
  overflow: hidden;
}

.ui-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-ui);
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ui-card-title {
  font-family: var(--font-brand-title);
  font-size: 1.3rem;
  color: var(--brand-green);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-card-body {
  padding: 24px;
}

.ui-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-ui);
  background-color: var(--brand-green-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Dropzone & Compression */
.compression-dropzone {
  border: 2px dashed var(--brand-green-border);
  border-radius: var(--radius-md);
  background-color: var(--brand-green-subtle);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compression-dropzone:hover {
  border-color: var(--brand-green);
  background-color: #d8ede0;
}

.dropzone-symbol {
  font-size: 2.2rem;
  color: var(--brand-green);
  margin-bottom: 8px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-brand-sub);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-pill-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-pill-warning {
  background-color: var(--brand-yellow-subtle);
  color: #92400e;
}

.badge-pill-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-pill-info {
  background-color: #e0f2fe;
  color: #075985;
}

/* Cockpit Split Screen */
.cockpit-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  height: calc(100vh - 220px);
}

.cockpit-panel-left {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-ui);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cockpit-panel-right {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-ui);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cockpit-item-row {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.cockpit-item-row:hover {
  background-color: var(--bg-app);
}

.cockpit-item-row.active {
  background-color: var(--brand-green-subtle);
  border-color: var(--brand-green);
}

/* ==========================================================================
   OFFICIAL MEMBRETE FOOTER (PAGE 10 OF BRAND MANUAL)
   ========================================================================== */

.institutional-membrete-footer {
  position: relative;
  background: linear-gradient(180deg, #18241c 0%, #0d1710 100%);
  color: #d1d5db;
  padding: 44px 24px 20px;
  margin-top: 48px;
  border-top: 4px solid var(--brand-yellow);
  overflow: hidden;
}

/* Diagonal Geometric Angle on Footer Base */
.institutional-membrete-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 240px;
  height: 6px;
  background-color: var(--brand-green-light);
}

.footer-content-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand-lockup img {
  height: 48px;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.footer-brand-lockup h4 {
  font-family: var(--font-brand-title);
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.footer-brand-lockup p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #9ca3af;
}

.footer-column-title {
  font-family: var(--font-brand-title);
  color: var(--brand-yellow);
  font-size: 1.1rem;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.footer-contact-list {
  list-style: none;
  font-family: var(--font-brand-sub);
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact-list li i {
  color: var(--brand-yellow);
  margin-top: 3px;
}

.footer-bottom-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #28372d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-brand-sub);
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Modal and Toasts */
.modal-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-content-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header-bar {
  padding: 16px 24px;
  background-color: var(--brand-green);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-brand-title);
  font-size: 1.25rem;
}

.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--brand-green);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  animation: toastIn 0.3s ease forwards;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVILES, TABLETS Y ESCRITORIOS)
   ========================================================================== */

@media (max-width: 992px) {
  .login-auth-card {
    grid-template-columns: 1fr;
    max-width: 580px;
    margin: 0 auto;
  }
  .login-visual-showcase {
    display: none;
  }
  .cockpit-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cockpit-panel-left {
    max-height: 380px;
  }
  .footer-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  /* 1. ENCABEZADO Y BARRA SUPERIOR */
  /* Ocultar información secundaria en móvil (dirección, teléfono, etc.) */
  .institutional-membrete-top {
    display: none !important;
  }

  /* Cabecera pegajosa y limpia */
  .main-nav-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .nav-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    position: relative !important;
  }
  
  /* Simplificar logotipo: Solo Terrinorte y Sistema de Proveedores alineados */
  .brand-identity-lockup {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
  }
  .official-logo-img {
    height: 38px !important;
    width: auto !important;
  }
  .brand-text-block {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
  .brand-text-title {
    font-size: 1.05rem !important;
    font-family: var(--font-brand-title) !important;
    color: var(--brand-green) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    letter-spacing: 0.3px;
  }
  .brand-text-sub {
    display: none !important;
  }

  /* Implementar Menú Hamburguesa accesible (>= 44px) con 3 barras limpias */
  .btn-hamburger {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--border-ui) !important;
    background: #ffffff !important;
    cursor: pointer !important;
    z-index: 1001 !important;
    padding: 0 !important;
  }
  .btn-hamburger .hamburger-bar {
    display: block !important;
    width: 22px !important;
    height: 2.5px !important;
    background-color: var(--brand-green) !important;
    border-radius: 2px !important;
    transition: all 0.2s ease !important;
  }
  .btn-hamburger:active, .btn-hamburger:hover, .btn-hamburger.is-active {
    background: var(--brand-green-subtle) !important;
    border-color: var(--brand-green) !important;
  }

  /* Opciones de navegación desplegables */
  .nav-actions {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    flex-direction: column !important;
    padding: 16px !important;
    gap: 10px !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 3px solid var(--brand-yellow) !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }
  .nav-actions.mobile-open {
    display: flex !important;
  }
  .nav-actions .btn-nav {
    width: 100% !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 10px 16px !important;
    font-size: 0.95rem !important;
    border-radius: var(--radius-sm) !important;
    box-sizing: border-box !important;
  }
  .nav-actions #user-profile-widget {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* 2. CONTENEDOR PRINCIPAL (TARJETA DE LOGIN) */
  /* Alineación central y ancho completo sin márgenes vacíos a la derecha */
  .app-viewport {
    padding: 16px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .login-stage-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  .login-auth-card {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
  }
  .login-form-wrapper {
    width: 100% !important;
    padding: 24px 18px !important;
    box-sizing: border-box !important;
  }
  .form-main-title {
    font-size: 1.35rem !important;
  }
  .form-sub-title {
    font-size: 0.88rem !important;
  }

  /* Botones de acción a ancho completo (100%) y áreas táctiles (>=44px) */
  .btn-primary-action, 
  .btn-secondary-action, 
  .btn-accent-action,
  #btn-identifier-submit {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  .field-input {
    min-height: 44px !important;
    font-size: 16px !important; /* Previene auto-zoom molesto en iOS */
    box-sizing: border-box !important;
  }
  .field-input-box {
    min-height: 44px !important;
  }
  .btn-toggle-pwd {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Tipografía de ayuda legible (>= 14px) */
  .field-help-text, 
  .form-field span {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  /* Distribución de recuadros de prueba en columna (flex-direction: column) */
  .demo-preset-panel {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .demo-preset-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .demo-preset-card {
    width: 100% !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
  }

  /* 3. PIE DE PÁGINA (FOOTER) A ANCHO COMPLETO (100%) Y CENTRADO */
  .institutional-membrete-footer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 32px 18px 24px !important;
    text-align: center !important;
    margin-top: 36px !important;
    overflow: hidden !important;
  }
  .institutional-membrete-footer::before {
    width: 100% !important;
  }
  .footer-content-grid {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 24px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
  }
  .footer-brand-lockup {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    max-width: 100% !important;
  }
  .footer-brand-lockup img {
    margin: 0 auto 12px auto !important;
  }
  .footer-brand-lockup p {
    text-align: center !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
  }
  .footer-column-title {
    text-align: center !important;
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }
  .footer-contact-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
  .footer-contact-list li {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    font-size: 0.88rem !important;
  }
  .footer-bottom-bar {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding-top: 16px !important;
  }

  /* Componentes del Wizard en Móvil */
  .stepper-nav {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }
  .stepper-bar-divider {
    display: none !important;
  }
  .stepper-item {
    width: 100% !important;
  }
  .form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .page-header-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 16px !important;
  }
  .page-header-title {
    font-size: 1.35rem !important;
  }
  .ui-card-footer {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .ui-card-footer button {
    width: 100% !important;
    min-height: 44px !important;
  }
  .toast-stack {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
  }
  .toast-card {
    min-width: auto !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .login-form-wrapper {
    padding: 20px 14px !important;
  }
  .form-main-title {
    font-size: 1.25rem !important;
  }
  .ui-card-body {
    padding: 16px 12px !important;
  }
}

/* ==========================================================================
   SPLIT-SCREEN 50/50 ATOMIC LOGIN ARCHITECTURE (SPEC COMPLIANT)
   ========================================================================== */
.app-viewport.auth-viewport-fullscreen {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-height: 100vh;
}

.auth-split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Visual Column (Left 50% on Desktop) */
.auth-visual-column {
  position: relative;
  background-color: var(--color-primary);
  background-image: linear-gradient(145deg, rgba(0, 80, 39, 0.90) 0%, rgba(0, 42, 20, 0.96) 100%), url('../img/brand_wallpaper_clean.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 48px;
  color: #ffffff;
  box-sizing: border-box;
}

.visual-brand-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.visual-isotipo-wrapper {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.visual-isotipo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.visual-brand-titles {
  display: flex;
  flex-direction: column;
}

.visual-brand-name {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  letter-spacing: 0.5px;
  line-height: 1;
  color: #ffffff;
}

.visual-brand-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.5px;
}

.visual-brand-center {
  margin: 48px 0;
  max-width: 520px;
}

.visual-compass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 194, 0, 0.18);
  border: 1px solid rgba(255, 194, 0, 0.45);
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.visual-headline {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  line-height: 1.08;
  color: #ffffff;
  margin-bottom: 18px;
}

.visual-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 28px;
}

.visual-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.visual-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: #ffffff;
}

.visual-feature-list li i {
  color: var(--color-secondary);
  font-size: 1.1rem;
}

.visual-brand-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}

/* Auth Column (Right 50% on Desktop, 100% on Mobile) */
.auth-form-column {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
}

.auth-form-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  box-sizing: border-box;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-form-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
}

.auth-form-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 6px;
  line-height: 1.15;
}

.auth-form-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Form Groups & Inputs (Atomic States & Accessibility) */
.auth-field-group {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 8px;
}

.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-input-container:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 80, 39, 0.14);
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  color: var(--color-text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px 12px 46px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-main);
  box-sizing: border-box;
  outline: none;
}

.auth-input::placeholder {
  color: var(--color-text-light);
}

.auth-btn-pwd-toggle {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-btn-pwd-toggle:hover {
  color: var(--color-primary);
}

.auth-help-text {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Call to Action Button (100% Solid Primary) */
.auth-btn-cta {
  width: 100%;
  min-height: 48px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 80, 39, 0.1);
}

.auth-btn-cta:hover {
  background-color: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(0, 80, 39, 0.2);
  transform: translateY(-1px);
}

.auth-btn-cta:active {
  transform: translateY(0);
}

/* Secondary Low-Prominence Links */
.auth-secondary-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.auth-link-secondary {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-link-secondary:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.auth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.84rem;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

/* User Detected Banner */
.auth-user-detected-banner {
  background-color: var(--color-primary-subtle);
  border: 1px solid var(--brand-green-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-detected-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-detected-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-detected-name {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.88rem;
}

.auth-detected-sub {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.auth-link-change {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: pointer;
}

.auth-link-change:hover {
  color: var(--color-primary);
}

.auth-btn-secondary {
  background-color: transparent !important;
  color: var(--color-text-muted) !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: none !important;
}

.auth-btn-secondary:hover {
  background-color: #f8fafc !important;
  color: var(--color-text-main) !important;
  border-color: #cbd5e1 !important;
  transform: none !important;
}

.auth-footer-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

/* Responsive Split-Screen Media Queries */
@media screen and (max-width: 900px) {
  .auth-split-screen {
    grid-template-columns: 1fr !important;
    min-height: 100vh !important;
  }
  .auth-visual-column {
    display: none !important;
  }
  .auth-form-column {
    width: 100% !important;
    padding: 32px 20px !important;
    min-height: 100vh !important;
  }
  .auth-form-title {
    font-size: 1.5rem !important;
  }
}
