/* Zapps Design System — monochrome soft UI (iDraft / Jobgio inspired) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --z-font: "Inter", system-ui, -apple-system, sans-serif;
  --z-bg: #f0f2f5;
  --z-surface: #ffffff;
  --z-surface-2: #f8f9fb;
  --z-text: #111827;
  --z-muted: #6b7280;
  --z-border: #e8eaef;
  --z-accent: #111827;
  --z-accent-soft: #374151;
  --z-radius: 20px;
  --z-radius-sm: 12px;
  --z-radius-pill: 999px;
  --z-shadow: 0 4px 24px rgba(17, 24, 39, 0.06);
  --z-shadow-lg: 0 12px 40px rgba(17, 24, 39, 0.08);
  --z-transition: 180ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --z-bg: #0f1117;
    --z-surface: #1a1d27;
    --z-surface-2: #222633;
    --z-text: #f3f4f6;
    --z-muted: #9ca3af;
    --z-border: #2e3344;
    --z-accent: #f9fafb;
    --z-accent-soft: #e5e7eb;
    --z-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --z-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.zapps-body {
  font-family: var(--z-font);
  background: var(--z-bg);
  color: var(--z-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Standalone page layout ── */
.zapps-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.zapps-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--z-text);
  margin-bottom: 32px;
}

.zapps-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--z-accent);
  color: var(--z-bg);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.zapps-brand__text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.zapps-brand__sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--z-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zapps-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--z-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--z-transition);
}

.zapps-back:hover {
  color: var(--z-text);
}

.zapps-page__header {
  margin-bottom: 28px;
}

.zapps-page__header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.zapps-page__header p {
  margin: 8px 0 0;
  color: var(--z-muted);
  font-size: 1rem;
  max-width: 42ch;
  line-height: 1.55;
}

.zapps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.zapps-card {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius);
  padding: 20px;
  box-shadow: var(--z-shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform var(--z-transition), box-shadow var(--z-transition);
}

.zapps-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--z-shadow-lg);
}

.zapps-card--disabled {
  opacity: 0.55;
  pointer-events: none;
}

.zapps-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: var(--z-surface-2);
  border: 1px solid var(--z-border);
  flex-shrink: 0;
}

.zapps-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.zapps-card__desc {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--z-muted);
  line-height: 1.45;
}

.zapps-card__meta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--z-muted);
  font-family: ui-monospace, monospace;
}

.zapps-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: var(--z-radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zapps-badge--live {
  background: #ecfdf5;
  color: #047857;
}

.zapps-badge--soon {
  background: var(--z-surface-2);
  color: var(--z-muted);
}

@media (prefers-color-scheme: dark) {
  .zapps-badge--live {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
  }
}

/* ── Shared components (tools) ── */
.zapps-tool-header {
  margin-bottom: 24px;
}

.zapps-tool-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.zapps-tool-header p {
  margin: 6px 0 0;
  color: var(--z-muted);
  font-size: 0.92rem;
}

.zapps-panel {
  background: var(--z-surface);
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius);
  padding: 24px;
  box-shadow: var(--z-shadow);
}

.zapps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--z-radius-pill);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--z-transition), transform var(--z-transition);
}

.zapps-btn--primary {
  background: var(--z-accent);
  color: var(--z-bg);
}

.zapps-btn--secondary {
  background: var(--z-surface);
  color: var(--z-text);
  border: 1px solid var(--z-border);
}

.zapps-btn:hover {
  opacity: 0.88;
}

.zapps-btn:active {
  transform: scale(0.98);
}

.zapps-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-sm);
  background: var(--z-surface);
  color: var(--z-text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--z-transition);
}

.zapps-input:focus {
  border-color: var(--z-accent-soft);
}

.zapps-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--z-muted);
  margin-bottom: 6px;
}

.zapps-field {
  margin-bottom: 14px;
}

.zapps-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.zapps-tab {
  padding: 9px 16px;
  border: 1px solid var(--z-border);
  border-radius: var(--z-radius-pill);
  background: var(--z-surface);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--z-muted);
  cursor: pointer;
}

.zapps-tab--active {
  background: var(--z-accent);
  color: var(--z-bg);
  border-color: var(--z-accent);
}

.zapps-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--z-muted);
  border: 1px dashed var(--z-border);
  border-radius: var(--z-radius);
}
