/* ==========================================================================
   CSS DESIGN SYSTEM: CPCE PORTAL PROFESIONAL & SISTEMA DE BOLETAS
   Curated harmony, premium layout, glassmorphic dark and light themes.
   ========================================================================== */

/* Theme Variables Definition */
:root {
  /* Font Family Definition */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Open Sans', var(--font-body);

  /* Common/Shared Specs */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Native Light Theme Variables */
  --bg-app: #f8fafc;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --bg-elevated: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  --glow-color: transparent;
  
  /* Text colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  /* Palette */
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-light: #f1f5f9;
  --secondary: #475569;
  --secondary-hover: #334155;
  --success: #16a34a;
  --success-hover: #15803d;
  --success-light: #f0fdf4;
  --warning: #ca8a04;
  --danger: #dc2626;
  --danger-hover: #b91c1c;

  /* Orbs */
  --orb-1-color: transparent;
  --orb-2-color: transparent;
}

/* ==========================================================================
   GLOBAL RESET & BASICS
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-app);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Interactive Glowing Background Orbs */
.glow-bg-orb {
  position: fixed;
  border-radius: var(--radius-full);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

.orb-1 {
  width: 50vw;
  height: 50vw;
  max-width: 500px;
  max-height: 500px;
  background: var(--orb-1-color);
  top: -10%;
  right: -5%;
}

.orb-2 {
  width: 45vw;
  height: 45vw;
  max-width: 450px;
  max-height: 450px;
  background: var(--orb-2-color);
  bottom: 5%;
  left: -5%;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.app-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Hide the pseudo-navbar on the login screen */
body:has(#login-section.active-view) .app-header {
  display: none !important;
}

.header-container {
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* User Badge in Header */
.user-mini-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.user-mini-name {
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  gap: 8px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 16px var(--glow-color);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--secondary-hover);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: var(--success-hover);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--border-color);
}

.btn-link {
  background: transparent;
  color: var(--primary);
  padding: 0;
  border: none;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--primary-hover);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
}

.icon-btn:hover {
  background: var(--border-color);
}

/* Theme Toggle Button Icons */
body.dark-theme .icon-sun { display: none; }
body.dark-theme .icon-moon { display: block; }
body.light-theme .icon-sun { display: block; }
body.light-theme .icon-moon { display: none; }

/* ==========================================================================
   GLASS CARDS & CONTAINERS
   ========================================================================== */
.app-main-content {
  flex: 1;
  padding: 40px 0;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.glass-card:hover {}

/* ==========================================================================
   VIEW 1: LOGIN STYLING
   ========================================================================== */
.login-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Institutional Glassmorphism Background & Orbs */
body:has(#login-section.active-view) {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 50%, #bfe1f6 100%) !important;
  position: relative;
  min-height: 100vh;
}

body:has(#login-section.active-view)::before {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  top: -50px;
  left: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 70%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

body:has(#login-section.active-view)::after {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  bottom: -50px;
  right: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, rgba(168, 85, 247, 0) 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.login-header-inside {
  text-align: center;
  margin-bottom: 24px;
}

.login-header-inside h1 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 25px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.5px;
  line-height: 1.3;
  color: #002855;
  margin-bottom: 10px;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  display: inline-block;
  width: 100%;
}

.login-header-inside p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-card {
  padding: 40px;
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-top: 5px solid #002855 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08) !important;
}

.login-logo {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto 24px auto;
  display: block;
}

/* Floating Label Form Controls */
.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-control {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700 !important;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 16px 16px 16px 44px; /* leaves room for the prefix icon */
  outline: none;
}

.floating-label label {
  position: absolute;
  top: 50%;
  left: 44px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

/* Field Focus/Populated styles */
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
  background: var(--bg-card);
}

.form-control:not(:placeholder-shown) {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.form-control:focus ~ label,
.form-control:not(:placeholder-shown) ~ label {
  top: 0;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0 6px;
  transform: translateY(-50%);
  border-radius: var(--radius-xs);
}

.form-control::placeholder {
  font-weight: 400 !important;
  opacity: 0.5;
}

.icon-field {
  margin-right: 6px;
}

/* Field Accent Line */
.field-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
}

.form-control:focus ~ .field-bar {
  left: 0;
  width: 100%;
}

/* Compact Forms (for Dashboard Forms) */
.floating-label.compact {
  margin-bottom: 20px;
}
.floating-label.compact .form-control {
  padding: 12px 14px 12px 14px;
  font-size: 14px;
}
.floating-label.compact label {
  left: 14px;
  font-size: 14px;
}
.floating-label.compact .form-control:focus ~ label,
.floating-label.compact .form-control:not(:placeholder-shown) ~ label {
  left: 10px;
}

/* Textarea styling */
.text-area-control {
  resize: vertical;
  min-height: 80px;
}

/* Dropdown/Select Styling */
.select-control {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.select-label {
  top: 50%;
  pointer-events: none;
}
/* Ensure proper label floating with selects */
.select-control:focus ~ .select-label,
.select-control:valid ~ .select-label,
.select-control:not([value=""]) ~ .select-label {
  top: 0 !important;
  left: 10px !important;
}

/* Actions inside text field (like eye icon) */
.field-action-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  z-index: 2;
}

.field-action-btn:hover {
  color: var(--primary);
}

/* Form controls with labels above the fields */
.form-label-above {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  text-align: left;
}

.form-label-above i {
  color: var(--text-muted);
  margin-right: 6px;
}

.input-relative-wrapper {
  position: relative;
  width: 100%;
}

.form-control-above {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600 !important;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 14px 16px;
  outline: none;
  transition: all 0.2s ease;
}

.form-control-above:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
  background: var(--bg-card);
}

.form-control-above::placeholder {
  font-weight: 400 !important;
  color: var(--text-muted);
  opacity: 0.5;
}

#password.form-control-above {
  padding-right: 44px;
}

/* Advanced SOAP Options Panel */
.advanced-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  overflow: hidden;
}

.advanced-header-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  outline: none;
}

.advanced-header-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.chevron-icon {
}

.advanced-accordion.open .chevron-icon {
}

.advanced-content {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.advanced-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Demo quick access credentials */
.demo-quick-access {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}
.demo-label {
  color: var(--text-muted);
}
.demo-separator {
  color: var(--border-color);
  opacity: 0.5;
  margin: 0 4px;
}

/* Alert Boxes */
.alert-box {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  border: 1px solid transparent;
  font-size: 14px;
}

.alert-box.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Spinner Loader */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
}

/* ==========================================================================
   VIEW 2: DASHBOARD LAYOUT & TABS
   ========================================================================== */
.dashboard-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.dashboard-title-area h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.dashboard-title-area p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Sidebar Tab Controls */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.nav-tab-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  outline: none;
  text-align: left;
}

.nav-tab-btn i {
  font-size: 16px;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(14, 165, 233, 0.2);
}

/* Tab Panels */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* TAB 1: User Profile Styling */
.profile-card-glow {
  padding: 40px;
}

.profile-main-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.profile-avatar-circle {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-heading);
  box-shadow: 0 8px 24px var(--glow-color);
  border: 3px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.receipt-signature-img {
  max-width: 160px;
  max-height: 70px;
  object-fit: contain;
  margin-bottom: 4px;
}

.profile-identity h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.prof-cuit {
  font-size: 13px;
  color: var(--text-muted);
}

/* Fast Info Grid */
.fast-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.fast-info-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.panel-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 32px 0;
}

.section-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* SOAP Attributes Grid (Key-Values list) */
.details-attributes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .details-attributes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-main-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-identity h2 {
    font-size: 22px;
  }
  
  .profile-tags {
    justify-content: center;
  }
  
  .profile-signature {
    margin-left: 0 !important;
    margin-top: 16px;
    width: 100%;
  }
  
  .fast-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .details-attributes-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--primary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-item-box .lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.detail-item-box .val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-item-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* TAB 2: Fee Ticket Generator (Boleta) */
.boletas-creation-card {
  padding: 24px;
}

.boleta-form-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.4fr;
  gap: 24px;
  margin-top: 16px;
}

.form-row-spacing {
  margin-bottom: 16px;
}

.aranceles-grid-spacing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 16px;
  column-gap: 20px;
}

.footer-grid-spacing {
  margin-top: 16px;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.math-row {
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.highlight-field .form-control {
  border-color: rgba(16, 185, 129, 0.4);
  font-size: 18px;
  font-weight: 700;
}
.highlight-field .form-control:focus {
  border-color: var(--success);
}

.tax-info-readouts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.readout-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.readout-val {
  font-weight: 700;
  color: var(--text-main);
}

/* Digital Invoice preview sidebar */
.boleta-summary-preview {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-self: start;
}

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

.ticket-header h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticket-watermark {
  font-size: 10px;
  font-weight: 700;
  background: var(--warning);
  color: black;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.ticket-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.ticket-logo {
  font-size: 24px;
  color: var(--primary);
}

.ticket-logo-row div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ticket-logo-row strong {
  font-size: 14px;
}
.ticket-logo-row span {
  font-size: 10px;
  color: var(--text-muted);
}

.ticket-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.t-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.t-val {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-divider {
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 16px 0;
}

.ticket-money-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.ticket-money-row.sub-tax {
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.ticket-total-row span {
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
}

.total-big {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.ticket-barcode {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.barcode-lines {
  height: 40px;
  width: 100%;
  background: linear-gradient(90deg, 
    #000 0%, #000 5%, transparent 5%, transparent 8%,
    #000 8%, #000 12%, transparent 12%, transparent 15%,
    #000 15%, #000 16%, transparent 16%, transparent 22%,
    #000 22%, #000 26%, transparent 26%, transparent 30%,
    #000 30%, #000 32%, transparent 32%, transparent 35%,
    #000 35%, #000 40%, transparent 40%, transparent 44%,
    #000 44%, #000 45%, transparent 45%, transparent 50%,
    #000 50%, #000 58%, transparent 58%, transparent 62%,
    #000 62%, #000 64%, transparent 64%, transparent 69%,
    #000 69%, #000 75%, transparent 75%, transparent 78%,
    #000 78%, #000 85%, transparent 85%, transparent 88%,
    #000 88%, #000 90%, transparent 90%, transparent 95%,
    #000 95%, #000 100%
  );
  filter: invert(1); /* makes it white barcode in dark mode */
  opacity: 0.7;
}

body.light-theme .barcode-lines {
  filter: invert(0);
}

.barcode-number {
  font-size: 10px;
  font-family: monospace;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* TAB 3: History list and tables */
.history-panel-card {
  padding: 40px;
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.premium-table th {
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.premium-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.premium-table tbody tr {
}

.premium-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.no-data-row {
  padding: 60px 0 !important;
}

.no-data-icon {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ==========================================================================
   MODAL DIALOGS (PRINT PREVIEW)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 19, 0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

body.light-theme .modal-card {
  background: white;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: var(--danger);
}

.modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Printable invoice matching physical standards */
.printable-receipt {
  background: white;
  color: #0f172a;
  padding: 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  font-size: 12px;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.receipt-logo i {
  font-size: 32px;
  color: #0284c7;
}

.receipt-logo h2 {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.receipt-logo h3 {
  font-size: 10px;
  color: #475569;
  font-weight: 600;
}

.receipt-meta {
  display: flex;
  gap: 16px;
}

.r-meta-box {
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.r-lbl {
  font-size: 8px;
  color: #64748b;
  font-weight: 700;
}

.r-val {
  font-size: 12px;
  color: #0f172a;
}

.print-divider {
  border: none;
  border-top: 2px solid #0f172a;
  margin: 20px 0;
}

.receipt-section {
  margin-bottom: 24px;
}

.receipt-section h4 {
  font-size: 10px;
  font-weight: 800;
  color: #0284c7;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
}

.receipt-table td {
  padding: 6px 0;
  vertical-align: top;
}

.receipt-table td.lbl {
  width: 15%;
  color: #64748b;
  font-weight: 600;
}
.receipt-table td.val {
  width: 35%;
  color: #0f172a;
}

.receipt-item-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.receipt-item-table th {
  border-bottom: 2px solid #0f172a;
  padding: 8px;
  text-align: left;
  font-weight: 700;
  color: #0f172a;
}

.receipt-item-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.receipt-item-table tr.total-row td {
  border-top: 2px solid #0f172a;
  border-bottom: 1px solid #0f172a;
  font-weight: 600;
}

.receipt-item-table tr.grand-total-row td {
  background: #f1f5f9;
  border-bottom: 2px solid #0f172a;
  font-size: 14px;
}

.receipt-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 40px;
}

.receipt-signature-block {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sig-line {
  width: 100%;
  border-top: 1px solid #475569;
  margin-bottom: 8px;
}

.sig-line + span {
  font-size: 10px;
  color: #475569;
  text-align: center;
}

.receipt-barcode-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.big-barcode {
  height: 50px;
  width: 250px;
  opacity: 0.9;
  filter: invert(0) !important; /* always dark on receipt */
}

.receipt-barcode-block p {
  font-size: 8px;
  color: #64748b;
  margin-top: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 40px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-note {
  font-size: 10px;
  opacity: 0.7;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */


/* ==========================================================================
   RESPONSIVE DESIGN MEDIA QUERIES
   ========================================================================== */
/* Responsive Grid Helpers (Desktop Defaults) */
.grid-responsive-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-responsive-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-responsive-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.grid-responsive-12-08 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}
.grid-responsive-buttons {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}
.aranceles-prof-bar {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 24px;
  color: #334155;
}
body.dark-theme .aranceles-prof-bar {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .details-attributes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .boleta-form-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    height: 70px;
  }
  .app-main-content {
    padding: 20px 0;
  }
  .login-card {
    padding: 24px;
  }
  .fast-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .grid-responsive-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .grid-responsive-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .grid-responsive-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .grid-responsive-12-08 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .grid-responsive-buttons {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .aranceles-prof-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .details-attributes-grid {
    grid-template-columns: 1fr;
  }
  .fast-info-grid {
    grid-template-columns: 1fr;
  }
  .grid-responsive-4 {
    grid-template-columns: 1fr;
  }
  .logo-sub {
    display: none;
  }
  .logo-title {
    font-size: 16px;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .header-container {
    height: 60px;
  }
}

/* ==========================================================================
   ARANCELBOLETA ADDITIONAL LAYOUT & STYLING
   ========================================================================== */
.form-section-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.triple-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.double-span {
  grid-column: span 2;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.custom-checkbox-wrapper input[type="checkbox"]:checked + .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox-wrapper input[type="checkbox"]:checked + .checkbox-box::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--text-inverse);
  font-size: 10px;
  position: absolute;
}

.checkbox-label {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

.print-impresion-row {
  margin: 12px 0 20px 0;
}

.full-width-readouts {
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0 24px 0;
}

/* Light Theme Neutrals */
body.light-theme .math-row {
  background: #f8fafc;
}
body.light-theme .boleta-summary-preview {
  background: #ffffff;
}
body.light-theme .fast-info-box {
  background: #ffffff;
}
body.light-theme .detail-item-box {
  background: #ffffff;
}

/* ==========================================================================
   PRINT MEDIA QUERY RULES
   ========================================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
    overflow: visible !important;
  }
  
  /* Hide all interactive components */
  .no-print,
  .app-header,
  .app-footer,
  .app-main-content,
  .modal-header,
  .modal-footer,
  .glow-bg-orb {
    display: none !important;
  }
  
  /* Style the print modal area */
  .modal-overlay {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
  }
  
  .modal-card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    max-height: none !important;
  }
  
  .modal-content {
    padding: 0 !important;
    overflow: visible !important;
  }
  
  .printable-receipt {
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* ==========================================================================
   ARANCELES FORM PREMIUM UX/UI STYLING
   ========================================================================== */
.aranceles-subtitle-row {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.aranceles-subtitle-row span {
  cursor: pointer;
  position: relative;
}

.aranceles-subtitle-row span:hover {
  color: var(--secondary);
}

.aranceles-main-title {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: white;
  padding: 14px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px var(--glow-color);
  margin-bottom: 24px;
  font-family: var(--font-heading);
}

.aranceles-prof-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.aranceles-prof-bar div {
  color: var(--text-main);
}

.aranceles-prof-bar span {
  font-weight: 700;
  color: var(--primary);
}

#boleta-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-step-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}



.form-step-header {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-step-number {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 10px var(--glow-color);
}

.form-label-premium {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label-premium i {
  color: var(--primary);
}

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

.premium-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.form-control-premium {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700 !important;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #111827;
  padding: 12px 14px 12px 38px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.form-control-premium::placeholder {
  font-weight: 400 !important;
  opacity: 0.5;
}

.form-control-premium:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 12px var(--glow-color);
  background: var(--bg-card-hover);
}

.form-control-premium.no-icon {
  padding-left: 14px;
}

.form-control-premium.money-input {
  font-size: 16px;
  font-weight: 700 !important;
  text-align: right;
  color: var(--primary);
}

.premium-btn-add {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

/* ==========================================================================
   INLINE ADD-EMPRESA PANEL
   ========================================================================== */
.add-empresa-panel {
  margin-top: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
  animation: slideDownPanel 0.2s ease;
}

@keyframes slideDownPanel {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.add-empresa-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  gap: 8px;
}

.add-empresa-panel-header i {
  font-size: 14px;
}

.add-empresa-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}

.add-empresa-close-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.add-empresa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
}

.add-empresa-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.add-empresa-cuit-field {
  grid-column: 1 / 2;
}

.add-empresa-denom-field {
  grid-column: 2 / 3;
}

.add-empresa-domicilio-field {
  grid-column: 1 / 3;
}

.add-empresa-localidad-field {
  grid-column: 1 / 2;
}

.add-empresa-cp-field {
  grid-column: 2 / 3;
}

.add-empresa-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.add-empresa-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700 !important;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-empresa-input::placeholder {
  font-weight: 400 !important;
  opacity: 0.5;
}

.add-empresa-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--glow-color);
}

.add-empresa-input--error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.add-empresa-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,0.03);
}

.add-empresa-cancel-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.add-empresa-cancel-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.add-empresa-save-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s ease;
}

.add-empresa-save-btn:hover {
  opacity: 0.9;
}

.premium-btn-add:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-add-prof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0;
}

.btn-add-prof:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

body.dark-theme .btn-add-prof {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

body.dark-theme .btn-add-prof:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.premium-checkbox-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
}



.premium-checkbox-card:has(input:checked) {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary), 0 4px 12px var(--glow-color);
}

.premium-checkbox-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.premium-exemption-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.premium-exemption-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.premium-info-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.premium-table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.premium-table-header-title {
  font-weight: 800;
  font-size: 12px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-badge-date {
  font-size: 11px;
  font-weight: 800;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.premium-link-action {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.premium-link-action:hover {
  color: var(--secondary);
}

.btn-premium-action {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px var(--glow-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-premium-action:hover {
  box-shadow: 0 8px 25px var(--glow-color);
}

.btn-premium-action.secondary {
  background: var(--success);
  box-shadow: 0 4px 15px var(--success-light);
}

.btn-premium-action.secondary:hover {
  background: var(--success-hover);
  box-shadow: 0 8px 25px var(--success-light);
}

.premium-calc-output-card {
  margin-top: 30px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.05);
}

.premium-calc-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
}

.premium-calc-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.premium-calc-grid-item .lbl {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-calc-grid-item .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.premium-calc-grid-item .val.highlight {
  color: var(--primary);
}

/* Float visual indicator on inputs */
.boletas-creation-card input:focus,
.boletas-creation-card select:focus {
  border-color: var(--border-focus) !important;
  outline: none;
  box-shadow: 0 0 0 3px var(--glow-color), inset 0 1px 2px rgba(0,0,0,0.05);
}

/* ==========================================================================
   PARTICIPANTES MODULE (boletaUi/participantes.js)
   ========================================================================== */
@media (min-width: 993px) {
  .participantes-box {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0 !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
  }

  #participantes-container {
    gap: 0 !important;
    min-height: auto !important;
  }

  .participante-card-wrapper {
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .participante-card-wrapper:last-child {
    border-bottom: none !important;
  }

  .participantes-header-row {
    display: grid;
    grid-template-columns: 160px 140px 110px 1fr 40px;
    gap: 16px;
    padding: 12px 16px;
    background: var(--primary-light) !important;
    border-bottom: 1px solid var(--border-color) !important;
    margin-bottom: 0 !important;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .participantes-header-row .part-header-col {
    display: flex;
    align-items: center;
  }
  
  .participantes-header-row .col-action {
    justify-content: flex-end;
  }
  
  .participantes-box:has(.participantes-empty) .participantes-header-row {
    display: none !important;
  }

  .participantes-empty {
    padding: 20px 0 !important;
  }
  
  .participante-card {
    display: grid !important;
    grid-template-columns: 160px 140px 110px 1fr 40px !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 10px 16px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  .participante-card.owner {
    background: rgba(2, 132, 199, 0.02) !important;
    border-left: 4px solid var(--border-focus) !important;
    padding-left: 12px !important;
  }

  .participante-card:not(.owner) {
    border-left: 4px solid transparent !important;
    padding-left: 12px !important;
  }
  
  .part-card-header,
  .part-card-body {
    display: contents !important;
  }
  
  .part-field-label {
    display: none !important;
  }
  
  .part-body-field {
    display: block !important;
    width: 100% !important;
  }
  
  .part-role-badge {
    grid-column: 1 !important;
    order: 1 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    width: fit-content !important;
    white-space: nowrap !important;
  }
  
  .part-mat-field {
    grid-column: 2 !important;
    order: 2 !important;
  }
  
  .part-pct-field {
    grid-column: 3 !important;
    order: 3 !important;
  }
  
  .part-status-field {
    grid-column: 4 !important;
    order: 4 !important;
  }
  
  .btn-remove-part,
  .part-header-spacer {
    grid-column: 5 !important;
    order: 5 !important;
    justify-self: end !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
  }
  
  .btn-remove-part {
    border-radius: 50% !important;
  }

  .part-card-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  .part-matricula-wrap,
  .participante-pct-wrap .part-porcentaje,
  .part-denominacion {
    height: 34px !important;
    font-size: 13px !important;
  }

  .participantes-footer {
    padding: 12px 16px !important;
    background: rgba(0, 0, 0, 0.01) !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 0 !important;
  }
}

.participantes-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Estudio Jurídico Panel ─────────────────────────────────────────────── */
.estudio-panel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.estudio-panel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.estudio-icon-ok {
  font-size: 22px;
  color: var(--success);
  flex-shrink: 0;
}

.estudio-panel-nombre {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.estudio-panel-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.estudio-panel-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

.estudio-panel-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.estudio-option-card {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.estudio-option-card input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.estudio-option-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.estudio-option-card i {
  font-size: 16px;
}

#participantes-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 58px;
}

.participantes-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
}

.participante-card-wrapper {
  width: 100%;
  margin-bottom: 10px;
}

/* Card Container */
.participante-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participante-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.participante-card.owner {
  background: linear-gradient(to right, var(--bg-card), var(--primary-light));
  border-left: 4px solid var(--border-focus);
}

/* Card Header */
.part-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.part-role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--text-muted);
}

.part-role-badge.owner {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

.part-header-spacer {
  height: 22px;
}

/* Remove button */
.btn-remove-part {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove-part:hover {
  background: #fef2f2;
  color: var(--danger);
  transform: scale(1.08);
}

/* Card Body Layout */
.part-card-body {
  display: grid;
  grid-template-columns: 180px 120px 1fr;
  gap: 16px;
  align-items: flex-end;
}

/* Field Container & Labels */
.part-body-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.part-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Matrícula Wrapper */
.part-matricula-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  height: 36px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

.part-matricula-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.part-matricula-wrap input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700 !important;
  color: var(--text-main);
  outline: none;
  height: 100%;
}

.part-matricula-wrap input::placeholder {
  font-weight: 400 !important;
  opacity: 0.5;
}

.part-mat-tipo {
  width: 30px;
  text-align: right;
  font-weight: 700 !important;
}

.part-mat-numero {
  flex: 1;
  font-weight: 700 !important;
  min-width: 0;
}

.part-matricula-wrap .part-sep {
  color: var(--text-muted);
  opacity: 0.6;
  font-weight: 600;
  margin: 0 6px;
  user-select: none;
}

/* Owner read-only Matrícula */
.part-matricula-wrap.read-only {
  background: var(--primary-light) !important;
  border-color: var(--border-color) !important;
  box-shadow: none !important;
}

.part-mat-value {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

/* Percentage Field */
.participante-pct-wrap {
  position: relative;
  width: 100%;
}

.participante-pct-wrap .part-porcentaje {
  width: 100%;
  text-align: right;
  padding-right: 32px !important;
  font-weight: 700;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  -moz-appearance: textfield;
}

.participante-pct-wrap .part-porcentaje::-webkit-outer-spin-button,
.participante-pct-wrap .part-porcentaje::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.participante-pct-wrap .part-porcentaje:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.pct-symbol {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* Denominación (Name / Status) */
.part-denominacion {
  height: 36px;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
}

.part-denominacion.loading {
  background: var(--bg-input);
  color: var(--text-muted);
  border-color: var(--border-color);
  opacity: 0.8;
}

.part-denominacion.success {
  background: rgba(22, 163, 74, 0.05);
  color: var(--success);
  border-color: rgba(22, 163, 74, 0.25);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.02);
}

.part-denominacion.error {
  background: rgba(220, 38, 38, 0.05);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.02);
}

.part-denominacion.unverified {
  background: var(--bg-input);
  color: var(--text-muted);
  border-color: var(--border-color);
}

.participantes-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  display: block;
  padding: 10px 0;
}

/* ==========================================================================
   BOLETA SUCCESS TOAST
   ========================================================================== */
.boleta-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--success);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 9999;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ==========================================================================
   MOBILE HAMBURGER & RESPONSIVE DRAWER NAVIGATION
   ========================================================================== */
.mobile-hamburger-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.mobile-hamburger-btn i {
  font-size: 20px;
}

.mobile-menu-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.mobile-menu-header span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

.mobile-menu-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}

.mobile-menu-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--danger);
}

.sidebar-logout-btn {
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px !important;
  color: #dc2626 !important;
  display: flex !important;
}

.sidebar-logout-btn:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

/* Media Query for mobile screen sizes */
@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mobile-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .no-mobile {
    display: none !important;
  }

  .mobile-menu-header {
    display: flex;
  }

  .sidebar-logout-btn {
    margin-top: auto !important;
  }

  /* Off-canvas drawer — standard Bootstrap pattern with smooth transitions */
  .dashboard-nav-tabs {
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dashboard-nav-tabs.open {
    transform: translateX(0);
  }

  /* Dimming overlay */
  .mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
  }

  .mobile-nav-overlay.active {
    display: block;
  }

  /* Card Padding Scale Down */
  .profile-card-glow,
  .boletas-creation-card {
    padding: 24px;
  }
  
  .form-step-card {
    padding: 20px;
  }

  /* Participant cards 2-column layout for tablets and medium viewports */
  .participante-card {
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .part-card-body {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .part-mat-field {
    grid-column: 1 / span 1 !important;
  }

  .part-pct-field {
    grid-column: 2 / span 1 !important;
  }

  .part-status-field {
    grid-column: 1 / span 2 !important;
  }

  .part-denominacion {
    white-space: normal !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
  }

  .part-matricula-wrap,
  .participante-pct-wrap .part-porcentaje {
    height: 42px !important;
  }

  .aranceles-grid-spacing {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .profile-card-glow,
  .boletas-creation-card {
    padding: 20px;
  }

  .grid-responsive-2 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  .profile-card-glow,
  .boletas-creation-card {
    padding: 16px;
  }

  .form-step-card {
    padding: 16px;
  }



  /* Stack Add Empresa grid vertically on mobile */
  .add-empresa-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .add-empresa-field {
    grid-column: auto !important;
  }

  /* Restore original spacing on mobile so it is not affected by desktop compaction */
  .participantes-box {
    padding: 12px !important;
    gap: 12px !important;
  }

  #participantes-container {
    gap: 10px !important;
  }

  .participante-card-wrapper {
    margin-bottom: 16px !important;
  }

  .part-header-spacer {
    height: 28px !important;
  }

  .btn-remove-part {
    width: 28px !important;
    height: 28px !important;
  }

  .form-row-spacing {
    margin-bottom: 20px !important;
  }

  .aranceles-grid-spacing {
    row-gap: 28px !important;
    column-gap: 24px !important;
  }

  .footer-grid-spacing {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
  }
}

@media (max-width: 480px) {
  .participante-card {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .part-card-body {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .part-mat-field,
  .part-pct-field,
  .part-status-field {
    grid-column: 1 / span 1 !important;
  }
}

/* Remove backdrop blurs */
.app-header,
.glass-card,
.modal-card,
.modal-overlay,
.dashboard-nav-tabs {
}

/* Remove glow box-shadows */
.btn:hover,
.btn-primary:hover,
.btn-success:hover,
.btn-premium-action:hover,
.btn-add-prof:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* Remove filter blur on orbs */
.glow-bg-orb {
  display: none !important;
}

/* Styling for date/period part inputs to be bold and black when text is entered */
.date-part-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  padding: 12px 0;
  color: #000000 !important;
  font-weight: 700 !important;
}

.date-part-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 0.8 !important;
}

/* ==========================================================================
   CALC RESULT CARD — SOAP ArancelArancel layout
   ========================================================================== */

/* Top row: Arancel | Escaneo | Total a Depositar */
.calc-result-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 16px;
  margin-bottom: 0;
}

.calc-result-main-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.calc-result-total {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.04);
}

.calc-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.calc-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.calc-val-highlight {
  color: var(--primary);
}

.calc-val-total {
  font-size: 26px;
  color: var(--success);
}

/* Destino del Arancel section */
.calc-result-destino-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 14px 0 8px 0;
  border-top: 1px dashed var(--border-color);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-result-destino-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.calc-destino-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--secondary);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.calc-dest-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.calc-dest-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   BOLETA REVIEW STEP UI
   ========================================================================== */

.calc-result-5-cols {
  grid-template-columns: 1fr 1fr 1fr 1fr 2fr !important;
}

#boleta-review-step {
  animation: fadeIn 0.4s ease forwards;
}

.review-breadcrumb {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.btn-review-back {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-review-back:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.review-breadcrumb-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-summary-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
}

.review-ribbon-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.ribbon-lbl {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ribbon-val {
  font-weight: 700;
  color: var(--text-main);
}

.ribbon-val.highlight {
  color: var(--primary);
}

@media (max-width: 768px) {
  .review-summary-grid {
    grid-template-columns: 1fr;
  }
}



.review-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.review-btn-back {
  padding: 12px 24px;
}

.review-btn-emitir {
  padding: 12px 32px;
  font-size: 15px;
}

@media (max-width: 1024px) {
  .calc-result-5-cols {
    grid-template-columns: 1fr 1fr !important;
  }
  .calc-result-total {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .calc-result-5-cols {
    grid-template-columns: 1fr !important;
  }
  .calc-result-total {
    grid-column: span 1 !important;
  }
  .review-action-row {
    flex-direction: column-reverse;
  }
  .review-btn-back, .review-btn-emitir {
    width: 100%;
    justify-content: center;
  }
}
