
/* /src/styles/design-system.css */
/* Servipro QC — Web Design System tokens
 * Blue/gray palette anchored to --c-primary + --c-surface/--c-bg.
 * All semantic colors live here; do not hardcode hex/oklch in components.
 */

@font-face { font-display: swap; }

:root {
  /* Surfaces */
  --c-bg:         oklch(0.96 0.005 250);
  --c-surface:    oklch(1 0 0);
  --c-surface-2:  oklch(0.975 0.005 250);
  --c-border:     oklch(0.90 0.008 250);
  --c-border-2:   oklch(0.86 0.010 250);
  --c-divider:    oklch(0.93 0.006 250);

  /* Ink scale */
  --c-ink-1: oklch(0.20 0.020 260);
  --c-ink-2: oklch(0.36 0.020 260);
  --c-ink-3: oklch(0.52 0.018 260);
  --c-ink-4: oklch(0.66 0.015 260);
  --c-ink-5: oklch(0.78 0.010 260);

  /* Brand (blue) */
  --c-primary:      oklch(0.55 0.16 250);
  --c-primary-50:   oklch(0.96 0.03 250);
  --c-primary-100:  oklch(0.92 0.05 250);
  --c-primary-900:  oklch(0.32 0.10 250);

  /* Status */
  --c-ok:      oklch(0.62 0.14 152);
  --c-ok-bg:   oklch(0.95 0.04 152);
  --c-warn:    oklch(0.72 0.16 75);
  --c-warn-bg: oklch(0.96 0.06 80);
  --c-crit:    oklch(0.60 0.20 25);
  --c-crit-bg: oklch(0.96 0.04 25);
  --c-info:    oklch(0.60 0.13 230);
  --c-info-bg: oklch(0.96 0.03 230);

  /* Radius / shadow */
  --r-2: 3px;
  --r-3: 6px;
  --r-4: 10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);

  /* Type */
  --font-sans: "Inter", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Shared utility classes (mirroring web.jsx conventions) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--c-ink-4); font-weight: 500;
}
.mono { font-family: var(--font-mono); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  font-weight: 600; line-height: 1.4;
}
.pill-ok   { background: var(--c-ok-bg);   color: var(--c-ok); }
.pill-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.pill-crit { background: var(--c-crit-bg); color: var(--c-crit); }
.pill-info { background: var(--c-info-bg); color: var(--c-info); }

/* App shell */
.w-app {
  background: var(--c-bg);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  font-family: var(--font-sans);
  color: var(--c-ink-1);
}
.w-topbar {
  grid-column: 1 / -1;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; padding: 0 20px; gap: 16px;
}
.w-brand { display: flex; align-items: center; gap: 10px; width: 220px; }
.w-logo {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--c-primary-900); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: -0.02em;
}
.w-brandname { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.w-brandsub  { font-size: 10px; color: var(--c-ink-3); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

.w-search { flex: 1; max-width: 460px; position: relative; }
.w-search input {
  width: 100%; box-sizing: border-box;
  height: 32px; border: 1px solid var(--c-border); border-radius: 4px;
  padding: 0 12px 0 32px; font-family: var(--font-sans); font-size: 13px;
  background: var(--c-surface-2); color: var(--c-ink-1); outline: none;
}
.w-search input:focus { border-color: var(--c-primary); }
.w-search input::placeholder { color: var(--c-ink-4); }
.w-search > svg { position: absolute; left: 10px; top: 9px; color: var(--c-ink-3); }
.w-search kbd {
  position: absolute; right: 8px; top: 7px; background: var(--c-surface);
  border: 1px solid var(--c-border); padding: 0 5px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 10px; color: var(--c-ink-3);
}

.w-nav {
  background: var(--c-surface-2); border-right: 1px solid var(--c-border);
  padding: 16px 0; overflow: auto; display: flex; flex-direction: column;
}
.w-nav-section {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-ink-4); padding: 8px 16px; margin-top: 4px;
}
.w-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 16px;
  font-size: 13px; color: var(--c-ink-2); border-left: 2px solid transparent;
  font-weight: 500; cursor: pointer; text-decoration: none;
}
.w-nav-item:hover { background: var(--c-surface); color: var(--c-ink-1); }
.w-nav-item.active {
  color: var(--c-primary); background: var(--c-primary-50);
  border-left-color: var(--c-primary); font-weight: 600;
}
.w-nav-item .count {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  background: var(--c-border); color: var(--c-ink-3);
  padding: 1px 6px; border-radius: 8px; font-weight: 500;
}
.w-nav-item .count.crit { background: var(--c-crit-bg); color: var(--c-crit); }
.w-nav-item .count.warn { background: var(--c-warn-bg); color: var(--c-warn); }

.w-main { overflow: auto; padding: 20px 24px; }

.w-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--c-border);
  gap: 16px;
}
.w-page-title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.w-page-sub { font-family: var(--font-mono); font-size: 11px; color: var(--c-ink-3); letter-spacing: 0.04em; margin-top: 4px; }
.w-actions { display: flex; gap: 8px; align-items: center; }

.w-btn {
  height: 32px; padding: 0 12px; border: 1px solid var(--c-border-2);
  background: var(--c-surface); border-radius: 4px; font-size: 12px;
  font-family: var(--font-sans); font-weight: 500; color: var(--c-ink-2);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.w-btn:hover { background: var(--c-surface-2); color: var(--c-ink-1); }
.w-btn.primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.w-btn.primary:hover { background: var(--c-primary-900); }
.w-btn.danger-tint { color: var(--c-crit); border-color: oklch(0.85 0.07 25); background: var(--c-crit-bg); }

.w-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-3);
}
.w-card-head {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--c-divider);
}
.w-card-title { font-size: 13px; font-weight: 600; color: var(--c-ink-1); }
.w-card-meta  { font-family: var(--font-mono); font-size: 11px; color: var(--c-ink-4); margin-top: 2px; }

.w-tab {
  display: inline-flex; padding: 4px;
  background: var(--c-surface-2); border-radius: 4px; gap: 2px;
  border: 1px solid var(--c-border);
}
.w-tab > button {
  padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--c-ink-3);
  border-radius: 3px; border: none; background: transparent;
  font-family: var(--font-sans); cursor: pointer;
}
.w-tab > button.active {
  background: var(--c-surface); color: var(--c-ink-1);
  font-weight: 600; box-shadow: var(--shadow-sm);
}
