:root {
  --ink: #132120;
  --ink-soft: #4c5d59;
  --ink-muted: #72827d;
  --paper: #f5efe3;
  --paper-strong: #fffaf0;
  --paper-deep: #f0e6d4;
  --coal: #16211f;
  --coal-soft: #22312f;
  --signal: #ffbc35;
  --signal-deep: #ef7122;
  --accent: #16887d;
  --accent-soft: #d8f1ec;
  --warning: #fff0c5;
  --line: rgba(19, 33, 32, 0.1);
  --line-strong: rgba(19, 33, 32, 0.18);
  --panel: rgba(255, 251, 243, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 44px rgba(14, 18, 18, 0.12);
  --shadow-deep: 0 32px 72px rgba(14, 18, 18, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-display: "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(255, 188, 53, 0.28), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(22, 136, 125, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(239, 113, 34, 0.14), transparent 30%),
    linear-gradient(180deg, #f8f3e9 0%, #ede2cf 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 65%);
  opacity: 0.35;
}

body.app-body {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

input,
textarea {
  width: 100%;
  font-size: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(22, 136, 125, 0.55);
  box-shadow: 0 0 0 4px rgba(22, 136, 125, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  width: min(100%, 560px);
  height: 100dvh;
  margin: 0 auto;
  padding:
    max(10px, env(safe-area-inset-top))
    10px
    max(12px, env(safe-area-inset-bottom))
    10px;
}

.app-main {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0 8px;
}

.panel {
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.84), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(255, 188, 53, 0.05), rgba(22, 136, 125, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.utility-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.utility-brand {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.utility-brand-head,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.utility-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.trial-hint {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 24rem;
}

.compact-link {
  min-height: 42px;
}

.brand-mark,
.company-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--signal), var(--signal-deep));
  color: var(--coal);
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  box-shadow:
    inset 0 -14px 24px rgba(0, 0, 0, 0.12),
    0 10px 24px rgba(239, 113, 34, 0.2);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

h1 {
  font-size: 1.48rem;
}

h2 {
  font-size: clamp(2.6rem, 9vw, 4rem);
  line-height: 0.92;
}

h3 {
  font-size: 1.45rem;
}

h4 {
  font-size: 1.08rem;
}

.hero-copy p:last-child,
.welcome-copy p:last-child,
.voice-stage-note,
.review-card-head p,
.history-intro span,
.field-help,
.billing-card p,
.modal-card p,
.empty-state,
.invoice-footer {
  color: var(--ink-soft);
  line-height: 1.55;
}

.invoice-helper {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.eyebrow,
.badge,
.tab-text,
.welcome-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--signal-deep);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(19, 33, 32, 0.08);
  color: var(--ink-soft);
}

.badge-accent {
  background: rgba(22, 136, 125, 0.14);
  color: #0e675f;
}

.badge-success {
  background: rgba(22, 136, 125, 0.18);
  color: #0e675f;
}

.badge-warning {
  background: rgba(255, 188, 53, 0.28);
  color: #9a6400;
}

.badge-neutral {
  background: rgba(19, 33, 32, 0.08);
}

.badge-trial {
  background: rgba(255, 188, 53, 0.24);
  color: #925d00;
}

.utility-strip .badge {
  min-height: 36px;
  padding: 8px 12px;
}

.share-actions,
.action-row,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-link,
.primary-button,
.secondary-button,
.ghost-button,
.tab-button {
  min-height: 46px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(19, 33, 32, 0.1);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.compact {
  min-height: 42px;
  padding: 11px 14px;
}

.primary-button {
  background: linear-gradient(145deg, var(--signal), var(--signal-deep));
  color: var(--coal);
  box-shadow: 0 12px 26px rgba(239, 113, 34, 0.16);
}

.secondary-button {
  background: rgba(19, 33, 32, 0.08);
  color: var(--ink);
}

.ghost-button {
  background: transparent;
  border: 1px dashed rgba(19, 33, 32, 0.18);
  color: var(--ink-soft);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.tab-button:hover,
.record-button:hover {
  transform: translateY(-1px);
}

.tab-panel {
  display: none;
  gap: 14px;
  align-content: start;
}

.tab-panel.is-active {
  display: grid;
}

.hero-panel,
.welcome-guide,
.voice-panel,
.review-panel,
.preview-panel,
.history-panel,
.profile-panel {
  padding: 18px;
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 188, 53, 0.2), transparent 22%),
    linear-gradient(145deg, #172422 0%, #233432 60%, #2d4441 100%);
  color: var(--paper-strong);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-deep);
}

.hero-copy p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 250, 240, 0.76);
  max-width: 28rem;
}

.hero-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hero-step {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.hero-step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--signal), var(--signal-deep));
  color: var(--coal);
  font-family: var(--font-display);
  font-weight: 800;
}

.welcome-guide {
  display: grid;
  gap: 16px;
  text-align: center;
}

.welcome-copy p:last-child {
  margin: 10px 0 0;
}

.welcome-spotlight {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.welcome-arrow-wrap {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 188, 53, 0.18);
}

.welcome-arrow {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--signal-deep);
  animation: nudge 1.6s infinite ease-in-out;
}

.welcome-script {
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.welcome-script strong {
  font-size: 1.24rem;
  line-height: 1.35;
}

.welcome-label {
  color: rgba(255, 250, 240, 0.68);
}

.voice-panel {
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 188, 53, 0.12), transparent 24%),
    linear-gradient(145deg, #1a2624 0%, #223432 100%);
  color: var(--paper-strong);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-deep);
}

.voice-panel .eyebrow,
.voice-panel .badge {
  color: inherit;
}

.voice-panel .badge {
  background: rgba(255, 255, 255, 0.1);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.voice-stage {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 2px 0 4px;
}

.voice-stage-glow {
  position: absolute;
  top: 20px;
  width: 100%;
  height: 64%;
  background: radial-gradient(circle, rgba(255, 188, 53, 0.22), transparent 52%);
  filter: blur(30px);
  pointer-events: none;
  opacity: 0.72;
  animation: stageGlow 6s ease-in-out infinite;
}

.record-button {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  justify-items: center;
  width: min(326px, 82vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 22px;
  border: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(145deg, #172321 0%, #2a3a38 100%);
  color: var(--paper-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 34px 64px rgba(10, 13, 13, 0.32);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.record-button::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 53, 0.12);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.record-button:active {
  transform: scale(0.992);
}

.record-button.is-recording {
  animation: recordLive 1.8s ease-in-out infinite;
}

.record-button.is-recording::before {
  opacity: 1;
  transform: scale(1.02);
}

.record-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 182px;
  height: 182px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.record-ring::before,
.record-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 188, 53, 0.2);
  opacity: 0;
}

.record-button.is-recording .record-ring::before {
  animation: recordRipple 1.8s ease-out infinite;
}

.record-button.is-recording .record-ring::after {
  animation: recordRipple 1.8s ease-out 0.6s infinite;
}

.record-core {
  position: relative;
  width: 122px;
  height: 122px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--signal), var(--signal-deep));
  box-shadow:
    inset 0 -16px 26px rgba(0, 0, 0, 0.12),
    0 12px 26px rgba(239, 113, 34, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.record-button.is-recording .record-core {
  transform: scale(1.02);
  box-shadow:
    inset 0 -16px 26px rgba(0, 0, 0, 0.12),
    0 14px 30px rgba(239, 113, 34, 0.28);
}

.record-core::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 24px;
  width: 32px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: var(--coal);
}

.record-core::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 42px;
  height: 26px;
  transform: translateX(-50%);
  border: 6px solid var(--coal);
  border-top: 0;
  border-radius: 0 0 20px 20px;
}

.record-copy {
  display: grid;
  gap: 6px;
  text-align: center;
}

.record-copy strong {
  font-size: 1.68rem;
}

.record-copy span,
.voice-stage-note {
  color: rgba(255, 250, 240, 0.76);
}

.voice-stage-note {
  position: relative;
  z-index: 1;
  max-width: 18rem;
  margin: 0;
}

.speaking-prompt {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.speaking-prompt-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 250, 240, 0.72);
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.client-memory-hint {
  margin: 0;
  color: rgba(255, 250, 240, 0.76);
}

.processing-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.processing-card.is-processing {
  background:
    linear-gradient(145deg, rgba(255, 188, 53, 0.14), rgba(255, 250, 242, 0.08)),
    rgba(255, 250, 242, 0.08);
  border-color: rgba(255, 188, 53, 0.24);
}

.processing-copy {
  display: grid;
  gap: 4px;
}

.processing-copy p {
  margin: 0;
  color: rgba(255, 250, 240, 0.76);
}

.hidden-transcript,
.hidden-build {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.field,
.item-total {
  display: grid;
  gap: 8px;
}

.field span,
.item-total span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.review-panel {
  display: grid;
  gap: 14px;
}

.review-sheet {
  display: grid;
  gap: 12px;
}

.review-notice {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--warning);
  border: 1px solid rgba(239, 113, 34, 0.18);
  color: var(--ink);
}

.review-card,
.items-shell,
.profile-section,
.billing-card,
.mini-card,
.item-row,
.history-pill,
.history-intro {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(19, 33, 32, 0.08);
}

.review-card {
  padding: 16px 18px 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(252, 247, 238, 0.94)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 32px,
      rgba(19, 33, 32, 0.03) 32px,
      rgba(19, 33, 32, 0.03) 33px
    );
}

.review-card-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.review-card-head p {
  margin: 0;
}

.review-field {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(19, 33, 32, 0.12);
}

.review-field:last-child {
  border-bottom: 0;
}

.review-input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.08rem;
  font-weight: 800;
}

.review-input:focus {
  box-shadow: none;
  background: transparent;
}

.review-textarea {
  min-height: 56px;
}

.items-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.items-list {
  display: grid;
  gap: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(68px, 0.6fr) minmax(88px, 0.8fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.item-input {
  font-size: 1rem;
}

.item-total {
  min-width: 70px;
  padding-bottom: 6px;
}

.item-total strong {
  font-family: var(--font-display);
  font-size: 1.16rem;
}

.totals {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  box-shadow: var(--shadow);
}

.preview-totals {
  margin-top: 14px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.total-row-strong {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.total-row-strong strong {
  font-size: 1.42rem;
}

.audio-wrap audio {
  width: 100%;
}

.invoice-preview {
  padding: 20px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 247, 239, 0.96)),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 30px,
      rgba(19, 33, 32, 0.025) 30px,
      rgba(19, 33, 32, 0.025) 31px
    );
  border: 1px solid rgba(19, 33, 32, 0.08);
}

.invoice-preview.is-empty {
  padding: 0;
  background: transparent;
  border: 0;
}

.invoice-empty-state {
  display: grid;
  gap: 10px;
  padding: 26px 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(252, 247, 238, 0.94)),
    rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(19, 33, 32, 0.16);
  text-align: center;
}

.invoice-empty-state p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.invoice-header,
.invoice-meta,
.invoice-client,
.invoice-items,
.invoice-summary,
.invoice-footer {
  display: grid;
  gap: 10px;
}

.invoice-header {
  grid-template-columns: 1fr auto;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(19, 33, 32, 0.08);
}

.invoice-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.invoice-brand img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 18px;
}

.invoice-meta {
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(19, 33, 32, 0.04);
}

.invoice-items table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-items th,
.invoice-items td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(19, 33, 32, 0.08);
}

.invoice-items td:last-child,
.invoice-items th:last-child {
  text-align: right;
}

.invoice-summary {
  justify-items: end;
  margin-top: 12px;
}

.summary-box {
  width: min(100%, 320px);
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  display: grid;
  gap: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-line strong {
  font-family: var(--font-display);
}

.history-panel,
.profile-panel {
  display: grid;
  gap: 14px;
}

.upgrade-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  box-shadow: var(--shadow);
}

.upgrade-banner p {
  margin: 6px 0 0;
  color: rgba(255, 250, 240, 0.78);
}

.pro-benefits,
.tick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pro-benefits span,
.tick-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.tick-list {
  margin: 10px 0 0;
}

.tick-list span {
  background: rgba(19, 33, 32, 0.06);
  color: var(--ink);
}

.tick-list-dark span {
  background: rgba(19, 33, 32, 0.08);
  color: var(--ink);
}

.billing-soft-sell {
  margin: 4px 0 12px;
  color: var(--ink-soft);
}

.pro-nudge-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 188, 53, 0.14), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(239, 113, 34, 0.14);
}

.pro-nudge-card p:last-child {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.history-intro {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-pill {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(19, 33, 32, 0.08);
  box-shadow: var(--shadow);
}

.history-pill[open] {
  background: rgba(255, 255, 255, 0.84);
}

.history-pill-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.history-pill-summary::-webkit-details-marker {
  display: none;
}

.history-pill-main,
.history-pill-meta {
  display: grid;
  gap: 4px;
}

.history-pill-main strong {
  display: block;
  font-size: 1.02rem;
}

.history-pill-main span,
.history-pill-meta span {
  color: var(--ink-soft);
}

.history-pill-meta {
  justify-items: end;
  text-align: right;
}

.history-status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  background: rgba(19, 33, 32, 0.08);
}

.history-status-tag.is-success {
  background: rgba(22, 136, 125, 0.16);
  color: #0e675f;
}

.history-status-tag.is-warning {
  background: rgba(255, 188, 53, 0.28);
  color: #9a6400;
}

.history-status-tag.is-neutral {
  background: rgba(19, 33, 32, 0.08);
  color: var(--ink-soft);
}

.history-pill-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.history-pill-preview {
  padding: 16px;
}

.history-pill-preview .invoice-preview-shell {
  display: grid;
  gap: 10px;
}

.history-pill-preview .invoice-header,
.history-pill-preview .invoice-meta {
  grid-template-columns: 1fr;
}

.history-pill-preview .invoice-brand {
  align-items: flex-start;
}

.history-pill-preview .summary-box {
  width: 100%;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 30px 20px;
  border-radius: 24px;
  border: 1px dashed rgba(19, 33, 32, 0.18);
  color: var(--ink-soft);
  text-align: center;
}

.profile-form,
.profile-preview {
  display: grid;
  gap: 12px;
}

.profile-section,
.billing-card,
.mini-card {
  padding: 16px;
}

.profile-section-heading {
  margin-bottom: 12px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-help {
  margin: 12px 0 0;
}

.billing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.billing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(19, 33, 32, 0.08);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.billing-status.is-live {
  background: rgba(22, 136, 125, 0.18);
  color: #0e675f;
}

.billing-status.is-missing {
  background: rgba(255, 188, 53, 0.22);
  color: #996200;
}

.billing-status.is-error {
  background: rgba(239, 113, 34, 0.16);
  color: #a84b19;
}

.saved-clients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.saved-client-chip {
  display: inline-grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(19, 33, 32, 0.05);
  border: 1px solid rgba(19, 33, 32, 0.08);
}

.saved-client-chip strong {
  font-size: 0.92rem;
}

.saved-client-chip span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.help-stack {
  display: grid;
  gap: 10px;
}

.help-note {
  padding: 14px;
  border-radius: 18px;
  background: rgba(19, 33, 32, 0.05);
  border: 1px solid rgba(19, 33, 32, 0.08);
}

.help-note strong {
  display: block;
  margin-bottom: 4px;
}

.help-note p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 33, 32, 0.12);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.company-stamp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
}

.bottom-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.tab-button {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  border-radius: 20px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.tab-button.is-active {
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tab-icon {
  font-size: 1.18rem;
  line-height: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 19, 19, 0.58);
  backdrop-filter: blur(14px);
}

.modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
  padding: 24px 22px 20px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 238, 0.98)),
    linear-gradient(135deg, rgba(255, 188, 53, 0.05), rgba(22, 136, 125, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 34px 90px rgba(10, 13, 13, 0.3),
    0 0 0 1px rgba(19, 33, 32, 0.06);
  animation: rise 180ms ease both;
}

.modal-card p {
  margin: 0;
}

.modal-card h3 {
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  line-height: 0.96;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(19, 33, 32, 0.1);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
  box-shadow: var(--shadow-deep);
}

.toast.is-error {
  background: linear-gradient(145deg, #6f2316 0%, #8d331a 100%);
}

.toast.is-success {
  background: linear-gradient(145deg, #0f5f54 0%, #16887d 100%);
}

.toast-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper-strong);
  font-size: 1.35rem;
  line-height: 1;
}

.action-feedback-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  overflow: hidden;
}

.action-burst {
  position: fixed;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.action-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--signal);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.4);
  animation: feedback-burst 780ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.action-burst.is-paid .action-dot:nth-child(3n) {
  background: #16a085;
}

.action-burst.is-paid .action-dot:nth-child(3n + 1) {
  background: #ffbc35;
}

.action-burst.is-paid .action-dot:nth-child(3n + 2) {
  background: #ef7122;
}

.action-burst.is-share .action-dot {
  background: #16a085;
}

.action-burst.is-save .action-dot {
  background: #ffbc35;
}

.action-tag {
  position: fixed;
  min-width: 118px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid rgba(19, 33, 32, 0.08);
  box-shadow: 0 16px 36px rgba(14, 18, 18, 0.14);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0;
  transform: translate3d(-50%, 10px, 0) scale(0.92);
  animation: feedback-tag 900ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
}

.action-tag.is-paid {
  background: linear-gradient(145deg, #0f5f54 0%, #16887d 100%);
  color: var(--paper-strong);
}

.action-tag.is-share {
  background: linear-gradient(145deg, #172422 0%, #223330 100%);
  color: var(--paper-strong);
}

.panel.is-confirmed,
.history-pill.is-confirmed {
  animation: confirm-pop 480ms ease;
}

.action-row-primary {
  margin-top: 14px;
}

.edit-toggle-button {
  width: 100%;
}

.hidden {
  display: none !important;
}

.reveal {
  animation: rise 420ms ease both;
}

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

@keyframes recordLive {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 34px 64px rgba(10, 13, 13, 0.32),
      0 0 0 0 rgba(255, 188, 53, 0.16);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 38px 72px rgba(10, 13, 13, 0.34),
      0 0 0 12px rgba(255, 188, 53, 0);
  }
}

@keyframes recordRipple {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  18% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes stageGlow {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.02);
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes feedback-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.4);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0px), var(--dy, -40px), 0) scale(1);
  }
}

@keyframes feedback-tag {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 12px, 0) scale(0.92);
  }
  18% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) scale(1);
  }
  78% {
    opacity: 1;
    transform: translate3d(-50%, -4px, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -12px, 0) scale(0.98);
  }
}

@keyframes confirm-pop {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
  35% {
    transform: scale(1.01);
    box-shadow:
      var(--shadow-deep),
      0 0 0 5px rgba(22, 136, 125, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: 100%;
  }

  .panel-heading,
  .items-header {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-strip {
    grid-template-columns: 1fr;
  }

  .utility-actions {
    justify-items: stretch;
  }

  .utility-links {
    justify-content: stretch;
  }

  .share-actions,
  .action-row,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .utility-links,
  .share-actions,
  .billing-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-steps,
  .two-up,
  .three-up,
  .invoice-meta {
    grid-template-columns: 1fr;
  }

  .upgrade-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .pro-nudge-card {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: 1fr 1fr;
  }

  .item-field-wide,
  .item-total,
  .remove-item-button {
    grid-column: 1 / -1;
  }

  .history-pill-summary {
    grid-template-columns: 1fr;
  }

  .history-pill-meta {
    justify-items: start;
    text-align: left;
  }

  .invoice-header {
    grid-template-columns: 1fr;
  }
}
