/* === CrazyWin Theme — Lightning Gateway === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg-base: #0a1120;
  --surface: #0f172a;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-hover: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #10b981;
  --warning: #fbbf24;
  --danger: #dc2626;
  --cashapp: #00D632;
  --cashapp-hover: #00c02d;
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus: rgba(255, 255, 255, 0.25);
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --btn-shadow: inset 0 1px 2px rgba(255,255,255,0.25), 0 3px 3px -1.5px rgba(16,24,40,0.06), 0 1px 1px rgba(16,24,40,0.08);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a1120;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  letter-spacing: -0.025em;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* === CrazyWin Exact Background Blur Spots === */
.bg-effects {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Hero area glow — top center */
.bg-effects .glow-hero {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 650px;
  background: rgba(30, 41, 59, 0.5); /* slate-800/50 */
  border-radius: 50%;
  filter: blur(120px);
}

/* Top-left glow */
.bg-effects .glow-tl {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(51, 65, 85, 0.3); /* slate-700/30 */
  border-radius: 50%;
  filter: blur(100px);
}

/* Left side glow */
.bg-effects .glow-left {
  position: absolute;
  top: 280px;
  left: -80px;
  width: 288px;
  height: 288px;
  background: rgba(71, 85, 105, 0.4); /* slate-600/40 */
  border-radius: 50%;
  filter: blur(100px);
}

/* Top-right blue accent */
.bg-effects .glow-tr {
  position: absolute;
  top: -160px;
  right: -160px;
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.1); /* blue-500/10 */
  border-radius: 50%;
  filter: blur(100px);
}

/* Mid-left blue accent */
.bg-effects .glow-ml {
  position: absolute;
  top: 50%;
  left: -160px;
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.1); /* blue-500/10 */
  border-radius: 50%;
  filter: blur(100px);
}

/* Center fill glow */
.bg-effects .glow-center {
  position: absolute;
  top: 50%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: rgba(51, 65, 85, 0.35); /* slate-700/35 */
  border-radius: 50%;
  filter: blur(150px);
}

/* Bottom-right blue accent */
.bg-effects .glow-br-blue {
  position: absolute;
  bottom: -160px;
  right: 33%;
  width: 500px;
  height: 500px;
  background: rgba(59, 130, 246, 0.1); /* blue-500/10 */
  border-radius: 50%;
  filter: blur(100px);
}

/* Bottom-right fill glow */
.bg-effects .glow-br {
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 700px;
  height: 700px;
  background: rgba(51, 65, 85, 0.3); /* slate-700/30 */
  border-radius: 50%;
  filter: blur(180px);
}

/* === Navbar === */
.navbar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
}

.navbar-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-centered {
  justify-content: center;
}

@media (min-width: 640px) {
  .navbar-inner { padding: 1.25rem 2rem; }
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

@media (min-width: 640px) {
  .nav-logo-img { height: 48px; }
}

.nav-powered {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Centered nav links */
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Right side actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-nav-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.btn-nav-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* === Layout === */
.page-wrapper {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* === Centered modal layout (pay page) === */
.modal-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 1.5rem;
}

/* === Cards (CrazyWin modal style) === */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Card decorative blur spots (exact CrazyWin modal) */
.card::before {
  content: '';
  position: absolute;
  top: -96px;
  right: -96px;
  width: 192px;
  height: 192px;
  background: rgba(59, 130, 246, 0.25); /* blue-500/25 */
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.card::after {
  content: '';
  position: absolute;
  bottom: -112px;
  left: -112px;
  width: 224px;
  height: 224px;
  background: rgba(100, 116, 139, 0.35); /* slate-500/35 */
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

/* Extra decorative spots via inner wrapper */
.card-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.card h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.card-success {
  text-align: center;
  border-color: var(--success);
}

.card-success::before {
  background: rgba(16, 185, 129, 0.2);
}

.card-success .check-icon {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

/* === Wide card for dashboard === */
.card-wide {
  max-width: 100%;
}

/* === Forms === */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
  text-align: left;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-row { display: flex; gap: 0.75rem; }
.field-row .field { flex: 1; min-width: 0; }

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.field input {
  padding: 0.7rem 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--input-focus);
  background: rgba(255, 255, 255, 0.1);
}

.field input::placeholder {
  color: var(--text-muted);
}

.hint { font-size: 0.75rem; color: var(--text-muted); }

/* === Amount preset buttons === */
.amount-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preset-btn {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.preset-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* === Dollar input === */
.input-with-prefix {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.input-with-prefix:focus-within {
  border-color: var(--input-focus);
  background: rgba(255, 255, 255, 0.1);
}

.input-prefix {
  padding: 0.7rem 0 0.7rem 0.9rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  user-select: none;
}

.input-with-prefix input {
  border: none !important;
  background: transparent !important;
  padding-left: 0.3rem;
  font-size: 1.1rem;
  flex: 1;
  min-width: 0;
  border-radius: 0;
}

.input-with-prefix input:focus { outline: none; }

/* === Amount display === */
.amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0.5rem 0;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.amount-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -0.3rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.memo {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.timestamp {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s;
  box-shadow: var(--btn-shadow);
  position: relative;
  z-index: 1;
  letter-spacing: -0.01em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn-large {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  width: 100%;
  border-radius: var(--radius-xl);
}

.btn-icon {
  gap: 0.5rem;
}

.btn-cashapp-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  box-shadow: none;
}

.btn-cashapp {
  background: var(--cashapp);
  color: #000;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-cashapp:hover { background: var(--cashapp-hover); }

.btn-copied {
  background: var(--success) !important;
  color: #fff !important;
}

/* === Button row (80/20 split) === */
.btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

.btn-row-main {
  flex: 4;
  min-width: 0;
}

.btn-row-side {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: all 0.15s;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.btn-logout:hover {
  background: var(--card-bg);
  color: var(--text);
}

/* === QR Code === */
.qr-container {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0;
  position: relative;
  z-index: 1;
}

.qr-code {
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 8px;
  max-width: 220px;
  width: 100%;
}

/* === Action buttons (Step 2) === */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.link-muted {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.link-muted:hover { color: var(--text); }

/* === Status indicators === */
.status-pending {
  text-align: center;
  padding: 0.85rem;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-xl);
  color: var(--warning);
  font-weight: 600;
  font-size: 0.9rem;
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.status-paid {
  text-align: center;
  padding: 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* === Alerts === */
.alert {
  padding: 1rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.alert-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--danger);
}

/* === Stats grid (dashboard) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--card-border-hover);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.3rem;
  letter-spacing: -0.03em;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.table-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === Settlement card === */
.settlement-card {
  max-width: 100%;
  border-color: rgba(37, 99, 235, 0.3);
}

.settlement-card::before {
  background: rgba(37, 99, 235, 0.2);
}

.settlement-card h2 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.settlement-card p,
.settlement-card ol {
  position: relative;
  z-index: 1;
}

.settlement-card ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.settlement-card li {
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
}

/* === Page title === */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

/* === Filter bar === */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-bar h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.filter-buttons { display: flex; gap: 0.5rem; }

.filter-btn {
  background: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--btn-shadow);
}

/* === Table === */
.table-wrapper {
  overflow-x: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.invoice-table th,
.invoice-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.invoice-table tr:last-child td {
  border-bottom: none;
}

.invoice-table th {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.invoice-table tbody tr {
  transition: background 0.15s;
}

.invoice-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.amount-cell {
  font-family: 'Montserrat', monospace;
  font-weight: 600;
}

/* === Badges === */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-paid { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-pending { background: rgba(251, 191, 36, 0.12); color: var(--warning); }
.badge-expired { background: rgba(220, 38, 38, 0.12); color: var(--danger); }

/* === Empty state === */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
}

.empty-state a { color: var(--accent); text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

/* === Login wrapper (centered) === */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* === Loading Spinner === */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--cashapp);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

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

/* === Waiting Pulse Icon === */
.waiting-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.waiting-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--warning);
  animation: waitPulse 1.5s ease-in-out infinite;
}

@keyframes waitPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  50% { transform: scale(1.1); opacity: 0.8; box-shadow: 0 0 0 16px rgba(251, 191, 36, 0); }
}

/* === Info Box (detail rows) === */
.info-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 0;
  margin: 1.25rem 0;
  overflow: hidden;
  text-align: left;
  position: relative;
  z-index: 1;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--card-border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* === CrazyWin Footer (centered, sub-brand) === */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.footer-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

/* Footer logo */
.footer-logo {
  display: inline-block;
}

.footer-logo-img {
  height: 36px;
  width: auto;
}

@media (min-width: 640px) {
  .footer-logo-img { height: 42px; }
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: -0.01em;
}

.footer-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.2s;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

/* === Dashboard: full-width layout === */
.container-dashboard {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 2rem 2.5rem;
  flex: 1;
}

/* Dashboard navbar: space-between with tabs */
.navbar-dashboard {
  justify-content: space-between;
  max-width: 100%;
  padding: 1rem 2.5rem;
}

/* Dashboard nav tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-tab {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* User info in nav */
.nav-user {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Date filter bar */
.date-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.date-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.date-filter-form .btn {
  min-width: 5rem;
  text-align: center;
}

/* Custom date picker wrapper */
.date-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.date-input-wrapper label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-input-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 150px;
}

.date-input-box:hover {
  border-color: var(--card-border-hover);
  background: rgba(255, 255, 255, 0.1);
}

.date-input-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.date-input-box input[type="date"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.date-display {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
}

/* Row animations */
.invoice-row-new {
  animation: rowSlideIn 0.5s ease-out;
  background: rgba(37, 99, 235, 0.08);
}

.invoice-row-updated {
  animation: rowFlash 1.5s ease-out;
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rowFlash {
  0% { background: rgba(16, 185, 129, 0.15); }
  100% { background: transparent; }
}

/* Auth tabs (login/register) */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
}

.auth-tab {
  flex: 1;
  padding: 0.65rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Responsive === */
@media (max-width: 600px) {
  .nav-center { display: none; }
  .navbar-inner { padding: 0.75rem 1rem; }
  .nav-logo-img { height: 32px; }
  .nav-powered { font-size: 0.6rem; margin-left: 0.5rem; padding-left: 0.5rem; }
  .container { padding: 0 1rem; margin-top: 1rem; }
  .modal-center { padding: 1rem; }
  .card { padding: 1.25rem; }
  .card h1 { font-size: 1.15rem; }
  .card .subtitle { font-size: 0.8rem; margin-bottom: 1rem; }
  .field input { padding: 0.6rem 0.8rem; font-size: 0.9rem; }
  .field-row { gap: 0.5rem; }
  .input-prefix { padding: 0.6rem 0 0.6rem 0.8rem; font-size: 1rem; }
  .input-with-prefix input { font-size: 1rem; }
  .btn-large { padding: 0.75rem 1.2rem; font-size: 0.9rem; }
  .form { gap: 0.75rem; }
  .info-box { margin: 0.75rem 0; }
  .info-row { padding: 0.55rem 0.75rem; }
  .info-label { font-size: 0.7rem; }
  .info-value { font-size: 0.8rem; }
  .btn-row { margin-top: 0.5rem; }
  .status-pending { padding: 0.65rem; font-size: 0.8rem; }
  .waiting-icon { margin-bottom: 0.5rem; }
  .waiting-pulse { width: 36px; height: 36px; }
  .loading-spinner { width: 36px; height: 36px; margin-bottom: 0.75rem; }
  .check-icon { font-size: 2rem; }
  .footer-inner { padding: 1.5rem 1rem; }
  .footer-logo-img { height: 28px; }
  .footer-tagline { font-size: 0.75rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .container-dashboard { padding: 1rem; }
  .navbar-dashboard { padding: 0.75rem 1rem; }
  .nav-tabs { display: none; }
  .nav-user { display: none; }
  .date-filter-bar { flex-direction: column; align-items: flex-start; }
  .date-filter-bar .page-title { font-size: 1.2rem; margin-bottom: 0; }
  .date-filter-form { width: 100%; }
  .date-input-wrapper { flex: 1; min-width: 0; }
  .date-input-box { min-width: 0; }
}

/* Mobile tabs: hidden by default */
.nav-tabs-mobile {
  display: none;
}

@media (max-width: 600px) {
  .nav-tabs-mobile {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
  }
  .nav-tabs-mobile .nav-tab {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
  }
}
