/* Tax Filing Styles */
:root {
    --font-primary: 'Sora', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --frute-blue: #2D7FF9;
    --frute-blue-glow: rgba(45, 127, 249, 0.1);
    
    --accent-purple: #6366f1;
    --accent-purple-rgb: 99, 102, 241;
    
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.1);
    
    --border-light: #e2e8f0;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--frute-blue);
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo span {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--frute-blue-glow);
    color: var(--frute-blue);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
}

.section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.section-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
}

.tax-year-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tax-year-selector label {
    font-weight: 500;
    color: var(--text-secondary);
}

.tax-year-selector select {
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Document Categories */
.document-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    border-color: var(--frute-blue);
    box-shadow: var(--shadow-md);
}

.category-card.active {
    border-color: var(--frute-blue);
    background: var(--frute-blue-glow);
}

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--frute-blue-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    color: var(--frute-blue);
}

.category-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.category-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-count {
    margin-left: auto;
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Upload Zone */
.upload-zone {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-light);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 32px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--frute-blue);
    background: var(--frute-blue-glow);
}

.upload-icon {
    width: 64px;
    height: 64px;
    background: var(--frute-blue-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    color: var(--frute-blue);
}

.upload-zone h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--text-muted);
}

.upload-hint {
    font-size: 0.85rem;
    margin-top: 12px;
}

/* Uploaded Files */
.uploaded-files-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.uploaded-files-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    width: 20px;
    height: 20px;
    color: var(--frute-blue);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.file-category {
    padding: 4px 10px;
    background: var(--frute-blue-glow);
    color: var(--frute-blue);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Category Dropdown Selector */
.file-category-select {
    min-width: 160px;
}

.category-dropdown {
    width: 100%;
    padding: 6px 12px;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-dropdown:hover {
    border-color: var(--frute-blue);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--frute-blue);
    box-shadow: 0 0 0 3px var(--frute-blue-glow);
}

/* Highlight dropdowns that need category selection */
.category-dropdown.needs-category {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
    animation: pulse-attention 2s ease-in-out infinite;
}

.category-dropdown.needs-category:hover {
    border-color: #d97706;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
}

@keyframes pulse-attention {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    }
}

/* AI Auto-Detect Badge */
.auto-detect-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.auto-detect-badge.high {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.auto-detect-badge.medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.auto-detect-badge svg {
    width: 12px;
    height: 12px;
}

.file-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.file-status.pending {
    background: var(--warning-glow);
    color: var(--warning);
}

.file-status.processed {
    background: var(--success-glow);
    color: var(--success);
}

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

.file-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.file-action-btn:hover {
    background: var(--bg-secondary);
    color: var(--error);
}

.file-action-btn svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state.small {
    padding: 20px;
}

.empty-state.small svg {
    width: 32px;
    height: 32px;
}

/* Section Actions */
.section-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--frute-blue);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1a6fe8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Summary Section */
.summary-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.summary-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.summary-stat.highlight {
    background: linear-gradient(135deg, var(--frute-blue), #1a5fd4);
    color: white;
    border: none;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.summary-stat.highlight .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
}

.summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.summary-card h3 svg {
    width: 24px;
    height: 24px;
    color: var(--frute-blue);
}

.summary-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.summary-row .source {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.summary-row .amount {
    font-weight: 600;
}

.summary-row.total {
    background: var(--frute-blue-glow);
    font-weight: 600;
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border-left: 4px solid var(--frute-blue);
}

.recommendation-item.warning {
    border-left-color: var(--warning);
}

.recommendation-item.success {
    border-left-color: var(--success);
}

.recommendation-icon {
    width: 36px;
    height: 36px;
    background: var(--frute-blue-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recommendation-icon svg {
    width: 18px;
    height: 18px;
    color: var(--frute-blue);
}

.recommendation-content h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.recommendation-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 1040 Form Container */
.form-1040-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
}

.form-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--frute-blue);
    box-shadow: 0 0 0 3px var(--frute-blue-glow);
}

/* Line Items */
.line-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.line-item.total {
    background: var(--frute-blue-glow);
    font-weight: 500;
}

.line-item.highlight {
    background: linear-gradient(135deg, var(--frute-blue), #1a5fd4);
    color: white;
}

.line-num {
    width: 32px;
    font-weight: 600;
    color: var(--text-muted);
}

.line-item.highlight .line-num {
    color: rgba(255, 255, 255, 0.7);
}

.line-desc {
    flex: 1;
    font-size: 0.95rem;
}

.line-value {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-align: right;
    font-weight: 500;
    background: var(--bg-secondary);
}

.line-value.calculated {
    border: none;
    background: transparent;
    font-family: var(--font-display);
}

.line-item.highlight .line-value.calculated {
    color: white;
}

/* Deduction Choice */
.deduction-choice {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: var(--frute-blue);
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--frute-blue);
}

.radio-option input:checked + .radio-label {
    color: var(--frute-blue);
    font-weight: 600;
}

.radio-label {
    flex: 1;
}

.radio-value {
    font-weight: 600;
}

/* Result Section */
.result-section {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.result-box {
    text-align: center;
    padding: 32px 48px;
    border-radius: 16px;
}

.result-box.refund {
    background: var(--success-glow);
    border: 2px solid var(--success);
}

.result-box.owed {
    background: var(--error-glow);
    border: 2px solid var(--error);
}

.result-box h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.result-box.refund h3 {
    color: var(--success);
}

.result-box.owed h3 {
    color: var(--error);
}

.result-amount {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
}

.result-box.refund .result-amount {
    color: var(--success);
}

.result-box.owed .result-amount {
    color: var(--error);
}

/* Filing Summary */
.filing-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.summary-header {
    background: linear-gradient(135deg, var(--frute-blue), #1a5fd4);
    padding: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-logo svg {
    width: 40px;
    height: 40px;
}

.summary-logo span {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}

.summary-title {
    text-align: right;
}

.summary-title h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.summary-title p {
    opacity: 0.8;
}

.summary-body {
    padding: 32px;
}

.summary-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-section h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

.info-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-item .value {
    font-weight: 500;
}

.summary-table-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-table-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-weight: 600;
    margin-top: 12px;
}

.documents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.summary-result {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.result-row:last-child {
    border-bottom: none;
}

.result-row.final {
    padding-top: 16px;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-row.final .refund {
    color: var(--success);
}

.result-row.final .owed {
    color: var(--error);
}

.summary-footer {
    padding: 16px 32px;
    background: var(--bg-tertiary);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* E-File Consent */
.efile-consent {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.efile-consent h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.consent-checkbox input {
    display: none;
}

.consent-checkbox .checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.consent-checkbox input:checked + .checkmark {
    background: var(--frute-blue);
    border-color: var(--frute-blue);
}

.consent-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

.consent-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Bank Info */
.bank-info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.bank-info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.bank-info-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.bank-info-card .form-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.success-modal .success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-modal .success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.success-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-modal > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.confirmation-details {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.detail-row:first-child {
    border-bottom: 1px solid var(--border-light);
}

.detail-row span:first-child {
    color: var(--text-muted);
}

.detail-row span:last-child {
    font-weight: 600;
}

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

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

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

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

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

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

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.info .toast-icon {
    color: var(--frute-blue);
}

.toast-content h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .summary-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bank-info-card .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .summary-overview {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .deduction-choice {
        flex-direction: column;
    }
    
    .result-section {
        flex-direction: column;
    }
    
    .section-actions {
        flex-direction: column;
    }
    
    .section-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .bank-info-card .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Review Tax Filing Documentation Styles
   ============================================ */

.review-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* Document Viewer Panel */
.document-viewer-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.viewer-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.viewer-controls {
    display: flex;
    gap: 8px;
}

.viewer-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.viewer-btn:hover {
    background: var(--frute-blue);
    color: white;
    border-color: var(--frute-blue);
}

/* Document List */
.document-list {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.document-item:hover {
    background: var(--bg-tertiary);
}

.document-item.active {
    background: var(--frute-blue-glow);
    border-color: var(--frute-blue);
}

.document-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.document-item.active svg {
    color: var(--frute-blue);
}

.document-item span {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 500;
    flex-shrink: 0;
}

.doc-status.ready {
    background: var(--success-glow);
    color: var(--success);
}

.doc-status.pending {
    background: var(--warning-glow);
    color: var(--warning);
}

/* Document Preview */
.document-preview {
    flex: 1;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    padding: 40px;
}

.preview-placeholder svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.preview-placeholder h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.preview-placeholder p {
    font-size: 13px;
    color: var(--text-muted);
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
}

/* Chat Panel */
.chat-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.chat-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-glow);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-message.system {
    align-items: center;
    text-align: center;
}

.chat-message.system .message-content {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    max-width: 90%;
}

.chat-message.cpa {
    align-items: flex-start;
}

.chat-message.cpa .message-content {
    background: var(--frute-blue-glow);
    border: 1px solid rgba(45, 127, 249, 0.2);
    padding: 12px 16px;
    border-radius: 12px 12px 12px 4px;
    max-width: 85%;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.user .message-content {
    background: var(--frute-blue);
    color: white;
    padding: 12px 16px;
    border-radius: 12px 12px 4px 12px;
    max-width: 85%;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--frute-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--frute-blue);
    display: block;
    margin-bottom: 4px;
}

.message-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Chat Input */
.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 8px 12px;
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    outline: none;
    color: var(--text-primary);
}

.chat-input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.chat-input-actions {
    display: flex;
    gap: 4px;
}

.attach-btn,
.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.attach-btn {
    background: transparent;
    color: var(--text-muted);
}

.attach-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.send-btn {
    background: var(--frute-blue);
    color: white;
}

.send-btn:hover {
    background: #1a6ae0;
}

/* Responsive for Review Layout */
@media (max-width: 1024px) {
    .review-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .document-viewer-panel {
        min-height: 400px;
    }
    
    .chat-panel {
        min-height: 400px;
    }
}


/* ============================================
   TAX FILING AGREEMENT & AUTHORIZATION STYLES
   Premium, Professional, Elegant Design
   ============================================ */

/* Page Header Enhancement */
.agreement-section-wrapper .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.agreement-page-header .header-left {
    flex: 1;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.page-badge svg {
    opacity: 0.8;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    padding: 16px 28px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-step .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.progress-step.completed .step-circle,
.progress-step.active .step-circle {
    background: var(--frute-blue);
    border-color: var(--frute-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(45, 127, 249, 0.3);
}

.progress-step span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.progress-step.completed span,
.progress-step.active span {
    color: var(--text-primary);
}

.progress-line {
    width: 60px;
    height: 3px;
    background: #e2e8f0;
    margin: 0 16px;
    margin-bottom: 28px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--frute-blue);
    transition: width 0.5s ease;
}

.progress-indicator.step-2 .progress-line::after {
    width: 100%;
}

/* Main Layout */
.agreement-auth-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 48px;
    min-height: calc(100vh - 280px);
    align-items: start;
}

.agreement-auth-content {
    flex: 1;
}

/* Section Tabs - Premium Pill Design */
.section-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.section-tab {
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-radius: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-tab .tab-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(100, 116, 139, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.section-tab .tab-icon-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.section-tab .tab-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.section-tab .tab-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.section-tab .tab-title {
    font-size: 0.95rem;
}

.section-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
}

.section-tab.active {
    color: var(--frute-blue);
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.section-tab.active .tab-icon-wrap {
    background: var(--frute-blue-glow);
}

.section-tab.active .tab-icon-wrap svg {
    color: var(--frute-blue);
}

/* Tab Content Transitions */
.tab-content {
    display: none;
    animation: slideUp 0.5s ease-out;
}

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

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

/* Tab Actions */
.tab-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

.btn-next {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px !important;
    font-size: 1rem !important;
}

.btn-next svg {
    transition: transform 0.3s ease;
}

.btn-next:hover svg {
    transform: translateX(4px);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px !important;
    font-size: 1.05rem !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3) !important;
}

.btn-submit:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
}

/* Card Styling - Premium Document Look */
.agreement-card, .authorization-card {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.agreement-header, .authorization-header {
    padding: 28px 36px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--frute-blue-glow) 0%, rgba(45, 127, 249, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon-badge svg {
    width: 24px;
    height: 24px;
    color: var(--frute-blue);
}

.header-icon-badge.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
}

.header-icon-badge.success svg {
    color: #10b981;
}

.header-text h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.agreement-content, .authorization-content {
    padding: 36px;
}

/* Document Meta */
.document-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px dashed #e2e8f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meta-item svg {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Agreement Sections with Numbers */
.agreement-scroll {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 24px;
}

.agreement-section {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
}

.agreement-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-number {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.section-content {
    flex: 1;
}

.section-content h5 {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-content p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* Agreement Accept Section */
.agreement-accept {
    padding: 28px 36px;
    background: linear-gradient(135deg, #f8fafc 0%, #fafbfc 100%);
    border-top: 1px solid var(--border-light);
}

/* Enhanced Checkbox */
.consent-checkbox.enhanced {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    padding: 20px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: white;
    transition: all 0.3s ease;
}

.consent-checkbox.enhanced:hover {
    border-color: var(--frute-blue-glow);
}

.consent-checkbox.enhanced input {
    display: none;
}

.checkmark-enhanced {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: white;
}

.checkmark-enhanced svg {
    width: 16px;
    height: 16px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.consent-checkbox.enhanced input:checked + .checkmark-enhanced {
    background: var(--frute-blue);
    border-color: var(--frute-blue);
    box-shadow: 0 4px 12px rgba(45, 127, 249, 0.3);
}

.consent-checkbox.enhanced input:checked + .checkmark-enhanced svg {
    opacity: 1;
    transform: scale(1);
}

.consent-checkbox.enhanced.final input:checked + .checkmark-enhanced {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.consent-checkbox.enhanced .consent-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Authorization Specifics */
.authorization-intro {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, var(--frute-blue-glow) 0%, rgba(45, 127, 249, 0.05) 100%);
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid var(--frute-blue);
    margin-bottom: 32px;
}

.intro-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.intro-icon svg {
    width: 20px;
    height: 20px;
    color: var(--frute-blue);
}

.authorization-intro p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.statements-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 700;
}

.auth-statement {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.auth-statement:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.02);
    transform: translateX(4px);
}

.auth-statement::before {
    display: none;
}

.statement-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.statement-check svg {
    width: 12px;
    height: 12px;
    color: white;
}

.auth-statement p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Signature Section */
.signature-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px dashed #e2e8f0;
}

.signature-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 700;
}

.signature-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
    margin-bottom: 28px;
}

.signature-group {
    position: relative;
}

.signature-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.signature-group label .optional {
    text-transform: none;
    font-weight: 400;
    opacity: 0.7;
}

.signature-group input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 0;
    padding: 14px 0;
    font-size: 1.15rem;
    font-family: 'Georgia', serif;
    font-style: italic;
    background: transparent;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.signature-group input:focus {
    border-bottom-color: var(--frute-blue);
    outline: none;
}

.signature-group input::placeholder {
    color: #cbd5e1;
    font-style: italic;
    font-family: var(--font-primary);
    font-size: 0.95rem;
}

.signature-group.date-group input {
    font-family: var(--font-primary);
    font-style: normal;
    font-size: 1rem;
}

/* Final Authorization */
.final-authorization {
    margin-top: 36px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 18px;
}

/* Chat Panel - Concierge Premium Style */
.agreement-chat-panel {
    position: relative;
    height: 100%;
}

.chat-panel-inner {
    position: sticky;
    top: 24px;
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    height: 680px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.agreement-chat-panel .chat-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agreement-chat-panel .chat-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.concierge-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.concierge-avatar svg {
    color: white;
}

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

.concierge-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.concierge-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.concierge-status .status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.chat-security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agreement-chat-panel .chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-date-divider {
    text-align: center;
    margin: 8px 0;
}

.chat-date-divider span {
    background: #e2e8f0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 10px;
}

.agreement-chat-panel .chat-message {
    max-width: 88%;
}

.agreement-chat-panel .chat-message.ai {
    align-self: flex-start;
}

.agreement-chat-panel .chat-message.user {
    align-self: flex-end;
}

.agreement-chat-panel .message-content {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.65;
}

.agreement-chat-panel .ai .message-content {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.agreement-chat-panel .user .message-content {
    background: linear-gradient(135deg, var(--frute-blue) 0%, #1a6ae0 100%);
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(45, 127, 249, 0.25);
}

/* Quick Questions */
.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    align-items: center;
}

.quick-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    width: 100%;
    margin-bottom: 4px;
}

.quick-btn {
    background: white;
    border: 1px solid var(--border-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    border-color: var(--frute-blue);
    color: var(--frute-blue);
    background: var(--frute-blue-glow);
}

/* Chat Input */
.agreement-chat-panel .chat-input-container {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: white;
}

.agreement-chat-panel .chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: #f8fafc;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 10px 10px 10px 18px;
    transition: all 0.3s ease;
}

.agreement-chat-panel .chat-input-wrapper:focus-within {
    border-color: var(--frute-blue);
    background: white;
    box-shadow: 0 0 0 4px var(--frute-blue-glow);
}

.agreement-chat-panel textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    resize: none;
    font-size: 0.9rem;
    min-height: 24px;
    max-height: 120px;
    color: var(--text-primary);
}

.agreement-chat-panel textarea:focus {
    outline: none;
}

.agreement-chat-panel .send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--frute-blue) 0%, #1a6ae0 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.agreement-chat-panel .send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 127, 249, 0.35);
}

/* Responsive */
@media (max-width: 1350px) {
    .agreement-auth-layout {
        grid-template-columns: 1fr 360px;
        gap: 36px;
    }
    
    .progress-indicator {
        display: none;
    }
}

@media (max-width: 1100px) {
    .agreement-auth-layout {
        grid-template-columns: 1fr;
    }
    
    .agreement-chat-panel {
        order: -1;
        margin-bottom: 32px;
    }
    
    .chat-panel-inner {
        position: relative;
        height: 400px;
        top: 0;
    }
    
    .section-tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .section-tab {
        width: 100%;
    }
}

/* Selector Card */
.compliance-selector-card {
    background: linear-gradient(135deg, var(--card-bg), rgba(var(--accent-purple-rgb), 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.selector-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.selector-group label svg {
    color: var(--accent-purple);
}

.selector-group select {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.selector-group select:hover {
    border-color: var(--accent-purple);
}

.selector-group select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.compliance-selector-card .btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    justify-content: center;
}

.compliance-selector-card .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compliance Results */
.compliance-results {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: slideInUp 0.4s ease;
}

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

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h3 svg {
    color: var(--accent-purple);
    width: 24px;
    height: 24px;
}

.results-header h3 span {
    color: var(--accent-purple);
    font-weight: 700;
}

/* Compliance List */
.compliance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.requirement-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-primary), rgba(var(--accent-purple-rgb), 0.03));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.requirement-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.requirement-card.federal {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.3);
}

.requirement-card.federal:hover {
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

.requirement-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.requirement-icon svg {
    width: 24px;
    height: 24px;
}

.requirement-icon.boi {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.requirement-icon.franchise {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.requirement-icon.annual-report {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.requirement-icon.state-tax {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.requirement-icon.sales-tax {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.requirement-icon.payroll {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.requirement-icon.registration {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.requirement-info {
    flex: 1;
    min-width: 0;
}

.requirement-info h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.requirement-agency {
    font-size: 0.85rem;
    color: var(--accent-purple);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.requirement-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.requirement-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.detail-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(var(--accent-purple-rgb), 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.detail-item strong {
    color: var(--text-primary);
}

.requirement-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.required {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.recommended {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge.optional {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.varies {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-purple);
}

/* Compliance Note */
.compliance-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    margin-top: 1.5rem;
}

.compliance-note svg {
    width: 20px;
    height: 20px;
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.compliance-note p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Federal Requirements Section */
.federal-requirements {
    margin-top: 2rem;
}

.federal-requirements > h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.federal-requirements > h3 svg {
    width: 22px;
    height: 22px;
    color: #ef4444;
}

/* No Results State */
.no-compliance-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-compliance-results svg {
    width: 64px;
    height: 64px;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.no-compliance-results h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .requirement-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .requirement-icon {
        width: 40px;
        height: 40px;
    }
    
    .requirement-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .requirement-status {
        margin-top: 1rem;
        text-align: center;
    }
    
    .requirement-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Requirement Actions and Links */
.requirement-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.requirement-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--accent-purple), #8b5cf6);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.requirement-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #8b5cf6, var(--accent-purple));
}

.requirement-link svg {
    width: 16px;
    height: 16px;
}

/* Federal requirements file link */
.federal .requirement-link {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.federal .requirement-link:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* Responsive adjustments for requirement actions */
@media (max-width: 768px) {
    .requirement-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .requirement-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   OCR EXTRACTION STYLES
   ============================================ */

/* OCR Status Badge */
.ocr-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 500;
}

.ocr-status svg {
    width: 16px;
    height: 16px;
}

.ocr-status.processing {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.ocr-status.processing svg {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* OCR Extraction Panel */
.ocr-extraction-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: slideDown 0.4s ease;
}

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

.ocr-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.ocr-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    color: white;
}

.ocr-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.ocr-title p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* OCR Documents List */
.ocr-documents {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ocr-doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.ocr-doc-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.ocr-doc-icon.w2 { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.ocr-doc-icon.form-1099 { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.ocr-doc-icon.form-1098 { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.ocr-doc-icon.receipt { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.ocr-doc-icon.default { background: linear-gradient(135deg, #64748b, #475569); color: white; }

.ocr-doc-icon svg {
    width: 20px;
    height: 20px;
}

.ocr-doc-info {
    flex: 1;
    min-width: 0;
}

.ocr-doc-info h5 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.ocr-doc-info p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ocr-doc-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ocr-progress {
    width: 100px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.ocr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ocr-confidence {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.ocr-confidence.high {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.ocr-confidence.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.ocr-confidence.low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Extraction Badge */
.extraction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #10b981;
    margin-top: 0.5rem;
}

/* OCR Tag */
.ocr-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 4px;
    margin-left: auto;
}

/* Extracted Documents Card */
.summary-card.extracted-docs {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(99, 102, 241, 0.02));
}

.summary-card h3 .doc-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: auto;
}

.extracted-docs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.extracted-doc {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.extracted-doc:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.extracted-doc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.extracted-doc-header .doc-type-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.extracted-doc-header .doc-type-icon.w2 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.extracted-doc-header .doc-type-icon.f1099 { background: linear-gradient(135deg, #10b981, #059669); }
.extracted-doc-header .doc-type-icon.f1098 { background: linear-gradient(135deg, #f59e0b, #d97706); }

.extracted-doc-header h5 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.extracted-doc-header p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.extracted-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.extracted-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.extracted-field .field-label {
    color: var(--text-secondary);
}

.extracted-field .field-value {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.extracted-field .field-value .confidence-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.extracted-field .field-value .confidence-dot.high { background: #10b981; }
.extracted-field .field-value .confidence-dot.medium { background: #f59e0b; }
.extracted-field .field-value .confidence-dot.low { background: #ef4444; }

/* Income Summary Row Enhancement */
.summary-row .ocr-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.summary-row .ocr-source .source-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 4px;
}

.summary-row .ocr-source .confidence-indicator {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.summary-row .ocr-source .confidence-indicator.high { color: #10b981; }
.summary-row .ocr-source .confidence-indicator.medium { color: #f59e0b; }

/* Responsive */
@media (max-width: 768px) {
    .ocr-extraction-panel {
        padding: 1rem;
    }
    
    .extracted-docs-list {
        grid-template-columns: 1fr;
    }
    
    .ocr-doc-item {
        flex-wrap: wrap;
    }
    
    .ocr-doc-status {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .ocr-progress {
        flex: 1;
    }
}

/* ============================================
   TAX FORMS LIBRARY STYLES
   ============================================ */

.forms-library-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.library-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.library-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--frute-blue), #5a9bfa);
    border-radius: 12px;
    color: white;
}

.library-icon svg {
    width: 24px;
    height: 24px;
}

.library-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.library-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Forms Grid */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* Form Card */
.form-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-card:hover {
    border-color: var(--frute-blue);
    box-shadow: 0 8px 25px rgba(45, 127, 249, 0.12);
    transform: translateY(-3px);
}

.form-card.featured {
    border-color: var(--frute-blue);
    background: linear-gradient(135deg, rgba(45, 127, 249, 0.03), rgba(45, 127, 249, 0.08));
}

.form-card.featured::before {
    content: '★ Most Used';
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--frute-blue);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 2rem;
    transform: rotate(45deg);
}

/* Form Badge */
.form-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.form-badge.foreign {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.form-badge.corp {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.form-badge.scorp {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.form-badge.info {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.form-badge.individual {
    background: rgba(45, 127, 249, 0.1);
    color: var(--frute-blue);
}

.form-badge.schedule {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.form-badge.partnership {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* Form Number */
.form-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

/* Form Title */
.form-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Form Description */
.form-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
}

.form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.form-btn svg {
    width: 14px;
    height: 14px;
}

.form-btn.download {
    background: var(--frute-blue);
    color: white;
}

.form-btn.download:hover {
    background: #1a5fc7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 127, 249, 0.3);
}

.form-btn.instructions {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.form-btn.instructions:hover {
    background: white;
    border-color: var(--frute-blue);
    color: var(--frute-blue);
}

/* Library Footer */
.library-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.view-all-forms {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--frute-blue), #5a9bfa);
    color: white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-forms:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 127, 249, 0.3);
}

.view-all-forms svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .forms-library-section {
        padding: 1.5rem;
    }
    
    .forms-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-btn {
        justify-content: center;
    }
}

/* ============================================
   FILING AUTHORIZATION SECTION
   ============================================ */

.filing-authorization-section {
    background: linear-gradient(135deg, rgba(45, 127, 249, 0.03), rgba(16, 185, 129, 0.03));
    border: 2px solid var(--frute-blue);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-header svg {
    width: 32px;
    height: 32px;
    color: var(--frute-blue);
}

.auth-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0;
}

/* ============================================
   RESEARCH & RESOURCES SECTION STYLES
   ============================================ */

/* Resources Cards */
.resources-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.resources-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.resources-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--frute-blue), #5a9bfa);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.resources-icon.news {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.resources-icon svg {
    width: 24px;
    height: 24px;
}

.resources-card-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.resources-card-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* IRC Search Box */
.irc-search-box {
    margin-bottom: 2rem;
}

.irc-search-box .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: all 0.3s ease;
}

.irc-search-box .search-input-wrapper:focus-within {
    border-color: var(--frute-blue);
    box-shadow: 0 0 0 4px rgba(45, 127, 249, 0.1);
}

.irc-search-box .search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.irc-search-box input {
    flex: 1;
    border: none;
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
    background: transparent;
}

.irc-search-box .btn {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
}

.search-hints {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hint-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hint-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hint-tag:hover {
    background: var(--frute-blue);
    border-color: var(--frute-blue);
    color: white;
}

/* IRC Titles Grid */
.irc-titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.irc-title-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.irc-title-card:hover {
    border-color: var(--frute-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 127, 249, 0.12);
}

.title-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--frute-blue), #5a9bfa);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.title-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.title-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
}

/* Popular Sections Grid */
.popular-sections h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.section-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.section-card:hover {
    border-color: var(--frute-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 127, 249, 0.12);
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--frute-blue);
    margin-bottom: 0.35rem;
}

.section-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* News Tabs */
.news-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.news-tab {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.news-tab.active {
    background: var(--frute-blue);
    color: white;
}

/* News Content */
.news-content {
    display: none;
}

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

/* News Sources Grid */
.news-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.news-source-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.news-source-card .source-logo {
    display: inline-block;
    background: #004B87;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.news-source-card .source-logo.treasury {
    background: #1a365d;
}

.news-source-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.news-source-card .source-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.news-source-card .source-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-source-card .source-links a:hover {
    background: var(--frute-blue);
    color: white;
}

/* Experts Grid */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.expert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.expert-card:hover {
    border-color: var(--frute-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 127, 249, 0.12);
}

.expert-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.expert-avatar.kpmg { background: linear-gradient(135deg, #00338d, #005eb8); }
.expert-avatar.deloitte { background: linear-gradient(135deg, #86bc25, #4aa564); }
.expert-avatar.ey { background: linear-gradient(135deg, #ffe600, #ffd700); color: #333; }
.expert-avatar.pwc { background: linear-gradient(135deg, #d04a02, #e85d04); }
.expert-avatar.taxnotes { background: linear-gradient(135deg, #1e3a5f, #2d5a87); }
.expert-avatar.journalacct { background: linear-gradient(135deg, #002855, #00509e); }
.expert-avatar.taxprof { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }

.expert-info h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.expert-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Publications Grid */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.publication-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.publication-card:hover {
    border-color: var(--frute-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 127, 249, 0.12);
}

.pub-number {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    flex-shrink: 0;
    text-align: center;
    min-width: 55px;
}

.pub-info h4 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.pub-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Quick Reference Grid */
.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.quick-ref-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.qr-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--frute-blue), #5a9bfa);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.qr-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.quick-ref-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.deadline-list,
.amount-list,
.bracket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.deadline-list li,
.amount-list li,
.bracket-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px dashed var(--border-color);
}

.deadline-list li:last-child,
.amount-list li:last-child,
.bracket-list li:last-child {
    border-bottom: none;
}

.deadline-list .date,
.bracket-list .rate {
    font-weight: 600;
    color: var(--frute-blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.amount-list .label {
    color: var(--text-secondary);
}

.amount-list .amount {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .resources-card {
        padding: 1.25rem;
    }
    
    .irc-search-box .search-input-wrapper {
        flex-direction: column;
        padding: 0.75rem;
    }
    
    .irc-search-box .btn {
        width: 100%;
    }
    
    .irc-titles-grid,
    .sections-grid,
    .news-sources-grid,
    .experts-grid,
    .publications-grid,
    .quick-ref-grid {
        grid-template-columns: 1fr;
    }
    
    .news-tabs {
        flex-wrap: wrap;
    }
}
