/*
  Nefes Medikal ortak tema (shared).

  ProsesTakip src/styles/global.css V1.06.1 kopyasidir; su an sadece TechnicalService
  kullanir. ProsesTakip kendi kopyasini kullanmaya devam eder (ileride buraya gecebilir).
*/

/*
  Design tokens for the ProsesTakip factory-floor kiosk app.

  This app runs full-screen on a tablet mounted at an assembly station, so
  the priorities are: large touch targets, high contrast, and near-zero
  chrome — the photo and instruction for the current step should dominate
  the screen. Colors follow Nefes Medikal's existing internal-tool palette
  (navy + teal), the same family used in NefesReporter / CashFlow / the
  Ventisense manual, so this reads as one more Nefes Medikal tool rather
  than a different visual language. System fonts only — no external font
  CDN — since factory tablets may sit on a network with no outside access.
*/

:root {
  /* Brand */
  --navy-900: #122046;
  --navy-800: #1b3a5c;
  --navy-700: #234a72;
  --teal-500: #3ab5c6;
  --teal-600: #2b96a5;
  --teal-100: #e3f6f8;

  /* Neutrals */
  --bg-app: #eef3fb;
  --bg-card: #ffffff;
  --border: #d9e2ef;
  --text-primary: var(--navy-900);
  --text-secondary: #52627e;
  --text-muted: #94a3b8;

  /* Status */
  --success-500: #1f9d63;
  --success-100: #e3f6ec;
  --warning-500: #d98a1f;
  --warning-100: #fbf0dd;
  --danger-500: #d64545;
  --danger-100: #fce8e8;

  /* Layout */
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-card: 0 1px 2px rgba(18, 32, 70, 0.06), 0 8px 24px rgba(18, 32, 70, 0.06);
  --touch-min: 56px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-min);
  padding: 0 28px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--navy-800);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-700);
}

.btn-primary:disabled {
  background: #b9c3d4;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--navy-800);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--navy-800);
}

.btn-danger-text {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.badge-muted {
  background: #eef1f6;
  color: var(--text-secondary);
}

.badge-progress {
  background: var(--warning-100);
  color: var(--warning-500);
}

.badge-done {
  background: var(--success-100);
  color: var(--success-500);
}

/* Search-select widget (src/scripts/searchSelect.ts) — the work-order
 * picker on /select and the report filters on /reports/* all render
 * through this one component, so styling it once here keeps every
 * instance visually identical instead of drifting per page. */
.search-select-grid.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding: 2px;
}
.search-select-grid.layout-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 2px;
}
.search-select-card,
.search-select-row {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.12s ease, transform 0.08s ease, border-color 0.12s ease;
}
.search-select-card:hover,
.search-select-row:hover {
  box-shadow: 0 2px 4px rgba(18, 32, 70, 0.08), 0 14px 28px rgba(18, 32, 70, 0.1);
}
.search-select-card:active,
.search-select-row:active {
  transform: scale(0.997);
}
.search-select-card.selected,
.search-select-row.selected {
  border-color: var(--teal-500);
}
.search-select-card.is-done,
.search-select-row.is-done {
  border-color: var(--success-500);
  background: var(--success-100);
}
.search-select-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  min-height: 76px;
}
.search-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  min-height: var(--touch-min);
  width: 100%;
}
.ss-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ss-side {
  display: grid;
  grid-template-columns: 130px 96px;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.ss-primary {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.2px;
}
.search-select-card .ss-primary {
  font-size: 16px;
}
.ss-secondary {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.ss-tertiary {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: #eef1f6;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.ss-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.ss-done-pill,
.ss-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}
.ss-done-pill {
  color: var(--success-500);
  background: var(--success-100);
}
.ss-progress-pill {
  color: var(--warning-500);
  background: var(--warning-100);
}
.search-select-empty,
.search-select-more {
  grid-column: 1 / -1;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: #eef1f6;
  border-radius: var(--radius-md);
}

/* Document / product code badge (front-matter `code:`), used in headings. */
.code-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--navy-800);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* App version label next to the app name (src/lib/version.ts). */
.app-version {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
