:root {
    --primary: #1800ad;
    --secondary: #3998ff;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #6c757d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fb 0%, #e8ecf1 100%);
    color: var(--dark-text);
    min-height: 100vh;
}

.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2a00ff 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 0, 173, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: transform 0.3s;
    background: rgba(255,255,255,0.95);
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 700;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0 !important;
}

.invoice-preview {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    min-height: 800px;
    padding: 35px;
    transition: all 0.3s;
}

.theme-selector {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s;
    padding: 10px;
}

.theme-selector:hover, .theme-selector.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 50px 0 25px;
    margin-top: 50px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px) rotate(5deg);
}

.invoice-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

.invoice-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.invoice-total {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
}

.theme-1 {
    --theme-primary: #1800ad;
    --theme-secondary: #3998ff;
}

.theme-2 {
    --theme-primary: #2c5530;
    --theme-secondary: #73a580;
}

.theme-3 {
    --theme-primary: #8b4513;
    --theme-secondary: #d2691e;
}

.theme-4 {
    --theme-primary: #4b0082;
    --theme-secondary: #9370db;
}

.theme-color-box {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 30px;
}

.share-link-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid var(--primary);
}

.template-selector {
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: all 0.3s;
    overflow: hidden;
}

.template-selector:hover, .template-selector.active {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.template-preview {
    height: 120px;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-1 .template-preview {
    background-color: white;
}

.template-2 .template-preview {
    background-color: #f8f9fa;
}

.template-3 .template-preview {
    background-color: #1a1a2e;
}

.template-preview-content {
    width: 80%;
    height: 80%;
    border: 1px solid #ddd;
    background: white;
    position: relative;
}

.template-1 .template-preview-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #2a00ff 100%);
}

.template-2 .template-preview-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #2a00ff 100%);
}

.template-3 .template-preview-content {
    background: #2d3748;
    color: white;
}

.template-3 .template-preview-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--secondary);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,249,250,0.9) 100%);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.save-load-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid var(--primary);
}

@media (max-width: 768px) {
    .invoice-preview {
        padding: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.settings-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.currency-selector {
    max-width: 150px;
}

.ai-suggestions {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--secondary);
}

.suggestion-item {
    background: white;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e3f2fd;
}

.suggestion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.floating-action {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.progress-bar {
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    transition: width 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.quick-action-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.quick-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.invoice-preview-container {
    position: relative;
    overflow: hidden;
}

.preview-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 120px;
    color: rgba(0,0,0,0.03);
    font-weight: 900;
    pointer-events: none;
    z-index: 1;
}

.feature-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

.tools-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
}

.tool-title {
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.tool-description {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 60px;
}

.invoice-history {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.history-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: between;
    align-items: center;
    transition: all 0.3s;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.share-view {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.share-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.view-only-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .invoice-preview, .invoice-preview * {
        visibility: visible;
    }
    .invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
}