/* ============================================
   INSTANT INVOICE APP — Glassmorphism Design
   Colors: Dark Blue, Dark Orange, Silver
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-primary: #0A1628;
  --bg-secondary: #0F1D32;
  --bg-tertiary: #1B2A4A;
  --accent: #C45A1A;
  --accent-light: #E8752A;
  --accent-glow: rgba(196, 90, 26, 0.4);
  --silver: #B0B8C8;
  --silver-light: #D4DAE4;
  --silver-dark: #7A8599;
  --text-primary: #FFFFFF;
  --text-secondary: #B0B8C8;
  --text-muted: #6B7A90;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(176, 184, 200, 0.12);
  --glass-border-hover: rgba(176, 184, 200, 0.25);
  --blur: 20px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
  --shadow-accent: 0 4px 20px rgba(196, 90, 26, 0.3);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Animated Background --- */
.bg-animation {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.bg-animation::before,
.bg-animation::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}
.bg-animation::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%; right: -10%;
  animation-delay: 0s;
}
.bg-animation::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--bg-tertiary) 0%, transparent 70%);
  bottom: -15%; left: -10%;
  animation-delay: -10s;
}
.blob-3 {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232, 117, 42, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  top: 40%; left: 50%;
  animation: float2 25s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.1); }
}

/* --- Glass Utilities --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.glass-nav {
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.glass-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.938rem;
  padding: 12px 16px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}
.glass-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(196, 90, 26, 0.15);
}
.glass-input::placeholder { color: var(--text-muted); }

select.glass-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B0B8C8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.glass-input { resize: vertical; min-height: 80px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem; font-weight: 600;
  padding: 12px 24px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(196, 90, 26, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--silver-dark);
}

.btn-danger {
  background: rgba(220, 50, 50, 0.15);
  border: 1px solid rgba(220, 50, 50, 0.3);
  color: #f87171;
}
.btn-danger:hover { background: rgba(220, 50, 50, 0.25); }

.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text-secondary); cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--accent-light);
  border-color: var(--accent);
}

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* --- Layout --- */
.app-wrapper {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.nav-brand .brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.nav-links {
  display: flex; gap: 4px; list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--glass-bg);
}
.nav-links a.active { color: var(--accent-light); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
}
.sync-dot.offline { background: var(--silver-dark); }
.sync-dot.syncing {
  background: var(--accent-light);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Mobile nav */
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--text-primary); font-size: 1.5rem; cursor: pointer;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Page views */
.page-view { display: none; animation: fadeIn 0.4s ease; }
.page-view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem; font-weight: 700;
  margin-bottom: 4px;
}
.page-header p {
  color: var(--text-secondary); font-size: 0.9rem;
}

/* --- Stats Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  padding: 24px;
  position: relative; overflow: hidden;
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.stat-card .stat-icon.orange {
  background: rgba(196, 90, 26, 0.15);
  color: var(--accent-light);
}
.stat-card .stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.stat-card .stat-icon.silver {
  background: rgba(176, 184, 200, 0.12);
  color: var(--silver-light);
}
.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem; font-weight: 700;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.8rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* --- Form --- */
.form-section {
  padding: 28px;
  margin-bottom: 20px;
}
.form-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 8px;
}
.form-row {
  display: grid; gap: 16px;
  margin-bottom: 16px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* Items table */
.items-table {
  width: 100%; border-collapse: collapse;
  margin-bottom: 16px;
}
.items-table th {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.items-table th:last-child { text-align: center; width: 50px; }
.items-table td { padding: 8px 4px; vertical-align: middle; }
.items-table td:last-child { text-align: center; }
.items-table .glass-input { padding: 10px 12px; font-size: 0.85rem; }
.items-table input[type="number"] { text-align: right; }

.item-subtotal {
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 10px 12px !important;
  min-width: 120px;
}

/* Totals */
.invoice-total-section {
  display: flex; justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.total-box {
  text-align: right;
  min-width: 250px;
}
.total-row {
  display: flex; justify-content: space-between; gap: 32px;
  padding: 6px 0; font-size: 0.9rem;
  color: var(--text-secondary);
}
.total-row.grand {
  font-size: 1.2rem; font-weight: 700;
  color: var(--accent-light);
  padding-top: 12px; margin-top: 8px;
  border-top: 2px solid var(--accent);
}

/* --- Action bar --- */
.action-bar {
  display: flex; gap: 12px; justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 20px;
}

/* --- Invoice Preview Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  max-width: 700px; width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.35s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
}
.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 600;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.invoice-preview {
  background: #fff;
  color: #1a1a1a;
  border-radius: var(--radius-md);
  padding: 40px;
  font-size: 0.85rem;
  line-height: 1.5;
  --inv-accent: #C45A1A;
}
.invoice-preview .inv-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--inv-accent, #C45A1A);
}
.invoice-preview .inv-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 700; color: #0A1628;
}
.invoice-preview .inv-brand p { color: #666; font-size: 0.8rem; }
.invoice-preview .inv-brand img {
  max-height: 48px; margin-bottom: 8px;
}
.invoice-preview .inv-meta { text-align: right; }
.invoice-preview .inv-meta .inv-number {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 700; color: var(--inv-accent, #C45A1A);
}
.invoice-preview .inv-meta p { color: #666; font-size: 0.8rem; }
.invoice-preview .inv-customer {
  margin-bottom: 24px;
}
.invoice-preview .inv-customer strong { color: #0A1628; }
.invoice-preview .inv-table {
  width: 100%; border-collapse: collapse; margin-bottom: 20px;
}
.invoice-preview .inv-table th {
  background: #f0f0f0; text-align: left;
  padding: 10px 12px; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.5px; color: #555;
  border-bottom: 1px solid #ddd;
}
.invoice-preview .inv-table td {
  padding: 10px 12px; border-bottom: 1px solid #eee;
}
.invoice-preview .inv-table td:nth-child(2),
.invoice-preview .inv-table td:nth-child(3),
.invoice-preview .inv-table td:nth-child(4),
.invoice-preview .inv-table th:nth-child(2),
.invoice-preview .inv-table th:nth-child(3),
.invoice-preview .inv-table th:nth-child(4) { text-align: right; }
.invoice-preview .inv-total {
  text-align: right; margin-top: 10px;
}
.invoice-preview .inv-total .grand-total {
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 700; color: var(--inv-accent, #C45A1A);
}
.invoice-preview .inv-notes {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 0.8rem; color: #888;
}

/* --- History Table --- */
.history-controls {
  display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.history-controls .glass-input { max-width: 280px; }

.history-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}
.history-table {
  width: 100%; border-collapse: collapse;
  min-width: 600px;
}
.history-table th {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
}
.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.875rem;
}
.history-table tr {
  transition: var(--transition);
}
.history-table tr:hover {
  background: var(--glass-bg);
}
.history-table .amount {
  font-weight: 600; color: var(--accent-light);
  text-align: right;
}

/* --- Settings --- */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 100%;
}
.settings-col-left,
.settings-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

@media (min-width: 992px) {
  .settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    max-width: 100%;
    align-items: start;
  }
}
.logo-upload-area {
  width: 120px; height: 120px;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-size: 0.75rem;
  overflow: hidden;
  position: relative;
}
.logo-upload-area:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.logo-upload-area img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
}
.logo-upload-area input { display: none; }

.preset-color-btn {
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}
.preset-color-btn:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
.preset-color-btn:active {
  transform: scale(0.9) !important;
}

/* --- Chart container --- */
.chart-container {
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  height: 300px;
}
.chart-container canvas {
  width: 100% !important;
}

/* --- Empty State --- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3rem; margin-bottom: 16px; opacity: 0.5;
}
.empty-state p { margin-bottom: 16px; }

/* --- Toast notification --- */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  backdrop-filter: blur(16px);
  animation: slideInRight 0.35s ease;
  display: flex; align-items: center; gap: 10px;
  min-width: 280px;
  box-shadow: var(--shadow-md);
}
.toast.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.toast.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.toast.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    display: none;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .main-content { padding: 16px; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .modal { border-radius: var(--radius-lg); }
  .invoice-preview { padding: 24px; }
  .invoice-preview .inv-header { flex-direction: column; gap: 12px; }
  .invoice-preview .inv-meta { text-align: left; }
  .history-controls .glass-input { max-width: 100%; }
  .action-bar { justify-content: stretch; }
  .action-bar .btn { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* --- Login Portal Overlay --- */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(6, 14, 25, 0.85);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-overlay.active {
  display: flex;
}
.login-card {
  max-width: 420px;
  width: 100%;
  padding: 40px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(196, 90, 26, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(15, 29, 50, 0.4);
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.login-header {
  text-align: center;
  margin-bottom: 30px;
}
.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 1.8rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-accent);
}
.login-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.login-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.password-wrapper {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 4px;
}
.password-toggle:hover {
  color: var(--accent-light);
}
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-card.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* --- Lucide Icons --- */
.lucide, i[data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.nav-links a .lucide {
  width: 16px;
  height: 16px;
}

/* --- Print --- */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  /* Hide main app interface, sidebar, backgrounds, buttons, and alerts */
  .app-layout,
  .bg-animation,
  .toast-container,
  .modal-header,
  .modal-footer,
  #confirmModal,
  #loginOverlay,
  .sync-indicator {
    display: none !important;
  }
  
  /* Make the active invoice modal full-width and natural flowing */
  .modal-overlay#invoiceModal {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .modal-overlay#invoiceModal .modal {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .invoice-preview {
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
  }
}
