/* ==========================================================================
   LUMIVERDE - Belgian Business Assistant
   Professional, trustworthy, mobile-first
   ========================================================================== */

:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --primary-dark: #0f2440;
  --accent: #d4a843;
  --accent-light: #e8c96a;
  --success: #38a169;
  --danger: #e53e3e;
  --warning: #dd6b20;
  --bg: #f7fafc;
  --bg-card: #ffffff;
  --bg-dark: #1a202c;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --border: #e2e8f0;
  --border-focus: #4299e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  /* Belgian flag subtle gradient */
  --be-black: #2d2926;
  --be-yellow: #fdda24;
  --be-red: #ef3340;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.lang-switch button {
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  font-family: inherit;
}

.lang-switch button.active {
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-accent:hover { background: var(--accent-light); transform: translateY(-1px); }

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

.btn-ghost {
  background: transparent;
  color: var(--text-light);
}
.btn-ghost:hover { color: var(--text); background: var(--bg); }

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

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   FORMS
   ========================================================================== */

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

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

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

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

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

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

.card-body { padding: 20px; }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(26, 54, 93, 0.08);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

/* Belgian flag accent bar */
.belgian-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--be-black) 33%, var(--be-yellow) 33% 66%, var(--be-red) 66%);
  width: 60px;
  border-radius: 2px;
  margin: 0 auto 24px;
}

.landing-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--primary);
  max-width: 700px;
}

.landing-title span {
  background: linear-gradient(135deg, var(--accent), var(--be-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  width: 100%;
  margin-top: 20px;
}

.landing-feature {
  padding: 24px 20px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.landing-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.landing-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 22px;
}

.landing-feature-icon.blue { background: rgba(66, 153, 225, 0.1); }
.landing-feature-icon.green { background: rgba(56, 161, 105, 0.1); }
.landing-feature-icon.orange { background: rgba(221, 107, 32, 0.1); }
.landing-feature-icon.purple { background: rgba(128, 90, 213, 0.1); }

.landing-feature h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.landing-feature p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

.landing-pricing {
  margin-top: 60px;
  padding: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg);
  color: white;
  max-width: 500px;
  width: 100%;
}

.landing-pricing h3 {
  color: white;
  margin-bottom: 4px;
}

.landing-pricing .price {
  font-size: 2.5rem;
  font-weight: 800;
}

.landing-pricing .price-period {
  font-size: 1rem;
  opacity: 0.7;
}

.landing-pricing .price-trial {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 4px;
  margin-bottom: 16px;
}

.landing-pricing ul {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
}

.landing-pricing li {
  padding: 6px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-pricing li::before {
  content: '\2713';
  font-weight: 700;
  color: var(--accent);
}

.landing-footer {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   APP LAYOUT (authenticated)
   ========================================================================== */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  background: var(--primary-dark);
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.3s;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-brand .brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4);
  padding: 8px 12px;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.sidebar-link.active {
  background: rgba(255,255,255,0.12);
  color: white;
}

.sidebar-link .link-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-conversations {
  max-height: 300px;
  overflow-y: auto;
}

.sidebar-conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

.sidebar-conv-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.sidebar-conv-item.active {
  background: rgba(255,255,255,0.12);
  color: white;
}

.sidebar-conv-item .conv-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-conv-item .conv-delete {
  opacity: 0;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  font-family: inherit;
}

.sidebar-conv-item:hover .conv-delete {
  opacity: 1;
}

.sidebar-conv-item .conv-delete:hover {
  color: var(--danger);
  background: rgba(255,255,255,0.1);
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-user:hover { background: rgba(255,255,255,0.08); }

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary-dark);
}

.sidebar-user-info {
  flex: 1;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.sidebar-user-email {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* Mobile sidebar toggle */
.mobile-toggle {
  display: none;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ==========================================================================
   CHAT PAGE
   ========================================================================== */

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-size: 1rem;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.chat-welcome h2 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.chat-welcome p {
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 400px;
}

.chat-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 500px;
  width: 100%;
}

.chat-suggestion {
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.chat-suggestion:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.message {
  display: flex;
  gap: 12px;
  max-width: 800px;
}

.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message.assistant { align-self: flex-start; }

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

.message.assistant .message-avatar {
  background: var(--accent);
  color: var(--primary-dark);
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 600px;
  word-break: break-word;
}

.message.user .message-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
  background: white;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-bubble p { margin-bottom: 8px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble strong { font-weight: 600; }
.message-bubble ul, .message-bubble ol { padding-left: 20px; margin: 8px 0; }
.message-bubble li { margin-bottom: 4px; }
.message-bubble code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.message-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.message-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.4s infinite;
}

.message-typing span:nth-child(2) { animation-delay: 0.2s; }
.message-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: white;
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  height: 48px;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
}

.chat-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.chat-send {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-send:hover { background: var(--primary-light); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   INVOICE PAGE
   ========================================================================== */

.page-header {
  padding: 24px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 1.3rem;
}

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Invoice list */
.invoice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invoice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.invoice-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.invoice-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.invoice-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(26, 54, 93, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}

.invoice-item-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.invoice-item-info p {
  font-size: 0.78rem;
  color: var(--text-light);
}

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

.invoice-item-amount {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

.invoice-item-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.status-draft { background: rgba(160,174,192,0.15); color: var(--text-light); }
.status-sent { background: rgba(66,153,225,0.1); color: #2b6cb0; }
.status-paid { background: rgba(56,161,105,0.1); color: #276749; }

/* Invoice form */
.invoice-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.invoice-section {
  margin-bottom: 24px;
}

.invoice-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* Line items */
.line-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.line-items-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
}

.line-items-table td {
  padding: 6px 4px;
}

.line-items-table input,
.line-items-table select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
}

.line-items-table input:focus,
.line-items-table select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.line-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-family: inherit;
}

.line-item-remove:hover {
  background: rgba(229, 62, 62, 0.2);
}

/* Invoice totals */
.invoice-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.invoice-totals .total-row {
  display: flex;
  justify-content: space-between;
  width: 250px;
  font-size: 0.9rem;
}

.invoice-totals .total-row.grand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: 8px;
  border-top: 2px solid var(--primary);
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-card-header {
  padding: 32px 32px 0;
  text-align: center;
}

.auth-card-header .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-card-header h2 {
  margin-bottom: 8px;
}

.auth-card-header p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.auth-card-body {
  padding: 24px 32px 32px;
}

.auth-footer {
  text-align: center;
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.auth-error {
  padding: 10px 14px;
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.auth-error.show { display: block; }

/* ==========================================================================
   PROFILE PAGE
   ========================================================================== */

.profile-card {
  max-width: 600px;
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

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

.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ==========================================================================
   LOADING
   ========================================================================== */

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
  }

  .sidebar-overlay.show { display: block; }

  .mobile-toggle { display: flex; }

  .chat-header { padding: 12px 16px; }
  .chat-messages { padding: 16px; }
  .chat-input-area { padding: 12px 16px; }
  .chat-suggestions { grid-template-columns: 1fr; }

  .page-header { padding: 16px; }
  .page-body { padding: 16px; }

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

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

@media (max-width: 480px) {
  .landing-features { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
