:root {
  --bg: #f5f8ff;
  --bg-soft: rgba(94, 112, 173, 0.08);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-border: rgba(17, 32, 76, 0.08);
  --text: #10204b;
  --muted: #62708f;
  --brand: #6d2ce5;
  --brand-strong: #5225dd;
  --accent: #1dbaf4;
  --accent-soft: #7dd8fb;
  --panel-bg: rgba(7, 19, 50, 0.95);
  --panel-bg-soft: rgba(10, 26, 66, 0.92);
  --panel-text: #f5f8ff;
  --panel-muted: #9fb2da;
  --line: rgba(96, 119, 183, 0.15);
  --danger: #ff6b6b;
  --warning: #d59516;
  --success: #29d79b;
  --radius-lg: 30px;
  --radius-md: 20px;
  --shadow: 0 26px 80px rgba(18, 38, 86, 0.14);
  --panel-shadow: 0 24px 64px rgba(5, 11, 30, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(109, 44, 229, 0.13), transparent 24%),
    radial-gradient(circle at top right, rgba(29, 186, 244, 0.16), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, #eef4ff 45%, #e9effc 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.5;
  pointer-events: none;
}

.orb-a {
  top: -100px;
  left: -70px;
  width: 320px;
  height: 320px;
  background: rgba(109, 44, 229, 0.16);
}

.orb-b {
  right: -80px;
  top: 220px;
  width: 280px;
  height: 280px;
  background: rgba(29, 186, 244, 0.16);
}

.grid-noise {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 32, 75, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 75, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 92%);
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px 16px 124px;
}

.hero {
  display: grid;
  gap: 18px;
  animation: fade-up 450ms ease;
}

.hero--landing {
  gap: 22px;
}

.hero__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 32px;
  border: 1px solid rgba(122, 144, 208, 0.18);
  background:
    radial-gradient(circle at top right, rgba(29, 186, 244, 0.18), transparent 30%),
    radial-gradient(circle at top left, rgba(109, 44, 229, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(12, 27, 63, 0.98), rgba(6, 15, 36, 0.96)),
    var(--panel-bg);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px);
  color: var(--panel-text);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark--stacked,
.brand-mark--inline {
  max-width: 720px;
}

.brand-wordmark {
  display: block;
  height: auto;
  max-width: 100%;
}

.brand-wordmark--hero {
  width: min(100%, 240px);
}

.brand-wordmark--compact {
  width: min(100%, 188px);
}

.brand-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.9rem, 6vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.title--compact {
  font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.subtitle {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--panel-text);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero__header .eyebrow {
  color: var(--accent-soft);
}

.hero__header .title {
  color: var(--panel-text);
}

.hero__header .subtitle {
  color: var(--panel-muted);
}

.login-card {
  padding: 24px;
  border: 1px solid var(--surface-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.92)),
    rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel,
.feature-card,
.metric-card,
.speed-card,
.table-card,
.support-card,
.invoice-card,
.note-card,
.nav-shell {
  border: 1px solid rgba(122, 144, 208, 0.18);
  background:
    linear-gradient(180deg, rgba(12, 27, 63, 0.98), rgba(6, 15, 36, 0.96)),
    var(--panel-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px);
  color: var(--panel-text);
}

.login-grid {
  display: grid;
  gap: 20px;
}

.login-copy {
  display: grid;
  gap: 12px;
}

.login-copy h2,
.section-title {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.info-points {
  display: grid;
  gap: 12px;
}

.point {
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(237, 243, 255, 0.86), rgba(247, 250, 255, 0.98));
  border: 1px solid rgba(17, 32, 76, 0.07);
}

.point strong,
.stat-value,
.money {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  color: inherit;
}

.point span,
.helper,
.empty-state,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
}

.panel .muted,
.metric-card .muted,
.feature-card .muted,
.speed-card .muted,
.support-card .muted,
.invoice-card .muted,
.note-card .muted,
.panel .subtitle,
.speed-card .helper,
.section-header p,
.customer-meta,
.speed-stage,
.table-card .empty-state {
  color: var(--panel-muted);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 0.9rem;
}

.field input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(17, 32, 76, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
}

.field input:focus {
  border-color: rgba(29, 186, 244, 0.55);
  box-shadow: 0 0 0 4px rgba(29, 186, 244, 0.12);
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid rgba(17, 32, 76, 0.08);
  border-radius: 14px;
  background: rgba(237, 243, 255, 0.7);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-strong);
}

.button-row,
.tabbar,
.quick-actions,
.invoice-actions,
.speed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-strong), var(--accent));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(82, 37, 221, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--panel-text);
}

.login-card .btn-secondary {
  background: #edf3ff;
  border: 1px solid rgba(17, 32, 76, 0.08);
  color: var(--text);
}

.btn-success {
  background: linear-gradient(135deg, #0f2d75, var(--accent));
  color: #ffffff;
  font-weight: 700;
}

.feedback {
  min-height: 24px;
  color: var(--warning);
  font-size: 0.9rem;
}

.feedback.error {
  color: var(--danger);
}

.feedback.success {
  color: var(--success);
}

.dashboard {
  display: grid;
  gap: 18px;
  animation: fade-up 350ms ease;
}

.panel,
.metric-card,
.feature-card,
.table-card,
.speed-card,
.support-card {
  padding: 20px;
}

.metric-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-heading {
  display: grid;
  gap: 6px;
}

.customer-name {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 186, 244, 0.14);
  border: 1px solid rgba(29, 186, 244, 0.28);
  color: #bfefff;
}

.stats-grid,
.features-grid,
.cards-grid,
.invoices-grid,
.notes-grid {
  display: grid;
  gap: 14px;
}

.stats-grid,
.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.features-grid,
.invoices-grid,
.notes-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.metric-card strong,
.feature-card strong,
.table-card strong,
.support-card strong {
  display: block;
  font-size: 1rem;
}

.stat-label,
.card-tag {
  display: inline-block;
  color: #90a6d9;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-value--plan {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.15;
}

.section-block {
  display: grid;
  gap: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-header p {
  margin: 0;
  font-size: 0.92rem;
}

.invoice-card,
.note-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.featured-invoice {
  display: grid;
  gap: 14px;
}

.invoice-top,
.note-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.badge {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-open {
  background: rgba(255, 209, 102, 0.14);
  color: #ffd97b;
}

.badge-paid,
.badge-issued {
  background: rgba(41, 215, 155, 0.14);
  color: #abffd7;
}

.line-code {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: #dfeaff;
  word-break: break-word;
  font-size: 0.86rem;
}

.speed-card {
  display: grid;
  gap: 18px;
}

.trust-release-panel {
  display: grid;
  gap: 16px;
}

.speed-stage {
  min-height: 22px;
  font-size: 0.92rem;
}

.speed-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.speed-metric {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
}

.speed-metric strong {
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.nav-shell {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 560px);
  padding: 10px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(11, 25, 60, 0.94), rgba(6, 14, 35, 0.94)),
    rgba(6, 14, 35, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.tabbar {
  justify-content: space-between;
}

.tab-btn {
  flex: 1;
  justify-content: center;
  border-radius: 18px;
  padding: 12px 14px;
  background: transparent;
  color: var(--panel-muted);
  border: 0;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(109, 44, 229, 0.2), rgba(29, 186, 244, 0.16));
  color: var(--panel-text);
}

.logout-btn {
  padding: 12px 14px;
}

.support-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hidden {
  display: none !important;
}

.quick-actions--metric {
  margin-top: auto;
}

.btn-compact {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(calc(100% - 24px), 420px);
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(122, 144, 208, 0.24);
  box-shadow: 0 20px 44px rgba(7, 19, 50, 0.26);
  backdrop-filter: blur(14px);
  text-align: center;
  font-weight: 700;
  animation: fade-up 180ms ease;
}

.toast--success {
  background:
    linear-gradient(180deg, rgba(12, 27, 63, 0.98), rgba(6, 15, 36, 0.96)),
    var(--panel-bg);
  color: var(--success);
}

.toast--error {
  background:
    linear-gradient(180deg, rgba(54, 16, 20, 0.98), rgba(32, 10, 12, 0.96)),
    rgba(32, 10, 12, 0.96);
  color: #ffd6d6;
  border-color: rgba(255, 107, 107, 0.3);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 719px) {
  .hero__header,
  .brand-mark,
  .brand-mark--stacked,
  .brand-mark--inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-wordmark--hero {
    width: 210px;
  }

  .brand-wordmark--compact {
    width: 168px;
  }

  .toast {
    bottom: 178px;
  }
}

@media (min-width: 840px) {
  .app {
    padding-top: 42px;
  }

  .login-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
  }

  .hero {
    gap: 24px;
  }
}
