@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0b1f33;
  --navy-2: #102b45;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e0e8;
  --soft: #f4f7fa;
  --panel: #ffffff;
  --brand-surface: #f3faf6;
  --brand-surface-line: #d8ece4;
  --red: #e0262f;
  --teal: #13a6a6;
  --blue: #246bfe;
  --green: #16875d;
  --amber: #c77900;
  --shadow: 0 18px 55px rgba(11, 31, 51, .12);
  --sidebar: 280px;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
main { max-width: 100vw; overflow-x: hidden; }

.btn {
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 12px 28px rgba(224, 38, 47, .22); }
.btn-primary:hover { background: #c71922; transform: translateY(-1px); }
.btn-secondary { background: #fff; border-color: rgba(255,255,255,.7); color: var(--navy); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); }

.marketing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 78px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(243,250,246,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brand-surface-line);
  box-shadow: 0 8px 26px rgba(11,31,51,.06);
}
.brand-lockup img { width: 190px; height: 56px; object-fit: contain; filter: drop-shadow(0 8px 15px rgba(11,31,51,.08)); }
.marketing-nav nav { display: flex; gap: 24px; color: var(--navy); font-size: 14px; font-weight: 700; }
.marketing-nav nav a:hover { color: var(--red); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.marketing-nav .btn-ghost { color: var(--navy); border-color: var(--line); }
.marketing-nav .btn-ghost:hover { border-color: var(--navy); }

.hero {
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 92vh;
  padding: 118px clamp(20px, 5vw, 72px) 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
  background:
    radial-gradient(circle at 76% 44%, rgba(19,166,166,.16), transparent 34%),
    linear-gradient(115deg, #081727 0%, #111f3f 52%, #19264d 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -80px;
  z-index: 0;
  background-image: url("assets/flous-logo.png");
  background-repeat: repeat;
  background-size: clamp(260px, 24vw, 420px) auto;
  background-position: -24px 36px;
  filter: saturate(.9);
  opacity: .13;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(8,23,39,.55), rgba(8,23,39,.32) 45%, rgba(8,23,39,.58));
}
.hero > * { position: relative; z-index: 1; min-width: 0; max-width: 100%; }
.hero-content,
.hero-media { min-width: 0; }
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}
.hero .eyebrow { color: #ff5a65; }
.hero h1 {
  margin: 0;
  max-width: 790px;
  color: #fff;
  font-size: clamp(44px, 7vw, 86px);
  line-height: .98;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.hero h1 span,
.hero p:not(.eyebrow) span { display: block; }
.hero p:not(.eyebrow) {
  margin: 24px 0 0;
  max-width: 650px;
  color: #dbe5ef;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  overflow-wrap: break-word;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-media {
  min-height: 460px;
  position: relative;
  display: grid;
  place-items: center;
}
.hero-board {
  position: relative;
  width: min(420px, 90%);
  min-width: 0;
  background: rgba(255,255,255,.94);
  color: var(--navy);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 30px 85px rgba(0,0,0,.28);
  border-top: 4px solid var(--teal);
}
.board-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.board-head span { color: var(--muted); font-weight: 700; }
.board-head strong { font-size: 30px; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding-top: 18px; font-size: 14px; }
.board-grid span { color: var(--muted); }
.board-grid b { color: var(--navy); }

.feature-band,
.split-section,
.price-section,
.trust-section {
  padding: clamp(46px, 7vw, 92px) clamp(20px, 5vw, 72px);
}
.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.feature-band article {
  background: #fff;
  padding: 34px;
  min-height: 260px;
}
.feature-band span { color: var(--red); font-weight: 800; font-size: 13px; }
.feature-band h2,
.split-section h2,
.price-section h2,
.trust-section h2 {
  margin: 12px 0 14px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}
.feature-band p,
.split-section p,
.price-section p,
.trust-section p {
  color: var(--muted);
  line-height: 1.7;
}
.split-section,
.price-section {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: clamp(32px, 7vw, 92px);
  align-items: start;
  background: #fff;
}
.benefit-list {
  display: grid;
  gap: 12px;
}
.benefit-list div,
.price-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.benefit-list div { padding: 20px; display: grid; gap: 7px; }
.benefit-list span { color: var(--muted); line-height: 1.5; }
.price-section { background: #f9fbfd; }
.price-box {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.price-box li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px 14px 42px;
  position: relative;
  font-weight: 700;
}
.price-box li:before {
  content: "\2713";
  position: absolute;
  left: 16px;
  color: var(--green);
}
.trust-section {
  text-align: center;
  background: linear-gradient(180deg, var(--navy), #081927);
  color: #fff;
}
.trust-section h2 { color: #fff; }
.trust-section p { max-width: 700px; margin: 0 auto 26px; color: #cdd9e5; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background: var(--soft);
}
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--brand-surface);
  color: var(--navy);
  padding: 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--brand-surface-line);
  z-index: 30;
}
.app-brand { padding: 0 4px 18px; border-bottom: 1px solid var(--line); }
.app-brand img { width: 220px; height: 64px; object-fit: contain; display: block; margin: 0 auto; }
.app-brand small { display: block; color: var(--muted); text-align: center; line-height: 1.4; }
#appNav { display: grid; gap: 4px; padding: 18px 0; overflow: auto; }
.nav-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  background: transparent;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}
.nav-item:hover,
.nav-item.active { background: rgba(19,166,166,.12); color: var(--navy); }
.nav-item[disabled] { color: rgba(11,31,51,.35); cursor: not-allowed; }
.workspace-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid rgba(19,166,166,.2);
  display: grid;
  gap: 5px;
}
.workspace-card span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.workspace-card small { color: var(--muted); line-height: 1.45; }
.sidebar-demo { color: var(--navy); border-color: var(--line); margin-top: 12px; width: 100%; }

.app-main { min-width: 0; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 86px;
  padding: 18px clamp(18px, 3vw, 38px);
  background: rgba(244,247,250,.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.app-topbar p { margin: 0 0 3px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.app-topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 36px); color: var(--navy); }
.topbar-meta { display: flex; gap: 10px; align-items: center; }
.select-label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.select-label select,
.field input,
.field select,
.field textarea,
.quick-input {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 11px 12px;
  min-width: 0;
  outline: none;
}
.select-label select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.quick-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.12); }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.mobile-menu { display: none; }
.view-stage { padding: clamp(18px, 3vw, 38px); }

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}
.surface,
.metric-card,
.module-card,
.table-card,
.form-card,
.setup-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(11,31,51,.04);
}
.surface { padding: clamp(22px, 4vw, 38px); }
.surface h2 { margin: 0 0 12px; color: var(--navy); font-size: clamp(28px, 4vw, 44px); letter-spacing: 0; }
.surface p { margin: 0; color: var(--muted); line-height: 1.65; }
.setup-card { padding: 20px; }
.setup-card h3,
.module-card h3,
.table-card h3,
.form-card h3 { margin: 0 0 14px; color: var(--navy); }
.checklist { display: grid; gap: 9px; }
.check-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  color: #344054;
  font-weight: 700;
}
.check-item input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 1px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.metric-card { padding: 18px; min-height: 124px; display: grid; gap: 8px; align-content: start; }
.metric-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-card strong { color: var(--navy); font-size: clamp(24px, 3vw, 34px); }
.metric-card small { color: var(--muted); line-height: 1.4; }
.metric-card.warning { border-color: #f3c16b; background: #fff9ef; }
.metric-card.good { border-color: #a8dbc6; background: #f1fbf6; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.invoice-grid {
  grid-template-columns: minmax(300px, .86fr) minmax(520px, 1.14fr);
}
.module-card,
.table-card,
.form-card { padding: 20px; }
.module-card p { color: var(--muted); line-height: 1.55; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th,
.data-table td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.data-table tr:last-child td { border-bottom: 0; }
.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
  color: #344054;
}
.status.ok { background: #e8f7ef; color: var(--green); }
.status.warn { background: #fff4df; color: var(--amber); }
.status.bad { background: #ffecef; color: #be1620; }
.status.info { background: #eaf1ff; color: #1d5bd8; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; color: #475467; font-size: 13px; font-weight: 700; }
.field.wide { grid-column: 1 / -1; }
.field textarea { min-height: 92px; resize: vertical; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.timer-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
}
.timer-display {
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: center;
}
.timer-display strong { font-size: clamp(44px, 7vw, 72px); line-height: 1; }
.timer-display span { color: #c3d0dd; }
.pause-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.qr-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qr-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  padding: 18px;
  align-items: start;
}
.swiss-qr-code {
  width: 220px;
  aspect-ratio: 1;
  min-width: 0;
  justify-self: end;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  padding: 16px;
}
.swiss-qr-code canvas {
  display: block;
  width: 184px !important;
  height: 184px !important;
  max-width: 100%;
  image-rendering: pixelated;
}
.qr-loading {
  position: absolute;
  inset: auto 10px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.qr-ready .qr-loading { display: none; }
.qr-error { border-color: var(--red); }
.qr-bottom {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.security-list { display: grid; gap: 10px; margin-top: 14px; }
.security-list div { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; }
.security-list b { color: var(--navy); }
.permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.permission-grid span { padding: 8px 10px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 800; color: #475467; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: var(--navy);
  color: #fff;
  padding: 13px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  max-width: 360px;
}
.toast.show { transform: none; opacity: 1; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { min-height: 360px; order: -1; }
  .welcome-panel,
  .timer-panel,
  .split-section,
  .price-section { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .marketing-nav nav { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform .22s ease;
    width: min(86vw, 320px);
  }
  .app-sidebar.open { transform: none; box-shadow: 28px 0 80px rgba(0,0,0,.28); }
  .mobile-menu { display: inline-grid; place-items: center; }
  .app-topbar { align-items: flex-start; }
  .topbar-meta { flex-direction: column; align-items: stretch; }
  .feature-band,
  .module-grid,
  .invoice-grid,
  .price-box,
  .form-grid,
  .permission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .marketing-nav {
    height: auto;
    padding: 10px 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }
  .brand-lockup img { width: 138px; height: 42px; }
  .nav-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; width: min(280px, 100%); justify-self: center; }
  .nav-actions .btn { min-height: 36px; padding: 0 12px; width: 100%; font-size: 14px; }
  .hero { padding-top: 180px; overflow: hidden; }
  .hero-content { order: -1; width: min(320px, 100%); max-width: 320px; justify-self: start; }
  .hero h1 { font-size: 40px; }
  .hero-media { min-height: 250px; width: 100%; }
  .hero p:not(.eyebrow),
  .hero-actions { max-width: 320px; }
  .hero-board { width: min(310px, 100%); padding: 18px; }
  .board-head strong { font-size: 25px; }
  .hero-actions,
  .button-row { flex-direction: column; }
  .hero-actions .btn,
  .button-row .btn { width: 100%; }
  .metrics-grid { grid-template-columns: 1fr; }
  .app-topbar { flex-wrap: wrap; }
  .topbar-meta { width: 100%; }
  .select-label select { width: 100%; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .qr-top,
  .qr-bottom,
  .security-list div,
  .pause-row { grid-template-columns: 1fr; }
  .swiss-qr-code { justify-self: start; width: 220px; max-width: 100%; }
}
