:root {
  --ink: #111315;
  --text: #2f363d;
  --muted: #717a84;
  --line: #e4e8ec;
  --line-strong: #cfd7df;
  --page: #f1f4f6;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --brand: #0567ee;
  --brand-dark: #043f9c;
  --brand-soft: #eaf3ff;
  --commerce: #0567ee;
  --commerce-dark: #043f9c;
  --commerce-soft: #eaf3ff;
  --blue: #0567ee;
  --amber: #b66a00;
  --red: #b42318;
  --green: #15803d;
  --shadow: 0 12px 32px rgba(11, 16, 31, 0.055);
  --shadow-strong: 0 18px 55px rgba(11, 16, 31, 0.11);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.logged-out .app-shell,
body:not(.logged-out) .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f7f8f8 0%, #eef5f4 100%);
}

.login-panel {
  width: min(390px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel label,
.search-box,
.launch-field,
dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.login-panel input,
.search-box input,
.launch-field input,
dialog input,
dialog select,
dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

dialog input[type="checkbox"],
dialog input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.login-panel input:focus,
.search-box input:focus,
.launch-field input:focus,
dialog input:not([type="checkbox"]):not([type="radio"]):focus,
dialog select:focus,
dialog textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 103, 238, 0.12);
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-weight: 650;
}

.login-error.success,
.reset-message.success {
  color: var(--green);
}

.text-button {
  width: fit-content;
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  padding: 2px 0;
  font-weight: 700;
}

.text-button:hover {
  color: var(--brand);
}

.reset-panel {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-width: 1px 0 0;
  color: var(--muted);
}

.reset-copy,
.reset-message {
  margin: 0;
}

.reset-copy {
  line-height: 1.45;
}

.reset-code-fields {
  display: grid;
  gap: 12px;
}

.reset-send {
  justify-self: start;
}

.reset-message {
  min-height: 20px;
  font-weight: 650;
}

.reset-message.error {
  color: var(--red);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  width: calc(100% - 32px);
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(214, 221, 227, 0.9);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(21, 31, 43, 0.1);
}

.sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

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

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

.brand p,
.brand h1,
.eyebrow,
.metric span,
.metric small,
.contact span,
.contact small,
.task span,
.task small,
.stack-item span,
.timeline time,
.timeline span,
.doc span,
.feedback span,
.panel-heading p {
  margin: 0;
}

.brand p,
.eyebrow,
.panel-heading p {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

.login-brand {
  align-items: center;
  margin-bottom: 2px;
}

.login-brand .brand-logo {
  width: 142px;
}

.primary-button,
.small-button,
.ghost-button,
.danger-button,
.icon-button,
.project-card,
.panel button,
.timeline button {
  border: 0;
  border-radius: 8px;
}

.primary-button,
.small-button,
.ghost-button,
.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  font-weight: 650;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.primary-button {
  background: var(--brand);
  color: white;
}

.primary-button:hover {
  background: var(--brand-dark);
}

.primary-button.compact {
  min-height: 36px;
}

.ghost-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.ghost-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.small-button {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid transparent;
}

.small-button:hover {
  border-color: rgba(5, 103, 238, 0.28);
}

.danger-button {
  background: #fff6f5;
  color: var(--red);
  border: 1px solid #f3c6c2;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.search-box {
  color: var(--muted);
}

.project-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.project-card {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.project-card:hover {
  background: var(--surface-soft);
  border-color: rgba(5, 103, 238, 0.28);
}

.project-card.active {
  background: var(--brand-soft);
  border-color: rgba(5, 103, 238, 0.38);
}

.project-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.project-card i,
.bar {
  height: 7px;
  background: #e6eaec;
  border-radius: 999px;
  overflow: hidden;
}

.project-card i b,
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.workspace {
  min-width: 0;
  background: #fbfcfd;
  padding: 22px clamp(18px, 3vw, 34px) 34px;
}

.userbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: -22px calc(clamp(18px, 3vw, 34px) * -1) 22px;
  padding: 14px clamp(18px, 3vw, 34px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.userbar div {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.userbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 20px;
}

.topbar h2 {
  max-width: 18ch;
  margin: 4px 0 0;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: 0;
}

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

.launch-field {
  min-width: 176px;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 650;
  white-space: nowrap;
}

.tab.active {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 18px rgba(16, 18, 20, 0.12);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 124px;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.metric-link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.metric-link:hover {
  border-color: rgba(5, 103, 238, 0.25);
  transform: translateY(-1px);
}

.metric-link:focus-visible {
  outline: 3px solid rgba(5, 103, 238, 0.2);
  outline-offset: 2px;
}

.metric strong {
  font-size: 1.95rem;
  font-weight: 650;
  line-height: 1;
}

.metric span,
.metric small {
  color: var(--muted);
}

.overview-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.8fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.overview-main,
.overview-side,
.my-task-list {
  display: grid;
  gap: 14px;
}

.my-task-list {
  gap: 8px;
  margin-top: 12px;
}

.my-task {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 11px 10px 12px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.my-task:hover {
  border-color: rgba(5, 103, 238, 0.22);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.my-task.overdue,
.my-task.severity-high {
  border-left-color: var(--red);
  background: #fff8f7;
}

.my-task.soon,
.my-task.severity-medium {
  border-left-color: var(--amber);
  background: #fffaf0;
}

.my-task.upcoming,
.my-task.severity-low {
  border-left-color: var(--green);
  background: #f4fbf8;
}

.my-task.later {
  border-left-color: var(--brand);
}

.my-task span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
}

.my-task small,
.empty-note {
  color: var(--muted);
}

.my-task strong {
  line-height: 1.25;
}

.empty-note {
  margin: 0;
}

.readiness-panel {
  overflow: hidden;
}

.readiness-score {
  color: var(--brand);
  font-size: 1.05rem;
}

.readiness-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.readiness-ring {
  --score: 0;
  width: 136px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 58%, transparent 59%),
    conic-gradient(var(--brand) calc(var(--score) * 1%), #e8eef1 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.readiness-ring span {
  font-size: 1.85rem;
  font-weight: 720;
}

.readiness-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 9px;
}

.readiness-check {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.readiness-check span {
  color: var(--muted);
  font-size: 0.82rem;
}

.readiness-check strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.readiness-check.good {
  border-color: #ccebdd;
  background: #f4fbf8;
}

.readiness-check.warn {
  border-color: #f4dca8;
  background: #fffaf0;
}

.readiness-check.bad {
  border-color: #f0c5c0;
  background: #fff8f7;
}

.client-action-list,
.activity-feed {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.client-action-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.client-action-group > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-action-group > div span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.queue-item {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.queue-item.overdue {
  border-left-color: var(--red);
}

.queue-item.soon {
  border-left-color: var(--amber);
}

.queue-item.upcoming {
  border-left-color: var(--green);
}

.queue-item.later,
.queue-item.none {
  border-left-color: var(--blue);
}

.queue-item span {
  font-weight: 700;
}

.queue-item small {
  color: var(--muted);
}

.activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.activity-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.activity-item p {
  margin: 3px 0 0;
  color: var(--muted);
}

.activity-item strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.activity-file-link {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cde4e1;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.activity-file-link .file-icon {
  transform: scale(0.78);
}

.activity-item time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.panel {
  padding: 16px;
}

.panel-heading,
.stage-heading,
.modal-heading,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel h3,
.stage-heading h3,
dialog h3 {
  margin: 3px 0 0;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: 0;
}

.gantt {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.gantt-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.gantt-row span,
.gantt-row small {
  color: var(--muted);
  font-weight: 650;
}

.gantt-track {
  position: relative;
  height: 28px;
  background: #edf0f1;
  border-radius: 8px;
  overflow: hidden;
}

.gantt-track i {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 999px;
  background: rgba(5, 103, 238, 0.14);
  overflow: hidden;
}

.gantt-track b {
  display: block;
  height: 100%;
  background: var(--brand);
}

.gantt-dates {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.contact-list,
.stack-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.contact,
.stack-item,
.timeline-item,
.doc,
.feedback,
.task {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
}

.contact,
.stack-item,
.doc {
  display: grid;
  gap: 6px;
}

.contact span,
.contact small,
.stack-item span,
.timeline span,
.task span,
.task small,
.doc p,
.feedback span,
.feedback p,
td small {
  color: var(--muted);
}

.contact button,
.stack-item button,
.doc button,
.feedback button,
.task button,
td button,
.timeline button,
.item-actions button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  padding: 2px 0;
  font-weight: 650;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.item-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-link {
  color: var(--red) !important;
}

.milestone-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #edf1f2;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 650;
  vertical-align: middle;
}

.milestone-status.complete {
  border-color: #bfe7d5;
  background: #e2f5ec;
  color: var(--green);
}

.milestone-status.at-risk {
  border-color: #f4d49a;
  background: #fff1d7;
  color: var(--amber);
}

.milestone-status.planned {
  border-color: #d8e3ea;
  background: #f3f6f8;
  color: var(--muted);
}

.timeline-item p,
.task p,
.stack-item p,
.feedback p,
.doc p {
  margin: 4px 0 0;
}

.stage-layout,
.feedback-board,
.doc-grid,
.doc-type-grid {
  display: grid;
  gap: 14px;
}

.stage-layout {
  grid-template-columns: repeat(5, minmax(300px, 1fr));
  overflow-x: auto;
  align-items: start;
  gap: 18px;
  padding-bottom: 8px;
}

.stage-column,
.feedback-lane {
  min-height: 360px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7f9;
}

.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.stage-heading h3 {
  min-width: 0;
  font-size: 1.18rem;
  line-height: 1.15;
}

.stage-heading button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 650;
}

.task-stack,
.feedback-list {
  display: grid;
  gap: 14px;
  min-height: 84px;
}

[draggable="true"] {
  cursor: grab;
}

[draggable="true"]:active {
  cursor: grabbing;
}

.is-dragging {
  opacity: 0.45;
  transform: scale(0.99);
}

.task {
  display: grid;
  gap: 12px;
  background: white;
  border-left: 4px solid var(--brand);
  padding: 16px;
}

.task.client {
  border-left-color: var(--amber);
}

.task footer {
  display: grid;
  grid-template-columns: auto minmax(64px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.task footer small {
  justify-self: center;
  white-space: nowrap;
}

.task footer .item-actions {
  justify-self: end;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.task strong,
.feedback strong {
  display: block;
  line-height: 1.25;
}

.assignment-line,
.feedback-meta {
  display: grid;
  gap: 2px;
  margin-top: 4px;
}

.assignment-line,
.feedback-meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

mark,
.status {
  border-radius: 999px;
  padding: 4px 9px;
  background: #edf1f2;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 650;
}

.status.signed-off {
  background: #e2f5ec;
  color: var(--green);
}

.status.in-review {
  background: #fff1d7;
  color: var(--amber);
}

.table-wrap {
  overflow: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  text-align: left;
  font-size: 14px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  background: #fbfcfd;
}

td strong,
td small {
  display: block;
}

.spec-title-cell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.drag-handle {
  width: 20px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  opacity: 0.8;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.drag-handle::before {
  content: "";
  width: 14px;
  height: 20px;
  background-image: radial-gradient(currentColor 2px, transparent 2.5px);
  background-size: 7px 7px;
  background-position: 0 0;
}

.drag-handle:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  opacity: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.spec-author-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.spec-row-actions {
  justify-self: end;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.file-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-version {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.file-version small {
  color: var(--muted);
  font-weight: 550;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.file-list a,
.doc a,
.upload-link {
  color: var(--brand-dark);
  font-weight: 650;
}

.file-pill {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cde4e1;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.file-pill:hover {
  border-color: var(--brand);
  background: #d9efed;
  transform: translateY(-1px);
}

.file-pill:focus-visible {
  outline: 3px solid rgba(5, 103, 238, 0.2);
  outline-offset: 2px;
}

.file-icon {
  position: relative;
  width: 17px;
  height: 21px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.file-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-bottom-left-radius: 2px;
  background: var(--brand-soft);
}

.file-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 5px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor;
  opacity: 0.75;
}

.upload-link {
  cursor: pointer;
}

.upload-link input {
  display: none;
}

.spec-signoff-button {
  min-height: 34px;
  border: 1px solid #cde4e1;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 7px 11px;
  font-weight: 650;
}

.spec-signoff-button:hover {
  border-color: var(--brand);
  background: #d9efed;
}

.feedback-board {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  margin-top: 14px;
}

.feedback {
  display: grid;
  gap: 9px;
  background: white;
  border-left: 4px solid var(--amber);
}

.feedback.high {
  border-left-color: var(--red);
}

.feedback.low {
  border-left-color: var(--green);
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.screenshot-upload {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.screenshot-pill {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cde4e1;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.screenshot-pill:hover {
  border-color: var(--brand);
  background: #d9efed;
  transform: translateY(-1px);
}

.screenshot-icon {
  position: relative;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.screenshot-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--brand-soft);
}

.screenshot-icon::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 4px;
  width: 6px;
  height: 3px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.doc-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
  gap: 18px;
}

.doc-type-section {
  display: grid;
  gap: 12px;
}

.doc-type-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #d8e3ea;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
}

.doc-type-heading div {
  display: grid;
  gap: 3px;
}

.doc-type-heading span,
.doc-type-heading small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.doc-type-heading h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.doc-type-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: stretch;
}

.doc span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 650;
}

dialog {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(16, 18, 20, 0.2);
  font-size: 14px;
  overflow: auto;
}

dialog::backdrop {
  background: rgba(16, 18, 20, 0.45);
}

dialog form {
  padding: 18px;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.modal-body label:has(textarea),
.modal-body .checkbox-group {
  grid-column: 1 / -1;
}

.modal-body .check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  color: var(--text);
  width: fit-content;
  max-width: 100%;
}

.modal-body > .check {
  align-self: end;
  min-height: 43px;
  padding: 0 2px;
}

.checkbox-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin: 4px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.checkbox-group small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.checkbox-group .check {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.user-management-body {
  display: block;
}

.user-management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.user-management-header h4 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.user-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(150px, 0.8fr) minmax(220px, 1.15fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.user-identity,
.user-access,
.user-projects {
  display: grid;
  gap: 4px;
}

.user-identity strong {
  font-weight: 680;
}

.user-identity span,
.user-access small,
.user-projects small,
.loading-note,
.form-error {
  color: var(--muted);
}

.modal-error {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #f0c5c0;
  border-radius: 8px;
  background: #fff8f7;
  color: var(--red);
  font-weight: 650;
}

.user-identity span,
.user-projects small {
  overflow-wrap: anywhere;
}

.user-access > span:not(.status-pill) {
  line-height: 1.25;
}

.user-projects span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.is-active {
  background: #dff5ec;
  color: var(--green);
}

.status-pill.is-inactive {
  background: #edf0f2;
  color: #6b747c;
}

.user-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.user-actions button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  padding: 2px 0;
  font-weight: 700;
}

.modal-actions {
  justify-content: flex-end;
}

.error-state {
  padding: 28px;
}

/* Venditan brand refinement */
strong,
b {
  font-weight: 650;
}

.login-screen {
  background: #f3f6f7;
}

.login-panel {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-color: #dfe5ea;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(11, 16, 31, 0.16);
}

.login-visual {
  position: relative;
  isolation: isolate;
  min-height: 540px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 28px;
  padding: 42px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 103, 238, 0.94), rgba(5, 103, 238, 0) 34%),
    #111315;
  color: white;
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: var(--brand);
}

.login-visual::before {
  width: 56%;
  height: 42%;
  top: 28px;
  right: -18%;
  transform: skewX(-18deg);
  opacity: 0.95;
}

.login-visual::after {
  width: 68%;
  height: 34%;
  left: -22%;
  bottom: 80px;
  transform: skewX(-18deg);
  background: #263b97;
  opacity: 0.9;
}

.login-visual-copy {
  max-width: 360px;
  display: grid;
  gap: 24px;
}

.login-visual strong {
  max-width: 9ch;
  color: white;
  font-size: clamp(3rem, 5.8vw, 4.9rem);
  font-weight: 800;
  line-height: 0.9;
}

.login-visual-logo {
  width: min(250px, 70%);
  height: auto;
  filter: brightness(0) invert(1);
}

.login-form-stack {
  display: grid;
  align-content: center;
  gap: 17px;
  padding: 48px;
  background: var(--surface);
}

.login-credentials {
  display: grid;
  gap: 17px;
}

.login-panel.reset-mode .login-credentials {
  display: none;
}

.login-brand .brand-logo {
  width: 180px;
}

.login-brand {
  margin-bottom: 12px;
}

.login-brand h1 {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 750;
}

.login-panel label,
.search-box,
.launch-field,
dialog label {
  color: #68727d;
  font-weight: 650;
}

.login-panel input,
.search-box input,
.launch-field input,
dialog input,
dialog select,
dialog textarea {
  border-color: #d4dce4;
  border-radius: 7px;
}

.login-panel input {
  min-height: 46px;
  font-weight: 600;
}

.login-panel .primary-button {
  min-height: 48px;
  margin-top: 18px;
  font-size: 0.98rem;
  box-shadow: 0 14px 28px rgba(5, 103, 238, 0.22);
}

.login-panel .text-button {
  color: var(--ink);
  font-weight: 750;
}

.login-panel .text-button:hover {
  color: var(--brand);
}

.login-panel input:focus,
.search-box input:focus,
.launch-field input:focus,
dialog input:not([type="checkbox"]):not([type="radio"]):focus,
dialog select:focus,
dialog textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 103, 238, 0.12);
}

dialog input[type="checkbox"],
dialog input[type="radio"] {
  accent-color: var(--brand);
}

.app-shell {
  width: calc(100% - 24px);
  min-height: calc(100vh - 24px);
  margin: 12px auto;
  border-color: #dfe5ea;
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
}

.sidebar {
  height: calc(100vh - 24px);
  background: #fbfcfd;
  border-right-color: #dfe5ea;
}

.workspace {
  background: #f5f7f8;
}

.userbar {
  border-bottom-color: #dfe5ea;
}

.brand-logo {
  width: 138px;
}

.brand h1 {
  font-size: 0.98rem;
  font-weight: 650;
}

.brand p,
.eyebrow,
.panel-heading p {
  color: #6f7883;
  font-weight: 700;
}

.primary-button,
.small-button,
.ghost-button,
.danger-button,
.icon-button,
.project-card,
.panel button,
.timeline button,
.tab,
.metric,
.panel,
.contact,
.stack-item,
.timeline-item,
.doc,
.feedback,
.task,
dialog,
.user-row,
.checkbox-group,
.feedback-lane,
.stage-column {
  border-radius: 8px;
}

.primary-button {
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(5, 103, 238, 0.14);
}

.primary-button:hover {
  background: var(--brand-dark);
}

.small-button,
.icon-button {
  background: var(--commerce-soft);
  color: var(--commerce-dark);
}

.small-button:hover,
.icon-button:hover {
  border-color: rgba(5, 103, 238, 0.28);
}

.ghost-button:hover {
  border-color: rgba(5, 103, 238, 0.35);
  color: var(--brand-dark);
}

.text-button,
.contact button,
.stack-item button,
.doc button,
.feedback button,
.task button,
td button,
.timeline button,
.item-actions button,
.file-list a,
.doc a,
.upload-link,
.spec-signoff-button {
  color: var(--commerce-dark);
}

.project-card {
  background: #ffffff;
  border-color: #dde4e9;
}

.project-card:hover {
  background: #fbfdff;
  border-color: rgba(5, 103, 238, 0.28);
}

.project-card.active {
  background: #eef6ff;
  border-color: rgba(5, 103, 238, 0.38);
}

.project-card i b,
.bar i {
  background: var(--brand);
}

.topbar {
  padding-bottom: 18px;
}

.topbar h2 {
  font-size: clamp(1.95rem, 3vw, 2.85rem);
  font-weight: 650;
  line-height: 1.08;
}

.tabs {
  gap: 8px;
}

.tab {
  color: #68727d;
  font-weight: 650;
}

.tab.active {
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(17, 19, 21, 0.13);
}

.metric,
.panel {
  border-color: #dfe5ea;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 116px;
  padding: 17px;
}

.metric strong {
  font-size: 1.82rem;
  font-weight: 650;
}

.metric-link:hover {
  border-color: rgba(5, 103, 238, 0.25);
}

.metric-link:focus-visible {
  outline-color: rgba(5, 103, 238, 0.2);
}

.readiness-score,
.readiness-ring span {
  color: var(--commerce-dark);
}

.readiness-ring {
  background:
    radial-gradient(circle at center, var(--surface) 58%, transparent 59%),
    conic-gradient(var(--commerce) calc(var(--score) * 1%), #e7ecef 0);
}

.readiness-ring span {
  font-weight: 680;
}

.readiness-check strong,
.queue-item span,
.panel h3,
.stage-heading h3,
dialog h3,
.activity-item strong,
.task strong,
.feedback strong,
td strong,
.contact strong,
.doc strong {
  font-weight: 650;
}

.activity-icon,
.activity-file-link,
.file-pill,
.screenshot-pill,
.spec-signoff-button {
  background: var(--commerce-soft);
  border-color: #cfe1ff;
  color: var(--commerce-dark);
}

.activity-file-link:hover,
.file-pill:hover,
.screenshot-pill:hover,
.spec-signoff-button:hover {
  border-color: rgba(5, 103, 238, 0.42);
  background: #ddecff;
}

.stage-column,
.feedback-lane {
  background: #f8fafb;
  border-color: #dfe5ea;
}

.stage-heading button {
  background: var(--commerce);
}

.task,
.feedback,
.my-task,
.queue-item {
  border-color: #dfe5ea;
}

.task:hover,
.feedback:hover,
.contact:hover,
.doc:hover,
.timeline-item:hover,
.activity-item:hover {
  border-color: #d3dce4;
}

.gantt-track {
  background: #e9eef1;
}

.gantt-track i {
  background: rgba(5, 103, 238, 0.14);
}

.gantt-track b {
  background: var(--commerce);
}

mark,
.status,
.milestone-status {
  font-weight: 650;
}

.status.signed-off,
.milestone-status.complete,
.status-pill.is-active {
  background: #e0f5ec;
  color: var(--green);
}

.status.in-review,
.milestone-status.at-risk {
  background: #fff2d9;
  color: var(--amber);
}

th {
  background: #f9fbfc;
  color: #6f7883;
  font-weight: 700;
}

td,
th {
  border-bottom-color: #e1e6eb;
}

.drag-handle:hover {
  background: #eef6ff;
  color: var(--brand);
}

.user-row,
.checkbox-group .check {
  background: #fbfcfd;
}

dialog {
  border-color: #dfe5ea;
  box-shadow: 0 28px 80px rgba(11, 16, 31, 0.22);
}

dialog::backdrop {
  background: rgba(17, 19, 21, 0.5);
}

.task {
  border-left-color: var(--commerce);
}

.task.client,
.feedback {
  border-left-color: var(--amber);
}

.feedback.high,
.my-task.overdue,
.my-task.severity-high,
.queue-item.overdue {
  border-left-color: var(--red);
}

.feedback.low,
.my-task.upcoming,
.my-task.severity-low,
.queue-item.upcoming {
  border-left-color: var(--green);
}

.my-task.soon,
.my-task.severity-medium,
.queue-item.soon {
  border-left-color: var(--amber);
}

.my-task.later,
.queue-item.later,
.queue-item.none {
  border-left-color: var(--brand);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .metric-grid,
  .overview-grid,
  .two-column,
  .feedback-board {
    grid-template-columns: 1fr;
  }

  .login-panel {
    grid-template-columns: 1fr;
    width: min(520px, calc(100vw - 28px));
  }

  .login-visual {
    min-height: 230px;
    align-items: flex-end;
    padding: 28px;
  }

  .login-visual strong {
    max-width: none;
    font-size: clamp(2.25rem, 8vw, 3.25rem);
  }

  .login-form-stack {
    padding: 32px;
  }
}

@media (max-width: 700px) {
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .topbar-actions,
  .userbar {
    align-items: stretch;
    flex-direction: column;
  }

  .userbar div {
    justify-items: start;
  }

  .metric-grid,
  .gantt-row,
  .readiness-body,
  .timeline-item,
  .modal-body,
  .user-row {
    grid-template-columns: 1fr;
  }

  .readiness-ring {
    width: 124px;
  }

  .user-actions {
    justify-items: start;
  }

  .topbar h2 {
    max-width: none;
  }

  .login-screen {
    align-items: start;
    padding: 14px;
  }

  .login-panel {
    width: 100%;
    min-height: 0;
  }

  .login-visual {
    min-height: 190px;
    padding: 22px;
  }

  .login-form-stack {
    padding: 24px;
  }

  .login-brand .brand-logo {
    width: 154px;
  }
}
