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

:root {
  --bg: #07090e;
  --bg-2: #0f1520;
  --bg-3: #141c2a;
  --ink: #f4f7fb;
  --muted: #a8b4c4;
  --accent: #36f0c2;
  --accent-2: #ff7a18;
  --accent-3: #5cd1ff;
  --danger: #ff3b6b;
  --radius: 22px;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.12);
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 20%, rgba(54, 240, 194, 0.18), transparent 45%),
    radial-gradient(circle at 80% 15%, rgba(255, 122, 24, 0.16), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(92, 209, 255, 0.18), transparent 45%),
    linear-gradient(120deg, var(--bg) 20%, var(--bg-2) 70%);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-repeat: no-repeat;
}

.ambient {
  position: fixed;
  inset: -20%;
  background: repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 8px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

.logo {
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 2px;
  color: inherit;
  text-decoration: none;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  box-shadow: 0 0 14px rgba(54, 240, 194, 0.6);
}

.btn {
  border: 1px solid transparent;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(92, 209, 255, 0.9);
  outline-offset: 3px;
}

.btn.solid {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0a0d12;
}

.btn.outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(54, 240, 194, 0.12);
  border: 1px solid rgba(54, 240, 194, 0.35);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.link-btn {
  text-decoration: none;
}

main {
  flex: 1;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.site-footer {
  padding: 40px 6vw 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 14, 0.6);
}

.footer-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 6vw;
  position: sticky;
  top: 0;
  z-index: 9;
  background: rgba(7, 9, 14, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.compact {
  position: static;
  background: transparent;
  border-bottom: none;
}

.register-screen {
  padding-top: 40px;
}

.register-card {
  gap: 22px;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.span-2 {
  grid-column: 1 / -1;
}

.auth-card textarea {
  background: rgba(10, 13, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
}

.auth-card small,
.form-section small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.form-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 60px;
  align-items: center;
  padding: 80px 8vw;
}

.auth-brand h1 {
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  font-size: clamp(32px, 5vw, 54px);
  margin: 24px 0 20px;
}

.auth-brand p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 480px;
}

.auth-highlights {
  margin-top: 32px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.auth-highlights strong {
  display: block;
  font-size: 22px;
}

.auth-highlights span {
  color: var(--muted);
  font-size: 13px;
}

.auth-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border-radius: 28px;
  padding: 36px;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card h2 {
  font-size: 24px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.auth-card input {
  background: rgba(10, 13, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
}

.auth-card input:focus {
  outline: 2px solid rgba(54, 240, 194, 0.4);
}

.auth-card textarea:focus {
  outline: 2px solid rgba(54, 240, 194, 0.4);
}

.app-shell {
  display: none;
  min-height: 100vh;
}

body.is-authenticated .auth-screen {
  display: none;
}

body.is-authenticated .app-shell {
  display: block;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 6vw;
  background: rgba(7, 9, 14, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 20px;
}

.shop-switcher {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shop-switcher .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
}

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

.switcher select {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-badge.confirmed {
  background: rgba(54, 240, 194, 0.16);
  color: var(--accent);
  border: 1px solid rgba(54, 240, 194, 0.4);
}

.status-badge.pending {
  background: rgba(255, 122, 24, 0.16);
  color: var(--accent-2);
  border: 1px solid rgba(255, 122, 24, 0.4);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 32px;
  padding: 32px 6vw 80px;
}

.sidebar {
  background: rgba(15, 21, 32, 0.75);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  display: grid;
  gap: 20px;
  height: fit-content;
  box-shadow: var(--shadow);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-head h3 {
  font-size: 18px;
}

.count {
  font-size: 12px;
  color: var(--muted);
}

.payment-list {
  display: grid;
  gap: 14px;
}

.payment-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.payment-item strong {
  display: block;
  font-size: 14px;
}

.payment-item span {
  font-size: 12px;
  color: var(--muted);
}

.tag {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid transparent;
}

.payment-item.active .tag,
.tag.active {
  background: rgba(54, 240, 194, 0.14);
  color: var(--accent);
  border-color: rgba(54, 240, 194, 0.4);
}

.payment-item.paid .tag,
.tag.success {
  background: rgba(92, 209, 255, 0.14);
  color: var(--accent-3);
  border-color: rgba(92, 209, 255, 0.4);
}

.payment-item.expired .tag {
  background: rgba(255, 59, 107, 0.14);
  color: var(--danger);
  border-color: rgba(255, 59, 107, 0.4);
}

.tag.warning {
  background: rgba(255, 122, 24, 0.14);
  color: var(--accent-2);
  border-color: rgba(255, 122, 24, 0.4);
}

.dashboard {
  display: grid;
  gap: 28px;
}

.dash-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border-radius: 22px;
  padding: 22px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-card strong {
  font-size: 26px;
}

.stat-card em {
  color: var(--accent);
  font-style: normal;
  font-size: 13px;
}

.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.panel {
  background: rgba(15, 21, 32, 0.8);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h3 {
  font-size: 18px;
}

.panel-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(54, 240, 194, 0.16);
  color: var(--accent);
  border: 1px solid rgba(54, 240, 194, 0.4);
}

.pill.violet {
  background: rgba(92, 209, 255, 0.16);
  color: var(--accent-3);
  border-color: rgba(92, 209, 255, 0.4);
}

.pill.danger {
  background: rgba(255, 59, 107, 0.16);
  color: var(--danger);
  border-color: rgba(255, 59, 107, 0.4);
}

.chart {
  width: 100%;
  height: 200px;
}

.chart-line {
  fill: none;
  stroke: url(#turnoverLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 20px rgba(54, 240, 194, 0.25));
}

.chart-line.alt {
  stroke: url(#txnLine);
  filter: drop-shadow(0 10px 20px rgba(92, 209, 255, 0.25));
}

.chart-fill {
  fill: url(#turnoverFill);
}

.chart-fill.alt {
  fill: url(#txnFill);
}

.board-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.board {
  display: grid;
  gap: 14px;
}

.board-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.board-row-item strong {
  font-size: 14px;
}

.board-row-item span {
  font-size: 12px;
  color: var(--muted);
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet.secondary {
  opacity: 0.6;
}

.wallet span {
  color: var(--muted);
  font-size: 12px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.store-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.status-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-actions p {
  color: var(--muted);
  margin: 12px 0 20px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.7);
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(720px, 95vw);
  background: rgba(15, 21, 32, 0.95);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-subtitle {
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.modal-form {
  display: grid;
  gap: 20px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section h4 {
  font-size: 16px;
}

.modal-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.modal-form input,
.modal-form textarea {
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: inherit;
}

.modal-form small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

body.is-loaded .panel,
body.is-loaded .stat-card,
body.is-loaded .payment-item,
body.is-loaded .auth-card {
  animation: rise 0.9s ease forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-screen {
    padding: 60px 6vw;
  }

  .app-header .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-header {
    gap: 10px;
    padding: 18px 5vw;
  }

  .site-header .logo {
    flex: 0 0 auto;
    gap: 8px;
    font-size: 16px;
    letter-spacing: 1.5px;
  }

  .site-header .logo-dot {
    width: 10px;
    height: 10px;
  }

  .site-header .header-actions {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .site-header .header-actions .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-header .header-actions {
    width: 100%;
    margin-left: 0;
  }

  .site-header .header-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
