/**
 * AraInvoice - Main Styles
 * Complete application styling
 */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* LOGIN STYLES */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px 48px 48px 48px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.logo-large {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
    height: 150px;
    width: 100%;
    overflow: hidden;
}

.logo-large img {
    transition: transform 0.3s ease;
    width: 350px;
    height: auto;
    object-fit: contain;
    object-position: center;
    clip-path: inset(15px 40px 30px 40px);
    transform: scale(1.1);
}

.logo-large img:hover {
    transform: scale(1.15);
    filter: brightness(0) saturate(100%) invert(50%) sepia(90%) saturate(2500%) hue-rotate(210deg) brightness(102%) contrast(95%) drop-shadow(0 12px 40px rgba(103, 126, 234, 0.4));
}

.subtitle {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 32px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

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

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* APP STYLES */
.app-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.sidebar {
    width: 300px;
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.user-info {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu {
    padding: 20px 0;
}

.menu-item {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background: rgba(102, 126, 234, 0.2);
    border-right: 3px solid #667eea;
}

.menu-badge {
    background: #ef4444;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.main-content {
    flex: 1;
    margin-left: 300px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* IMPRESSUM FOOTER - Compact Version */
.impressum-footer {
    background: #1e293b;
    color: #64748b;
    padding: 12px 24px;
    margin-top: auto;
    border-top: 1px solid #334155;
}

.impressum-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
}

.impressum-title {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impressum-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 16px;
    font-size: 10px;
    line-height: 1.4;
}

.impressum-section {
    display: flex;
    align-items: center;
    gap: 4px;
}

.impressum-section strong {
    color: #94a3b8;
    font-weight: 600;
}

.impressum-section span {
    color: #64748b;
}

.impressum-divider {
    display: none;
}

.impressum-copyright {
    font-size: 10px;
    color: #475569;
}

.impressum-separator {
    color: #475569;
    font-size: 10px;
}

/* Login Impressum Footer - Compact */
.login-impressum-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-impressum-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.login-impressum-title {
    display: none;
}

.login-impressum-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    font-size: 9px;
    line-height: 1.3;
}

.login-impressum-item {
    color: rgba(255, 255, 255, 0.5);
}

.login-impressum-item strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.login-impressum-separator {
    color: rgba(255, 255, 255, 0.2);
}

.top-bar {
    background: white;
    padding: 20px 32px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.content-area {
    padding: 32px;
}

/* ADVANCED DASHBOARD STYLES */
.dashboard-container {
    padding: 24px;
    background: #f8fafc;
    min-height: calc(100vh - 120px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.dashboard-subtitle {
    color: #64748b;
    margin-top: 4px;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

/* Botões de ação do Dashboard - Padronizados */
.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

/* Todos os botões mantêm a mesma cor e tamanho */
.excel-btn,
.pdf-btn,
.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 120px;
    height: 80px;
}

.excel-btn:hover,
.pdf-btn:hover,
.refresh-btn:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
}

.btn-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.btn-text {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 1px;
    white-space: nowrap;
}

.btn-subtitle {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 400;
}

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

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

.dashboard-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    min-width: 140px;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.apply-filters-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    margin-top: 20px;
    min-width: 140px;
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

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

.apply-filters-btn .material-icons {
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.revenue { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.invoices { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.pending { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.clients { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: #059669;
    background: #d1fae5;
}

.stat-change.negative {
    color: #dc2626;
    background: #fee2e2;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.pdf-chart-card {
    grid-column: span 1;
}

.pdf-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.pdf-total-badge .material-icons {
    font-size: 16px;
}

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.chart-title-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.toggle-switch-container {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn .material-icons {
    font-size: 16px;
}

.toggle-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #475569;
}

.chart-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chart-type-selector {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.chart-type-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-type-btn.active {
    background: #667eea;
    color: white;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.chart-container.pie {
    height: 350px;
}

.data-table {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

/* Botão de exportação para tabelas (diferente dos botões do dashboard) */
.table-export-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-export-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.data-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 24px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    color: #4b5563;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8fafc;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pdf-chart-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .pdf-chart-card {
        grid-column: span 1;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toggle-switch-container {
        flex-wrap: wrap;
    }
}

/* PDF GENERATION STYLES */
.pdf-generator-container {
    padding: 24px;
    background: #f8fafc;
    min-height: calc(100vh - 120px);
}

.pdf-generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 160px);
}

.pdf-form-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-preview-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.section-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: between;
    align-items: center;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.form-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.form-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.form-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.items-section {
    margin-top: 24px;
}

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

.items-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.add-item-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.add-item-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 80px 100px 80px 100px 40px;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.item-row input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.remove-item-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #dc2626;
}

.totals-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.totals-row:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 2px solid #d1d5db;
    font-weight: 700;
    font-size: 16px;
}

.totals-label {
    color: #4b5563;
    font-weight: 500;
}

.totals-value {
    color: #1e293b;
    font-weight: 600;
}

.pdf-preview-container {
    flex: 1;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.pdf-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #64748b;
}

.preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #9ca3af;
}

.generate-actions {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.generate-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.generate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.preview-btn {
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .pdf-generator-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pdf-preview-section {
        height: 400px;
    }

    .item-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

.api-status {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.api-status.connecting {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.api-status.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.card-content {
    padding: 32px;
}

.upload-zone {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.upload-zone:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.02);
}

.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
}

.progress-modern {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.review-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 24px;
    min-height: 600px;
}

.pdf-panel, .data-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.pdf-panel {
    position: relative;
}

.edit-field {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.edit-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-field:disabled {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.field-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.field-group {
    margin-bottom: 16px;
}

.edit-mode .data-panel {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.save-cancel-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.btn-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.tabs-container {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 12px 16px;
    background: #f8fafc;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab:first-child {
    border-top-left-radius: 8px;
}

.tab:last-child {
    border-top-right-radius: 8px;
}

.tab.active {
    background: white;
    color: #1e293b;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab:hover:not(.active) {
    background: #f1f5f9;
    color: #475569;
}

.tab-content {
    min-height: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .main-content {
        margin-left: 0;
    }

    .review-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
