/* ==========================================================================
   FaturaForge - Freelancer Fatura Oluşturucu
   Professional Business Theme - Blue/White Palette
   ========================================================================== */

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

:root {
    --primary: #1a56db;
    --primary-dark: #1440a8;
    --primary-light: #e8effc;
    --secondary: #0f172a;
    --accent: #3b82f6;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    --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;
    --white: #ffffff;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

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

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

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

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary);
}

.navbar-brand:hover {
    color: var(--primary);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.1rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.navbar-menu a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.938rem;
    transition: all var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: var(--white);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--gray-50);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Invoice Preview Mockup */
.invoice-mockup {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    color: var(--gray-800);
    transform: rotate(2deg);
    max-width: 400px;
    margin-left: auto;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}

.mockup-brand {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}

.mockup-number {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.mockup-line {
    height: 10px;
    background: var(--gray-100);
    border-radius: 4px;
    margin-bottom: 8px;
}

.mockup-line.short {
    width: 60%;
}

.mockup-line.medium {
    width: 80%;
}

.mockup-table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
}

.mockup-table th {
    text-align: left;
    font-size: 0.7rem;
    color: var(--gray-400);
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-200);
}

.mockup-table td {
    font-size: 0.8rem;
    padding: 8px 0;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.mockup-table td:last-child,
.mockup-table th:last-child {
    text-align: right;
}

.mockup-total {
    text-align: right;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 12px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.938rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

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

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

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

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

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

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

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

.btn-success:hover {
    background: #15803d;
    color: var(--white);
}

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

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.813rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.063rem;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius);
    background: transparent;
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Features ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.938rem;
    line-height: 1.6;
}

/* ---------- How It Works / Steps ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    counter-reset: step;
}

.step-card {
    text-align: center;
    position: relative;
    counter-increment: step;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.step-card p {
    color: var(--gray-500);
    font-size: 0.938rem;
}

/* ---------- Dashboard ---------- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-card.primary { border-top: 3px solid var(--primary); }
.stat-card.success { border-top: 3px solid var(--success); }
.stat-card.warning { border-top: 3px solid var(--warning); }
.stat-card.danger  { border-top: 3px solid var(--danger); }

/* Chart Container */
.chart-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
}

.chart-container h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary);
}

.chart-wrapper {
    position: relative;
    height: 250px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 0 10px;
    border-bottom: 2px solid var(--gray-200);
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: background var(--transition);
    position: relative;
}

.chart-bar:hover {
    background: var(--primary-dark);
}

.chart-bar-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 4px;
}

.chart-bar:hover .chart-bar-tooltip {
    display: block;
}

.chart-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 6px;
}

/* ---------- Tables ---------- */
.table-wrapper {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.table-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

tbody td {
    padding: 14px 24px;
    font-size: 0.938rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

tbody tr:last-child td {
    border-bottom: none;
}

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

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

/* ---------- Status Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-draft {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-sent {
    background: var(--info-light);
    color: #0369a1;
}

.badge-paid {
    background: var(--success-light);
    color: var(--success);
}

.badge-overdue {
    background: var(--danger-light);
    color: var(--danger);
}

/* ---------- Forms ---------- */
.form-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.938rem;
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ---------- Invoice Items Table ---------- */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.items-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.items-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.items-table .form-control {
    padding: 8px 10px;
    font-size: 0.875rem;
}

.items-table .col-desc { width: 40%; }
.items-table .col-qty { width: 15%; }
.items-table .col-price { width: 20%; }
.items-table .col-total { width: 18%; }
.items-table .col-action { width: 7%; text-align: center; }

.btn-remove-item {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition);
}

.btn-remove-item:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* Invoice Totals */
.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.totals-table {
    width: 300px;
}

.totals-table .row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.938rem;
}

.totals-table .row.total {
    border-top: 2px solid var(--gray-800);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

/* ---------- Invoice View (Print Friendly) ---------- */
.invoice-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
}

.invoice-document {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow);
}

.invoice-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--primary);
}

.invoice-doc-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.invoice-doc-brand p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

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

.invoice-doc-meta h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
}

.invoice-doc-meta .meta-row {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.invoice-doc-meta .meta-label {
    font-weight: 600;
    color: var(--gray-500);
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.invoice-party h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.invoice-party .party-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.invoice-party p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.invoice-items-table thead th {
    background: var(--gray-800);
    color: var(--white);
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invoice-items-table thead th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.invoice-items-table thead th:last-child {
    border-radius: 0 var(--radius) 0 0;
    text-align: right;
}

.invoice-items-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.938rem;
}

.invoice-items-table .text-right {
    text-align: right;
}

.invoice-items-table .text-center {
    text-align: center;
}

.invoice-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

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

.invoice-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.938rem;
    color: var(--gray-600);
}

.invoice-summary-row.grand-total {
    border-top: 2px solid var(--gray-800);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
}

.invoice-notes {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.invoice-notes h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 8px;
}

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

.invoice-footer-bar {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.813rem;
    color: var(--gray-400);
}

.invoice-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

/* ---------- Autocomplete ---------- */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--primary-light);
}

.autocomplete-item .item-name {
    font-weight: 600;
    color: var(--gray-800);
}

.autocomplete-item .item-detail {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.938rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #075985;
    border-color: #bae6fd;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ---------- Page Header ---------- */
.page-header {
    padding: 40px 0 32px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
}

.page-header p {
    color: var(--gray-500);
    margin-top: 4px;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer p {
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul a {
    color: var(--gray-400);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer ul a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 24px;
    text-align: center;
    font-size: 0.813rem;
    color: var(--gray-500);
}

/* ---------- Utility ---------- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .invoice-mockup {
        transform: none;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.open {
        display: flex;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .invoice-parties {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .invoice-doc-header {
        flex-direction: column;
        gap: 16px;
    }

    .invoice-doc-meta {
        text-align: left;
    }

    .invoice-document {
        padding: 24px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Horizontal scroll for tables on mobile */
    .table-wrapper {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .invoice-actions {
        flex-direction: column;
    }

    .invoice-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Print Stylesheet ---------- */
@media print {
    * {
        box-shadow: none !important;
    }

    body {
        background: white;
        color: #000;
        font-size: 12pt;
        line-height: 1.4;
    }

    .no-print {
        display: none !important;
    }

    main {
        padding: 0;
    }

    .invoice-page {
        margin: 0;
        padding: 0;
    }

    .invoice-document {
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        max-width: 100%;
    }

    .invoice-doc-header {
        border-bottom: 2px solid #000;
    }

    .invoice-doc-brand h2 {
        color: #000;
    }

    .invoice-items-table thead th {
        background: #e5e7eb;
        color: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .invoice-summary-row.grand-total {
        border-top: 2px solid #000;
        color: #000;
    }

    .invoice-notes {
        background: #f3f4f6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .invoice-actions {
        display: none !important;
    }

    .badge {
        border: 1px solid currentColor;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    @page {
        margin: 1.5cm;
        size: A4;
    }
}
