:root {
  --bg: #0d0f12;
  --bg-alt: #15181d;
  --ink: #f2f4f7;
  --ink-soft: #9aa3ad;
  --accent: #f4b43a;
  --accent-2: #5fd1a5;
  --panel: rgba(20, 24, 30, 0.92);
  --panel-dark: #0f1216;
  --border: #2a2f37;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Raleway", "Avenir Next", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #232833 0%, #0f1216 45%, #0b0d10 100%);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.25;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px 6vw;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.brand-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #1b2028;
  color: #f2f4f7;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-title {
  font-family: "Raleway", "Avenir Next", sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.brand-title i {
  margin-right: 8px;
  font-size: 18px;
  color: var(--accent);
}

.brand-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.top-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

button {
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #1a1408;
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.layout,
.detail-layout {
  display: grid;
  gap: 20px;
  padding: 0 6vw 60px;
}

.layout {
  grid-template-columns: 1fr;
}

.detail-layout {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.68);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 6vw 60px;
  z-index: 20;
}

.login-overlay {
  align-items: center;
}

.detail-modal {
  width: min(1200px, 100%);
  max-height: 82vh;
  overflow: hidden;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-modal {
  width: min(520px, 92vw);
  padding: 32px;
  text-align: center;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.login-logo {
  height: 40px;
}

.login-text {
  color: var(--ink-soft);
  margin: 0;
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #f8f9fb;
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.google-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.google-icon svg {
  width: 18px;
  height: 18px;
}

.login-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.create-grid {
  display: grid;
  gap: 16px;
}

.detail-scroll {
  overflow-y: auto;
  padding-right: 8px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.detail-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.detail-title h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  font-weight: 600;
}

.detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-card {
  background: var(--panel-dark);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-kv {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.detail-approval-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-wide {
  margin-bottom: 14px;
}

.detail-wide .label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.detail-kv .label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
}

.detail-kv .value {
  display: block;
  font-weight: 600;
  margin-top: 4px;
}

.detail-subhead {
  margin: 16px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.detail-text {
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}

.detail-collapse {
  margin-top: 12px;
}

.detail-collapse summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 6px 0;
}

.detail-collapse summary::-webkit-details-marker {
  display: none;
}

.detail-collapse summary::after {
  content: "▾";
  margin-left: auto;
  transition: transform 0.2s ease;
}

.detail-collapse[open] summary::after {
  transform: rotate(180deg);
}

.detail-close {
  border: 1px solid var(--border);
}

.muted {
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-modal {
    max-height: 88vh;
  }
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.6s ease-out both;
}

@keyframes rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.filter-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.filter-grid label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

input,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f141a;
  color: var(--ink);
}

.filter-grid .wide {
  grid-column: span 2;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-full {
  grid-column: 1 / -1;
}

.form-full textarea {
  width: 100%;
}

.is-hidden {
  display: none;
}

textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f141a;
  color: var(--ink);
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-soft);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.form-error {
  color: #c0392b;
  font-weight: 600;
}

.hint {
  font-size: 12px;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: #1c222b;
  color: var(--ink);
  border: 1px solid #2a323d;
}

.chip.active {
  background: var(--accent);
  color: #1a1408;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.panel.table {
  overflow-x: auto;
}

.table-grid {
  min-width: 1200px;
}

.table-row {
  display: grid;
  grid-template-columns: 64px minmax(240px, 3fr) 1fr 1fr 2fr 2fr 0.8fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #141a22;
  border: 1px solid #222833;
  width: 100%;
}

.table-head {
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.owner-initials {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.owner-initials.badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c222b;
  border: 1px solid #2a323d;
  font-size: 14px;
  margin: 0 auto;
}

.scrape-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-left: 8px;
  border: 1px solid transparent;
  background: #3f3413;
  color: #f3d48a;
}

.scrape-badge.failed {
  background: #3b1f1f;
  color: #ffb3b3;
  border-color: #7c3a3a;
}

.scrape-badge.partial {
  background: #3d3212;
  color: #f5d88a;
  border-color: #7a5a20;
}

.admin-panel .admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-grid {
  display: grid;
  gap: 12px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) 140px 140px 140px 110px 110px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #141a22;
  border: 1px solid #222833;
}

.user-head {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.user-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-email {
  color: var(--ink-soft);
  font-size: 12px;
}

.user-field label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.inherit-hint {
  color: #5fd1a5;
  font-weight: 600;
}


.user-row input,
.user-row select {
  width: 100%;
}

.user-actions {
  display: flex;
  justify-content: flex-end;
}

.user-empty {
  padding: 12px;
  color: var(--ink-soft);
}

.title-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}

.title-cell a {
  color: var(--ink);
  text-decoration: none;
}

.title-cell a:hover {
  color: var(--accent);
}

.summary-drop {
  position: relative;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-soft);
}

.summary-drop summary {
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.summary-drop summary::-webkit-details-marker {
  display: none;
}

.summary-drop summary::before {
  content: "▸";
  color: var(--ink-soft);
  font-size: 11px;
  transition: transform 0.2s ease;
}

.summary-drop summary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--ink);
}

.summary-drop[open] summary::before {
  transform: rotate(90deg);
}

.summary-text {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #121922;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  max-width: 520px;
  min-width: 220px;
  display: none;
}

.summary-drop[open] .summary-text {
  display: block;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.loading-card {
  background: #101823;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  min-width: 280px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  margin: 0 auto 12px;
  animation: spin 0.9s linear infinite;
}

.loading-text {
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 12px;
}

.loading-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loading-bar span {
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: loading-move 1.2s ease infinite;
}

.loading-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10000;
  overflow: hidden;
}

.loading-topbar.show {
  opacity: 1;
}

.loading-topbar span {
  position: absolute;
  inset: 0;
  transform: translateX(-60%);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: loading-move 1.1s ease infinite;
}

@keyframes loading-move {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(60%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.type-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.type-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #1b222c;
  font-size: 16px;
}

.type-badge.tender {
  border: 1px solid rgba(244, 180, 58, 0.4);
}

.type-badge.direct {
  border: 1px solid rgba(95, 209, 165, 0.4);
}

.type-badge.other {
  border: 1px solid #2a2f37;
}

.priority {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.priority.high {
  background: #f04e30;
}

.priority.medium {
  background: #f5a623;
}

.priority.low {
  background: #53b178;
}

.status.pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-icon {
  font-size: 20px;
}

.status-dot {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.evaluating {
  background: rgba(140, 96, 190, 0.25);
  color: #e4d6ff;
}

.waiting {
  background: rgba(244, 180, 58, 0.2);
  color: #f8dda6;
}

.in-progress {
  background: rgba(95, 209, 165, 0.2);
  color: #c6f5e1;
}

.link-icons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.icon {
  padding: 4px 10px;
  border-radius: 999px;
  background: #1d232c;
  font-size: 11px;
  border: 1px solid #2a2f37;
}

.icon-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  background: #1d232c;
  color: var(--ink);
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.primary {
  background: var(--accent);
  color: #1a1408;
}

.btn.danger {
  background: #ff5c5c;
  color: #220a0a;
  border: 1px solid #ff5c5c;
}

.btn.success {
  background: #3ddc97;
  color: #0b2a1c;
  border: 1px solid #3ddc97;
}

.btn.ghost {
  border: 1px solid #2a2f37;
  background: transparent;
  color: var(--ink-soft);
}

.action-cell {
  display: flex;
  justify-content: flex-end;
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.value-czk {
  white-space: nowrap;
}

.next-step-cell {
  display: grid;
  gap: 4px;
}

.next-step-cell .next-step-text {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.next-step-cell .next-step-text:hover {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #1d232c;
  color: var(--ink);
  border: 1px solid #2a2f37;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  max-width: 320px;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  border-color: #ff5c5c;
  background: rgba(255, 92, 92, 0.15);
  color: #ffd6d6;
}

.toast-success {
  border-color: #5fd1a5;
  background: rgba(95, 209, 165, 0.15);
  color: #c6f5e1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.6);
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal {
  background: #141a22;
  border: 1px solid #2a2f37;
  border-radius: 18px;
  padding: 20px;
  width: min(420px, 90vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.modal.wide {
  width: min(980px, 96vw);
}

.admin-tabs {
  display: flex;
  gap: 10px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-tabs .tab {
  background: #1c222b;
  color: var(--ink);
  border: 1px solid #2a323d;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.admin-tabs .tab.active {
  background: var(--accent);
  color: #1a1408;
  border-color: transparent;
}

.roles-panel {
  display: grid;
  gap: 16px;
}

.role-card {
  background: #141a22;
  border: 1px solid #222833;
  border-radius: 14px;
  padding: 16px;
}

.role-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-card h4 {
  margin: 0 0 6px;
}

.role-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 13px;
}

.modal input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #2a2f37;
  background: #0f1319;
  color: var(--ink);
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.summary-grid,
.deadline-grid,
.financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.value {
  font-size: 16px;
  font-weight: 600;
}

.links-grid {
  display: grid;
  gap: 8px;
}

.links-grid a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.link-orbs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.link-orb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 30px;
}

.link-orb:hover {
  background: rgba(255, 255, 255, 0.12);
}

.link-orb i {
  font-size: 30px;
  line-height: 1;
}

.link-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink);
}

.link-drive .link-icon::before {
  content: "⛁";
}

.link-external .link-icon::before {
  content: "↗";
}

.link-email .link-icon::before {
  content: "✉";
}

.link-related .link-icon::before {
  content: "•";
}

.link-drive::before {
  content: "Drive · ";
  color: var(--ink-soft);
  font-weight: 500;
}

.timeline,
.audit-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.audit-list li {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.5fr 1fr;
  gap: 8px;
  padding: 6px 0;
}

.audit-time {
  font-size: 12px;
  color: var(--ink-soft);
}

.audit-action {
  font-weight: 600;
}

.audit-field {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.audit-change {
  color: var(--accent-2);
  font-weight: 600;
}

.audit-actor {
  text-align: right;
}

.audit-stream {
  display: grid;
  gap: 14px;
}

.audit-item {
  display: flex;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.audit-body {
  display: grid;
  gap: 6px;
}

.audit-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.audit-change {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 12px;
}

.audit-meta {
  font-size: 11px;
  color: var(--ink-soft);
}

.time-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hours.over,
.time-row .over {
  color: #ff8b8b;
  font-weight: 600;
}

.hours-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hours-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hours-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2bb3ff, #64f2b5);
  transition: width 0.2s ease;
}

.time-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.time-entry {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 90px 90px;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.time-entry span {
  word-break: break-word;
}

.next-step-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.next-step-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.next-step-date {
  font-weight: 600;
  color: var(--ink);
}

.next-step-text {
  word-break: break-word;
}

.next-step-item.completed .next-step-text {
  color: var(--ink-soft);
  opacity: 0.75;
}

.next-step-check {
  color: #3ddc97;
  font-weight: 700;
  font-size: 14px;
}

.next-step-item .btn.small {
  padding: 4px 10px;
}

.next-step-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.live {
  background: #53b178;
}

.legend-dot.paused {
  background: #f5a623;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .user-head {
    display: none;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
