:root {
  --bg: #050505;
  --panel: #111;
  --panel-2: #181818;
  --line: #2b2b2b;
  --text: #f7f7f7;
  --muted: #a8a8a8;
  --danger: #ff5252;
  --ok: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #000;
  overflow: hidden;
}
.mobile-menu-btn,
.sidebar-backdrop {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: 20px;
}
.brand img {
  display: block;
  width: 95px;
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}
nav { display: grid; gap: 10px; }
.nav-group {
  display: grid;
  gap: 4px;
}
.nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6f6f6f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
}
.nav-title > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-title .material-symbols-outlined {
  font-size: 18px;
}
.nav-title:hover {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}
.nav-chevron {
  transition: transform .18s ease;
}
.nav-group.is-collapsed .nav-chevron {
  transform: rotate(-90deg);
}
.submenu {
  display: grid;
  gap: 4px;
  overflow: hidden;
}
.nav-group.is-collapsed .submenu {
  display: none;
}
nav a, .icon-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
}
nav a {
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
}
nav a:hover { background: var(--panel); color: var(--text); }
.main { margin-left: 258px; padding: 28px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
h1 { margin: 4px 0 0; font-size: 32px; }
h2 { margin: 0 0 16px; font-size: 18px; }
.userbox { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
.search input { border: 0; background: transparent; }
.select-hidden {
  display: none;
}
.autocomplete {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 6px) 0 auto;
  display: none;
  max-height: 236px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.autocomplete.is-open .autocomplete-list {
  display: block;
}
.autocomplete-list button,
.autocomplete-empty {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.autocomplete-list button {
  cursor: pointer;
}
.autocomplete-list button:hover {
  background: var(--panel-2);
}
.autocomplete-list button:last-child,
.autocomplete-empty {
  border-bottom: 0;
}
.autocomplete-empty {
  color: var(--muted);
}
.btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: #fff; }
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.danger { color: var(--danger); }
.table-wrap, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.actions { width: 110px; white-space: nowrap; }
.actions form { display: inline; }
.empty { color: var(--muted); text-align: center; }
.bool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
}
.bool-yes { color: #7ddc8a; }
.bool-no { color: var(--muted); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  max-width: 980px;
}
.field { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.field-textarea { grid-column: 1 / -1; }
.field-checkbox { align-content: end; }
.field-checkbox input { width: 22px; min-height: 22px; }
.file-link { color: var(--text); font-size: 13px; text-decoration: underline; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #5c2222; border-radius: 8px; background: #1c0909; color: #ffb3b3; }
.approval-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 980px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101010;
}
.approval-banner > .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-size: 25px;
}
.approval-banner strong {
  display: block;
  margin-bottom: 4px;
}
.approval-banner p {
  margin: 0;
  color: var(--muted);
}
.approval-banner.is-approved {
  border-color: #7ddc8a;
}
.approval-banner.is-approved > .material-symbols-outlined {
  background: #7ddc8a;
}
.metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metrics article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.metrics strong { font-size: 24px; }
.metrics small { color: var(--muted); }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .75fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}
.dashboard-grid .panel {
  max-height: calc(100vh - 210px);
}
.dashboard-grid table {
  min-width: 0;
}
.dashboard-grid th,
.dashboard-grid td {
  padding: 10px 12px;
}
.panel { padding: 14px; }
.relation-panel {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin-top: 28px;
  margin-bottom: 44px;
  overflow: visible;
}
.relation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}
.relation-head h2 {
  margin: 0;
}
.relation-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  color: var(--muted);
  font-weight: 700;
}
.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090909;
}
.inline-form textarea {
  min-height: 86px;
}
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding: 6px 0 10px 54px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 24px;
  left: 20px;
  width: 2px;
  border-radius: 999px;
  background: #3b3b3b;
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -54px;
  top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px var(--panel);
  color: #000;
}
.timeline-item:first-child .timeline-marker {
  border-color: #fff;
  color: var(--text);
  background: #000;
}
.timeline-marker .material-symbols-outlined {
  font-size: 19px;
}
.timeline-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
}
.timeline-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.timeline-user, .timeline-card time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.timeline-user {
  color: var(--text);
  font-weight: 700;
}
.timeline-user .material-symbols-outlined, .timeline-card time .material-symbols-outlined {
  font-size: 16px;
}
.timeline-card time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.timeline-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
}
.status-list { display: grid; gap: 10px; }
.status-list div { display: flex; justify-content: space-between; padding: 12px; border-radius: 8px; background: var(--panel-2); }
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(292px, 1fr);
  gap: 16px;
  min-height: 62vh;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban-column {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.kanban-column header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.kanban-column h2 {
  flex: 1;
  margin: 0;
  font-size: 16px;
}
.kanban-column header strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  color: #000;
}
.status-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #fff;
  border-radius: 50%;
}
.kanban-dropzone {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}
.kanban-dropzone.drag-over {
  outline: 2px solid #fff;
  outline-offset: -8px;
}
.kanban-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070707;
  cursor: grab;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kanban-card p { margin: 0; color: var(--text); }
.kanban-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(132, 226, 183, .42);
  border-radius: 8px;
  background: rgba(132, 226, 183, .12);
  color: #bdf1d8;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.kanban-chip .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 16px;
}
.kanban-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
.kanban-card dt {
  color: var(--muted);
  font-size: 11px;
}
.kanban-card dd {
  margin: 2px 0 0;
  font-size: 13px;
}
.kanban-card small { color: var(--muted); }
.kanban-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.login-page {
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(135deg, #050505 0%, #101010 48%, #07110e 100%);
}
.login-shell {
  width: min(1080px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(0, 0, 0, .74);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}
.login-brand,
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand {
  gap: 34px;
  padding: clamp(32px, 6vw, 68px);
  border-right: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
}
.login-logo {
  display: inline-flex;
  align-items: center;
  width: 128px;
}
.login-logo img {
  display: block;
  width: 100%;
  max-height: 52px;
  object-fit: contain;
}
.login-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: #9fb7ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.login-brand h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: .98;
}
.login-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: #c7c7c7;
  font-size: 17px;
  line-height: 1.55;
}
.login-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.login-highlights > span {
  display: grid;
  gap: 8px;
  min-height: 94px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #e8e8e8;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, .05);
}
.login-highlights .material-symbols-outlined {
  color: #cc9f00;
  font-size: 24px;
}
.login-panel {
  padding: clamp(24px, 5vw, 54px);
  background: #030303;
}
.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  margin: 0 auto;
}
.login-card-head {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}
.login-card h2 {
  margin: 0;
  font-size: 28px;
}
.login-card p {
  color: var(--muted);
  margin: 4px 0 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: #cc9f00;
  color: #000;
  font-size: 30px;
}
.login-field {
  gap: 7px;
}
.login-field input {
  background: #0b0b0b;
}
.login-field input:focus {
  border-color: #9fb7ff;
  outline: 3px solid rgba(159, 183, 255, .14);
}
.login-submit {
  width: 100%;
  margin-top: 4px;
}
.login-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.login-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0b;
}
.login-links a:hover {
  border-color: #9fb7ff;
  color: var(--text);
}
.public-page {
  min-height: 100vh;
  background: #f4f4f4;
  color: #111;
}
.public-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}
.public-hero {
  padding: 28px 0 20px;
}
.public-hero strong {
  display: block;
  margin-bottom: 10px;
  color: #000;
  font-size: 18px;
}
.public-hero h1 {
  margin: 0 0 8px;
}
.public-hero p {
  margin: 0;
  color: #555;
}
.public-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}
.public-panel div {
  display: grid;
  gap: 5px;
}
.public-panel span {
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
}
.public-panel strong {
  color: #111;
}
.public-timeline {
  display: block;
}
.public-description {
  display: block;
}
.public-description p {
  margin: 0;
  color: #333;
  line-height: 1.55;
  white-space: pre-wrap;
}
.public-timeline h2 {
  color: #111;
}
.public-page .timeline::before {
  background: #d0d0d0;
}
.public-page .timeline-marker {
  background: #000;
  color: #fff;
  box-shadow: 0 0 0 5px #fff;
}
.public-page .timeline-card {
  border-color: #ddd;
  background: #fafafa;
}
.public-page .timeline-card p, .public-page .timeline-user, .public-page .timeline-card strong {
  color: #111;
}
@media (max-width: 900px) {
  body.sidebar-open { overflow: hidden; }
  .mobile-menu-btn {
    position: fixed;
    z-index: 70;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #000;
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
  }
  .mobile-menu-btn .material-symbols-outlined { font-size: 25px; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    z-index: 60;
    width: min(286px, calc(100vw - 44px));
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 20px 0 44px rgba(0, 0, 0, .35);
    overflow-y: auto;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .brand { margin-left: 54px; }
  .main { margin-left: 0; padding: 76px 18px 18px; }
  .metrics, .dashboard-grid, .form-grid, .public-panel { grid-template-columns: 1fr; }
  .toolbar, .topbar { align-items: stretch; flex-direction: column; }
  .inline-form { grid-template-columns: 1fr; }
  .search { min-width: 0; }
  .login-page { padding: 16px; place-items: stretch; }
  .login-shell {
    min-height: calc(100vh - 32px);
    grid-template-columns: 1fr;
  }
  .login-brand {
    gap: 22px;
    padding: 28px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .login-brand h1 { font-size: 34px; }
  .login-brand p { font-size: 15px; }
  .login-highlights { grid-template-columns: 1fr; }
  .login-highlights > span {
    min-height: 56px;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .login-panel { padding: 28px; }
  .login-card { width: 100%; }
}
