@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
body { font-family: 'Inter', system-ui, sans-serif; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: -0.02em;
}
.brand-text { line-height: 1.1; }
.brand-text .name { font-size: 13px; font-weight: 600; color: #0f172a; letter-spacing: -0.01em; }
.brand-text .loc  { font-size: 10px; font-weight: 500; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Columns ---------- */
.col {
  flex: 0 0 85vw;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}
#board {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.col { scroll-snap-align: start; }
.col-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: #475569;
  padding: 4px 4px 10px 4px;
}
.col-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; margin-right: 8px; }
.col-count {
  font-size: 11px; color: #94a3b8; background: #f1f5f9;
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex; flex-direction: row; gap: 10px;
  min-height: 88px;
  align-items: stretch;
}
.card-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  background: #f1f5f9; border: 1px solid #e5e7eb; border-radius: 6px;
  overflow: hidden; align-self: center;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card:active { background: #f8fafc; }
.card-title {
  font-size: 13px; font-weight: 600; color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  font-size: 11px; color: #64748b; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-foot { margin-top: auto; padding-top: 6px; font-size: 10px; color: #94a3b8; }

/* ---------- PM cards (no thumbnail, wrapping title) ---------- */
.pm-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.pm-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.pm-card:active { background: #f8fafc; }
.pm-card .pm-equipment {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #94a3b8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-card .pm-name {
  font-size: 14px; font-weight: 600; color: #0f172a;
  line-height: 1.35;
  /* allow up to 3 lines, then ellipsis */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-card .pm-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: #64748b;
  margin-top: 2px;
}
.pm-card .pm-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; color: #475569; font-weight: 600; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.pm-card .pm-due { color: #64748b; }
.pm-card .pm-due.is-overdue { color: #dc2626; font-weight: 600; }

@media (min-width: 768px) {
  #board { overflow-x: visible; scroll-snap-type: none; }
  .col { flex: 1 1 0; min-width: 240px; max-width: none; }
}

/* ---------- Status picker (clean tile design) ---------- */
.status-tiles { display: flex; flex-direction: column; gap: 8px; }
.status-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  font: inherit;
  text-align: left;
  width: 100%;
}
.status-tile:hover { border-color: #cbd5e1; background: #f8fafc; }
.status-tile .tile-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.status-tile .tile-label { flex: 1; font-size: 14px; font-weight: 600; color: #0f172a; }
.status-tile .tile-check {
  width: 20px; height: 20px; border-radius: 999px;
  border: 1.5px solid #e2e8f0; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.status-tile.is-current { border-color: #0f172a; background: #f8fafc; }
.status-tile.is-current .tile-check {
  background: #0f172a; border-color: #0f172a; color: #fff;
}

/* ---------- Attachments ---------- */
.attach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px;
}
.attach-thumb {
  aspect-ratio: 1; background: #f1f5f9; border-radius: 8px;
  overflow: hidden; cursor: zoom-in; border: 1px solid #e5e7eb;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(15,23,42,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
