/**
 * Expresso Cadastro - Frontend Styles
 * 
 * Main stylesheet for frontend forms, portal, and user interface
 */

/* ===== CSS VARIABLES ===== */
:root {
    --ec-primary-color: #2271b1;
    --ec-secondary-color: #0073aa;
    --ec-accent-color: #00a0d2;
    --ec-success-color: #00a32a;
    --ec-warning-color: #dba617;
    --ec-error-color: #d63638;
    --ec-info-color: #72aee6;
    
    --ec-text-color: #1e1e1e;
    --ec-text-light: #666;
    --ec-text-muted: #4b5563;
    
    --ec-bg-color: #ffffff;
    --ec-bg-light: #f6f7f7;
    --ec-bg-dark: #f0f0f1;
    
    --ec-border-color: #c3c4c7;
    --ec-border-light: #dcdcde;
    --ec-border-dark: #8c8f94;
    
    --ec-radius: 8px;
    --ec-radius-small: 4px;
    --ec-radius-large: 12px;
    
    --ec-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --ec-shadow-large: 0 4px 6px rgba(0,0,0,0.1);
    --ec-shadow-hover: 0 2px 8px rgba(0,0,0,0.15);
    
    --ec-transition: all 0.3s ease;
    --ec-transition-fast: all 0.15s ease;
    
    --ec-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --ec-font-size: 14px;
    --ec-line-height: 1.5;
    
    --ec-container-width: 1200px;
    --ec-form-width: 800px;
}

/* ===== RESET & BASE ===== */
.ec-cadastro-form-container *,
.ec-portal-page *,
.ec-status-page * {
    box-sizing: border-box;
}

.ec-cadastro-form-container,
.ec-portal-page,
.ec-status-page {
    font-family: var(--ec-font-family);
    font-size: var(--ec-font-size);
    line-height: var(--ec-line-height);
    color: var(--ec-text-color);
}

/* ===== LAYOUT CONTAINERS ===== */
.ec-cadastro-form-container {
    max-width: var(--ec-form-width);
    margin: 0 auto;
    padding: 16px; /* Reduzido de 20px para compactação */
}

.ec-portal-container,
.ec-status-container {
    max-width: var(--ec-container-width);
    margin: 0 auto;
    padding: 16px; /* Reduzido de 20px */
}

/* ===== FORM PROGRESS ===== */
.ec-form-progress {
    margin-bottom: 30px; /* Reduzido de 40px */
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 16px; /* Reduzido de 20px */
    box-shadow: var(--ec-shadow);
}

.ec-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px; /* Reduzido de 20px */
    position: relative;
}

.ec-progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: var(--ec-border-light);
    z-index: 1;
}

.ec-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.ec-step-number {
    width: 44px; /* Manter 44px para acessibilidade */
    height: 44px;
    border-radius: 50%;
    background: var(--ec-bg-light);
    border: 2px solid var(--ec-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px; /* Reduzido de 8px */
    transition: var(--ec-transition);
}

.ec-step-label {
    font-size: 12px;
    color: var(--ec-text-light);
    text-align: center;
}

.ec-step-active .ec-step-number {
    background: var(--ec-primary-color);
    border-color: var(--ec-primary-color);
    color: white;
}

.ec-step-complete .ec-step-number {
    background: var(--ec-success-color);
    border-color: var(--ec-success-color);
    color: white;
}

.ec-progress-bar {
    height: 6px;
    background: var(--ec-bg-light);
    border-radius: 3px;
    overflow: hidden;
}

.ec-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ec-primary-color), var(--ec-accent-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ===== EDIT MODE BANNER ===== */
.ec-edit-banner {
    background: linear-gradient(135deg, #ff6b35, #ff8e53);
    color: white;
    padding: 16px 24px;
    border-radius: var(--ec-radius) var(--ec-radius) 0 0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.ec-edit-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.ec-edit-icon {
    font-size: 20px;
    min-width: 24px;
}

.ec-edit-info {
    flex: 1;
}

.ec-edit-info strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.ec-edit-info small {
    font-size: 13px;
    opacity: 0.9;
}

.ec-edit-status .ec-status-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    -webkit-backdrop-filter: blur(10px);

    backdrop-filter: blur(10px);
}

/* ===== EDIT ERROR BANNER ===== */
.ec-edit-error-banner {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 20px;
    border-radius: var(--ec-radius);
    margin-bottom: 4px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    border-left: 5px solid #b91c1c;
}

.ec-error-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.ec-error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ec-error-text {
    flex: 1;
}

.ec-error-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    font-weight: 600;
}

.ec-error-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

/* ===== EDIT MODE FORM ADJUSTMENTS ===== */
.ec-edit-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ec-edit-actions .ec-btn {
    min-width: 140px;
}

.ec-edit-note {
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--ec-radius-small);
    color: #856404;
}

.ec-edit-note small {
    font-size: 13px;
}

/* ===== FORM SECTIONS ===== */
.ec-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ec-form-step.ec-step-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ec-form-section {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
}

.ec-section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ec-border-light);
}

.ec-section-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-section-description {
    margin: 0;
    color: var(--ec-text-light);
    font-size: 13px;
}

/* ===== FORM FIELDS ===== */
.ec-form-fields {
    display: -ms-grid;

    display: grid;
    gap: 20px;
}

.ec-fields-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.ec-fields-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ec-fields-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.ec-form-group {
    display: flex;
    flex-direction: column;
}

.ec-width-full { grid-column: 1 / -1; }
.ec-width-half { grid-column: span 1; }
.ec-width-third { grid-column: span 1; }

.ec-form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--ec-text-color);
    font-size: 13px;
}

.ec-required {
    color: var(--ec-error-color);
    font-weight: 600;
}

.ec-form-control {
    padding: 10px 12px;
    border: 1px solid var(--ec-border-color);
    border-radius: var(--ec-radius-small);
    font-size: 14px;
    transition: var(--ec-transition-fast);
    background: var(--ec-bg-color);
    color: var(--ec-text-color);
}

.ec-form-control:focus {
    outline: none;
    border-color: var(--ec-primary-color);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.ec-form-control:invalid {
    border-color: var(--ec-error-color);
}

.ec-form-control::placeholder {
    color: var(--ec-text-muted);
}

textarea.ec-form-control {
    resize: vertical;
    min-height: 80px;
}

select.ec-form-control {
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    -webkit-appearance: none;

    -moz-appearance: none;

    appearance: none;
}

.ec-field-help {
    margin-top: 5px;
    font-size: 12px;
    color: var(--ec-text-muted);
    line-height: 1.4;
}

/* ===== CHECKBOX & RADIO ===== */
.ec-checkbox-label {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: flex-start;

    -ms-flex-align: flex-start;

    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    min-height: 38px;
    padding: 10px 0;
}

.ec-checkbox-label input[type="checkbox"] {
    display: none;
}

.ec-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ec-border-color);
    border-radius: var(--ec-radius-small);
    background: var(--ec-bg-color);
    position: relative;
    flex-shrink: 0;
    transition: var(--ec-transition-fast);
    margin-top: 1px;
}

.ec-checkbox-label input[type="checkbox"]:checked + .ec-checkbox-custom {
    background: var(--ec-primary-color);
    border-color: var(--ec-primary-color);
}

.ec-checkbox-label input[type="checkbox"]:checked + .ec-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);

    -ms-transform: translate(-50%, -50%);

    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.ec-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--ec-radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ec-transition-fast);
    text-decoration: none;
    line-height: 1;
    min-height: 38px;
}

.ec-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--ec-shadow-hover);
}

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

.ec-button:disabled {
    background-color: #9ca3af !important;
    color: #374151 !important;
    cursor: not-allowed;
}

.ec-button:disabled:hover,
.ec-button:disabled:active {
    transform: none;
    box-shadow: none;
}

.ec-button-primary {
    background: var(--ec-primary-color);
    color: white;
}

.ec-button-primary:hover {
    background: var(--ec-secondary-color);
    color: white;
}

.ec-button-secondary {
    background: var(--ec-bg-light);
    color: var(--ec-text-color);
    border: 1px solid var(--ec-border-color);
}

.ec-button-secondary:hover {
    background: var(--ec-bg-dark);
    color: var(--ec-text-color);
}

.ec-button-success {
    background: var(--ec-success-color);
    color: white;
}

.ec-button-success:hover {
    background: #008a20;
    color: white;
}

.ec-button-danger {
    background: var(--ec-error-color);
    color: white;
}

.ec-button-danger:hover {
    background: #b32d2e;
    color: white;
}

.ec-button-outline {
    background: transparent;
    border: 2px solid var(--ec-primary-color);
    color: var(--ec-primary-color);
}

.ec-button-outline:hover {
    background: var(--ec-primary-color);
    color: white;
}

.ec-button-small {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 38px;
}

.ec-button-large {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 52px;
}

/* ===== DOCUMENT UPLOAD ===== */
.ec-documents-section {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 30px;
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
}

.ec-documents-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-documents-grid {
    display: -ms-grid;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ec-document-upload {
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius);
    padding: 20px;
    background: var(--ec-bg-color);
    transition: var(--ec-transition-fast);
}

.ec-document-upload:hover {
    box-shadow: var(--ec-shadow);
}

.ec-doc-header {
    margin-bottom: 15px;
}

.ec-doc-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-doc-description {
    margin: 0;
    font-size: 12px;
    color: var(--ec-text-light);
    line-height: 1.4;
}

.ec-file-input {
    display: none;
}

.ec-upload-label {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-flex-direction: column;

    -ms-flex-direction: column;

    flex-direction: column;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    padding: 20px;
    border: 2px dashed var(--ec-border-color);
    border-radius: var(--ec-radius);
    cursor: pointer;
    transition: var(--ec-transition-fast);
    text-align: center;
    background: var(--ec-bg-light);
}

.ec-upload-label:hover {
    border-color: var(--ec-primary-color);
    background: rgba(34, 113, 177, 0.05);
}

.ec-upload-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.ec-upload-primary {
    display: block;
    font-weight: 500;
    color: var(--ec-text-color);
    margin-bottom: 4px;
}

.ec-upload-secondary {
    display: block;
    font-size: 12px;
    color: var(--ec-text-light);
}

.ec-upload-progress {
    margin-top: 15px;
}

.ec-progress-bar {
    height: 4px;
    background: var(--ec-bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.ec-progress-fill {
    height: 100%;
    background: var(--ec-primary-color);
    transition: width 0.3s ease;
}

.ec-progress-text {
    font-size: 11px;
    color: var(--ec-text-light);
}

.ec-doc-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ec-border-light);
}

.ec-doc-formats,
.ec-doc-size {
    display: block;
    font-size: 11px;
    color: var(--ec-text-muted);
    margin-bottom: 2px;
}

/* ===== UPLOADED DOCUMENTS ===== */
.ec-doc-existing {
    background: var(--ec-bg-light);
    border-radius: var(--ec-radius);
    padding: 15px;
}

.ec-doc-file {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 12px;
}

.ec-file-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.ec-file-info {
    -webkit-flex: 1;

    -ms-flex: 1;

    flex: 1;
    min-width: 0;
}

.ec-file-name {
    display: block;
    font-weight: 500;
    color: var(--ec-text-color);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-file-meta {
    display: block;
    font-size: 11px;
    color: var(--ec-text-light);
    margin-top: 2px;
}

.ec-file-actions {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== TERMS SECTION ===== */
.ec-terms-section {
    background: var(--ec-bg-light);
    border-radius: var(--ec-radius);
    padding: 25px;
    border: 1px solid var(--ec-border-light);
}

.ec-terms-content h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--ec-text-color);
}

.ec-terms-scrollable {
    max-height: 200px;
    overflow-y: auto;
    background: var(--ec-bg-color);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-small);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.ec-terms-acceptance {
    margin-bottom: 10px;
}

.ec-privacy-link {
    font-size: 12px;
    color: var(--ec-text-light);
}

.ec-privacy-link a {
    color: var(--ec-primary-color);
    text-decoration: none;
}

.ec-privacy-link a:hover {
    text-decoration: underline;
}

/* ===== FORM ACTIONS ===== */
.ec-form-actions {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--ec-border-light);
}

.ec-form-actions .ec-button {
    min-width: 140px;
}

/* ===== REVIEW SECTION ===== */
.ec-review-section {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 30px;
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
}

.ec-review-content {
    margin-bottom: 25px;
}

.ec-review-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ec-border-light);
}

.ec-review-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ec-review-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-review-item {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: flex-start;

    -ms-flex-align: flex-start;

    align-items: flex-start;
    margin-bottom: 4px;
    font-size: 13px;
}

.ec-review-label {
    font-weight: 500;
    color: var(--ec-text-light);
    margin-right: 20px;
    min-width: 140px;
}

.ec-review-value {
    color: var(--ec-text-color);
    -webkit-flex: 1;

    -ms-flex: 1;

    flex: 1;
    text-align: right;
    word-break: break-word;
}

.ec-final-confirmation {
    background: var(--ec-bg-light);
    border-radius: var(--ec-radius);
    padding: 20px;
    border: 1px solid var(--ec-border-light);
}

/* ===== STATUS BADGES ===== */
.ec-status-badge {
    display: inline-flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--ec-radius-small);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ec-status-pendente {
    background: #fff3cd;
    color: #856404;
}

.ec-status-aguardando {
    background: #d1ecf1;
    color: #0c5460;
}

.ec-status-analise {
    background: #f8d7da;
    color: #721c24;
}

.ec-status-aprovado {
    background: #d4edda;
    color: #155724;
}

.ec-status-recusado {
    background: #f8d7da;
    color: #721c24;
}

.ec-status-arquivado {
    background: #e2e3e5;
    color: #383d41;
}

/* ===== TYPE BADGES ===== */
.ec-type-badge {
    display: inline-flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--ec-radius-small);
    font-size: 12px;
    font-weight: 600;
    background: var(--ec-bg-light);
    color: var(--ec-text-color);
    border: 1px solid var(--ec-border-light);
}

/* ===== ALERTS & NOTIFICATIONS ===== */
.ec-alert {
    padding: 15px 20px;
    border-radius: var(--ec-radius);
    margin-bottom: 4px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.5;
}

.ec-alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--ec-success-color);
}

.ec-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--ec-error-color);
}

.ec-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--ec-warning-color);
}

.ec-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--ec-info-color);
}

.ec-alert h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
}

.ec-alert p {
    margin: 0;
}

.ec-alert ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

/* ===== PORTAL STYLES ===== */
.ec-portal-page {
    background: var(--ec-bg-light);
    min-height: 100vh;
    padding: 20px 0;
}

.ec-portal-container {
    display: -ms-grid;

    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ec-portal-header {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 20px;
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
}

.ec-portal-breadcrumb {
    font-size: 12px;
    color: var(--ec-text-light);
    margin-bottom: 10px;
}

.ec-breadcrumb-separator {
    margin: 0 8px;
}

.ec-breadcrumb-current {
    color: var(--ec-text-color);
    font-weight: 500;
}

.ec-portal-title {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 20px;
}

.ec-portal-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-cadastro-id {
    font-size: 14px;
    color: var(--ec-text-light);
    font-weight: 400;
}

/* ===== PORTAL NAVIGATION ===== */
.ec-portal-nav {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
    overflow: hidden;
}

.ec-nav-tabs {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
}

.ec-nav-item {
    flex-shrink: 0;
}

.ec-nav-link {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: var(--ec-text-light);
    text-decoration: none;
    transition: var(--ec-transition-fast);
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.ec-nav-link:hover {
    background: var(--ec-bg-light);
    color: var(--ec-text-color);
}

.ec-nav-active .ec-nav-link {
    color: var(--ec-primary-color);
    border-bottom-color: var(--ec-primary-color);
    background: rgba(34, 113, 177, 0.05);
}

.ec-nav-icon {
    font-size: 16px;
}

.ec-nav-text {
    white-space: nowrap;
}

/* ===== PORTAL CONTENT ===== */
.ec-portal-content {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 30px;
    box-shadow: var(--ec-shadow);
    border: 1px solid var(--ec-border-light);
    min-height: 500px;
}


/* ===== ADMIN STYLES REMOVIDOS ===== */
/* Dashboard, sidebar e estilos administrativos foram movidos para admin.css */

/* ===== STATUS SECTION ===== */
.ec-status-section {
    margin-bottom: 30px;
}

.ec-section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-status-card {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 25px;
    border: 1px solid var(--ec-border-light);
    box-shadow: var(--ec-shadow);
}

.ec-status-header {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    margin-bottom: 4px;
}

.ec-status-info {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 10px;
}

.ec-cadastro-type {
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-progress-section {
    margin: 20px 0;
}

.ec-progress-bar {
    height: 8px;
    background: var(--ec-bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.ec-progress-text {
    font-size: 12px;
    color: var(--ec-text-light);
    font-weight: 500;
}

.ec-status-details {
    display: -ms-grid;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ec-border-light);
}

.ec-detail-item {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-flex-direction: column;

    -ms-flex-direction: column;

    flex-direction: column;
    gap: 4px;
}

.ec-detail-label {
    font-size: 12px;
    color: var(--ec-text-light);
    font-weight: 500;
}

.ec-detail-value {
    font-size: 14px;
    color: var(--ec-text-color);
    font-weight: 500;
}

/* ===== STATUS MESSAGES ===== */
.ec-status-message {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--ec-bg-light);
    border-radius: var(--ec-radius);
    margin-top: 20px;
    border-left: 4px solid;
}

.ec-status-message-pendente,
.ec-status-message-aguardando {
    border-left-color: var(--ec-warning-color);
}

.ec-status-message-analise {
    border-left-color: var(--ec-info-color);
}

.ec-status-message-aprovado {
    border-left-color: var(--ec-success-color);
}

.ec-status-message-recusado,
.ec-status-message-arquivado {
    border-left-color: var(--ec-error-color);
}

.ec-message-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ec-message-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-message-text {
    margin: 0 0 8px 0;
    color: var(--ec-text-color);
    line-height: 1.5;
}

.ec-message-action {
    margin: 0;
    color: var(--ec-text-light);
    font-size: 13px;
    line-height: 1.4;
}

/* ===== TIMELINE ===== */
.ec-activity-timeline {
    position: relative;
    padding-left: 30px;
}

.ec-activity-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ec-border-light);
}

.ec-timeline-item {
    position: relative;
    margin-bottom: 4px;
    padding-bottom: 20px;
}

.ec-timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.ec-timeline-marker {
    position: absolute;
    left: -37px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid var(--ec-bg-color);
    box-shadow: 0 0 0 2px var(--ec-border-light);
}

.ec-timeline-marker.ec-status-pendente { background: var(--ec-warning-color); }
.ec-timeline-marker.ec-status-aguardando { background: var(--ec-info-color); }
.ec-timeline-marker.ec-status-analise { background: var(--ec-primary-color); }
.ec-timeline-marker.ec-status-aprovado { background: var(--ec-success-color); }
.ec-timeline-marker.ec-status-recusado { background: var(--ec-error-color); }
.ec-timeline-marker.ec-status-arquivado { background: var(--ec-text-muted); }

.ec-timeline-content {
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    padding: 15px;
    border: 1px solid var(--ec-border-light);
    box-shadow: var(--ec-shadow);
}

.ec-timeline-header {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    margin-bottom: 4px;
}

.ec-timeline-status {
    font-weight: 600;
    color: var(--ec-text-color);
    text-transform: capitalize;
}

.ec-timeline-date {
    font-size: 12px;
    color: var(--ec-text-light);
}

.ec-timeline-notes {
    color: var(--ec-text-color);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}


/* ===== MODALS ===== */
.ec-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    -webkit-justify-content: center;

    -ms-flex-pack: center;

    justify-content: center;
    padding: 20px;
}

.ec-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);

    backdrop-filter: blur(2px);
}

.ec-modal-content {
    position: relative;
    background: var(--ec-bg-color);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow-large);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-flex-direction: column;

    -ms-flex-direction: column;

    flex-direction: column;
}

.ec-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--ec-border-light);
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
}

.ec-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ec-text-color);
}

.ec-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ec-text-light);
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    -webkit-justify-content: center;

    -ms-flex-pack: center;

    justify-content: center;
    border-radius: 50%;
    transition: var(--ec-transition-fast);
}

.ec-modal-close:hover {
    background: var(--ec-bg-light);
    color: var(--ec-text-color);
}

.ec-modal-body {
    padding: 25px;
    overflow-y: auto;
    -webkit-flex: 1;

    -ms-flex: 1;

    flex: 1;
}

.ec-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--ec-border-light);
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-justify-content: flex-end;

    -ms-flex-pack: flex-end;

    justify-content: flex-end;
    gap: 12px;
}

/* ===== LOADING ===== */
.ec-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    -webkit-justify-content: center;

    -ms-flex-pack: center;

    justify-content: center;
}

.ec-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(2px);

    backdrop-filter: blur(2px);
}

.ec-loading-content {
    position: relative;
    text-align: center;
    color: var(--ec-text-color);
}

.ec-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--ec-border-light);
    border-left-color: var(--ec-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ec-loading-message {
    margin: 0;
    font-size: 14px;
    color: var(--ec-text-light);
}

/* ===== TOAST NOTIFICATIONS ===== */
.ec-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    pointer-events: none;
}

.ec-toast {
    background: var(--ec-bg-color);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius);
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: var(--ec-shadow-large);
    font-size: 14px;
    max-width: 400px;
    -webkit-transform: translateX(100%);

    -ms-transform: translateX(100%);

    transform: translateX(100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.ec-toast-show {
    -webkit-transform: translateX(0);

    -ms-transform: translateX(0);

    transform: translateX(0);
}

.ec-toast-success {
    border-left: 4px solid var(--ec-success-color);
    background-color: var(--ec-success-color);
    color: white;
}

.ec-toast-error {
    border-left: 4px solid var(--ec-error-color);
    color: var(--ec-error-color);
}

.ec-toast-warning {
    border-left: 4px solid var(--ec-warning-color);
    color: var(--ec-warning-color);
}

.ec-toast-info {
    border-left: 4px solid var(--ec-info-color);
    color: var(--ec-info-color);
}

/* ===== RESPONSIVE DESIGN ===== */
/*
STANDARDIZED BREAKPOINT SYSTEM:
- Extra small devices (phones): (max-width: 575.98px) - xs
- Small devices (landscape phones): (max-width: 767.98px) - sm  
- Medium devices (tablets): (max-width: 991.98px) - md
- Large devices (desktops): (max-width: 1199.98px) - lg
- Extra large devices (large desktops): (min-width: 1200px) - xl
*/

/* Large devices (desktops) */
@media (max-width: 1199.98px) { /* lg */
    .ec-cadastro-form-container,
    .ec-portal-container,
    .ec-status-container {
        max-width: 960px;
        padding: 18px;
    }
    
    .ec-documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .ec-modal-content {
        max-width: 500px;
    }
}

/* Medium devices (tablets) */
@media (max-width: 991.98px) { /* md */
    .ec-cadastro-form-container,
    .ec-portal-container,
    .ec-status-container {
        max-width: 720px;
        padding: 16px;
    }
    
    .ec-fields-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ec-documents-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .ec-portal-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ec-nav-tabs {
        flex-wrap: wrap;
    }
    
    .ec-nav-text {
        font-size: 13px;
    }
}

/* Small devices (landscape phones) */
@media (max-width: 767.98px) { /* sm */
    .ec-cadastro-form-container,
    .ec-portal-container,
    .ec-status-container {
        padding: 15px;
    }
    
    .ec-form-section {
        padding: 20px;
    }
    
    .ec-fields-grid[data-columns="2"],
    .ec-fields-grid[data-columns="3"] {
        grid-template-columns: 1fr;
    }
    
    .ec-documents-grid {
        grid-template-columns: 1fr;
    }
    
    .ec-form-actions {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        gap: 12px;
    }
    
    .ec-form-actions .ec-button {
        width: 100%;
    }
    
    .ec-welcome-section {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        text-align: center;
    }
    
    .ec-welcome-actions {
        width: 100%;
        -webkit-justify-content: center;

        -ms-flex-pack: center;

        justify-content: center;
    }
    
    .ec-dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .ec-dashboard-sidebar {
        order: -1;
    }
    
    .ec-nav-tabs {
        -webkit-flex-wrap: wrap;

        -ms-flex-wrap: wrap;

        flex-wrap: wrap;
    }
    
    .ec-nav-item {
        -webkit-flex: 1;

        -ms-flex: 1;

        flex: 1;
        min-width: 0;
    }
    
    .ec-nav-text {
        display: none;
    }
    
    .ec-progress-steps {
        padding: 0 10px;
    }
    
    .ec-progress-steps::before {
        left: 25px;
        right: 25px;
    }
    
    .ec-step-label {
        font-size: 10px;
    }
    
    .ec-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .ec-modal-header,
    .ec-modal-body,
    .ec-modal-footer {
        padding: 15px;
    }
}

@media (max-width: 575.98px) { /* xs */
    .ec-portal-title {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 10px;
    }
    
    .ec-welcome-actions {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
    }
    
    .ec-status-header {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 10px;
    }
    
    .ec-status-details {
        grid-template-columns: 1fr;
    }
    
    .ec-review-item {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 4px;
    }
    
    .ec-review-label {
        min-width: auto;
        margin-right: 0;
    }
    
    .ec-review-value {
        text-align: left;
    }
}

/* ===== ACCESSIBILITY - COMPREHENSIVE REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    /* Universal motion disabling for users with vestibular disorders */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable form step transitions */
    .ec-form-step {
        animation: none !important;
        transform: none !important;
    }
    
    /* Disable button hover movements */
    .ec-button:hover {
        transform: none !important;
    }
    
    /* Disable progress step scaling */
    .ec-step-number,
    .ec-step-active .ec-step-number,
    .ec-step-complete .ec-step-number {
        transform: none !important;
        animation: none !important;
    }
    
    /* Disable progress bar width animations */
    .ec-progress-fill {
        transition: none !important;
    }
    
    /* Disable modal fade-in effects */
    .ec-modal,
    .ec-modal-content {
        animation: none !important;
        transform: none !important;
    }
    
    /* Disable loading spinner animations */
    .ec-spinner {
        animation: none !important;
    }
    
    /* Disable toast notification slide-ins */
    .ec-toast,
    .ec-toast-show {
        transform: none !important;
        animation: none !important;
    }
    
    /* Disable timeline marker animations */
    .ec-timeline-marker {
        animation: none !important;
        transform: none !important;
    }
    
    /* Disable document upload animations */
    .ec-document-upload:hover,
    .ec-upload-label:hover {
        transform: none !important;
    }
    
    /* Disable edit mode slide-in animations */
    .slideIn {
        animation: none !important;
        transform: none !important;
    }
    
    /* Keep safe transitions - color and opacity changes don't cause motion sickness */
    .ec-form-control:focus,
    .ec-button:focus,
    .ec-nav-link:focus {
        transition: border-color 0.01ms, box-shadow 0.01ms, background-color 0.01ms !important;
    }
    
    /* Keep essential UI feedback - opacity changes are generally safe */
    .ec-modal-overlay,
    .ec-loading-overlay {
        transition: opacity 0.01ms !important;
    }
}

.ec-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== COMPREHENSIVE FOCUS INDICATORS - WCAG COMPLIANT ===== */

/* Primary focus style - high contrast blue */
.ec-button:focus,
.ec-button:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.2) !important;
}

/* Form controls comprehensive focus */
.ec-form-control:focus,
.ec-form-control:focus-visible,
input.ec-form-control:focus,
textarea.ec-form-control:focus,
select.ec-form-control:focus {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    border-color: var(--ec-primary-color) !important;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1) !important;
}

/* Checkbox and radio focus */
.ec-checkbox-label:focus-within {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    background-color: rgba(34, 113, 177, 0.05) !important;
}

.ec-checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* File upload focus */
.ec-file-input:focus + .ec-upload-label,
.ec-upload-label:focus-within {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    border-color: var(--ec-primary-color) !important;
    background-color: rgba(34, 113, 177, 0.05) !important;
}

/* Navigation focus */
.ec-nav-link:focus,
.ec-nav-link:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    background-color: rgba(34, 113, 177, 0.1) !important;
}

/* Step navigation focus */
.ec-step:focus,
.ec-step:focus-visible,
.ec-step-number:focus,
.ec-step-number:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Links and action elements */
a:focus,
a:focus-visible,
.ec-action-link:focus,
.ec-action-link:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    text-decoration: underline !important;
}

/* Modal elements focus */
.ec-modal-close:focus,
.ec-modal-close:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
    background-color: rgba(34, 113, 177, 0.1) !important;
}

/* Status badge links */
.ec-status-badge:focus,
.ec-status-badge:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Type badges focus */
.ec-type-badge:focus,
.ec-type-badge:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Timeline elements focus (if interactive) */
.ec-timeline-item:focus,
.ec-timeline-item:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Document field focus */
.ec-document-field:focus-within {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Progress bar focus (if interactive) */
.ec-progress-bar:focus,
.ec-progress-bar:focus-visible {
    outline: 2px solid var(--ec-primary-color) !important;
    outline-offset: 2px !important;
}

/* Disabled elements focus */
.ec-button:disabled:focus,
.ec-form-control:disabled:focus {
    outline: 2px solid var(--ec-text-muted) !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ec-button:focus,
    .ec-button:focus-visible,
    .ec-form-control:focus,
    .ec-form-control:focus-visible,
    .ec-checkbox-label:focus-within,
    .ec-upload-label:focus-within,
    .ec-nav-link:focus,
    .ec-nav-link:focus-visible,
    a:focus,
    a:focus-visible {
        outline: 3px solid #000000 !important;
        outline-offset: 2px !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --ec-border-color: #000;
        --ec-text-light: #000;
    }
    
    .ec-form-control {
        border-width: 2px;
    }
    
    .ec-button {
        border: 2px solid;
    }
}

/* ===== UNIVERSAL DOCUMENT SYSTEM ===== */
/* Estilos universais para TODOS os campos de documento */

.ec-document-field[data-field-type="document"] {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius);
    background: var(--ec-bg-color);
    transition: var(--ec-transition-fast);
}

.ec-document-field[data-field-type="document"]:hover {
    box-shadow: var(--ec-shadow);
}

.ec-document-field[data-field-type="document"].error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Universal document label */
.ec-document-label {
    display: block;
    font-weight: 600;
    color: var(--ec-text-color);
    margin-bottom: 4px;
    font-size: 14px;
}

.ec-document-label .ec-required {
    color: #ef4444;
    margin-left: 4px;
}

/* Universal file input wrapper */
.ec-file-input-wrapper {
    position: relative;
    margin-bottom: 4px;
}

.ec-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Universal file input label (clickable area) */
.ec-file-input-label {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-flex-direction: column;

    -ms-flex-direction: column;

    flex-direction: column;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    padding: 24px;
    border: 2px dashed var(--ec-border-color);
    border-radius: var(--ec-radius);
    cursor: pointer;
    transition: var(--ec-transition-fast);
    text-align: center;
    background: var(--ec-bg-light);
    min-height: 80px;
    -webkit-justify-content: center;

    -ms-flex-pack: center;

    justify-content: center;
}

.ec-file-input-label:hover {
    border-color: var(--ec-primary-color);
    background: rgba(34, 113, 177, 0.05);
}

.ec-file-input-icon {
    font-size: 24px;
    margin-bottom: 4px;
    display: block;
}

.ec-file-input-text {
    font-weight: 500;
    color: var(--ec-text-color);
    font-size: 14px;
}

/* Universal status container */
.ec-file-status {
    margin: 12px 0;
    min-height: 20px;
}

/* Universal cached file indicator */
.ec-document-cached {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    -webkit-justify-content: space-between;

    -ms-flex-pack: space-between;

    justify-content: space-between;
    padding: 12px;
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: var(--ec-radius);
    font-size: 13px;
}

.ec-cached-info {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 8px;
    -webkit-flex: 1;

    -ms-flex: 1;

    flex: 1;
}

.ec-cached-icon {
    font-size: 16px;
}

.ec-cached-text {
    font-weight: 500;
    color: #1e40af;
}

.ec-cached-size {
    color: #1e40af;
}

.ec-clear-cache {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: var(--ec-transition-fast);
}

.ec-clear-cache:hover {
    background: #dc2626;
}

/* Universal uploaded file indicator */
.ec-document-uploaded {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    padding: 12px;
    background: #dcfce7;
    border: 1px solid #16a34a;
    border-radius: var(--ec-radius);
    font-size: 13px;
}

.ec-uploaded-info {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 8px;
}

.ec-uploaded-icon {
    font-size: 16px;
}

.ec-uploaded-text {
    font-weight: 500;
    color: #15803d;
}

.ec-uploaded-size {
    color: #15803d;
}

/* Universal error container */
.ec-field-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--ec-radius);
    color: #dc2626;
    font-size: 12px;
    display: none;
}

.ec-field-error:not(:empty) {
    display: block;
}

/* Universal help text */
.ec-field-help {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--ec-radius);
    font-size: 12px;
    color: var(--ec-text-muted);
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: flex-start;

    -ms-flex-align: flex-start;

    align-items: flex-start;
    gap: 6px;
}

.ec-help-icon {
    font-size: 14px;
    margin-top: 1px;
}

.ec-help-text {
    line-height: 1.4;
}

/* Universal file info */
.ec-file-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: var(--ec-radius);
    font-size: 11px;
    color: var(--ec-text-muted);
    line-height: 1.3;
}

/* Responsive design for universal document fields */
@media (max-width: 767.98px) { /* sm */
    .ec-document-field[data-field-type="document"] {
        margin-bottom: 4px;
        padding: 12px;
    }
    
    .ec-file-input-label {
        padding: 20px 16px;
        min-height: 70px;
    }
    
    .ec-file-input-icon {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .ec-file-input-text {
        font-size: 13px;
    }
    
    .ec-document-cached,
    .ec-document-uploaded {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 8px;
    }
    
    .ec-cached-info,
    .ec-uploaded-info {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 4px;
    }
}

/* Dark mode support for universal document system */
@media (prefers-color-scheme: dark) {
    .ec-document-field[data-field-type="document"] {
        background: #1f2937;
        border-color: #374151;
    }
    
    .ec-document-field[data-field-type="document"].error {
        background: #451a1a;
        border-color: #dc2626;
    }
    
    .ec-document-label {
        color: #f9fafb;
    }
    
    .ec-file-input-label {
        background: #111827;
        border-color: #4b5563;
    }
    
    .ec-file-input-label:hover {
        background: rgba(59, 130, 246, 0.1);
        border-color: #3b82f6;
    }
    
    .ec-file-input-text {
        color: #d1d5db;
    }
    
    .ec-field-help {
        background: #111827;
        border-color: #374151;
        color: #4b5563;
    }
    
    .ec-file-info {
        background: #111827;
        color: #4b5563;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .ec-portal-nav,
    .ec-form-actions,
    .ec-welcome-actions,
    .ec-file-actions,
    .ec-modal,
    .ec-loading,
    .ec-toast-container {
        display: none !important;
    }
    
    .ec-portal-page,
    .ec-cadastro-form-container {
        background: white !important;
        color: black !important;
    }
    
    .ec-form-section,
    .ec-status-card,
    .ec-portal-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ========================================
   EDIT MODE STYLES - MELHORIAS CRÍTICAS
   ======================================== */

/* Existing document indicator */
.ec-existing-document {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 14px;
}

.ec-existing-info {
    display: -webkit-flex;

    display: -ms-flexbox;

    display: flex;
    -webkit-align-items: center;

    -ms-flex-align: center;

    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.ec-existing-icon {
    font-size: 16px;
}

.ec-existing-text {
    color: #047857;
    font-weight: 500;
}

.ec-portal-content .ec-view-document {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ec-view-document:hover {
    background: rgba(59, 130, 246, 0.1);
    text-decoration: none;
}

.ec-existing-note {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
}

/* Modified field indicators */
.ec-cadastro-form-container .ec-field-modified {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.ec-cadastro-form-container .ec-file-modified {
    border-left: 4px solid #f59e0b;
}

/* Edit banner enhancements */
.ec-edit-banner {
    margin-bottom: 4px;
}

.ec-edit-banner-content {
    transition: border-left 0.3s ease;
}

/* Changes indicator floating element created via JS */
#ec-changes-indicator {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Edit mode responsive */
@media (max-width: 767.98px) { /* sm */
    .ec-existing-document {
        padding: 10px;
        font-size: 13px;
    }
    
    .ec-existing-info {
        -webkit-flex-direction: column;

        -ms-flex-direction: column;

        flex-direction: column;
        -webkit-align-items: flex-start;

        -ms-flex-align: flex-start;

        align-items: flex-start;
        gap: 5px;
    }
    
    .ec-view-document {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    #ec-changes-indicator {
        position: fixed;
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Dark mode for edit styles */
@media (prefers-color-scheme: dark) {
    .ec-existing-document {
        background: #064e3b;
        border-color: #10b981;
    }
    
    .ec-existing-text {
        color: #6ee7b7;
    }
    
    .ec-existing-note {
        color: #4b5563;
    }
    
    .ec-cadastro-form-container .ec-field-modified {
        background: rgba(245, 158, 11, 0.1);
    }
    
    .ec-portal-content .ec-view-document {
        color: #60a5fa;
    }
    
    .ec-view-document:hover {
        background: rgba(96, 165, 250, 0.1);
    }
