/* Colors/fonts come from assets/tokens.css (the shared Fieldstack design set)
   and motion from assets/motion.css -- both copied verbatim from a sibling
   product, not regenerated for this one, to keep the whole family visually
   identical. Edit the token/motion documents in that project, not the
   values below. */

:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* fieldstack-hub.trade-industrial motion, control.hover (state, 120ms,
   standard easing) -- wired as a CSS transition rather than the generated
   assets/motion.css keyframe class, since a hover is a continuous state
   that must reverse on pointer-leave, not a 1-shot trigger. The 120ms/
   cubic-bezier(0.4,0,0.2,1) values match the motion library exactly. */
.primary,
.secondary {
  transition: transform 120ms cubic-bezier(0.4, 0.0, 0.2, 1),
              filter 120ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.primary:hover,
.secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .primary,
  .secondary {
    transition: none;
  }
}

body {
  margin: 0;
  font-family: var(--semantic-font-body);
  background: var(--semantic-surface-base);
  color: var(--semantic-text-default);
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--semantic-font-heading);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--semantic-text-heading);
  margin-bottom: 0.5rem;
}

h1 img {
  width: 2rem;
  height: 2rem;
}

.intro {
  color: var(--semantic-text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

#status {
  color: var(--semantic-text-muted);
}

#status.ok {
  color: var(--semantic-status-success);
}

#status.error {
  color: var(--semantic-status-danger);
}

.card {
  background: var(--component-card-background);
  border: 1px solid var(--component-card-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.card h2 {
  font-family: var(--semantic-font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
  color: var(--semantic-text-heading);
}

.card label {
  display: block;
  font-size: 0.85rem;
  color: var(--semantic-text-muted);
  margin-bottom: 0.75rem;
}

.card input[type="text"],
.card input[type="number"],
.card input[type="date"],
.card select,
.card textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem;
  border: 1px solid var(--component-input-border);
  border-radius: 4px;
  font: inherit;
  background: var(--component-card-background);
  color: var(--semantic-text-default);
}

.card textarea {
  resize: vertical;
}

.card input:hover,
.card input:focus,
.card select:hover,
.card select:focus,
.card textarea:hover,
.card textarea:focus {
  border-color: var(--semantic-accent-decorative);
}

.branding {
  display: flex;
  flex-direction: column;
}

#logoPreview {
  max-width: 96px;
  max-height: 96px;
  margin: 0.5rem 0;
  border-radius: 4px;
}

#signaturePad {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 140px;
  border: 1px dashed var(--semantic-border-default);
  border-radius: 6px;
  /* Signature ink is a fixed dark navy (script.js's ctx.strokeStyle) so it
     reads correctly on the printed PDF -- this pad stays a light, paper-like
     surface regardless of the app's dark theme so the ink stays legible.
     base-bone-100 is the closest off-white token the shared token set
     defines; the old app-specific --base-white token no longer exists now
     that assets/tokens.css is the hub's pinned set. */
  background: var(--base-bone-100);
  touch-action: none;
  cursor: crosshair;
}

.primary {
  display: block;
  width: 100%;
  padding: 0.85rem;
  font-family: var(--semantic-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  color: var(--component-button-primary-foreground);
  background: var(--component-button-primary-background);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
}

.primary:hover {
  background: var(--component-button-primary-hover);
}

.secondary {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.6rem;
  font-family: var(--semantic-font-body);
  font-size: 0.9rem;
  color: var(--component-button-secondary-foreground);
  background: transparent;
  border: 1px solid var(--component-button-secondary-border);
  border-radius: 6px;
  cursor: pointer;
}

.secondary:hover {
  border-color: var(--semantic-accent-decorative);
}

.total p#totalValue {
  font-family: var(--semantic-font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--semantic-accent-decorative);
  margin: 0;
}

#pdfStatus.ok {
  color: var(--semantic-status-success);
}

#pdfStatus.error {
  color: var(--semantic-status-danger);
}

.paywall h2 {
  color: var(--semantic-text-heading);
}

.paywall p {
  color: var(--semantic-text-default);
  line-height: 1.5;
}

.hint {
  font-size: 0.85rem;
  color: var(--semantic-text-muted);
  margin: 0.5rem 0 0;
}
