/* Scoped Bootstrap-like grid (only inside .firma-registration) */
.firma-registration .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 0;
}
.firma-registration .row + .row { margin-top: 6px; }
.firma-registration [class*="col-md-"] {
  padding: 0;
  min-width: 0;
}
.firma-registration .col-md-12 { flex: 0 0 100%; }
.firma-registration .col-md-6  { flex: 1 1 calc(50% - 8px); }
.firma-registration .col-md-4  { flex: 1 1 calc(33.333% - 11px); }
.firma-registration .col-md-2  { flex: 1 1 calc(16.666% - 14px); }
@media (max-width: 768px) {
  .firma-registration [class*="col-md-"] { flex: 1 1 100%; }
}
/* Hide outline bootstrap-like text utility */
.firma-registration .text-muted { color: var(--muted, #64748b); }

        .firma-registration {
            padding: 40px 0 60px;
        }

        /* Step Indicator */
        .step-indicator {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
            padding: 0 20px;
        }
        .step {
            display: flex;
            align-items: center;
            color: #999;
            position: relative;
        }
        .step:not(:last-child)::after {
            content: '';
            width: 60px;
            height: 2px;
            background: #ddd;
            margin: 0 15px;
        }
        .step.active .step-number,
        .step.completed .step-number {
            background: linear-gradient(135deg, var(--portal-primary, #0E9F6E), var(--portal-secondary, #0B7E58));
            color: white;
        }
        .step.active .step-label,
        .step.completed .step-label {
            color: var(--portal-primary, #0E9F6E);
            font-weight: 600;
        }
        .step.completed:not(:last-child)::after {
            background: var(--portal-primary, #0E9F6E);
        }
        .step-number {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #ddd;
            color: #666;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 8px;
        }
        .step-label {
            font-size: 14px;
        }
        @media (max-width: 768px) {
            .step-label {
                display: none;
            }
            .step:not(:last-child)::after {
                width: 30px;
            }
        }

        /* Form Steps */
        .wizard-form {
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }
        .form-step {
            display: none;
        }
        .form-step.active {
            display: block;
        }
        .step-title {
            color: var(--portal-primary, #0E9F6E);
            font-size: 20px;
            margin-bottom: 5px;
        }
        .step-subtitle {
            color: #666;
            margin-bottom: 30px;
        }

        /* Form Groups */
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: #333;
        }
        .form-group label small {
            font-weight: 400;
            color: #999;
        }
        .form-control {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 15px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .form-control:focus {
            border-color: var(--portal-primary, #0E9F6E);
            box-shadow: 0 0 0 3px rgba(23, 70, 123, 0.1);
            outline: none;
        }
        .form-control.is-invalid {
            border-color: #dc3545;
        }

        /* Opening Hours */
        .opening-hours-section {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin: 30px 0;
        }
        .opening-hours-section h4 {
            margin-bottom: 15px;
            font-size: 16px;
        }
        .opening-hours-grid {
            display: grid;
            gap: 10px;
        }
        .day-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .day-label {
            width: 35px;
            font-weight: 500;
        }
        .time-select {
            width: 90px;
            padding: 8px 10px;
        }
        .time-separator {
            color: #999;
        }
        .quick-actions {
            margin-top: 15px;
            display: flex;
            gap: 20px;
        }
        .quick-action {
            color: var(--portal-primary, #0E9F6E);
            font-size: 13px;
            text-decoration: none;
        }
        .quick-action:hover {
            text-decoration: underline;
        }

        /* Custom Category */
        .custom-category-group {
            margin-top: 10px;
        }

        /* Additional Info Collapsible Section */
        .additional-info-section {
            margin-top: 30px;
            border: 2px solid #e0e6ed;
            border-radius: 12px;
            overflow: hidden;
        }
        .additional-info-header {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 15px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            font-weight: 600;
            color: var(--portal-primary, #0E9F6E);
            font-size: 16px;
            transition: background 0.3s ease;
        }
        .additional-info-header:hover {
            background: linear-gradient(135deg, #e9ecef, #dee2e6);
        }
        .additional-info-header .toggle-icon {
            font-size: 20px;
            transition: transform 0.3s ease;
        }
        .additional-info-header.open .toggle-icon {
            transform: rotate(45deg);
        }
        .additional-info-content {
            padding: 25px;
            background: #fafbfc;
            border-top: 1px solid #e0e6ed;
        }

        /* Form Actions */
        .form-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        .btn-next, .btn-submit {
            padding: 12px 30px;
            font-size: 16px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .btn-back {
            background: #6c757d;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 15px;
        }
        .btn-back:hover {
            background: #5a6268;
        }
        .required-note {
            color: #666;
            font-size: 13px;
            margin-top: 20px;
        }

        /* Checkbox */
        .form-check {
            display: flex;
            align-items: flex-start;
            gap: 10px;
        }
        .form-check-input {
            width: 18px;
            height: 18px;
            margin-top: 3px;
        }
        .form-check-label {
            font-size: 14px;
            color: #666;
        }
        .form-check-label a {
            color: var(--portal-primary, #0E9F6E);
        }

        /* Confirmation */
        .confirmation-content {
            text-align: center;
            padding: 40px 20px;
        }
        .success-icon {
            font-size: 80px;
            color: #28a745;
            margin-bottom: 20px;
        }
        .success-icon i {
            animation: scaleIn 0.3s ease-out;
        }
        @keyframes scaleIn {
            from { transform: scale(0); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        .confirmation-content h3 {
            color: var(--portal-primary, #0E9F6E);
            font-size: 24px;
            margin-bottom: 15px;
        }
        .confirmation-content > p {
            color: #666;
            max-width: 600px;
            margin: 0 auto 30px;
        }
        .preview-box {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 25px;
            margin: 30px auto;
            max-width: 450px;
            text-align: left;
        }
        .preview-box h4 {
            color: var(--portal-primary, #0E9F6E);
            font-size: 16px;
            margin-bottom: 15px;
            text-align: center;
        }
        .preview-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            border-left: 4px solid var(--portal-primary, #0E9F6E);
        }
        /* ===== Professional Confirmation Preview ===== */
        .success-header {
            text-align: center;
            margin-bottom: 40px;
        }
        .success-header .success-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #28a745, #20c997);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
        }
        .success-header .success-icon i {
            font-size: 40px;
            color: white;
            animation: scaleIn 0.5s ease-out;
        }
        .success-header h2 {
            color: var(--portal-primary, #0E9F6E);
            font-size: 28px;
            margin: 0 0 10px;
        }
        .success-subtitle {
            color: #666;
            font-size: 16px;
        }

        .preview-section {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border-radius: 16px;
            padding: 25px;
            margin-bottom: 30px;
        }
        .preview-header {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--portal-primary, #0E9F6E);
            font-weight: 600;
            margin-bottom: 20px;
            font-size: 16px;
        }
        .preview-header i {
            font-size: 20px;
        }

        .clinic-preview-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            overflow: hidden;
            position: relative;
        }
        .preview-status-badge {
            background: linear-gradient(135deg, #ffc107, #fd7e14);
            color: white;
            padding: 8px 20px;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .preview-main {
            display: flex;
            padding: 25px;
            gap: 25px;
        }
        .preview-logo-area {
            flex-shrink: 0;
        }
        .preview-logo {
            width: 100px;
            height: 100px;
            border-radius: 12px;
            background: linear-gradient(135deg, #e9ecef, #dee2e6);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .preview-logo i {
            font-size: 40px;
            color: #adb5bd;
        }
        .preview-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .preview-info {
            flex: 1;
            min-width: 0;
        }
        .preview-info h3.preview-name {
            font-size: 22px;
            color: #212529;
            margin: 0 0 8px;
            font-weight: 700;
        }
        .preview-category-badge {
            display: inline-block;
            background: linear-gradient(135deg, var(--portal-primary, #0E9F6E), var(--portal-secondary, #0B7E58));
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            margin-bottom: 15px;
        }
        .preview-details {
            display: grid;
            gap: 10px;
        }
        .detail-row {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #495057;
            font-size: 14px;
        }
        .detail-row i {
            color: var(--portal-primary, #0E9F6E);
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .preview-gallery {
            border-top: 1px solid #e9ecef;
            padding: 20px 25px;
        }
        .gallery-label {
            font-size: 13px;
            color: #6c757d;
            margin-bottom: 10px;
            font-weight: 500;
        }
        .gallery-thumbs {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .gallery-thumb {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            overflow: hidden;
        }
        .gallery-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .next-steps-section {
            margin-bottom: 30px;
        }
        .next-steps-section h4 {
            color: var(--portal-primary, #0E9F6E);
            font-size: 18px;
            margin-bottom: 20px;
            text-align: center;
        }
        .timeline {
            max-width: 400px;
            margin: 0 auto;
        }
        .timeline-item {
            display: flex;
            gap: 15px;
            padding-bottom: 20px;
            position: relative;
        }
        .timeline-item:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 15px;
            top: 35px;
            width: 2px;
            height: calc(100% - 35px);
            background: #dee2e6;
        }
        .timeline-item.completed::after {
            background: #28a745;
        }
        .timeline-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #e9ecef;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .timeline-icon i {
            font-size: 14px;
            color: #6c757d;
        }
        .timeline-item.completed .timeline-icon {
            background: #28a745;
        }
        .timeline-item.completed .timeline-icon i {
            color: white;
        }
        .timeline-item.pending .timeline-icon {
            background: #ffc107;
            animation: pulse 2s infinite;
        }
        .timeline-item.pending .timeline-icon i {
            color: white;
        }
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        .timeline-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .timeline-content strong {
            color: #212529;
            font-size: 14px;
        }
        .timeline-content span {
            color: #6c757d;
            font-size: 13px;
        }

        .confirmation-footer {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid #e9ecef;
        }
        .privacy-note {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #e8f5e9;
            color: #2e7d32;
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 13px;
            margin-bottom: 25px;
        }
        .privacy-note i {
            font-size: 18px;
        }
        .action-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
        }
        .action-buttons .primary-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        @media (max-width: 576px) {
            .preview-main {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .preview-details {
                text-align: left;
            }
            .success-header h2 {
                font-size: 22px;
            }
        }

        /* Alert Messages */
        .alert {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .alert-danger {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        /* Loading State */
        .btn-submit.loading {
            pointer-events: none;
            opacity: 0.7;
        }
        .btn-submit.loading::after {
            content: '';
            width: 16px;
            height: 16px;
            border: 2px solid white;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-left: 8px;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Upload Sections */
        .upload-section {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin: 30px 0;
        }
        .upload-section h4 {
            margin-bottom: 15px;
            font-size: 16px;
        }
        .upload-dropzone {
            border: 2px dashed #ddd;
            border-radius: 8px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            background: white;
        }
        .upload-dropzone:hover,
        .upload-dropzone.dragover {
            border-color: var(--portal-primary, #0E9F6E);
            background: rgba(23, 70, 123, 0.03);
        }
        .upload-dropzone .file-input {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }
        .upload-placeholder i {
            font-size: 48px;
            color: var(--portal-primary, #0E9F6E);
            margin-bottom: 10px;
        }
        .upload-placeholder p {
            margin: 0 0 5px;
            color: #666;
        }
        .upload-placeholder small {
            color: #999;
        }
        .upload-preview {
            position: relative;
            display: inline-block;
        }
        .upload-preview img {
            max-width: 200px;
            max-height: 150px;
            border-radius: 6px;
            object-fit: cover;
        }
        .remove-btn {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #dc3545;
            color: white;
            border: none;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .gallery-preview {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }
        .gallery-item {
            position: relative;
            aspect-ratio: 1;
            border-radius: 6px;
            overflow: hidden;
        }
        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .gallery-item .remove-btn {
            top: 4px;
            right: 4px;
            width: 20px;
            height: 20px;
            font-size: 14px;
        }
        .gallery-counter {
            margin-top: 10px;
            font-size: 13px;
            color: #666;
        }
        .gallery-counter.limit-reached {
            color: #dc3545;
        }