/* Consultancy Invoice Generator - Main Styles */

:root {
    --cig-primary: #0d6efd;
    --cig-radius: 0.5rem;
}

body {
    min-height: 100vh;
    background-color: var(--bs-body-bg);
}

/* Auth pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    border: none;
    border-radius: var(--cig-radius);
}

/* Dashboard stats */
.stat-card {
    transition: transform 0.2s;
}

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

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

/* Invoice preview container */
.invoice-preview-container {
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: #fff;
}

[data-bs-theme="dark"] .invoice-preview-container {
    background: #1a1d20;
}

/* Invoice document styles (screen) */
.invoice-document {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.5;
}

[data-bs-theme="dark"] .invoice-document {
    color: #dee2e6;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invoice-logo {
    max-height: 60px;
    max-width: 120px;
    object-fit: contain;
}

.invoice-business-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.invoice-title {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin: 0;
    color: var(--cig-primary);
}

.invoice-parties {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.invoice-from, .invoice-to {
    flex: 1;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.invoice-table th {
    background: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.invoice-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.invoice-totals {
    max-width: 280px;
    margin-left: auto;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
}

.totals-row.grand-total {
    font-size: 1.15rem;
    font-weight: 700;
    border-top: 2px solid #333;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.invoice-payment, .invoice-notes, .invoice-terms {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Template: Corporate */
.invoice-corporate .invoice-header {
    background: #1a365d;
    color: #fff;
    margin: -1.5rem -1.5rem 2rem;
    padding: 1.5rem;
    border-bottom: none;
}

.invoice-corporate .invoice-title {
    color: #fff;
}

.invoice-corporate .invoice-table th {
    background: #1a365d;
    color: #fff;
}

/* Template: Modern */
.invoice-modern .invoice-header {
    border-bottom: 3px solid var(--cig-primary);
}

.invoice-modern .invoice-title {
    font-weight: 700;
    color: #212529;
}

.invoice-modern .invoice-table th {
    background: var(--cig-primary);
    color: #fff;
}

.invoice-modern .totals-row.grand-total {
    color: var(--cig-primary);
    border-top-color: var(--cig-primary);
}

/* Line items drag */
.drag-handle {
    cursor: grab;
}

.line-item-row.dragging {
    opacity: 0.5;
}

/* Print styles */
@media print {
    .navbar, .btn, form, .card-header { display: none !important; }
    .card { border: none !important; box-shadow: none !important; }
    .invoice-preview-container { max-height: none; overflow: visible; }
}

/* Responsive */
@media (max-width: 768px) {
    .invoice-parties {
        flex-direction: column;
    }

    .invoice-header {
        flex-direction: column;
        gap: 1rem;
    }

    .invoice-meta {
        text-align: left !important;
    }
}
