@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Corporate Executive Palette - Inspired by high-end InvoiceHome & Stripe */
  --bg-app: #f4f6f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #2563eb;
  
  --border-app: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --border-sidebar: rgba(255, 255, 255, 0.08);

  /* Primary Brand: SCON STUDIOS Deep Corporate Navy & Azure */
  --primary: #0f4c81;
  --primary-hover: #0a365c;
  --primary-light: #e0f2fe;
  --primary-text: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;

  /* Status Colors */
  --status-pending: #d97706;
  --status-pending-bg: #fef3c7;
  --status-pending-border: #fde68a;
  
  --status-paid: #059669;
  --status-paid-bg: #d1fae5;
  --status-paid-border: #a7f3d0;
  
  --status-overdue: #dc2626;
  --status-overdue-bg: #fee2e2;
  --status-overdue-border: #fecaca;
  
  --status-cancelled: #64748b;
  --status-cancelled-bg: #f1f5f9;
  --status-cancelled-border: #e2e8f0;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #ffffff;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Layout & Elevations */
  --sidebar-width: 250px;
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-paper: 0 15px 40px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
}

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

body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  border-right: 1px solid var(--border-sidebar);
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border-sidebar);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #0f4c81);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.sidebar-brand h2 {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
}
.sidebar-brand span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 10px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-sidebar);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: #ffffff;
}
.nav-item.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-sidebar);
  background: rgba(0, 0, 0, 0.15);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #60a5fa;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}
.sidebar-user-role {
  font-size: 11px;
  color: #94a3b8;
}
.sidebar-logout {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-sidebar);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.sidebar-logout:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #f87171;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
  min-width: 0;
  max-width: 1400px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-dark);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-app);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}
.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}
.btn-icon {
  padding: 8px;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-value.primary { color: var(--accent); }
.stat-value.success { color: var(--status-paid); }
.stat-value.warning { color: var(--status-pending); }

/* Table Cards */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-app);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fafbfc;
}

.search-input {
  padding: 8px 14px 8px 36px;
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  width: 260px;
  transition: all 0.15s ease;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-wrapper::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  font-size: 12px;
  opacity: 0.5;
  pointer-events: none;
}

.filter-select {
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 12px 20px;
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-app);
}
.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: #f8fafc;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.badge-pending {
  background: var(--status-pending-bg);
  color: var(--status-pending);
  border: 1px solid var(--status-pending-border);
}
.badge-pending::before { background: var(--status-pending); }

.badge-paid {
  background: var(--status-paid-bg);
  color: var(--status-paid);
  border: 1px solid var(--status-paid-border);
}
.badge-paid::before { background: var(--status-paid); }

.badge-overdue {
  background: var(--status-overdue-bg);
  color: var(--status-overdue);
  border: 1px solid var(--status-overdue-border);
}
.badge-overdue::before { background: var(--status-overdue); }

.badge-cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled);
  border: 1px solid var(--status-cancelled-border);
}
.badge-cancelled::before { background: var(--status-cancelled); }

/* ========================================================
   INVOICE HOME STYLE DOCUMENT CANVAS (Ultra Professional)
   ======================================================== */
.invoice-paper-wrapper {
  max-width: 860px;
  margin: 0 auto 40px;
}

.invoice-paper {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* Top Decorative Accent Bar */
.invoice-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #0f4c81, #2563eb, #38bdf8);
}

.invoice-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid #f1f5f9;
}

.invoice-doc-brand h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0f4c81;
  letter-spacing: -0.02em;
}
.invoice-doc-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.invoice-doc-meta {
  text-align: right;
}
.invoice-title-large {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.invoice-number-tag {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #2563eb;
  margin: 4px 0 8px;
}
.invoice-dates-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.invoice-dates-meta strong {
  color: var(--text-primary);
}

/* Bill To / From Sections */
.invoice-parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
  background: #f8fafc;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}
.party-block .party-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
}
.party-block .party-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.party-block .party-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Invoice Sheet Items Table */
.invoice-sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
}
.invoice-sheet-table thead th {
  background: #0f4c81;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}
.invoice-sheet-table thead th:last-child,
.invoice-sheet-table thead th:nth-child(3),
.invoice-sheet-table thead th:nth-child(4) {
  text-align: right;
}
.invoice-sheet-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13.5px;
}
.invoice-sheet-table tbody td:last-child,
.invoice-sheet-table tbody td:nth-child(3),
.invoice-sheet-table tbody td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.invoice-sheet-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.invoice-sheet-table .item-name {
  font-weight: 700;
  color: var(--text-primary);
}
.invoice-sheet-table .item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Totals Summary Box */
.invoice-sheet-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}
.totals-box {
  width: 320px;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.totals-row.grand-total {
  border-top: 2px solid #0f4c81;
  padding-top: 12px;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0f4c81;
}

/* Notes & Terms Box */
.invoice-sheet-notes {
  background: #f8fafc;
  border-left: 4px solid #0f4c81;
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 28px;
}
.invoice-sheet-notes h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}
.invoice-sheet-notes p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.invoice-sheet-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================================
   SERVICE PRESETS SELECTOR (One-click add from SCON catalog)
   ======================================================== */
.presets-panel {
  background: #ffffff;
  border: 1px solid var(--border-app);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.presets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.presets-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.preset-pill {
  background: #f8fafc;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.preset-pill:hover {
  background: #eff6ff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.preset-pill-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.preset-pill-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-pill-price {
  font-size: 13px;
  font-weight: 700;
  color: #0f4c81;
  margin-top: 6px;
}

/* Form Inputs */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: all 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}
.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-app);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 14px 24px;
  background: #fafbfc;
  border-top: 1px solid var(--border-app);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Cards & Generic Panels */
.card {
  background: #ffffff;
  border: 1px solid var(--border-app);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

/* Passkey & API Key List items */
.passkey-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.passkey-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #fafbfc;
  border: 1px solid var(--border-app);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}
.passkey-item:hover {
  background: #f1f5f9;
  border-color: var(--border-dark);
}
.passkey-item-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.passkey-item-icon {
  font-size: 22px;
  opacity: 0.8;
}
.passkey-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.passkey-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.toast.success { border-left: 4px solid var(--status-paid); }
.toast.error { border-left: 4px solid var(--status-overdue); }
.toast.info { border-left: 4px solid var(--accent); }

/* Spinners & Utilities */
.loading-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* Login Page Specific */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1120;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo h1 {
  font-size: 26px;
  color: #0f4c81;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-logo p {
  color: #64748b;
  font-size: 13px;
  margin-top: 4px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.passkey-btn {
  width: 100%;
  padding: 10px 18px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s ease;
}
.passkey-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: #94a3b8;
}

/* Responsive Mobile Nav & Overlay */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 40;
}
.sidebar-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 60px 16px 24px;
  }
  .invoice-paper {
    padding: 24px 18px;
  }
  .invoice-parties-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .invoice-doc-header {
    flex-direction: column;
    gap: 16px;
  }
  .invoice-doc-meta {
    text-align: left;
  }
}
