/* --- Global Resets and Font --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    /* font-family: 'Poppins', sans-serif; /* Uncomment if Poppins is linked via HTML */
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #FF2A2A 0%, #1B1B3B 50%, #2A2A5B 100%); /* Expertzy Brand Gradient */
    color: #333; /* Default text color for content on white backgrounds */
    padding: 20px;
    overflow-x: hidden; 
}

/* --- App Container and Layout --- */
.app-container {
    width: 100%;
    max-width: 1200px; 
    margin: auto;
    text-align: center;
}

/* --- Sistema de Controle de Usuário --- */
.user-profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: white;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-profile {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-config-user {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-config-user:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: rgba(255, 42, 42, 0.3);
    border-color: rgba(255, 42, 42, 0.5);
    transform: translateY(-1px);
}

/* --- Modal de Configuração de Usuário --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.user-config-modal {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px 25px;
}

.profile-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.profile-info p {
    margin: 0;
    color: #666;
}

.profile-selector h4 {
    color: #333;
    margin-bottom: 15px;
    text-align: left;
    font-size: 16px;
}

.profile-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.profile-option {
    cursor: pointer;
    display: block;
}

.profile-option input[type="radio"] {
    display: none;
}

.profile-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s ease;
    text-align: left;
    background: white;
}

.profile-option:hover .profile-card {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.profile-option input[type="radio"]:checked + .profile-card {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.profile-card h5 {
    color: #333;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.profile-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-card ul li {
    font-size: 13px;
    padding: 3px 0;
    color: #555;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px 20px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e9e9e9;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* --- Sistema de Login --- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #FF2A2A 0%, #1B1B3B 50%, #2A2A5B 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.login-header {
    margin-bottom: 30px;
}

.logo-expertzy-login {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    font-size: 24px;
    margin: 15px 0 5px 0;
    font-weight: 600;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-form {
    text-align: left;
}

.login-form h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 20px 0;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-message {
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-help {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.login-help details {
    cursor: pointer;
}

.login-help summary {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    user-select: none;
}

.login-help summary:hover {
    background: #e9ecef;
}

.users-list {
    margin-top: 15px;
    padding: 15px;
    background: #f1f3f4;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.users-list p {
    margin: 8px 0;
    color: #555;
}

.users-list p strong {
    color: #333;
    font-weight: 600;
}

/* Ocultar aplicação principal quando login está ativo */
.login-active .app-container {
    display: none !important;
}

/* Responsividade da tela de login */
@media (max-width: 500px) {
    .login-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .logo-expertzy-login {
        width: 100px;
    }
}

.app-header {
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-expertzy {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.3);
    transition: transform 0.3s ease;
}

.logo-expertzy:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: left;
}

.app-header h1 {
    font-size: 2.8em; 
    font-weight: 700;
    color: #ffffff; /* Title remains white against gradient */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.title-icon {
    margin-right: 10px;
    font-size: 0.9em; 
}

.title-version {
    font-size: 0.5em;
    font-weight: 300;
    color: #e0e0e0;
    vertical-align: middle;
    margin-left: 5px;
}

.main-content {
    width: 100%;
}

/* --- Converter Panel (Import Panel) --- */
.converter-panel {
    background-color: #ffffff; /* Changed to white */
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Adjusted shadow for white panel */
    /* backdrop-filter: blur(10px); /* Blur is less effective on solid white */
    /* -webkit-backdrop-filter: blur(10px); */
    border: 1px solid #e0e0e0; /* Light border for white panel */
    margin-bottom: 30px;
    color: #333333; /* Default text color for panel content */
}

/* --- Drop Zone --- */
.drop-zone {
    border: 3px dashed #cccccc; /* Adjusted for white background */
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-bottom: 20px;
    background-color: #f9f9f9; /* Very light grey for drop zone on white panel */
}

.drop-zone.highlight,
.drop-zone.dragover {
    background-color: #e0e0e0; 
    border-color: #FF2A2A; /* Expertzy red border on drag over */
}

.drop-zone-icon {
    font-size: 3em;
    color: #FF2A2A; /* Expertzy red icon */
    display: block;
    margin-bottom: 15px;
}

.drop-zone-text {
    font-size: 1.1em;
    color: #555555; /* Darker text for readability */
    font-weight: 600;
    margin-bottom: 5px;
}
.drop-zone-or {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 15px;
}

.selected-file-text {
    font-size: 0.95em;
    color: #555555; /* Darker text */
    margin-top: 0px; /* Adjusted spacing */
    margin-bottom: 20px;
    min-height: 1.5em;
    word-wrap: break-word;
}

/* --- Log Window --- */
.log-container {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.log-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #444444;
    margin-bottom: 8px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 5px;
}

.log-window {
    max-height: 150px; /* Or desired height */
    overflow-y: auto;
    border: 1px solid #dddddd;
    border-radius: 6px;
    padding: 10px;
    background-color: #f8f9fa; /* Light background for log area */
    font-size: 0.85em;
    line-height: 1.6;
    color: #333333;
}

.log-message {
    padding: 2px 0;
    border-bottom: 1px dotted #eeeeee;
}
.log-message:last-child {
    border-bottom: none;
}
.log-info { /* Default */
    color: #333333;
}
.log-success {
    color: #28a745; /* Green */
    font-weight: bold;
}
.log-error {
    color: #dc3545; /* Red */
    font-weight: bold;
}
.log-warn {
    color: #ffc107; /* Yellow/Orange */
}


/* --- Input Fields & Labels --- */
.output-section {
    margin-bottom: 25px;
}

.label-excel-output {
    display: block;
    font-size: 1em;
    color: #444444; /* Darker label text */
    margin-bottom: 8px;
    text-align: left;
}

.input-style { /* General style for inputs */
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #cccccc; /* Adjusted for white panel */
    background-color: #fdfdfd; /* Slightly off-white */
    color: #333333; /* Dark text for input */
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-style::placeholder {
    color: #999999;
}

.input-style:focus {
    outline: none;
    border-color: #FF2A2A; /* Expertzy red focus */
    box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.2);
}

/* --- Buttons --- */
.btn-style {
    padding: 12px 25px;
    border-radius: 25px; 
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    text-decoration: none; 
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.2em; 
}

.btn-select-file {
    background: linear-gradient(45deg, #f857a6, #ff5858); 
    color: white;
    box-shadow: 0 4px 15px rgba(248, 87, 166, 0.3);
}

.btn-select-file:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 87, 166, 0.4);
}

.btn-convert {
    background: linear-gradient(45deg, #29ffc6, #20e3b2, #0abfbc); 
    color: white; /* Text color for convert button */
    box-shadow: 0 4px 15px rgba(41, 255, 198, 0.3);
    margin-top: 10px; 
}
.btn-convert .btn-icon { /* If icon needs different color than text */
    /* color: white; */
}


.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 255, 198, 0.4);
}

.btn-convert:disabled {
    background: #dddddd; /* Grey for disabled */
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


/* --- Progress Bar & Status --- */
.progress-section {
    margin: 30px 0;
}

.progress-bar-container-style {
    width: 100%;
    height: 25px; 
    background-color: #eeeeee; /* Lighter track for white panel */
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-style {
    height: 100%;
    width: 0%; 
    background: linear-gradient(90deg, #29ffc6, #20e3b2); 
    border-radius: 25px;
    transition: width 0.4s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 600;
    color: #1e5647; 
}


.status-message-text {
    font-size: 0.95em;
    color: #555555; /* Darker status text */
    min-height: 1.4em;
}
.status-message-text.error { 
    color: #dc3545; /* Red for error messages, from Bootstrap variables */
    font-weight: bold;
}


/* --- Footer --- */
.app-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Footer border against gradient */
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7); /* Footer text color against gradient */
}

/* Remove panel top highlight as panel is now opaque white */
/* .converter-panel::before { ... } */


/* --- Tab Navigation --- */
.tab-navigation {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.tab-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    flex: 1;
}

.tab-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    color: white;
    border-bottom-color: #FF2A2A;
    background: rgba(255, 255, 255, 0.15);
}

/* Abas desabilitadas - aparência opaca */
.tab-button.disabled {
    opacity: 0.4;
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed !important;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05) !important;
}

.tab-button.disabled:hover {
    color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: none !important;
}

/* --- Tab Content --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* --- FOMENTAR Specific Styles --- */
.fomentar-header {
    text-align: center;
    margin-bottom: 30px;
}

.fomentar-header h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.fomentar-subtitle {
    color: #666;
    font-size: 1rem;
    font-style: italic;
}

.instrucoes-uso {
    background: linear-gradient(45deg, rgba(41, 255, 198, 0.05), rgba(32, 227, 178, 0.05));
    border: 2px solid rgba(41, 255, 198, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.instrucoes-uso h3 {
    color: #20e3b2;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.instrucoes-content p {
    margin: 12px 0;
    color: #333;
    line-height: 1.6;
}

.instrucoes-content p strong {
    color: #20e3b2;
    font-weight: 600;
}

.instrucoes-content em {
    color: #f857a6;
    font-style: normal;
    font-weight: 500;
}

.fomentar-import-section {
    text-align: center;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(45deg, rgba(248, 87, 166, 0.05), rgba(255, 88, 88, 0.05));
    border-radius: 12px;
    border: 2px dashed #f857a6;
}

/* Estilos para importação múltipla */
.import-mode-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.import-mode-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.import-mode-selector label:hover {
    background-color: #f0f0f0;
}

.import-mode-selector input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: bold;
}

.import-mode-selector input[type="radio"] {
    margin: 0;
}

.import-section {
    margin-bottom: 20px;
}

.multiple-import-zone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.multiple-import-zone:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.multiple-import-zone.dragover {
    border-color: #20e3b2;
    background-color: #f0fff8;
    border-style: solid;
}

.multiple-import-zone .drop-zone-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    color: #667eea;
}

.multiple-import-zone .drop-zone-or {
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

.selected-files-list {
    margin-top: 20px;
    text-align: left;
}

.selected-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    margin-bottom: 5px;
    border-radius: 5px;
    font-size: 14px;
}

.selected-file-item .file-info {
    display: flex;
    flex-direction: column;
}

.selected-file-item .file-name {
    font-weight: bold;
    color: #333;
}

.selected-file-item .file-period {
    color: #666;
    font-size: 12px;
}

.selected-file-item .remove-file {
    color: #e74c3c;
    cursor: pointer;
    font-weight: bold;
}

.selected-file-item .remove-file:hover {
    color: #c0392b;
}

/* Estilos para seletor de períodos */
.periods-selector {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.periods-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.period-button {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.period-button:hover {
    border-color: #667eea;
}

.period-button.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.view-options {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-process {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

.btn-process:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
}

/* Estilos para relatório comparativo */
.table-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.table-info p {
    margin: 5px 0;
    font-size: 14px;
}

.comparative-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.comparative-table th,
.comparative-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.comparative-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.comparative-table .description-col {
    text-align: left;
    max-width: 200px;
}

.comparative-table .value-col {
    text-align: right;
    font-family: monospace;
}

.period-header {
    background-color: #667eea;
    color: white;
}

.summary-row {
    background-color: #e8f4f8;
    font-weight: bold;
}

.fomentar-config {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid #FF2A2A;
    text-align: left;
}

.fomentar-config h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-item label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* --- Multiple Period Config Section --- */
.multiple-period-config {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #90caf9;
}

.multiple-period-config h4 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-note {
    background: #fff3e0;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #ff9800;
    font-size: 0.9rem;
    color: #f57c00;
    margin-top: 15px;
    text-align: left;
    line-height: 1.4;
}

/* --- Comparative View Styles --- */
.comparative-view {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.comparative-view h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
}

.comparative-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.comparative-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparative-table th,
.comparative-table td {
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.85rem;
}

.comparative-table .rubrica-desc {
    text-align: left;
    font-weight: 600;
    background: #f8f9fa;
    min-width: 200px;
}

.comparative-table th {
    background: linear-gradient(135deg, #FF2A2A, #1B1B3B);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.comparative-table tr:nth-child(even) {
    background: #f8f9fa;
}

.comparative-table tr:hover {
    background: #e3f2fd;
}

.comparative-summary {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.comparative-summary h4 {
    color: #1976D2;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e3f2fd;
}

.summary-item label {
    font-weight: 600;
    color: #555;
}

.valor-total {
    color: #1976D2;
    font-weight: bold;
    font-size: 1.1rem;
}

.valor-economia {
    color: #388E3C;
    font-weight: bold;
    font-size: 1.1rem;
}

.quadro-section {
    margin: 25px 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #FF2A2A;
    text-align: left;
}

.quadro-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.quadro-table {
    overflow-x: auto;
}

.fomentar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.fomentar-table th {
    background: linear-gradient(45deg, #FF2A2A, #1B1B3B);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.fomentar-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}

.fomentar-table tr:hover {
    background: rgba(255, 42, 42, 0.05);
}

.fomentar-table tr:nth-child(even) {
    background: #f8f9fa;
}

.resumo-section {
    background: linear-gradient(45deg, rgba(41, 255, 198, 0.05), rgba(32, 227, 178, 0.05));
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 2px solid rgba(41, 255, 198, 0.2);
    text-align: left;
}

.resumo-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 700;
}

.resumo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.resumo-item label {
    font-weight: 600;
    color: #333;
}

.valor-destaque {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.valor-economia {
    color: #20e3b2;
}

.valor-total {
    color: #f857a6;
    font-size: 1.4rem;
}

.fomentar-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

/* Additional button styles */
.btn-export {
    background: linear-gradient(45deg, #20e3b2, #29ffc6);
    color: white;
    box-shadow: 0 4px 15px rgba(32, 227, 178, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 227, 178, 0.4);
}

.btn-import {
    background: linear-gradient(45deg, #f857a6, #ff5858);
    color: white;
    box-shadow: 0 4px 15px rgba(248, 87, 166, 0.3);
}

.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 87, 166, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .logo-expertzy {
        width: 60px;
        height: 60px;
    }
    
    .app-header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .converter-panel {
        padding: 20px;
    }
    .drop-zone {
        padding: 30px 15px;
    }
    .btn-style {
        font-size: 1em;
        padding: 10px 20px;
    }
    .log-window {
        max-height: 100px; /* Shorter log on small screens */
    }
    .config-grid {
        grid-template-columns: 1fr;
    }
    .resumo-grid {
        grid-template-columns: 1fr;
    }
    .fomentar-actions {
        flex-direction: column;
    }
    .tab-navigation {
        flex-direction: column;
    }
    .tab-button {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    .tab-button.active {
        border-right-color: #FF2A2A;
    }
}

/* --- Seção de Correção de Códigos E111 --- */
/* Seção de Opção para CFOPs Genéricos */
.cfop-opcao-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007BFF;
}

.cfop-opcao-info {
    text-align: left;
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #E3F2FD;
    border-radius: 8px;
    border-left: 4px solid #007BFF;
}

.cfop-opcao-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-listar-cfops {
    background: linear-gradient(135deg, #007BFF 0%, #0056B3 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-listar-cfops:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-calcular-sem-cfops {
    background: linear-gradient(135deg, #28A745 0%, #20C997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-calcular-sem-cfops:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Seção de Configuração de CFOPs Genéricos */
.cfop-generico-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #28A745;
}

.cfop-generico-info {
    text-align: left;
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #E8F5E8;
    border-radius: 8px;
    border-left: 4px solid #28A745;
}

.cfops-encontrados {
    margin: 20px 0;
}

.cfop-item {
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 15px;
    align-items: center;
}

.cfop-item.multiplo-periodo {
    border-left: 4px solid #007BFF;
}

.cfop-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cfop-codigo {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
    text-align: center;
    background: #E9ECEF;
    padding: 8px;
    border-radius: 6px;
}

.cfop-descricao {
    font-size: 0.85em;
    color: #666;
    text-align: center;
    font-style: italic;
}

.cfop-detalhes {
    font-size: 0.8em;
    color: #888;
    text-align: center;
    margin-top: 5px;
    padding: 5px;
    background: #F8F9FA;
    border-radius: 4px;
}

.cfop-ocorrencias {
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.cfop-classificacao {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfop-classificacao label {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.cfop-radio-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cfop-radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cfop-radio-option:hover {
    background: #F0F0F0;
}

.cfop-radio-option input[type="radio"] {
    margin: 0;
}

.cfop-radio-option.incentivado {
    color: #28A745;
}

.cfop-radio-option.nao-incentivado {
    color: #DC3545;
}

.cfop-radio-option.padrao {
    color: #6C757D;
}

.cfop-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-aplicar-cfops {
    background: linear-gradient(135deg, #28A745 0%, #20C997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-aplicar-cfops:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.btn-pular-cfops {
    background: linear-gradient(135deg, #6C757D 0%, #ADB5BD 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pular-cfops:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.codigo-correcao-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #FF6B35;
}

.codigo-correcao-info {
    text-align: left;
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #FFF4E6;
    border-radius: 8px;
    border-left: 4px solid #FF6B35;
}

.codigos-encontrados {
    margin: 20px 0;
}

/* Estilos para tabelas de códigos com scroll */
.codigos-table-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.codigos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.codigos-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 10;
}

.codigos-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #5a67d8;
    white-space: nowrap;
}

.codigos-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.codigos-table tbody tr:hover {
    background-color: #f8f9fa;
}

.codigos-table tbody tr.codigo-incentivado {
    background-color: #f0fff4;
}

.codigos-table tbody tr.codigo-nao-incentivado {
    background-color: #fff5f5;
}

.codigos-table tbody tr:hover.codigo-incentivado {
    background-color: #e6ffed;
}

.codigos-table tbody tr:hover.codigo-nao-incentivado {
    background-color: #ffe4e6;
}

.codigos-table tbody td {
    padding: 10px 15px;
    vertical-align: middle;
}

/* Colunas específicas */
.codigo-col {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2d3748;
}

.tipo-col {
    white-space: nowrap;
}

.descricao-col {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.valor-col {
    text-align: right;
    font-weight: 600;
    color: #16a34a;
}

.valor-col.valor-negativo {
    color: #dc2626;
}

.incentivado-col {
    text-align: center;
}

.periodos-col {
    font-size: 12px;
    color: #6b7280;
}

.correcao-col {
    min-width: 150px;
}

.acoes-col {
    text-align: center;
    width: 60px;
}

/* Badges */
.badge-incentivado,
.badge-nao-incentivado {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-incentivado {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-nao-incentivado {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-origem {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-c197 {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-d197 {
    background-color: #fce7f3;
    color: #a21caf;
}

/* Input de código */
.codigo-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.codigo-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Botão remover */
.btn-remover {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-remover:hover {
    background-color: #fee2e2;
}

/* Linha de períodos específicos */
.periodos-especificos-row {
    background-color: #f9fafb;
}

.periodos-especificos-cell {
    padding: 15px;
}

.periodos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.periodo-checkbox {
    display: flex;
    align-items: center;
    padding: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.periodo-checkbox:hover {
    background-color: #f3f4f6;
}

.periodo-checkbox input {
    margin-right: 8px;
}

/* Scrollbar personalizada */
.codigos-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.codigos-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.codigos-table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.codigos-table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsividade */
@media (max-width: 768px) {
    .codigos-table-container {
        max-height: 300px;
    }
    
    .codigos-table {
        font-size: 12px;
    }
    
    .codigos-table thead th,
    .codigos-table tbody td {
        padding: 8px 10px;
    }
    
    .descricao-col {
        max-width: 120px;
    }
}

/* Estilos específicos para tabela de CFOPs genéricos */
.cfops-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 15px 0;
    background: white;
}

.cfops-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
}

.cfops-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    z-index: 10;
}

.cfops-table thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

.cfops-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.cfops-table tbody tr:hover {
    background-color: #e3f2fd;
}

.cfops-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.cfops-table tbody tr:nth-child(even):hover {
    background-color: #e3f2fd;
}

.cfops-table tbody td {
    padding: 8px 10px;
    border-right: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 12px;
}

.cfops-table tbody td:last-child {
    border-right: none;
}

.cfops-table .cfop-cell {
    font-weight: 600;
    color: #0056b3;
    font-family: 'Courier New', monospace;
}

.cfops-table .descricao-cfop-cell {
    max-width: 250px;
    word-wrap: break-word;
    color: #495057;
}

.cfops-table .valor-cfop-cell {
    text-align: right;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    color: #28a745;
}

/* Radio buttons para classificação de CFOPs */
.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
}

.radio-option input[type="radio"] {
    margin: 0;
    transform: scale(0.9);
}

.radio-label {
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: #495057;
    white-space: nowrap;
}

.radio-label.incentivado {
    color: #28a745;
}

.radio-label.nao-incentivado {
    color: #dc3545;
}

/* Scrollbar personalizada para tabelas CFOP */
.cfops-table-container::-webkit-scrollbar {
    width: 8px;
}

.cfops-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cfops-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #17a2b8, #138496);
    border-radius: 4px;
}

.cfops-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #138496, #117a8b);
}

.codigo-item {
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.codigo-item.multiplo-periodo {
    border-left: 4px solid #007BFF;
}

.codigo-info h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.codigo-info p {
    color: #666;
    font-size: 0.9em;
    margin: 2px 0;
}

.codigo-valor {
    text-align: right;
    font-weight: bold;
    color: #28A745;
}

.codigo-valor.negativo {
    color: #DC3545;
}

.codigo-correcao {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.codigo-correcao label {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.codigo-correcao input {
    padding: 8px 12px;
    border: 1px solid #CED4DA;
    border-radius: 6px;
    font-size: 0.9em;
}

.codigo-correcao input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.periodo-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background-color: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
}

.aplicacao-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aplicacao-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.aplicacao-options input[type="radio"] {
    margin: 0;
}

.periodos-especificos {
    margin-top: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #DEE2E6;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #CED4DA #F1F3F4;
}

/* Estilização da barra de rolagem para navegadores Webkit */
.periodos-especificos::-webkit-scrollbar {
    width: 8px;
}

.periodos-especificos::-webkit-scrollbar-track {
    background: #F1F3F4;
    border-radius: 4px;
}

.periodos-especificos::-webkit-scrollbar-thumb {
    background: #CED4DA;
    border-radius: 4px;
}

.periodos-especificos::-webkit-scrollbar-thumb:hover {
    background: #ADB5BD;
}

.periodos-especificos h5 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 0.9em;
    font-weight: 600;
}

.periodos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.periodo-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background-color: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.periodo-checkbox:hover {
    background-color: #E9ECEF;
    border-color: #DEE2E6;
}

.periodo-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #FF6B35;
}

.periodo-checkbox input[type="checkbox"]:checked {
    background-color: #FF6B35;
}

.periodo-checkbox:has(input:checked) {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: #FF6B35;
}

.periodo-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.periodo-info strong {
    color: #495057;
    font-size: 0.9em;
}

.periodo-info small {
    color: #6C757D;
    font-size: 0.8em;
}

/* CLAUDE-FISCAL: Estilos para interface detalhada de períodos C197/D197 */
.checkbox-periodo-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: #FAFBFC;
    transition: all 0.2s ease;
}

.checkbox-periodo-item:hover {
    background-color: #F1F3F4;
    border-color: #DEE2E6;
}

.checkbox-periodo-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.checkbox-periodo-item .periodo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.checkbox-periodo-item .periodo-nome {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.checkbox-periodo-item .periodo-data {
    color: #6C757D;
    font-size: 0.85em;
}

.checkbox-periodo-item .periodo-valor {
    color: #28A745;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.checkbox-periodo-item:has(input:checked) {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: #28A745;
}

.checkbox-periodo-item:has(input:checked) .periodo-nome {
    color: #28A745;
}

.periodos-checkboxes {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.periodos-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.periodos-checkboxes::-webkit-scrollbar-track {
    background: #F1F3F4;
    border-radius: 3px;
}

.periodos-checkboxes::-webkit-scrollbar-thumb {
    background: #CED4DA;
    border-radius: 3px;
}

.periodos-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #ADB5BD;
}

/* Estilos para nova estrutura de períodos expandidos */
.periodos-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.periodo-item-expandido {
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.periodo-header {
    background: #F8F9FA;
    padding: 12px;
    border-bottom: 1px solid #E9ECEF;
}

.periodo-codigo {
    padding: 15px;
    background: white;
    border-top: 1px solid #E9ECEF;
}

.periodo-codigo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.periodo-codigo input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #CED4DA;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s;
}

.periodo-codigo input[type="text"]:focus {
    outline: none;
    border-color: #80BDFF;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.periodo-codigo .ajuda-codigo {
    display: block;
    margin-top: 5px;
    font-size: 0.8em;
    color: #6C757D;
    font-style: italic;
}

.correcao-global {
    margin-bottom: 15px;
}

.correcao-global label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.correcao-global input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #CED4DA;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s;
}

.correcao-global input[type="text"]:focus {
    outline: none;
    border-color: #80BDFF;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.codigo-actions {
    display: flex;
    gap: 10px;
}

.btn-remover-codigo {
    background: #DC3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-remover-codigo:hover {
    background: #C82333;
}

.correcao-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-aplicar-correcoes {
    background: linear-gradient(135deg, #28A745, #20C997);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-aplicar-correcoes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-pular-correcoes {
    background: linear-gradient(135deg, #6C757D, #495057);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-pular-correcoes:hover {
    background: linear-gradient(135deg, #5A6268, #3D4043);
}

/* Responsividade para códigos */
@media (max-width: 768px) {
    .codigo-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }
    
    .codigo-valor {
        text-align: left;
    }
    
    .correcao-actions {
        flex-direction: column;
    }
}

/* === ESTILOS PARA QUADROS COMPARATIVOS OFICIAIS === */

.comparative-quadro {
    margin: 25px 0;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.comparative-quadro h4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: none;
}

.comparative-quadro .comparative-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9em;
}

.comparative-quadro .comparative-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85em;
}

.comparative-quadro .comparative-table th.item-col {
    width: 60px;
    background: #e9ecef;
}

.comparative-quadro .comparative-table th.description-col {
    width: 300px;
    text-align: left;
    background: #f1f3f4;
}

.comparative-quadro .comparative-table th.value-col {
    min-width: 90px;
    background: #f8f9fa;
}

.comparative-quadro .comparative-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

.comparative-quadro .comparative-table td.item-cell {
    text-align: center;
    font-weight: 600;
    background: #f8f9fa;
    color: #495057;
}

.comparative-quadro .comparative-table td.description-cell {
    text-align: left;
    color: #495057;
    font-weight: 500;
}

.comparative-quadro .comparative-table td.value-cell {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #2c3e50;
    font-weight: 500;
}

.comparative-quadro .comparative-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.comparative-quadro .comparative-table tr:hover {
    background-color: #f1f5f9;
}

/* Tabela Info no topo */
.table-info {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0;
}

.table-info p {
    margin: 5px 0;
    color: #495057;
    font-size: 0.9em;
}

.table-info p strong {
    color: #2c3e50;
}

/* Responsividade para quadros comparativos */
@media (max-width: 1200px) {
    .comparative-quadro .comparative-table {
        font-size: 0.8em;
    }
    
    .comparative-quadro .comparative-table th,
    .comparative-quadro .comparative-table td {
        padding: 8px 6px;
    }
    
    .comparative-quadro .comparative-table th.description-col {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .comparative-quadro .comparative-table {
        font-size: 0.75em;
    }
    
    .comparative-quadro .comparative-table th.description-col {
        width: 200px;
    }
    
    .comparative-quadro .comparative-table th.value-col {
        min-width: 70px;
    }
    
    .comparative-quadro h4 {
        font-size: 1em;
        padding: 12px 15px;
    }
}

/* === ESTILOS PARA RELATÓRIO DE CONFRONTO SPED === */

.validation-section {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.validation-report h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.validation-table,
.multi-validation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
}

.validation-table th,
.validation-table td,
.multi-validation-table th,
.multi-validation-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.validation-table th,
.multi-validation-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-align: center;
}

.validation-table td:nth-child(2),
.validation-table td:nth-child(3),
.validation-table td:nth-child(4) {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
}

.validation-table td:nth-child(5) {
    text-align: center;
}

.sped-details-table,
.e111-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.85em;
}

.sped-details-table td,
.e111-table td,
.e111-table th {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f1f1;
}

.sped-details-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 200px;
}

.sped-details-table td:last-child {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
}

.e111-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.e111-table td:nth-child(2) {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Status indicators */
.status-ok {
    color: #28a745;
    font-weight: 600;
}

.status-divergente {
    color: #dc3545;
    font-weight: 600;
}

.ok {
    background-color: #d4edda !important;
    color: #155724;
}

.divergente {
    background-color: #f8d7da !important;
    color: #721c24;
}

/* Multi-period validation styles */
.multi-validation-report {
    margin: 20px 0;
}

.period-validation-details {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.validation-actions {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.validation-actions .btn-style {
    margin: 0 10px;
}

/* Responsividade para relatórios de confronto */
@media (max-width: 768px) {
    .validation-table,
    .multi-validation-table {
        font-size: 0.75em;
    }
    
    .validation-table th,
    .validation-table td,
    .multi-validation-table th,
    .multi-validation-table td {
        padding: 8px 4px;
    }
    
    .validation-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .validation-actions .btn-style {
        margin: 5px;
        font-size: 0.85em;
    }
}
