:root {
    --background: #000000;
    --background-light: #0A0A0A;
    --gold-accent: #FFB800;
    --gold-hover: #D99A00;
    --gold-light: #FFF8E7;
    --surface: #1A1A1A;
    --surface-light: #2A2A2A;
    --surface-hover: #333333;
    --border: #404040;
    --text-primary: #FFFFFF;
    --text-secondary: #A8A8A8;
    --text-muted: #6B6B6B;
    --error: #FF4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rot_container {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
}

.logos_panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 35vw;
    background: var(--background-light);
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border);
}

.logo-wrapper {
    text-align: center;
    z-index: 1;
}

.logos_panel h1 {
    font-size: 72px;
    margin: 0;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-primary);
}

.logos_panel h2 {
    font-size: 64px;
    margin: 0;
    font-weight: 800;
    letter-spacing: -2px;
}

.tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 16px;
    font-weight: 400;
}

.input_panel {
    flex-grow: 1;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.search-wrapper {
    width: 100%;
    max-width: 600px;
}

.search-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.search-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 40px 0;
}

.golden {
    color: var(--gold-accent);
}

.blue {
    color: var(--text-secondary);
}

.plate-search-container {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.plate-input-control {
    position: relative;
    flex: 1;
    transition: all ease-in-out .3s;
    filter: brightness(1);
    border-radius: 12px;
    background: var(--surface);
    border: 2px solid transparent;
}

.plate-input-control:focus-within {
    border-color: var(--gold-accent);
}

#input_plate {
    color: var(--text-primary);
    font-size: 1.1rem;
    background-color: transparent;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    height: 56px;
}

#input_plate::placeholder {
    color: var(--text-secondary);
}

.plate-input-border {
    position: absolute;
    background: var(--gold-accent);
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.42, 0, 0.58, 1.00);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

#input_plate:focus {
    outline: none;
}

#input_plate:focus + .plate-input-border {
    width: calc(100% - 4px);
}

button {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.primary-button,
.secondary-button {
    position: relative;
    display: flex;
    font-weight: 600;
    font-size: 16px;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 56px;
    white-space: nowrap;
}

.primary-button {
    background: var(--gold-accent);
    color: var(--background);
}

.primary-button:hover {
    background: var(--gold-hover);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-button {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--surface-hover);
    width: 100%;
}

.secondary-button:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--gold-accent);
}

.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#search_plate .button-text {
    margin: 0;
    position: relative;
    font-size: 16px;
    color: var(--background);
    font-weight: 600;
}

#search_plate .shield-icon {
    color: var(--background);
    transition: 0.2s;
}

#search_plate:hover .shield-icon {
    transform: translateX(4px);
}

#loaderContainer {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    background-color: rgba(0, 0, 0, .95);
    transition: opacity ease-in-out .3s;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    font-weight: 400;
    font-size: 16px;
    color: var(--text-secondary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: underline;
}

.divider:hover {
    cursor: pointer;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--surface-hover);
}

.divider span {
    padding: 0 16px;
}

.manual-entry-container {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--surface-hover);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

/* Wizard de identificación paso a paso (marca → modelo → año → versión) */
.vehicle-wizard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.wizard-progress {
    color: var(--gold-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0;
}
.wizard-step {
    animation: wizardFade 0.22s ease;
}
.wizard-step label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.wizard-step .form-select {
    width: 100%;
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.wizard-nav .primary-button {
    margin: 0;
}
@keyframes wizardFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Cuestionario de versión: preguntas como único camino */
.quiz-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.quiz-option {
    width: 100%;
    margin: 6px 0;
}
.quiz-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    padding: 14px 0;
}
.quiz-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--surface-hover);
    border-top-color: var(--gold-accent);
    border-radius: 50%;
    animation: quizSpin 0.7s linear infinite;
    flex: 0 0 auto;
}
.quiz-result {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-accent);
    padding: 8px 0;
}
@keyframes quizSpin { to { transform: rotate(360deg); } }

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-select {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
    height: 48px;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold-accent);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-select option {
    background: var(--surface);
    color: var(--text-primary);
}

.loader {
  height: 40px;
  aspect-ratio: 1.5;
  --c:no-repeat linear-gradient(#fff 0 0);
  background: var(--c), var(--c), var(--c), var(--c);
  background-size: 33.4% 50%;
  animation: l6 2s infinite linear;
}

@keyframes l6 {
  0%    {background-position:0 0,50% 0,0 100%,50% 100%}
  12.5% {background-position:0 0,100% 0,0 100%,50% 100%}
  25%   {background-position:0 0,100% 0,0 100%,50% 0}
  37.5% {background-position:0 0,100% 0,50% 100%,50% 0}
  50%   {background-position:0 100%,100% 0,50% 100%,50% 0}
  62.5% {background-position:0 100%,100% 0,50% 100%,0 0}
  75%   {background-position:0 100%,100% 100%,50% 100%,0 0}
  87.5% {background-position:0 100%,100% 100%,50% 0,0 0}
  100%  {background-position:0 100%,50% 100%,50% 0,0 0}
}

#cotizationPage {
    width: 100vw;
    min-height: 100vh;
    background: var(--background);
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow-y: auto;
}

.edit-info-toggle {
    display: none;
    width: 100%;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.edit-info-toggle:hover {
    border-color: var(--gold-accent);
    background: var(--surface-hover);
}

.infosHolder {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: clamp(320px, 32vw, 460px);
    min-width: 320px;
    overflow: visible;
}

.info-card {
    box-sizing: border-box;
    padding: 24px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
    overflow: visible;
}

.info-card:hover {
    border-color: var(--gold-accent);
}

#vehicleInfo {
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 184, 0, 0.12), transparent 48%),
        linear-gradient(165deg, #1c2233 0%, #111725 62%, #0d1320 100%);
    color: var(--text-primary);
}

#userInfo {
    background:
        radial-gradient(circle at 0% 0%, rgba(122, 216, 176, 0.1), transparent 38%),
        linear-gradient(165deg, #182123 0%, #111919 62%, #0d1415 100%);
    color: var(--text-primary);
    overflow: visible;
}

#userInfo .panel-head {
    padding-bottom: 8px;
    margin-bottom: 10px;
}

#userInfo .panel-head h3 {
    font-size: 20px;
}

#userInfo .vehicle-meta {
    font-size: 12px;
}

.panel-head {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.panel-head h3 {
    margin: 4px 0;
    font-size: 23px;
    letter-spacing: 0.01em;
}

.panel-kicker {
    margin: 0;
    color: var(--gold-accent);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 11px;
    font-weight: 700;
}

.vehicle-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.vehicle-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.vehicle-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vehicle-item-highlight {
    border-color: rgba(255, 184, 0, 0.5);
    background: rgba(255, 184, 0, 0.1);
}

.vehicle-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.vehicle-value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

.vehicle-version-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-version-block .version-dropdown {
    margin-left: 0;
    max-width: 100%;
    height: 42px;
}

.vehicle-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}

.infoTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
}

.cotizations {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: flex-start;
}

.cotization-card {
    background: var(--surface);
    flex: 0 0 420px;
    min-width: 320px;
    max-width: 460px;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
    overflow: visible;
}

.cotization-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.brand-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.brand-badge--crabi {
    background: #1a3a5c;
    color: #7ec8e3;
    border: 1px solid #2a5a8c;
}

.brand-badge--potosi {
    background: #2a1a00;
    color: var(--gold-accent);
    border: 1px solid #5a3a00;
}

.brand-badge--afirme {
    background: #103020;
    color: #6fd699;
    border: 1px solid #1f5a3a;
}

.brand-badge--qualitas {
    background: #2a1030;
    color: #c99be6;
    border: 1px solid #4a1f5a;
}

.brand-badge--atlas {
    background: #0d2430;
    color: #7fc4e6;
    border: 1px solid #1f455a;
}

.folio-badge {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.no-cotization-msg {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px 0;
}

.cotization-card:empty {
    display: none;
}

/* Cada aseguradora tarda lo suyo y ahora cada tarjeta llega por su cuenta: sin
   esto, la que todavía no contesta se ve igual que la que falló. */
.cotization-pending {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.cotization-pending-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold-accent);
    animation: cotization-pulse 1.1s ease-in-out infinite;
}

@keyframes cotization-pulse {
    0%, 100% { opacity: .25; transform: scale(.8); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .cotization-pending-dot { animation: none; opacity: .7; }
}

.cotization-card:hover {
    border-color: var(--gold-accent);
}

.cotization-card h3 {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.cotization-card h4 {
    margin: 24px 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.version-dropdown {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
    max-width: 90%;
    transition: all 0.2s ease;
}

.version-dropdown:focus {
    outline: none;
    border-color: var(--gold-accent);
}

.version-dropdown option {
    background: var(--surface);
    color: var(--text-primary);
}

#recotizarButton {
    margin-top: 0;
    padding: 10px 20px;
    background: var(--gold-accent);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#recotizarButton:hover:not(:disabled) {
    background: var(--gold-hover);
}

#recotizarButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#protectionButton {
    margin-top: 0;
    padding: 10px 16px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-light);
    color: var(--text-primary);
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#protectionButton:hover {
    border-color: var(--gold-accent);
    background: var(--surface-hover);
}

.error {
    text-align: center;
    color: var(--error);
}


/* Responsive Design */
@media (max-width: 1024px) {

    .input_panel {
        justify-content: flex-start;
    }

    .rot_container {
        flex-direction: column;
    }
    
    .logos_panel {
        width: 100vw;
        height: 30vh;
    }
    
    .logos_panel h1 {
        font-size: 48px;
    }
    
    .logos_panel h2 {
        font-size: 42px;
    }
    
    .search-wrapper {
        max-width: 90%;
    }
    
    .plate-search-container {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    #cotizationPage {
        flex-direction: column;
        overflow-y: auto;
        padding: 0;
    }

    .edit-info-toggle {
        display: block;
    }
    
    .infosHolder {
        width: 100%;
        flex-direction: row;
        height: auto;
        min-width: auto;
    }

    #cotizationPage:not(.show-info-panels) .infosHolder {
        display: none;
    }

    #cotizationPage.show-info-panels .infosHolder {
        display: flex;
    }
    
    .info-card {
        min-height: 200px;
    }
    
    .cotizations {
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 24px;
    }
    
    .cotization-card {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .infosHolder {
        flex-direction: column;
        height: auto;
    }
    
    .logos_panel h1 {
        font-size: 36px;
    }
    
    .logos_panel h2 {
        font-size: 32px;
    }
    
    .search-title {
        font-size: 24px;
    }
}

/* User Form Styles */
.user-form {
    width: 100%;
}

.user-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

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

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
}

.form-group-inline label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.user-input {
    min-width: 0;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.user-input:focus {
    outline: none;
    border-color: var(--gold-accent);
    background: var(--surface-hover);
}

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

.user-input option {
    background: var(--surface);
    color: var(--text-primary);
}

.update-user-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--gold-accent);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

@media (max-width: 768px) {
    .vehicle-grid,
    .user-form-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: span 1;
    }
}

.update-user-btn:hover {
    background: var(--gold-hover);
}

.update-user-btn:active {
    transform: translateY(0);
}

/* Cotization Display Styles */
.plan-main-price {
    background: var(--surface-light);
    border: 1px solid var(--gold-accent);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    text-align: center;

}

.price-label {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}

.price-value {
    margin: 0;
    font-size: 48px;
    font-weight: 800;
    color: var(--gold-accent);
    line-height: 1;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.currency {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
}

.payment-plans-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 16px 0;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-accent) var(--surface);
}

.payment-plans-grid::-webkit-scrollbar {
    height: 6px;
}

.payment-plans-grid::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}

.payment-plans-grid::-webkit-scrollbar-thumb {
    background: var(--gold-accent);
    border-radius: 3px;
}

.payment-plans-grid::-webkit-scrollbar-thumb:hover {
    background: var(--gold-hover);
}

.payment-plan {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    min-width: 180px;
    flex-shrink: 0;
}

.payment-plan:hover {
    border-color: var(--gold-accent);
    background: var(--surface-light);
}

.payment-plan .plan-header,
.payment-plan h5 {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-plan .plan-price,
.plan-price {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-accent);
}

.payment-plan .currency {
    font-size: 16px;
}

.payment-plan .plan-detail,
.plan-detail {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.coverages-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coverages-list li,
.coverage-item {
    background: var(--surface);
    border-left: 4px solid var(--gold-accent);
    padding: 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.coverages-list li:hover,
.coverage-item:hover {
    background: var(--surface-light);
    border-left-width: 6px;
}

.coverage-header,
.coverages-list li strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.coverage-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.coverage-price {
    font-size: 16px;
    color: var(--gold-accent);
    font-weight: 700;
    margin-top: 8px;
    display: block;
}

/* Coberturas alineadas entre columnas: altura mínima uniforme para que las
   filas coincidan horizontalmente entre aseguradoras. */
.coverage-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 104px;
    box-sizing: border-box;
}

.coverage-price {
    margin-top: auto;
}

/* Cobertura que la aseguradora no incluye (placeholder para mantener alineación). */
.coverage-item--missing {
    border-left-color: var(--border);
    opacity: 0.5;
}

.coverage-item--missing .coverage-header {
    color: var(--text-secondary);
    font-weight: 500;
}

.coverage-item--missing .coverage-detail {
    font-style: italic;
}

/* Desplegable de coberturas adicionales (las que no están en la referencia). */
.extra-coverages {
    margin: 4px 0 8px;
}

.extra-coverages > summary {
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-accent);
    padding: 8px 0;
    user-select: none;
}

.extra-coverages > summary::-webkit-details-marker {
    display: none;
}

.extra-coverages > summary::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.2s ease;
}

.extra-coverages[open] > summary::before {
    content: '▾ ';
}

.extra-coverages .coverages-list {
    margin-top: 8px;
}

.plan-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.plan-details p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-details strong {
    color: var(--text-primary);
}

.protection-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.protection-modal.open {
    display: flex;
}

.protection-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top center, rgba(12, 30, 60, 0.3), rgba(0, 0, 0, 0.92) 55%);
    backdrop-filter: blur(3px);
}

.protection-dialog {
    position: relative;
    width: min(1150px, 100%);
    border-radius: 22px;
    padding: 26px;
    background: linear-gradient(170deg, #081123 0%, #040b16 45%, #02050d 100%);
    border: 1px solid rgba(255, 184, 0, 0.38);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.protection-kicker {
    margin: 0;
    color: #7ad8b0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.protection-dialog h2 {
    margin: 10px 0 8px 0;
    font-size: 34px;
    color: #f5f7fb;
}

.protection-vehicle-text {
    margin: 0 0 24px 0;
    color: #b9c3d6;
    font-size: 16px;
}

.protection-level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.protection-level-card {
    text-align: left;
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(33, 43, 61, 0.52), rgba(11, 18, 33, 0.86));
    border: 1px solid rgba(161, 177, 208, 0.25);
    color: #f1f4fa;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.protection-level-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 184, 0, 0.45);
}

.protection-level-card.is-featured {
    border: 1px solid rgba(255, 184, 0, 0.95);
    background: linear-gradient(180deg, rgba(85, 73, 23, 0.38), rgba(18, 27, 41, 0.95));
    box-shadow: 0 12px 30px rgba(255, 184, 0, 0.12);
}

.protection-level-card.selected {
    border-color: rgba(255, 184, 0, 1);
    box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.25);
}

.level-badge {
    align-self: flex-start;
    margin: 0;
    background: var(--gold-accent);
    color: #121212;
    border-radius: 999px;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 700;
}

.level-match {
    margin: 0;
    color: #c4cee3;
    font-weight: 700;
    font-size: 13px;
}

.protection-level-card h3 {
    margin: 4px 0;
    font-size: 36px;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.level-price-note {
    margin: 0;
    color: #d2dcf0;
    min-height: 42px;
}

.protection-level-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: #edf1fb;
    flex: 1;
}

.protection-level-card span {
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 700;
    background: rgba(240, 247, 255, 0.08);
    border: 1px solid rgba(230, 236, 245, 0.26);
    border-radius: 10px;
    text-align: center;
    padding: 10px 12px;
}

.protection-level-card.is-featured span {
    background: var(--gold-accent);
    border-color: transparent;
    color: #111111;
}

@media (max-width: 1024px) {

    .protection-modal {
        justify-content: flex-start;
        align-items: flex-start;
        overflow-y: auto;
    }

    .protection-dialog {
        padding: 20px;
    }

    .protection-level-grid {
        grid-template-columns: 1fr;
    }

    .protection-level-card {
        min-height: auto;
    }

    .protection-dialog h2 {
        font-size: 28px;
    }
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 0;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.back-button:hover {
    color: var(--text-primary);
}

/* Package Selection Styles */
.contratar-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--gold-accent);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.contratar-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

.package-section {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.package-header {
    text-align: center;
    margin-bottom: 40px;
}

.package-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.package-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.package-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.package-card:hover {
    border-color: var(--gold-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 184, 0, 0.1);
}

.package-card-header {
    margin-bottom: 16px;
}

.package-insurer {
    display: inline-block;
    padding: 4px 12px;
    background: var(--surface-light);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-accent);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.package-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.package-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.package-fields-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.package-field-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-field-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-field-list li::before {
    content: '•';
    color: var(--gold-accent);
    font-weight: bold;
}

.package-field-optional {
    opacity: 0.6;
    font-style: italic;
}

.package-select-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--gold-accent);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.package-select-btn:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

/* Upload Modal Styles */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-modal[aria-hidden="false"] {
    display: flex;
}

.upload-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.upload-dialog {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
}

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

.upload-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.close-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.upload-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

.upload-section:last-child {
    margin-bottom: 0;
}

.upload-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-field {
    margin-bottom: 20px;
}

.upload-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-field-description {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.upload-field-required {
    color: var(--error);
}

/* Nota de ayuda (?) junto a cada campo: tooltip al pasar el cursor o enfocar. */
.help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    background: var(--surface-light, #2a2a2a);
    border: 1px solid var(--border, #444);
    color: var(--gold-accent, #d4af37);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    user-select: none;
}

.help-tip:hover,
.help-tip:focus {
    background: var(--gold-accent, #d4af37);
    color: #1a1a1a;
    outline: none;
    /* Eleva el "?" (y su tooltip) por encima de los campos vecinos para que no
       quede tapado/cortado por el siguiente input. */
    z-index: 1000;
}

.help-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    white-space: normal;
    text-align: left;
    background: #111;
    color: #f0f0f0;
    border: 1px solid var(--gold-accent, #d4af37);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 1001;
    pointer-events: none;
}

.help-tip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gold-accent, #d4af37);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 1001;
}

.help-tip:hover::after,
.help-tip:focus::after,
.help-tip:hover::before,
.help-tip:focus::before {
    opacity: 1;
    visibility: visible;
}

.file-input-wrapper {
    position: relative;
}

.file-input {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--text-secondary);
}

.file-input-label:hover {
    border-color: var(--gold-accent);
    background: var(--surface-hover);
    color: var(--text-primary);
}

.file-input-label.has-file {
    border-color: var(--gold-accent);
    border-style: solid;
    color: var(--gold-accent);
}

.text-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.text-input:focus {
    outline: none;
    border-color: var(--gold-accent);
    background: var(--surface-hover);
}

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

.upload-success {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.upload-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.upload-success h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.upload-success p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

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

    .upload-dialog {
        max-width: 100%;
        max-height: 90vh;
    }
}