/* ============================================
   NIMIQ INVOICE PAY — DESIGN SYSTEM V12
   Competition-winning UX
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #06080f; color-scheme: dark; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #fff; line-height: 1.5; overflow-x: hidden; background: #06080f; background: var(--bg-base); }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; border: none; outline: none; background: none; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: rgba(99,102,241,.35); color: #fff; }

/* --- CSS VARIABLES --- */
:root {
  --bg-base: #06080f;
  --bg-surface: #0c101c;
  --bg-card: #111627;
  --bg-elevated: #161c32;
  --bg-input: #0d1220;
  --border: rgba(255,255,255,.07);
  --border-focus: rgba(99,102,241,.5);
  --text-primary: #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted: #5a6480;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,.12), rgba(6,182,212,.08));
  --gradient-glow: linear-gradient(135deg, rgba(99,102,241,.25), rgba(6,182,212,.15));
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 8px 32px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.4);
  --shadow-glow: 0 0 60px rgba(99,102,241,.15);
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --transition-slow: .4s cubic-bezier(.4,0,.2,1);
}

/* --- AMBIENT BACKGROUND --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 15% 10%, rgba(99,102,241,.12), transparent),
    radial-gradient(ellipse 600px 500px at 85% 80%, rgba(6,182,212,.08), transparent);
  pointer-events: none;
  z-index: 0;
}

/* --- ANIMATIONS --- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.animate-fade-up { animation: fadeUp .5s ease both; }
.animate-fade-in { animation: fadeIn .4s ease both; }
.animate-scale-in { animation: scaleIn .35s ease both; }
.animate-slide-down { animation: slideDown .3s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* --- LAYOUT SHELLS --- */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 48px;
  min-height: 100vh;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
}
.brand-logo img { width: 26px; height: 26px; }
.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-text span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-ghost {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(99,102,241,.3);
}
.btn-accent:hover {
  box-shadow: 0 8px 30px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.btn-accent:active { transform: translateY(0); }
.btn-accent:disabled { opacity: .5; pointer-events: none; }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  border: none;
}
.btn-full { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; font-weight: 700; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* --- CARDS --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.card-body { padding: 32px; }
.card-glow {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .01em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}
.field textarea { min-height: 100px; resize: vertical; }
.field-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.amount-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.amount-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}
.amount-box .currency-tag {
  padding: 0 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-light);
  background: rgba(255,255,255,.04);
  border-right: 1px solid var(--border);
  height: 48px;
  display: flex;
  align-items: center;
}
.amount-box input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* --- BADGES & PILLS --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-pending {
  background: rgba(251,191,36,.12);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.2);
}
.badge-paid {
  background: rgba(34,197,94,.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.2);
}
.badge-rejected {
  background: rgba(239,68,68,.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.2);
}
.badge-submitted {
  background: rgba(99,102,241,.12);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,.2);
}
.badge-neutral {
  background: rgba(255,255,255,.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  animation: slideDown .3s ease;
  max-width: 380px;
  backdrop-filter: blur(20px);
}
.toast-success { border-color: rgba(34,197,94,.3); color: #86efac; }
.toast-error { border-color: rgba(239,68,68,.3); color: #fca5a5; }
.toast-info { border-color: rgba(99,102,241,.3); color: #c7d2fe; }

/* --- LOADING STATES --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--bg-surface);
  overflow: hidden;
}
.login-showcase::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,.2), transparent 70%);
  pointer-events: none;
}
.login-showcase::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,.15), transparent 70%);
  pointer-events: none;
}
.login-showcase h1 {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 20px;
  max-width: 480px;
}
.login-showcase h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-showcase p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 440px;
}
.login-features {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
.login-feature {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.login-feature:hover {
  background: rgba(255,255,255,.06);
  transform: translateX(4px);
}
.login-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.login-feature strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.login-feature span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  animation: fadeUp .5s ease;
}
.login-card .brand {
  margin-bottom: 40px;
  justify-content: center;
}
.login-card h2 {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
}
.wallet-connect-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 8px 32px rgba(99,102,241,.35);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.wallet-connect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99,102,241,.45);
}
.wallet-connect-btn:active { transform: translateY(0); }
.wallet-status {
  text-align: center;
  margin-top: 16px;
  min-height: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.wallet-status.error { color: #f87171; }
.login-steps {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}
.login-step {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.login-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-light);
  flex-shrink: 0;
}
.login-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   HOME / CREATE INVOICE
   ============================================ */
.home-layout {
  display: grid;
  gap: 32px;
}
.hero-section {
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,.15), transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--gradient-subtle);
  border: 1px solid rgba(99,102,241,.2);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-section h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  max-width: 600px;
}
.hero-section > p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
}
.hero-stats {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-stat {
  padding: 14px 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-stat strong { color: var(--text-primary); }

/* WORKBENCH */
.workbench {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.form-section {
  display: grid;
  gap: 24px;
}
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.form-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.form-header p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.create-status {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 20px;
}
.create-status.error { color: #f87171; }

/* PREVIEW */
.preview-section {
  position: sticky;
  top: 24px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.preview-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.preview-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
}
.preview-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}
.preview-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.preview-merchant {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.preview-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
}
.preview-merchant-name {
  font-size: 16px;
  font-weight: 700;
}
.preview-merchant-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.preview-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.preview-amount {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.preview-currency {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-light);
}
.preview-details {
  display: grid;
  gap: 12px;
}
.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.preview-row:last-child { border-bottom: none; }
.preview-row span { color: var(--text-secondary); }
.preview-row strong { text-align: right; max-width: 60%; word-break: break-word; }
.preview-note {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   DASHBOARD (My Invoices)
   ============================================ */
.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 48px;
  min-height: 100vh;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.dash-header h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.dash-header p {
  color: var(--text-secondary);
  margin-top: 4px;
  font-size: 14px;
}
.dash-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.accent { border-color: rgba(99,102,241,.2); }
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.stat-value {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
}

/* INVOICE LIST */
.invoice-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.invoice-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.invoice-list-header h2 {
  font-size: 20px;
  font-weight: 800;
}
.invoice-list {
  padding: 8px;
}
.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  cursor: default;
}
.invoice-row:hover { background: rgba(255,255,255,.03); }
.invoice-row-main { flex: 1; min-width: 0; }
.invoice-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.invoice-row-title h3 {
  font-size: 16px;
  font-weight: 700;
}
.invoice-row-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.invoice-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* EMPTY STATE */
.empty-state {
  padding: 60px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 8px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
}
.empty-state p {
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.6;
}

/* ============================================
   INVOICE PAYMENT PAGE
   ============================================ */
.invoice-page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.invoice-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px;
}
.invoice-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 48px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: start;
}
.invoice-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.invoice-loading,
.invoice-error {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Invoice detail header */
.inv-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.inv-id-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.inv-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.inv-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
  flex-shrink: 0;
}
.inv-hero h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 4px;
  word-break: break-word;
}
.inv-hero p {
  color: var(--text-secondary);
  font-size: 15px;
}
.inv-amount-display {
  padding: 28px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}
.inv-amount-num {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}
.inv-amount-currency {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-light);
  margin-top: 8px;
}
.inv-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.inv-info-cell {
  padding: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.inv-info-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.inv-info-value {
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
  line-height: 1.5;
}
.inv-info-full { grid-column: 1 / -1; }
.inv-banner {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}
.inv-banner.pending {
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.15);
  color: #fcd34d;
}
.inv-banner.paid {
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.15);
  color: #86efac;
}

/* Payment sidebar */
.invoice-pay-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: sticky;
  top: 24px;
}
.pay-card-header {
  margin-bottom: 20px;
}
.pay-card-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}
.pay-card-header p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.qr-container {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  margin-bottom: 20px;
}
.qr-container img {
  width: 100%;
  max-width: 240px;
}
.pay-address-box {
  padding: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.pay-address-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.pay-address-row {
  display: flex;
  gap: 8px;
}
.pay-address-row input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
}
.pay-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 8px 32px rgba(99,102,241,.35);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.pay-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99,102,241,.45); }
.pay-btn:disabled { opacity: .5; pointer-events: none; }
.pay-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.pay-progress {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--gradient-subtle);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.pay-progress-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.pay-progress-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-layout {
  max-width: 720px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.settings-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--bg-base);
}
.admin-aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  display: grid;
  place-items: center;
}
.admin-brand-icon img { width: 28px; height: 28px; }
.admin-brand-text h3 { font-size: 16px; font-weight: 800; }
.admin-brand-text p { font-size: 12px; color: var(--text-secondary); }
.admin-user-box {
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.admin-user-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.admin-user-email { font-size: 13px; font-weight: 700; word-break: break-word; }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.admin-nav-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.admin-nav-btn:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }
.admin-nav-btn.active {
  background: var(--gradient-subtle);
  color: var(--text-primary);
  border: 1px solid rgba(99,102,241,.15);
}
.admin-sidebar-bottom { margin-top: auto; }
.admin-main { padding: 28px; }
.admin-topbar { margin-bottom: 28px; }
.admin-topbar h1 { font-size: 28px; font-weight: 900; }
.admin-topbar p { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.admin-stat-value { font-size: 30px; font-weight: 900; }
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.admin-panel-head h3 { font-size: 16px; font-weight: 700; }
.admin-panel-body { padding: 12px; }
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.admin-row:last-child { margin-bottom: 0; }
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-title { font-weight: 700; font-size: 14px; }
.admin-row-sub { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
}
.admin-detail-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.admin-detail-value { color: var(--text-secondary); word-break: break-word; }
.admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.admin-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1080px) {
  .workbench { grid-template-columns: 1fr; }
  .preview-section { position: static; }
  .login-page { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .invoice-layout { grid-template-columns: 1fr; }
  .invoice-pay-card { position: static; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .shell, .dashboard { padding: 20px 16px 40px; }
  .hero-section { padding: 28px; }
  .hero-section h1 { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .inv-info-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .invoice-row { flex-direction: column; align-items: flex-start; }
  .invoice-row-actions { width: 100%; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-aside { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-detail-grid { grid-template-columns: 1fr; }
  .inv-amount-num { font-size: 36px; }
  .invoice-nav { padding: 16px; }
  .invoice-layout { padding: 0 16px 32px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .login-form-side { padding: 32px 20px; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }
.copy-success { color: #22c55e !important; }
