:root {
  --bg: #0f172a;
  --card: #111827;
  --muted: #1f2937;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --text: #e5e7eb;
  --text-dim: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter,
    Arial;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b1020;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #334155;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #334155;
  background: #0b1225;
  color: var(--text);
}
label {
  display: block;
  margin: 8px 0 6px;
  color: var(--text-dim);
  font-size: 14px;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}
.card {
  background: linear-gradient(180deg, #0b1225, #0a0f1e);
  border: 1px solid #1f2937;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.col {
  flex: 1 1 260px;
}
.center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logoRow {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1020;
  font-weight: 900;
}
.brand {
  font-size: 20px;
  letter-spacing: 0.6px;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b1225;
  border-bottom: 1px solid #1f2937;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sidebar {
  width: 260px;
  min-height: calc(100vh - 60px);
  background: #0b1225;
  border-right: 1px solid #1f2937;
  padding: 16px;
  position: sticky;
  top: 60px;
}
.layout {
  display: flex;
}
.main {
  flex: 1;
  padding: 20px;
}
.menu a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  color: var(--text-dim);
}
.menu a.active,
.menu a:hover {
  background: #0f172a;
  color: var(--text);
}
.tile {
  width: 150px;
  height: 150px;
  border-radius: 18px;
  background: #0b1225;
  border: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s transform;
}
.tile:hover {
  transform: translateY(-3px);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0f172a;
  color: var(--text-dim);
  font-size: 12px;
  border: 1px solid #1f2937;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.table th,
.table td {
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
}
.table th {
  color: var(--text-dim);
  cursor: pointer;
}
.rowItem {
  background: #0b1225;
  border: 1px solid #1f2937;
  border-radius: 12px;
}
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.pager {
  display: flex;
  gap: 8px;
  align-items: center;
}
.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  width: min(680px, 92vw);
  background: #0b1225;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 18px;
}
.modal .title {
  font-size: 18px;
  margin: 0 0 8px;
}
.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: #0b1225;
  border: 1px solid #1f2937;
  min-width: 200px;
}
.kpi .val {
  font-size: 28px;
  font-weight: 800;
}
/* Camera selection highlight on workbench */
.cameraBadge.active {
  background: var(--accent, #2563eb);
  color: #fff;
  border-color: var(--accent, #2563eb);
}

/* Pill-style radio groups for Activity & Confidence */
.choiceGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.choiceGroup input[type="radio"] {
  display: none;
}

.choiceGroup .pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, #e5e7eb);
  background: var(--bg-elevated, #0b1120);
  color: var(--text, #e5e7eb);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.choiceGroup .pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.4);
}

/* Selected pill state */
.choiceGroup input[type="radio"]:checked + .pill {
  background: var(--accent, #2563eb);
  color: #fff;
  border-color: var(--accent, #2563eb);
}

@media (max-width: 920px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-height: auto;
    position: static;
  }
}

/* Camera selection highlight on workbench */
.cameraBadge.active {
  background: var(--accent, #22d3ee);
  color: #0b1020;
  border-color: var(--accent, #22d3ee);
}

/* Pill-style radio groups for Activity & Confidence */
.choiceGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.choiceGroup input[type="radio"] {
  display: none;
}

.choiceGroup .pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text, #e5e7eb);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}

.choiceGroup .pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.4);
}

/* Selected pill state */
.choiceGroup input[type="radio"]:checked + .pill {
  background: var(--accent, #22d3ee);
  color: #0b1020;
  border-color: var(--accent, #22d3ee);
}

/* Date picker wrapper & popup calendar */
.datePickerWrapper {
  position: relative;
  max-width: 260px;
}

.dateInput {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text, #e5e7eb);
  cursor: pointer;
}

.dateInput:focus {
  outline: none;
  border-color: var(--accent, #22d3ee);
}

.calendarPopup {
  position: absolute;
  top: 110%;
  left: 0;
  z-index: 50;
  width: 260px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.calendarHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.calendarTitle {
  font-weight: 600;
  font-size: 0.95rem;
}

.calendarArrow {
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text, #e5e7eb);
}

.calendarArrow:hover {
  background: rgba(30, 64, 175, 0.8);
}

.calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 0.8rem;
}

.calendarDow {
  text-align: center;
  font-weight: 600;
  color: var(--text-dim, #94a3b8);
}

.calendarCell {
  text-align: center;
  padding: 4px 0;
}

.calendarCell.empty {
  visibility: hidden;
}

.calendarDay {
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text, #e5e7eb);
  cursor: pointer;
  padding: 4px 0;
}

.calendarDay.today {
  outline: 1px dashed rgba(148, 163, 184, 0.7);
}

.calendarDay.selected {
  background: var(--accent, #22d3ee);
  color: #0b1020;
}

.calendarDay:hover {
  background: rgba(30, 64, 175, 0.6);
}
/* Sidebar logbook filter tabs */
.logTab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--text-dim, #94a3b8);
}

.logTab.active {
  background: var(--accent, #22d3ee);
  color: #0b1020;
  border-color: var(--accent, #22d3ee);
}

/* Unread rows: stronger highlight */
.rowItem.unread td {
  font-weight: 600;
  font-style: italic;
  background: rgba(56, 189, 248, 0.08); /* soft blue tint */
}

/* Star icon styling */
.starIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b; /* slate-ish for unstarred */
  transition: transform 0.1s ease, color 0.15s ease;
}

.starIcon:hover {
  transform: scale(1.1);
}

.starIcon.active {
  color: #fbbf24; /* warm gold for starred */
}

/* Comment bubble */
.commentBtn {
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Looks "empty" if no staff comment */
.commentBtn.noComment {
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-dim, #94a3b8);
}

/* Looks "filled" if staff left a comment */
.commentBtn.hasComment {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  color: #eef2ff;
}

.commentBtn:hover {
  opacity: 0.9;
}

/* Feedback pencil button */
.feedbackBtn {
  border: 0;
  border-radius: 999px;
  width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

/* No feedback yet: subtle outline */
.feedbackBtn.noFeedback {
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-dim, #94a3b8);
}

/* Has feedback: highlight */
.feedbackBtn.hasFeedback {
  background: rgba(34, 197, 94, 0.22); /* greenish cue */
  color: #bbf7d0;
}

.feedbackBtn:hover {
  opacity: 0.95;
}
