/* Audiocom Examenes - Light Theme (Based on SVG Templates) */

:root {
  --primary: #007ba6;
  --primary-dark: #005f80;
  --secondary: #004659;
  --text-main: #464749;
  --text-light: #ffffff;
  --text-muted: #888888;
  --bg-body: #f4f6f8;
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --font-family: 'Montserrat', sans-serif;
}

body.examenes-body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Utilities */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.module-wrap {
  width: 100%;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  color: var(--secondary);
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  font-size: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(0, 123, 166, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 166, 0.4);
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-logout,
.btn-back {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover,
.btn-back:hover {
  background: var(--primary);
  color: white;
}

/* Layouts */

/* 1. Welcome Screen (Custom Layout) */
.welcome-screen {
  position: relative;
  overflow: hidden;
  /* Stage 1: Fondo global de oficina */
  background-image: url('../assets/img/bg_office.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.bg-circles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/img/circles_bg.png');
  background-size: contain;
  background-position: right bottom;
  background-repeat: no-repeat;
  z-index: 1;
  opacity: 0.6;
  /* More subtle */
  /* Soft fade from bottom-right to the rest of the screen */
  -webkit-mask-image: radial-gradient(circle at 80% 80%, black 20%, transparent 80%);
  mask-image: radial-gradient(circle at 80% 80%, black 20%, transparent 80%);
}

.welcome-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Center content horizontally */
}

.doctor-overlay {
  position: absolute;
  bottom: 0;
  right: 10%;
  /* Move inwards to overlap the card */
  height: 90vh;
  max-height: 1000px;
  z-index: 20;
  /* Ensure she is in FRONT of the blue card (z-index 15) */
  pointer-events: none;
}

.welcome-content {
  max-width: 1100px;
  width: 95%;
  margin-bottom: 40px;
  text-align: left;
}

.logo-hero {
  max-width: 250px;
  margin: 0 0 40px 0;
}

.title-hero {
  font-size: 42px;
  color: #464749;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.title-hero strong {
  font-weight: 700;
  color: #464749;
  display: block;
}

.text-hero {
  font-size: 16px;
  color: #464749;
  max-width: 500px;
  margin-bottom: 10px;
}

/* Blue Terms Card */
.terms-card-blue {
  background-color: #007ba6;
  border-radius: 40px;
  padding: 40px;
  padding-right: 350px;
  /* Reserve space on the right for the doctor */
  color: white;
  position: relative;
  z-index: 15;
  box-shadow: 0 20px 40px rgba(74, 134, 168, 0.2);
  max-width: 1100px;
  /* Make it wide/long */
  width: 95%;
  text-align: left;
  /* Keep checkboxes aligned left inside the card */
}

.terms-card-blue .actions {
  text-align: center;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 6px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
}

.checkbox-custom input {
  display: none;
}

.checkbox-custom.checked {
  background: white;
}

.checkbox-custom.checked::after {
  content: '✓';
  color: #4a86a8;
  font-weight: bold;
  font-size: 16px;
}

.term-text {
  font-size: 14px;
  line-height: 1.4;
  color: white;
}

.term-text a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.btn-accept {
  background-color: #2c526d;
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-accept:hover:not(:disabled) {
  background-color: #1a3a50;
}

.btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Default: Hide mobile visual on desktop */
.mobile-visual,
.mobile-login-header {
  display: none;
}

/* Hide desktop logo on mobile */
.desktop-logo-container {
  display: none;
}

/* Login Screen Layout - Redesigned to Match Reference */
.login-screen-layout {
  /* Background moved to .login-bg-global */
  background: transparent;

  display: flex;
  flex-direction: row;
  /* Horizontal layout for desktop */
  align-items: center;
  justify-content: center;
  /* Center everything */
  padding-bottom: 0;

  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  /* Content on top */
}

/* Global Background Layer */
.login-bg-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../assets/img/bg_office.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-color: #f4f6f8;
  z-index: 0;
}

/* Desktop: Move form to the right side, overlaying the image */
.login-card-wrapper {
  position: absolute;
  right: 10%;
  /* Adjust as needed */
  top: 50%;
  transform: translateY(-50%);
  width: 35%;
  max-width: 450px;
  margin: 0;
  z-index: 10;
}



/* Background Decoration - NEW: Desktop Background Layer (Wide Strip) */
.desktop-bg-strip {
  display: block;
  position: fixed;
  /* Fixed to viewport to ensure full width */
  top: 53%;
  left: 0;
  width: 125vw;
  height: 55vh;
  transform: translateY(-50%);

  background-image: url('../assets/img/stage2/backgroud-desktop.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 1;
  /* Layer 2: On top of global bg, behind content */
  pointer-events: none;
}

.login-screen-layout::after {
  display: none;
  /* Deprecated in favor of .desktop-bg-strip */
}

/* Desktop Default: Doctors Image (doctoras.png) - Original Layout */
.login-screen-layout::before {
  content: "";
  display: block;

  /* Position Absolute for Desktop Side-by-Side */
  position: absolute;
  left: 5%;
  top: 40%;
  transform: translateY(-50%);

  width: 60%;
  height: 100vh;
  /* Tall enough for the doctors */
  max-width: 1000px;

  background-image: url('../assets/img/stage2/doctoras.png');
  background-size: contain;
  background-position: center left;
  background-repeat: no-repeat;

  margin: 0;
  z-index: 1;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  /* Add depth back */
}

/* Logo Header */
.mobile-login-header {
  display: block;
  /* Always visible */
  position: absolute;
  top: 30px;
  width: 100%;
  text-align: center;
  z-index: 20;
}

.logo-brand-mobile {
  width: 160px;
  height: auto;
}

.login-card-wrapper {
  position: relative;
  width: 90%;
  max-width: 420px;
  margin: -50px auto 0;
  /* Slight overlap with doctors */
  padding: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;

  /* Reset absolute positioning */
  left: auto;
  top: auto;
  transform: none;
}

.login-card {
  width: 100%;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  backdrop-filter: none;
}

.login-card-body {
  background-color: #007ba6;
  border-radius: 25px;
  padding: 35px 30px 60px;
  box-shadow: 0 15px 35px rgba(0, 123, 166, 0.25);
  border: none;
  backdrop-filter: none;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.center-logo {
  display: none;
  /* Hide logo inside card */
}

.title-section,
.text-muted {
  display: none;
}

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

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: none;
  /* Keep natural case */
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(0, 60, 90, 0.2);
  /* Darker transparent blue */
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  font-size: 16px;
  color: #ffffff;
  box-sizing: border-box;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

/* Custom Select Styling to ensure visibility */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Reset colors to standard white text */
  color: #ffffff !important;

  /* Explicit background handling */
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;

  /* FIX: Override padding to prevent text clipping */
  padding: 10px 20px !important;
  padding-right: 40px !important;
  /* Ensure space for arrow */
  opacity: 1 !important;
  height: auto !important;
  /* Allow height to adjust to content */
}

/* Dropdown options: White Background with Dark Text */
select.form-control option {
  background-color: #ffffff !important;
  color: #000000 !important;
}


.form-control:focus {
  border-color: #007ba6;
  outline: none;
  background-color: rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Custom button style for SVG */
.login-form .btn-primary {
  background-color: #007ba6;
  color: white;
  border: none;
  height: 60px;
  /* Optimized height */
  border-radius: 30px;
  /* More rounded */
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 20px;
  /* Readable size */
  margin-top: 30px;
  /* Closer to form */
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  /* Full width in container */
  max-width: 250px;
  /* But limited */
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 8px 20px rgba(0, 123, 166, 0.3);
  /* Soft shadow */
}

.login-form .btn-primary:hover {
  background-color: #006080;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 123, 166, 0.4);
}

/* .msg-error and .field-error removed as we use SweetAlert now */

/* Flatpickr Customization - Premium Modern Dark Theme (Apple/iOS Style) */
.flatpickr-calendar {
  background-color: #1c1c1e !important;
  /* Solid dark grey (iOS System Grey 6) for better contrast */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  border-radius: 18px !important;
  width: auto !important;
  min-width: 340px !important;
  /* Ensure enough width */
  padding: 16px !important;
  margin-top: 10px;
  overflow: visible !important;
  /* Prevent cutting off */
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
  display: none !important;
}

/* Header Section */
.flatpickr-months {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0 16px 0 !important;
  margin-bottom: 12px;
  align-items: center;
}

.flatpickr-month {
  background: transparent !important;
  color: #fff !important;
  fill: #fff !important;
  height: auto !important;
  overflow: visible !important;
}

.flatpickr-current-month {
  font-size: 18px !important;
  padding-top: 0 !important;
  font-weight: 600 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff !important;
  position: relative !important;
  width: 100% !important;
  left: 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #fff !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent !important;
  border: none !important;
  padding: 0 5px !important;
  cursor: pointer;
}

.flatpickr-current-month input.cur-year {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month input.cur-year:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px;
}

/* Navigation Arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
  top: 15px !important;
  /* Center vertically relative to header padding */
  padding: 10px !important;
  height: 40px !important;
  width: 40px !important;
  fill: #0a84ff !important;
  /* iOS Blue Light Mode equivalent for dark bg */
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 50%;
  fill: #fff !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2;
  vertical-align: middle;
}

/* Inner Container */
.flatpickr-innerContainer {
  display: block !important;
  width: 100% !important;
  overflow: visible !important;
}

.flatpickr-rContainer {
  display: block !important;
  width: 100% !important;
}

/* Weekdays */
.flatpickr-weekdays {
  background: transparent !important;
  margin-bottom: 8px;
  width: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

span.flatpickr-weekday {
  color: #8e8e93 !important;
  /* iOS System Grey */
  font-weight: 600 !important;
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: center;
}

/* Days Grid */
.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  padding: 0 !important;
}

.flatpickr-day {
  color: #ffffff !important;
  font-size: 16px !important;
  border-radius: 50% !important;
  width: 14.28% !important;
  /* 100% / 7 days */
  max-width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease-out;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* Hover State */
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: transparent !important;
  cursor: pointer;
}

/* Selected State */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: #0a84ff !important;
  /* iOS Blue */
  color: #fff !important;
  font-weight: 600 !important;
  border-color: #0a84ff !important;
  box-shadow: 0 2px 10px rgba(10, 132, 255, 0.4) !important;
}

/* Today (if not selected) */
.flatpickr-day.today {
  border: none !important;
  color: #0a84ff !important;
  font-weight: 700 !important;
  position: relative;
}

.flatpickr-day.today::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background-color: #0a84ff;
  border-radius: 50%;
}

.flatpickr-day.today.selected {
  color: #fff !important;
}

.flatpickr-day.today.selected::after {
  background-color: #fff;
}

/* Disabled Days */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: #3a3a3c !important;
  /* Darker grey */
  background: transparent !important;
  cursor: not-allowed;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #636366 !important;
  /* Muted text */
}

/* Mobile Responsiveness for Calendar */
@media (max-width: 480px) {
  .flatpickr-calendar {
    width: 90% !important;
    max-width: 340px !important;
    min-width: unset !important;
    padding: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .flatpickr-day {
    height: 40px !important;
    line-height: 40px !important;
    max-width: 40px !important;
    font-size: 15px !important;
  }

  .flatpickr-current-month {
    font-size: 16px !important;
  }

  /* Remove hover background on touch devices to prevent sticky highlight */
  .flatpickr-current-month .flatpickr-monthDropdown-months:hover,
  .flatpickr-current-month input.cur-year:hover {
    background: transparent !important;
  }

  /* Better contrast for weekdays */
  span.flatpickr-weekday {
    color: #c0c0c5 !important;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Date Picker Styles (Global) */
/* Hide original input and flatpickr input */
.form-group input#fecha,
.form-group input.flatpickr-input,
.form-group input.flatpickr-mobile {
  display: none !important;
}

.custom-date-picker {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

/* Match glassmorphism style of other inputs */
.date-select {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 10px !important;
  font-size: 16px !important;
  height: 48px !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.date-select:focus {
  outline: none;
  border-color: #00AEEF !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 8px rgba(0, 174, 239, 0.3);
}

/* Stronger selector to override global styles */
select.date-select:disabled,
.date-select:disabled {
  opacity: 1 !important; /* Force opacity to 1 */
  cursor: not-allowed;
  background-color: #333 !important; /* Solid dark background */
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
}

/* Specific selector to override select.form-control option */
select.date-select option,
.date-select option {
  background-color: #222 !important;
  color: #fff !important;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {

  /* Welcome Screen */
  .welcome-container {
    padding: 20px;
    align-items: center;
  }

  .welcome-content {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
  }

  .logo-hero {
    margin: 0 auto 30px auto;
  }

  .title-hero {
    font-size: 22px;
    margin-bottom: 5px;
  }

  .mobile-visual {
    display: block;
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 380px;
    margin: 0 auto 20px auto;
  }

  .blue-shape-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 270px;
    background-color: #007ba6;
    border-radius: 20px;
    z-index: 1;
  }

  .mobile-doctor-img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 410px;
    width: auto;
    z-index: 2;
  }

  .text-hero {
    font-size: 14px;
    max-width: 100%;
    margin-bottom: 20px;
    color: #464749;
  }

  .mobile-highlight {
    display: block;
    color: #007ba6;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
  }

  .terms-card-blue {
    padding: 30px 20px;
    padding-right: 20px;
    width: 100%;
    max-width: 400px;
    text-align: left;
    margin-top: 10px;
  }

  .checkbox-row {
    margin-bottom: 15px;
  }

  .term-text {
    font-size: 13px;
  }

  .actions {
    text-align: center;
    margin-top: 20px;
  }

  .btn-accept {
    width: 100%;
  }

  .doctor-overlay {
    display: none;
  }

  .bg-circles {
    background-position: right top;
    background-size: 80%;
    opacity: 0.5;
  }

  .login-screen-layout {
    flex-direction: column;
    /* Stack vertically */
    justify-content: flex-start;
    padding-bottom: 40px;
    padding-top: 110px; /* Make space for logo on mobile */
  }

  /* Reset Form Position for Mobile */
  .login-card-wrapper {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 90%;
    max-width: 420px;
    margin: -50px auto 0;
    left: auto;
  }

  /* Login Screen Mobile Override: Arches Background (backgroud-movil.png) */
  .login-screen-layout::before {
    position: relative;
    /* Reset absolute */
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 50vh;
    min-height: 350px;
    max-width: 100%;

    background-image: url('../assets/img/stage2/backgroud-movil.png');
    background-size: 150% auto;
    background-position: 20% bottom;

    margin-top: 0;
    margin-bottom: -50px;
    filter: none;
    z-index: 0;
  }

  /* Hide Desktop Background on Mobile */
  .login-screen-layout::after,
  .desktop-bg-strip {
    display: none;
  }
}

/* =========================================
   DESKTOP ONLY STYLES (min-width: 993px)
   - Dark transparent form
   - Center-Right positioning
   ========================================= */
@media (min-width: 993px) {
  .login-card-wrapper {
    position: absolute;
    /* Force absolute positioning for desktop */
    right: 20%;
    top: 50%;
    left: auto;
    /* Reset any left override */
    transform: translateY(-50%);
    /* Center vertically */
    margin: 0;
    /* Reset mobile margins */

    width: 45%;
    /* Wider form */
    max-width: 650px;
    /* Allow it to be wider than mobile default */
  }

  .login-card-body {
    /* Dark Transparent Background (Glassmorphism) */
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  /* Ensure inputs look good on dark bg */
  .form-control {
    background-color: rgba(0, 0, 0, 0.2);
    /* Darker input bg */
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .form-control:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: #007ba6;
  }

  /* Desktop Logo Styling */
  .desktop-logo-container {
    display: block;
    position: absolute;
    /* Move outside form flow */
    top: 5%;
    /* Position above the background strip (strip is ~53% center) */
    right: 20%;
    /* Align with the form's right edge (form is right: 20%) */
    text-align: right;
    width: auto;
    /* Auto width to fit content */
    z-index: 20;
    /* Ensure it's above everything */
  }

  /* Hide Mobile Header on Desktop explicitly */
  .mobile-login-header {
    display: none !important;
  }

  .logo-brand-desktop {
    width: 280px;
    /* Bigger logo */
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    /* Better visibility */
  }
}


/* 3. Panel/Dashboard Screen (Rebooted Structure) */
/* Layout Cine */
.cinema-layout {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background-color: white;
  overflow: hidden;
}

.cinema-strip {
  width: 100%;
  height: 8vh;
  /* Altura de las franjas */
  background-color: white;
  flex-shrink: 0;
  z-index: 20;
}

.welcome-split-container {
  display: flex;
  width: 100%;
  flex: 1;
  /* Ocupa el espacio restante entre las franjas */
  background-color: white;
  overflow: hidden;
  position: relative;
}

.welcome-col-left {
  width: 42%;
  /* Reducir ancho para acercar el corte */
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  justify-content: flex-end;
  /* Empujar imagen a la derecha para tocar el borde */
  align-items: flex-end;
  /* Alinear imagen al fondo */
  padding: 0;
}

/* Imagen ajustada para no cortar cabeza ni franja inferior */
.welcome-left-img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom right;
  /* Priorizar esquina inferior derecha para unir con fondo */
}

.welcome-col-right {
  width: 58%;
  /* Aumentar ancho para compensar */
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Center vertically */
  padding: 4rem 6rem;
  /* Espacio lateral generoso */
  /* Fondo con difuminado hacia la izquierda */
  background-image: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 15%), url('../assets/img/bg_office.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Logo superior derecha */
.welcome-logo-top {
  position: absolute;
  top: 3rem;
  right: 4rem;
  z-index: 50; /* Ensure it is above split container in desktop too */
}

.welcome-logo-top .logo-brand-sm {
  height: 40px;
  width: auto;
}

/* Grupos de contenido (Desktop) */
.welcome-header-group {
  width: 100%;
  /* No restricción de ancho para que el logo absolute funcione bien relativo al padre */
}

.welcome-greeting-wrapper,
.welcome-body-group {
  max-width: 600px;
  width: 100%;
}

.welcome-greeting {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 2.5rem;
  /* Drásticamente aumentado */
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.welcome-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  /* Light/Regular */
  font-size: 3rem;
  /* Aumentado considerablemente */
  color: #1f2937;
  margin-bottom: 3rem;
  line-height: 1.2;
}

.action-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.action-card {
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid #1f2937;
  /* Borde oscuro fino */
  border-radius: 20px;
  padding: 1.5rem;
  /* Aumentado padding interno */
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.action-card:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #007BA6 !important;
  /* Forzar borde azul visible */
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 123, 166, 0.25);
}

.card-icon {
  width: 90px;
  /* Aumentado ligeramente */
  height: 90px;
  flex-shrink: 0;
  margin-right: 2rem;
  /* Separación aumentada */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #007BA6;
  /* Fondo azul */
  border-radius: 20px;
  /* Bordes redondeados */
  padding: 15px;
  /* Padding interno para que el icono respire */
}

.card-icon .icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  /* Volver icono blanco */
}

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

.card-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  /* Aumentado */
  color: #1f2937;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-desc {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 1.8rem;
  /* Aumentado considerablemente */
  color: #374151;
}

.logout-container {
  display: flex;
  justify-content: center;
  /* Centrado al formulario */
  margin-top: 1rem;
}

.btn-logout {
  background-color: #004b66;
  /* Azul oscuro corporativo */
  color: white;
  border: none;
  padding: 1rem 3rem;
  /* Aumentado padding */
  border-radius: 50px;
  /* Pill shape */
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  /* Aumentado tamaño fuente */
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-logout:hover {
  background-color: #00384d;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.welcome-card-icon {
  width: 80px;
  height: 80px;
  background-color: #007ba6;
  /* st15 */
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 1.5rem;
}

.welcome-card-icon img {
  width: 60%;
  height: auto;
  filter: brightness(0) invert(1);
}

/* FIX: Stage 3 Missing Decoration Styles */
.deco-object-blue {
  position: absolute;
  top: -120px;
  /* Subido drásticamente para pegarse a la esquina */
  left: -50px;
  /* Ajuste ligero a la izquierda */
  width: 35vw;
  /* Responsive width */
  max-width: 500px;
  height: auto;
  z-index: 15;
  /* Behind text but visible */
  pointer-events: none;
  /* Click-through */
  opacity: 0.9;
}

/* Ensure parent handles absolute positioning */
.cinema-layout {
  position: relative;
}

/* Responsive adjustments for Stage 3 */
@media (max-width: 992px) {
  .cinema-layout {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .welcome-split-container {
    flex-direction: column;
  }

  .welcome-col-left {
    width: 100%;
    height: 300px;
    order: -1;
    margin-top: 3rem; /* Lower the doctor image */
  }

  .welcome-col-right {
    width: 100%;
    padding: 2rem;
    /* Add office background for mobile too */
    background-image: url('../assets/img/bg_office.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Add a white overlay to ensure readability */
    background-color: rgba(255, 255, 255, 0.9);
    background-blend-mode: overlay;
  }

  .welcome-title {
    font-size: 2rem;
  }

  .deco-object-blue {
    width: 180px;
    top: -80px;
    /* Adjusted to be higher up as requested */
    left: -30px;
  }

  /* FIX: Stage 3 Logo Position for Mobile */
  .welcome-logo-top {
    position: absolute;
    top: 10px !important;
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    z-index: 100 !important;
  }

  .welcome-logo-top .logo-brand-sm {
    height: 28px !important; /* Smaller logo */
    width: auto !important;
  }
}
