* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #FFFFFF;
    --green-primary: #8BC34A;
    --green-dark: #2E7D32;
    --gray-dark: #1F2937;
    --gray-light: #F3F4F6;
    --gray-border: #E5E7EB;
    --gray-text: #6B7280;
    --yellow-soft: #FFF9C4;
    --red-soft: #FFEBEE;
    --red-error: #DC2626;
    --orange-warning: #F57C00;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--gray-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Sidebar - mantém mesmo estilo do dashboard */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-border);
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s ease, min-width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 80px;
    min-width: 80px;
}

.sidebar.collapsed .logo-text > span:not(.logo-icon) {
    display: none;
}

.sidebar.collapsed .menu-link > span:not(.menu-icon) {
    display: none;
}

.sidebar.collapsed .logo {
    padding: 0 16px 32px;
    justify-content: center;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
    padding: 12px;
}

.sidebar-toggle {
    position: absolute;
    top: 20px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--gray-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.logo {
    padding: 0 24px 32px;
    border-bottom: 1px solid var(--gray-border);
    margin-bottom: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--green-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.menu {
    list-style: none;
    padding: 0 12px;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-dark);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.menu-link span:not(.menu-icon) {
    transition: opacity 0.3s ease;
}

.menu-link:hover {
    background: var(--gray-light);
}

.menu-link.active {
    background: var(--gray-light);
    color: var(--green-dark);
    position: relative;
}

.menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--green-primary);
    border-radius: 0 4px 4px 0;
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--gray-light);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
    max-width: calc(100% - 80px);
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-dark);
    white-space: nowrap;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    min-width: 200px;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    font-size: 14px;
    background: var(--gray-light);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--green-primary);
    background: var(--white);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9CA3AF;
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

.icon-button:hover {
    background: var(--gray-border);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--green-primary);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.profile:hover {
    background: var(--gray-light);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.profile-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
    white-space: nowrap;
}

/* Form Content */
.form-content {
    flex: 1;
    padding: 32px;
    display: flex;
    gap: 24px;
    overflow-y: auto;
}

.form-main {
    flex: 1;
    min-width: 0;
}

.form-sidebar {
    width: 320px;
    min-width: 320px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Stepper */
.stepper {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.stepper-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--gray-border);
    z-index: 0;
}

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

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-text);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

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

.stepper-step.completed .step-number {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
}

.stepper-step.completed .step-number svg {
    stroke: var(--white);
    stroke-width: 3;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-text);
    text-align: center;
    max-width: 120px;
}

.stepper-step.active .step-label {
    color: var(--green-dark);
    font-weight: 600;
}

.step-connector {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gray-border);
    z-index: -1;
}

.stepper-step.completed .step-connector {
    background: var(--green-dark);
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-error {
    background: var(--red-soft);
    border: 1px solid #FCA5A5;
    color: var(--red-error);
}

.alert-warning {
    background: var(--yellow-soft);
    border: 1px solid #FCD34D;
    color: var(--orange-warning);
}

/* Form Cards */
.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray-text);
    margin-top: -16px;
    margin-bottom: 24px;
}

/* Form Fields */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--red-error);
    margin-left: 4px;
}

.form-label .optional {
    color: var(--gray-text);
    font-weight: 400;
    font-size: 12px;
    margin-left: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    transition: all 0.2s;
    color: var(--gray-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.form-input:disabled {
    background: var(--gray-light);
    cursor: not-allowed;
}

.form-input.error {
    border-color: var(--red-error);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    transition: all 0.2s;
    color: var(--gray-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.form-help {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--red-error);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

.badge-warning {
    background: rgba(245, 124, 0, 0.1);
    color: var(--orange-warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

/* Info Box */
.info-box {
    background: var(--gray-light);
    border-left: 4px solid var(--green-primary);
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-dark);
}

/* Completeness Indicator */
.completeness-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.completeness-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.completeness-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    font-size: 11px;
    color: var(--gray-text);
}

.completeness-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.completeness-fill {
    height: 100%;
    background: var(--green-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.completeness-percentage {
    font-size: 12px;
    color: var(--gray-text);
    text-align: right;
}

/* Summary Sidebar */
.summary-panel {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 20px;
}

.summary-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-dark);
}

.summary-value.empty {
    color: var(--gray-text);
    font-style: italic;
    font-weight: 400;
}

.summary-alert {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.summary-alert.warning {
    background: rgba(245, 124, 0, 0.1);
    color: var(--orange-warning);
    border-left: 3px solid var(--orange-warning);
}

.summary-alert.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
    border-left: 3px solid #2563EB;
}

/* Action Bar */
.action-bar {
    background: var(--white);
    border-top: 1px solid var(--gray-border);
    padding: 20px 32px;
    position: sticky;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.action-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--green-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 195, 74, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--green-dark);
    box-shadow: 0 4px 8px rgba(139, 195, 74, 0.3);
}

.btn-primary:disabled {
    background: var(--gray-light);
    color: var(--gray-text);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--gray-dark);
    border: 1px solid var(--gray-border);
}

.btn-secondary:hover {
    background: var(--gray-light);
    border-color: var(--green-primary);
}

.btn-link {
    background: transparent;
    color: var(--gray-text);
    padding: 12px 16px;
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--gray-dark);
}

/* SVG Icons */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Responsive */
@media (max-width: 1200px) {
    .form-sidebar {
        display: none;
    }
    
    .form-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .form-content {
        padding: 16px;
        flex-direction: column;
    }
    
    .stepper {
        padding: 20px 16px;
    }
    
    .step-label {
        font-size: 11px;
        max-width: 80px;
    }
    
    .form-card {
        padding: 24px 20px;
    }
    
    .tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        min-width: 120px;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .tab-content {
        padding: 16px;
    }
    
    .upload-area {
        padding: 24px 16px;
    }
    
    .upload-area-large {
        padding: 48px 24px;
        min-height: 150px;
    }
    
    .file-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .document-card-fields {
        grid-template-columns: 1fr;
    }
    
    .document-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .action-bar {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-bar-left,
    .action-bar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Tabs */
.tabs-container {
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--gray-border);
    background: var(--gray-light);
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--gray-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}

.tab-button:hover {
    background: rgba(139, 195, 74, 0.05);
    color: var(--gray-dark);
}

.tab-button.active {
    color: var(--green-dark);
    border-bottom-color: var(--green-primary);
    background: var(--white);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 24px;
}

.tab-content.active {
    display: block;
}

/* Upload Area */
.upload-area {
    position: relative;
    border: 2px dashed var(--gray-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    background: var(--gray-light);
    transition: all 0.2s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--green-primary);
    background: rgba(139, 195, 74, 0.02);
}

.upload-area.dragover {
    border-color: var(--green-primary);
    background: rgba(139, 195, 74, 0.05);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.upload-placeholder {
    pointer-events: none;
    z-index: 0;
}

.uploaded-files {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    font-size: 14px;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon svg {
    width: 18px;
    height: 18px;
    color: var(--gray-text);
}

.file-name {
    font-weight: 500;
    color: var(--gray-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: var(--gray-text);
    margin-left: 8px;
}

.file-remove {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--gray-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-remove:hover {
    background: var(--red-soft);
    color: var(--red-error);
}

/* Upload Area Large */
.upload-area-large {
    position: relative;
    border: 2px dashed var(--gray-border);
    border-radius: 16px;
    padding: 64px 32px;
    text-align: center;
    background: var(--gray-light);
    transition: all 0.2s;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area-large:hover {
    border-color: var(--green-primary);
    background: rgba(139, 195, 74, 0.02);
}

.upload-area-large.dragover {
    border-color: var(--green-primary);
    background: rgba(139, 195, 74, 0.05);
}

.upload-placeholder-large {
    pointer-events: none;
    z-index: 0;
}

/* Document Type Tags */
.document-type-tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-dark);
    transition: all 0.2s;
}

.document-type-tag:hover {
    border-color: var(--green-primary);
    background: rgba(139, 195, 74, 0.05);
}

/* Document Counter */
.document-counter {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-text);
    padding: 8px 16px;
    background: var(--gray-light);
    border-radius: 8px;
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-text);
}

/* Document Card */
.document-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.document-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.document-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-border);
}

.document-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Quality Bar */
.quality-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quality-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.quality-indicator {
    padding: 12px;
    background: var(--gray-light);
    border-radius: 8px;
}

/* Garantir que elementos não ultrapassem limites */
* {
    max-width: 100%;
}

img, svg {
    max-width: 100%;
    height: auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--gray-border);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-text);
    transition: all 0.2s;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--gray-light);
    color: var(--gray-dark);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--gray-border);
    background: var(--gray-light);
}

/* ===== MODAL DE CONFIRMAÇÃO ===== */
.custom-confirmation-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease;
}

.custom-confirmation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirmation-dialog {
    background-color: #fff;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid #e5e7eb;
    text-align: center;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
}

.confirmation-icon svg {
    width: 32px;
    height: 32px;
}

.confirmation-dialog h3 {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.confirmation-dialog p {
    margin: 0 0 28px 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

.confirmation-dialog p strong {
    color: #111827;
    font-weight: 600;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancel-no {
    padding: 10px 20px;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-cancel-no:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-cancel-yes {
    padding: 10px 20px;
    background: #ef4444;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-cancel-yes:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-cancel-yes:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

@media (max-width: 768px) {
    .confirmation-dialog {
        padding: 24px;
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .confirmation-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }
    
    .confirmation-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .confirmation-dialog h3 {
        font-size: 1.25rem;
    }
    
    .confirmation-dialog p {
        font-size: 0.9375rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-cancel-no,
    .btn-cancel-yes {
        width: 100%;
        min-width: unset;
    }
}

.confirmation-icon.success {
    background: #f0fdf4;
    color: #10b981;
}

.confirmation-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.confirmation-icon.info {
    background: #eff6ff;
    color: #3b82f6;
}

.btn-cancel-yes.success {
    background: #10b981;
}

.btn-cancel-yes.success:hover:not(:disabled) {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-cancel-yes.warning {
    background: #f59e0b;
}

.btn-cancel-yes.warning:hover:not(:disabled) {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-cancel-yes.info {
    background: #3b82f6;
}

.btn-cancel-yes.info:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-cancel-yes.green {
    background: var(--green-dark);
}

.btn-cancel-yes.green:hover:not(:disabled) {
    background: #1B5E20;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.btn-cancel-yes.red {
    background: #ef4444;
}

.btn-cancel-yes.red:hover:not(:disabled) {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
