/* ============================================
   TAXMATAX - COMPLETE CSS FOR PRODUCTION
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #eee;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f5f7fa;
    color: #1e3c72;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Personas */
.for-who {
    padding: 4rem 0;
    text-align: center;
}

.for-who h2 {
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 3rem;
}

.personas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.persona {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.persona i {
    font-size: 3rem;
    color: #2a5298;
    margin-bottom: 1rem;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
}

.auth-footer a {
    color: #2a5298;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== DASHBOARD STYLES ===== */

/* Dashboard Header */
.dashboard-header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Financial Overview Cards */
.financial-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.overview-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.total-income .card-icon { background: linear-gradient(135deg, #4CAF50, #8BC34A); }
.total-expenses .card-icon { background: linear-gradient(135deg, #F44336, #FF9800); }
.net-profit .card-icon { background: linear-gradient(135deg, #2196F3, #03A9F4); }
.receipts .card-icon { background: linear-gradient(135deg, #9C27B0, #E91E63); }

.card-content h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.card-content .amount {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 5px 0;
}

.card-content .subtext {
    font-size: 14px;
    color: #888;
}

/* Dashboard Tabs */
.dashboard-tabs {
    margin-top: 2rem;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.tab-btn.active {
    background: #1e3c72;
    color: white;
}

.tab-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    min-height: 500px;
}

/* Overview Tab */
.overview-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.chart-card h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-activity {
    margin-top: 2rem;
}

.activity-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.activity-card h3 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #1e3c72;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.activity-icon.red { background: #F44336; }
.activity-icon.green { background: #4CAF50; }
.activity-icon.blue { background: #2196F3; }

.activity-details {
    flex: 1;
}

.activity-details h4 {
    color: #333;
    margin-bottom: 0.25rem;
}

.activity-details p {
    color: #666;
    font-size: 0.9rem;
}

.activity-amount {
    font-weight: bold;
    color: #1e3c72;
}

/* Expenses Tab */
.expenses-tab {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.section-header h2 {
    color: #1e3c72;
    font-size: 1.8rem;
}

.filters-section {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #555;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.summary-card h4 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.summary-card p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1e3c72;
}

.data-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #666;
}

.loading-spinner i {
    font-size: 2rem;
    color: #1e3c72;
}

/* Invoices Tab */
.invoice-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    font-weight: 500;
    flex: 1;
    min-width: 150px;
}

.stat-badge i {
    font-size: 18px;
}

.stat-badge.draft { border-left: 4px solid #FF9800; color: #FF9800; }
.stat-badge.pending { border-left: 4px solid #2196F3; color: #2196F3; }
.stat-badge.paid { border-left: 4px solid #4CAF50; color: #4CAF50; }
.stat-badge.overdue { border-left: 4px solid #F44336; color: #F44336; }

.stat-badge span {
    font-size: 20px;
    font-weight: bold;
}

/* Receipts Tab */
.receipts-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.summary-item i {
    font-size: 24px;
}

.summary-item span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Training Tab */
.training-tab {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.training-header h2 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.training-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

.language-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.lang-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.lang-btn.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.training-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.module-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 24px;
}

.module-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.module-card p {
    color: #666;
    margin-bottom: 20px;
}

.module-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
}

.training-content {
    min-height: 300px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

/* Reports Tab */
.reports-tab {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.report-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.report-card.wide {
    grid-column: 1 / -1;
}

.summary-table {
    display: grid;
    gap: 0.5rem;
}

/* Enhanced Data Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.data-table th {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: #f9f9ff;
}

.amount-cell {
    font-weight: bold;
    color: #1e3c72;
}

.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 14px;
}

.btn-action.view { background: #2196F3; }
.btn-action.edit { background: #FF9800; }
.btn-action.delete { background: #F44336; }
.btn-action.download { background: #4CAF50; }
.btn-action.process { background: #9C27B0; }

.btn-action:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Badges */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2E7D32;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.draft { background: #fff3cd; color: #856404; }
.status-badge.pending { background: #cce5ff; color: #004085; }
.status-badge.paid { background: #d4edda; color: #155724; }
.status-badge.overdue { background: #f8d7da; color: #721c24; }
.status-badge.done { background: #d4edda; color: #155724; }
.status-badge.failed { background: #f8d7da; color: #721c24; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-block {
    display: block;
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.wide-modal {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section h4 {
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Invoice Specific Styles */
.invoice-item-row {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.invoice-summary-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: #1e3c72;
}

.item-total {
    font-weight: bold;
    color: #1e3c72;
    min-width: 80px;
    text-align: right;
}

/* Receipt OCR Styles */
.receipt-processor {
    min-height: 500px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.upload-area {
    border: 3px dashed #4CAF50;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    background: #f9fff9;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    background: #f0fff0;
    border-color: #388E3C;
}

.upload-icon {
    font-size: 60px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.upload-area h4 {
    color: #333;
    margin-bottom: 10px;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.file-info {
    font-size: 14px;
    color: #888;
    margin-top: 15px;
}

.preview-container {
    margin: 1rem 0;
    text-align: center;
}

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.processing-content {
    text-align: center;
    padding: 50px 30px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    margin: 2rem auto;
    max-width: 400px;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.3s;
}

.processing-note {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.ocr-preview {
    margin: 1.5rem 0;
}

.ocr-text-preview {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.results-section {
    padding: 1rem;
}

/* Training Module Content */
.training-module {
    padding: 1rem;
}

.module-content {
    line-height: 1.6;
}

.key-points {
    background: #e8f5e9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.key-points h5 {
    color: #2E7D32;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-points ul {
    list-style: none;
    padding-left: 1rem;
}

.key-points li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.key-points li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.example {
    background: #e3f2fd;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.example h5 {
    color: #1565C0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz {
    background: #fff3e0;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.quiz h5 {
    color: #E65100;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-option {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1rem;
}

.quiz-option:hover {
    background: #e9ecef;
}

.quiz-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.quiz-option.wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.tax-table {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #ddd;
}

.tax-table table {
    width: 100%;
    border-collapse: collapse;
}

.tax-table th,
.tax-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.tax-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.tax-table tr:last-child td {
    border-bottom: none;
}

/* Footer */
footer {
    margin-top: 4rem;
    background: white;
    border-top: 1px solid #eee;
    padding: 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    color: #666;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #1e3c72;
}

/* Empty States */
.empty-state {
    color: #666;
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.empty-state a {
    color: #2a5298;
    text-decoration: none;
    font-weight: 500;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Table Footer */
.table-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Invoice View */
.invoice-view {
    padding: 1rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.invoice-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

.invoice-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.detail-section h5 {
    color: #1e3c72;
    margin-bottom: 1rem;
}

.invoice-items-section {
    margin: 2rem 0;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.invoice-items-table th,
.invoice-items-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.invoice-items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.invoice-totals {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.total-row:last-child {
    border-bottom: none;
}

.total-row.grand-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1e3c72;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: #1e3c72;
        padding: 2rem;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features-grid,
    .overview-grid,
    .financial-overview {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .tabs-header {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
    
    .modal-content.wide-modal {
        width: 95%;
        margin: 10px;
    }
    
    .training-modules {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .invoice-stats {
        flex-direction: column;
    }
    
    .stat-badge {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}