/* ===================== Cuenta - Secciones Profesionales ===================== */
.cuenta-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.cuenta-section .section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.cuenta-section .section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cuenta-section .section-icon svg {
    color: #fff;
}

.cuenta-section .section-title-wrapper {
    flex: 1;
}

.cuenta-section .section-title {
    margin: 0 0 4px 0;
    font-size: 1.25em;
    font-weight: 600;
    color: #1f2937;
}

.cuenta-section .section-description {
    margin: 0;
    font-size: 0.9em;
    color: #6b7280;
    line-height: 1.4;
}

/* Formulario CP */
.cuenta-form .input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.cuenta-form .input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.cuenta-form .input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.2s ease;
    color: #1f2937;
}

.cuenta-form .input-wrapper input:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.cuenta-form .input-wrapper input::placeholder {
    color: #9ca3af;
}

.cuenta-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cuenta-form .input-wrapper input:focus~.input-icon,
.cuenta-form .input-wrapper input:not(:placeholder-shown)~.input-icon {
    color: #6366f1;
}

/* Botones cuenta */
.buscar-btn.cuenta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.buscar-btn.cuenta-btn.btn-sm {
    padding: 10px 16px;
    font-size: 0.85em;
}

#btn-open-delete-account.buscar-btn.cuenta-btn {
    width: fit-content;
    max-width: 100%;
    box-shadow: none !important;
    transform: none !important;
}

#btn-open-delete-account.buscar-btn.cuenta-btn:hover,
#btn-open-delete-account.buscar-btn.cuenta-btn:active {
    transform: none !important;
    box-shadow: none !important;
}

.buscar-btn.cuenta-btn svg {
    flex-shrink: 0;
}

.form-message {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    min-height: 1.2em;
}

/* Preferencias Grid */
.preferences-grid {
    display: grid;
    gap: 16px;
}

/* Preference Cards */
.preference-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.preference-card:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

.preference-card:has(.toggle-input:checked) {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

/* Toggle Switch */
.preference-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    align-self: center;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    inset: 0;
    background: #d1d5db;
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-input:checked+.toggle-slider {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.toggle-input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

.toggle-input:focus+.toggle-slider {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Preference Info */
.preference-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.preference-info.full-width {
    width: 100%;
}

.preference-icon {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6366f1;
}

.preference-card:has(.toggle-input:checked) .preference-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.preference-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preference-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95em;
}

.preference-desc {
    font-size: 0.82em;
    color: #6b7280;
    line-height: 1.3;
}

/* Radius Card */
.radius-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    cursor: default;
}

.radius-card .preference-info {
    cursor: default;
}

.mayorista-extra-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mayorista-extra-settings[hidden] {
    display: none !important;
}

.mayorista-modo-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    cursor: default;
}

.mayorista-modo-card .preference-info {
    align-items: center;
}

.mayorista-modo-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.mayorista-modo-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    min-height: 44px;
}

.mayorista-modo-label {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 500;
    color: #374151;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    line-height: 1.35;
}

.mayorista-modo-select-col {
    flex: 0 0 130px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
}

.mayorista-modo-select {
    width: 100%;
    max-width: 130px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 0.88em;
    color: #1f2937;
    box-sizing: border-box;
    line-height: normal;
}

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

.radius-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.radius-adjust-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.radius-adjust-btn:hover {
    background: #f3f4f6;
    color: #6366f1;
}

.radius-adjust-btn:active {
    background: #e5e7eb;
}

.radius-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    min-width: 70px;
    justify-content: center;
}

.radius-display input {
    width: 40px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #1f2937;
    -moz-appearance: textfield;
    appearance: textfield;
}

.radius-display input::-webkit-outer-spin-button,
.radius-display input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.radius-display input:focus {
    outline: none;
}

.radius-unit {
    font-size: 0.9em;
    color: #6b7280;
    font-weight: 500;
}

/* Responsive para cuenta */
@media (max-width: 768px) {
    .cuenta-section {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .cuenta-section .section-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .cuenta-section .section-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .cuenta-section .section-icon svg {
        width: 20px;
        height: 20px;
    }

    .cuenta-section .section-title {
        font-size: 1.1em;
    }

    .cuenta-section .section-description {
        font-size: 0.85em;
    }

    .cuenta-form .input-group {
        flex-direction: column;
        gap: 10px;
    }

    #cuenta-cp-section .cuenta-form .input-group {
        flex-direction: row;
        align-items: center;
    }

    .cuenta-form .input-wrapper input {
        padding: 12px 14px 12px 44px;
    }

    .buscar-btn.cuenta-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    #cuenta-cp-section .buscar-btn.cuenta-btn {
        width: auto;
        flex: 0 0 auto;
    }

    #btn-open-delete-account.buscar-btn.cuenta-btn {
        width: fit-content;
    }

    .preference-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .preference-toggle {
        width: 48px;
        height: 26px;
    }

    .toggle-slider::before {
        width: 20px;
        height: 20px;
    }

    .toggle-input:checked+.toggle-slider::before {
        transform: translateX(22px);
    }

    .preference-icon {
        width: 36px;
        height: 36px;
    }

    .preference-icon svg {
        width: 18px;
        height: 18px;
    }

    .preference-title {
        font-size: 0.9em;
    }

    .preference-desc {
        font-size: 0.78em;
    }

    .radius-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .radius-input-wrapper {
        justify-content: center;
    }

    .buscar-btn.cuenta-btn.btn-sm {
        width: 100%;
        justify-content: center;
    }

    .mayorista-modo-row {
        gap: 10px;
        padding: 12px 10px;
    }

    .mayorista-modo-select-col {
        flex: 0 0 112px;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mayorista-modo-select {
        width: 100%;
        max-width: none;
        height: 40px;
        min-height: 40px;
        padding: 0 8px;
        text-align-last: center;
    }
}
