/**
 * Ciniki Invoice System
 * Modern Fintech UI Stylesheet
 * Mobile-First Responsive Design
 */

/* ==================== CSS Variables ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: rgba(99, 102, 241, 0.08);
    
    --secondary: #64748b;
    --secondary-dark: #475569;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.04);
    
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --sidebar-width: 280px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

.dark {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #1e293b;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }

/* ==================== App Layout ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-collapsed);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-base);
    overflow: hidden;
}

.sidebar-header {
    padding: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--header-height);
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.sidebar-logo-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.sidebar-logo-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) var(--space-2);
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-1);
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.nav-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.sidebar-footer {
    padding: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

.user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-collapsed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    z-index: 50;
    min-height: var(--header-height);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--gray-100);
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: var(--space-6);
}

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: var(--space-6);
}

/* ==================== Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-bg); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.info { background: var(--info-light); color: var(--info); }

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1;
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: var(--success-dark);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.readonly {
    background: var(--gray-100);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.dark .form-input.readonly {
    background: var(--gray-700);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ==================== Tables ==================== */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
}

.dark .table th {
    background: var(--gray-800);
}

.table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.dark .table tbody tr:hover {
    background: var(--gray-800);
}

.invoice-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.amount {
    font-weight: 600;
    color: var(--success);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-danger { background: var(--danger-light); color: var(--danger-dark); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

.dark .badge-gray { background: var(--gray-700); color: var(--gray-300); }

/* ==================== Alerts ==================== */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    font-size: 0.875rem;
}

.alert-success { background: var(--success-light); color: var(--success-dark); }
.alert-error { background: var(--danger-light); color: var(--danger-dark); }
.alert-warning { background: var(--warning-light); color: var(--warning-dark); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
}

.alert-close:hover { opacity: 1; }

/* ==================== Invoice Document ==================== */
.invoice-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.invoice-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--space-8);
}

.invoice-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.invoice-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.invoice-brand-text h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: var(--space-1);
}

.invoice-brand-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.invoice-meta {
    text-align: right;
}

.invoice-type {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-2);
}

.invoice-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
}

.invoice-body {
    padding: var(--space-8);
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.party-card {
    background: var(--gray-50);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
}

.dark .party-card {
    background: var(--gray-800);
}

.party-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.party-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.party-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.invoice-items-table {
    margin-bottom: var(--space-8);
}

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

.invoice-items-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 2px solid var(--border-color);
}

.dark .invoice-items-table th {
    background: var(--gray-800);
}

.invoice-items-table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9375rem;
}

.invoice-items-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-8);
}

.invoice-totals-table {
    width: 280px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) 0;
    font-size: 0.9375rem;
}

.totals-row.grand-total {
    border-top: 2px solid var(--text-primary);
    margin-top: var(--space-2);
    padding-top: var(--space-4);
    font-size: 1.25rem;
    font-weight: 700;
}

.invoice-notes {
    background: var(--gray-50);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.dark .invoice-notes {
    background: var(--gray-800);
}

.invoice-notes h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.invoice-notes p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.invoice-footer {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Invoice Actions */
.invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.invoice-actions .btn {
    flex: 1;
    min-width: 140px;
}

/* ==================== Login Page ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-4);
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-10);
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo {
    font-size: 3rem;
    margin-bottom: var(--space-4);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

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

/* ==================== Quick Actions ==================== */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.quick-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.9375rem;
    margin-bottom: var(--space-6);
}

/* ==================== Invoice Items (Create/Edit) ==================== */
.items-container {
    margin-bottom: var(--space-6);
}

.item-row {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-light);
}

.dark .item-row {
    background: var(--gray-800);
    border-color: var(--border-color);
}

.item-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.item-row-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

.item-total-preview {
    font-weight: 600;
    color: var(--success);
    text-align: right;
    padding: var(--space-2) 0;
}

.totals-section {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: var(--space-4);
}

.dark .totals-section {
    background: var(--gray-800);
}

.totals-row-preview {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    font-size: 0.9375rem;
}

.totals-row-preview.grand {
    border-top: 2px solid var(--text-primary);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    font-size: 1.25rem;
    font-weight: 700;
}

/* ==================== Responsive - Tablet ==================== */
@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .invoice-actions .btn {
        flex: none;
    }
    
    .invoice-parties {
        grid-template-columns: 1fr 1fr;
    }
    
    .item-row-fields {
        grid-template-columns: 2fr 1fr 1fr 1fr auto;
        align-items: end;
    }
}

/* ==================== Responsive - Desktop ==================== */
@media (min-width: 768px) {
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .sidebar-logo-text,
    .nav-text {
        opacity: 1;
    }
    
    .sidebar .nav-item {
        justify-content: flex-start;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .invoice-parties {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .sidebar,
    .header,
    .invoice-actions,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    .invoice-card {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: 100% !important;
    }
}

/* ==================== Utilities ==================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
