/**
 * Cadastro de Empresas - Stylesheet
 * Padrão UI similar ao empresas-v2.php
 */

:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --sidebar-width: 280px;
    --header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb-separator {
    color: var(--gray-300);
}

/* Main Content */
.main-content {
    margin-top: var(--header-height);
    padding: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Container */
.card-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 32px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 4px 0;
}

.card-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

.vip-badge {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin: 32px 0;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step:last-child::before {
    display: none;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.step.active .step-circle {
    background: var(--primary-color);
    color: white;
}

.step.completed .step-circle {
    background: var(--secondary-color);
    color: white;
}

.step.completed::before {
    background: var(--secondary-color);
}

.step-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Card Body */
.card-body {
    padding: 32px;
}

/* Form Sections */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control:disabled,
.form-control:read-only {
    background-color: var(--gray-50);
    color: var(--gray-600);
}

.form-text {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
}

/* Company Preview Box */
.company-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    font-size: 14px;
}

.preview-label {
    color: var(--gray-600);
    font-weight: 500;
}

.preview-value {
    color: var(--gray-900);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-vip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert.d-none {
    display: none !important;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-group .btn:first-child {
    flex: 0 0 auto;
}

.btn-group .btn:last-child {
    flex: 1;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.loading-text {
    color: var(--gray-500);
    font-size: 15px;
}

/* Honeypot Fields (hidden from users) */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -12px;
}

.col-12 {
    flex: 0 0 100%;
    padding: 12px;
}

.col-md-6 {
    flex: 0 0 100%;
    padding: 12px;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .card-header,
    .card-body {
        padding: 20px;
    }

    .step-indicator {
        margin: 24px 0;
    }

    .step-label {
        font-size: 11px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.badge-success {
    background: var(--secondary-color);
    color: white;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-2 {
    gap: 8px !important;
}

.mt-3 {
    margin-top: 16px !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 16px !important;
}

.mb-4 {
    margin-bottom: 24px !important;
}

.text-muted {
    color: var(--gray-500) !important;
}
