/* Formularios compartidos para modales */
.zone-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg, 18px);
    min-width: 200px;
}

.zone-filter svg {
    color: var(--icon-accent, var(--accent, #38bdf8));
    flex-shrink: 0;
}

.zone-select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main, #f1f5f9);
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
}

.zone-select option {
    background: var(--bg-card-start, #143244);
    color: var(--text-main, #f1f5f9);
    padding: 8px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
}

.modal-form .card-body {
    margin-top: 16px;
    font-size: 16px;
    padding: 0 8px;
}

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

.modal-form .form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 8px;
}

.modal-form .form-field label {
    display: block;
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.modal-form .checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.modal-form .checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.modal-form .checkbox-label {
    margin: 0;
    color: var(--text-main);
}

.modal-form .company-option-checkbox {
    min-height: 44px;
}

.modal-form .company-option-row-centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-form .form-field input,
.modal-form .form-field select,
.modal-form .form-field textarea,
.modal-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-1);
    color: var(--text-main);
    font-family: inherit;
    font-size: 16px;
    transition: all 0.2s ease;
}

.modal-form .form-field input::placeholder,
.modal-form .form-field textarea::placeholder,
.modal-form .form-control::placeholder {
    color: var(--text-soft);
    opacity: 1;
}

.modal-form .form-field input:focus,
.modal-form .form-field select:focus,
.modal-form .form-field textarea:focus,
.modal-form .form-control:focus {
    background: var(--surface-1);
    color: var(--text-main);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft) !important;
    outline: none !important;
}

.modal-form .form-field textarea {
    min-height: 60px;
    resize: vertical;
}

.modal-form .form-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-form .btn-primary-main {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 16px;
    border: 1px solid var(--accent);
    cursor: pointer;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-form .btn-primary-main:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.modal-form .btn-primary-main:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-form .btn-ghost-small {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    font-size: 15px;
    background: var(--surface-2);
    color: var(--text-soft);
    cursor: pointer;
}

.modal-form .btn-ghost-small:hover {
    background: var(--surface-1);
    border-color: var(--border-subtle);
}

.modal-form .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--surface-3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: modal-form-spin 0.8s linear infinite;
}

.modal-form .error-message {
    color: var(--danger);
    font-size: 16px;
    margin-top: 10px;
}

.modal-form .custom-select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--border-subtle);
    font-size: 16px;
    background-color: var(--bg-soft);
    cursor: pointer;
    appearance: none;
    color: var(--text-main);
}

.modal-form .custom-select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: var(--bg-soft);
    color: var(--text-main);
    box-shadow: 0 0 0 2px var(--accent-soft) !important;
}

.modal-form .gray-placeholder {
    color: var(--text-soft) !important;
}

.modal-form .gray-placeholder:focus {
    color: var(--text-main) !important;
}

.company-modal-form .logo-center {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.company-modal-form .logo-form-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.company-modal-form .logo-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px dashed var(--border-subtle);
    cursor: pointer;
    position: relative;
}

.company-modal-form .logo-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-soft);
}

.company-modal-form .logo-placeholder {
    text-align: center;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.company-modal-form .logo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

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

.location-picker-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.location-picker-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    max-height: 180px;
    overflow-y: auto;
}

.location-picker-result {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-main);
    padding: 10px 12px;
    cursor: pointer;
}

.location-picker-result:hover {
    border-color: var(--accent);
    background: var(--surface-1);
}

.location-picker-result-title {
    display: block;
    font-size: 14px;
}

.location-picker-map {
    width: 100%;
    min-height: 280px;
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.location-picker-coordinates {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 14px;
}

.location-picker-feedback {
    margin-top: 8px;
}

.leaflet-container {
    font-family: inherit;
}

.leaflet-control-attribution {
    font-size: 11px;
}

@keyframes modal-form-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .modal-form .form-grid-2 {
        grid-template-columns: 1fr !important;
    }

    .modal-form .form-field-span-2 {
        grid-column: auto;
    }

    .location-picker-search-row {
        grid-template-columns: 1fr;
    }
}
