:root {
  --bg: #efefef;
  --panel: #efefef;
  --panel-soft: #ffe9b4;
  --ink: #101010;
  --muted: #667085;
  --line: #d8dce2;
  --brand: #1b3323;
  --brand-dark: #14271b;
  --accent: #ffe9b4;
  --danger: #b42318;
  --bucket: color-mix(in srgb, var(--panel) 72%, white);
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.08);
  font-family: Outfit, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font-family: Outfit, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

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

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: var(--brand);
  color: white;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.brand-link {
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.brand-link:hover .brand-title,
.brand-link:focus-visible .brand-title {
  text-decoration: underline;
}

.brand-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 78%, white);
  outline-offset: 4px;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 8px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.brand-logo {
  background: white;
  border-radius: 8px;
  display: block;
  height: 36px;
  object-fit: contain;
  width: 36px;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  color: color-mix(in srgb, white 72%, var(--brand));
  font-size: 0.82rem;
  margin-top: 2px;
}

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

.header-action {
  min-width: 36px;
  padding-inline: 10px;
}

.role-pill,
.status-pill,
.role-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #e6fffb;
}

.role-pill .avatar {
  height: 22px;
  width: 22px;
}

.page {
  margin: 0 auto;
  max-width: 1560px;
  padding: 20px clamp(10px, 2vw, 28px) 44px;
}

.auth-page {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.05fr);
  min-height: 100vh;
  padding: clamp(18px, 4vw, 56px);
}

.auth-intro {
  background:
    linear-gradient(rgba(19, 32, 31, 0.72), rgba(19, 32, 31, 0.52)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'%3E%3Crect width='900' height='900' fill='%230f766e'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.25' stroke-width='3'%3E%3Cpath d='M80 220h250v130H80zM390 150h340v170H390zM160 440h300v160H160zM530 410h250v220H530zM260 700h360v95H260z'/%3E%3Cpath d='M330 285h60M460 235h70M460 270h180M240 520h90M590 505h110M340 748h160'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
}

.auth-intro h1 {
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0;
  max-width: 640px;
}

.auth-intro p {
  color: #e1f5f2;
  font-size: 1rem;
  line-height: 1.6;
  margin: 22px 0 0;
  max-width: 560px;
}

.auth-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
}

.auth-stat {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
}

.auth-stat strong {
  display: block;
  font-size: 1.35rem;
}

.auth-stat span {
  color: #c8d9d6;
  display: block;
  font-size: 0.78rem;
  margin-top: 4px;
}

.auth-panel {
  align-self: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px);
}

.tabs {
  background: #e8ebe8;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 22px;
  padding: 4px;
}

.tab {
  background: transparent;
  color: #475467;
  min-height: 40px;
}

.tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(31, 41, 51, 0.08);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 0.84rem;
  font-weight: 750;
}

.spam-field {
  height: 0;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.field input,
.field select,
.field textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 36px;
  outline: 0;
  padding: 8px 10px;
  width: 100%;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input[type="file"] {
  font-size: 0.88rem;
  line-height: 1.25;
  padding: 6px;
}

.compact-actions input[type="file"],
.file-row input[type="file"] {
  font-size: 0.88rem;
  line-height: 1.25;
}

.field input[type="file"]::file-selector-button,
.compact-actions input[type="file"]::file-selector-button,
.file-row input[type="file"]::file-selector-button {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.25;
  margin-right: 10px;
  min-height: 34px;
  padding: 8px 11px;
}

.field input[type="file"]::file-selector-button:hover,
.compact-actions input[type="file"]::file-selector-button:hover,
.file-row input[type="file"]::file-selector-button:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--panel));
}

.initials-field {
  max-width: 50px;
}

.date-warning {
  background: color-mix(in srgb, var(--accent) 72%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--brand));
  border-radius: 8px;
  color: var(--brand);
  font-size: 0.82rem;
  padding: 9px 10px;
}

.date-entry {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 38px;
  min-height: 42px;
  padding: 0 8px 0 0;
}

.date-entry:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.date-entry input[data-date-display] {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 1rem;
  min-height: 40px;
  padding: 8px 10px;
}

.date-entry input[data-date-picker] {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.date-picker-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 34px;
}

.date-picker-button::before {
  border: 2px solid #6b7280;
  border-radius: 4px;
  content: "";
  height: 19px;
  width: 19px;
}

.date-picker-button::after {
  background:
    linear-gradient(#6b7280, #6b7280) 0 0 / 3px 7px no-repeat,
    linear-gradient(#6b7280, #6b7280) 100% 0 / 3px 7px no-repeat,
    linear-gradient(#6b7280, #6b7280) 50% 8px / 15px 2px no-repeat;
  content: "";
  height: 23px;
  position: absolute;
  width: 19px;
}

.compact-date {
  min-width: 0;
}

.date-parts {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(54px, 0.55fr) minmax(74px, 0.8fr) auto;
}

.date-parts input,
.date-parts select {
  min-height: 34px;
}

.date-parts span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding-right: 2px;
}

.check-field {
  align-items: center;
  align-self: end;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: flex;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
}

.check-field input {
  accent-color: var(--brand);
}

.effort-field {
  min-width: 0;
}

.effort-control {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 1fr) minmax(86px, auto);
}

.effort-control input[type="range"] {
  accent-color: var(--brand);
  min-height: 34px;
  padding: 0;
}

.effort-control output {
  background: color-mix(in srgb, var(--muted) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 14%, transparent);
  border-radius: 8px;
  color: color-mix(in srgb, var(--ink) 70%, var(--muted));
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 34px;
  padding: 8px 9px;
  text-align: right;
  white-space: nowrap;
}

.task-edit {
  border-top: 0;
  justify-self: end;
  padding-top: 0;
  position: absolute;
  right: 10px;
  top: -44px;
  z-index: 2;
}

.task-edit[open] {
  border-top: 1px solid rgba(31, 41, 51, 0.08);
  grid-column: 1 / -1;
  justify-self: stretch;
  padding-top: 8px;
  position: static;
}

.task-edit[open] > .icon-summary {
  display: none;
}

.icon-summary {
  align-items: center;
  background: #e7ebee;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  list-style: none;
  width: 30px;
}

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

.task-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.color-picker {
  position: relative;
}

.color-summary {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr;
  list-style: none;
  min-height: 44px;
  padding: 5px 13px 5px 5px;
}

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

.color-summary [data-color-label] {
  font-size: 0.84rem;
  font-weight: 400;
}

.color-popover {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  left: 0;
  min-width: min(320px, 86vw);
  padding: 10px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 10;
}

.color-picker:not([open]) .color-popover {
  display: none;
}

.color-field {
  background:
    linear-gradient(to bottom, #fff 0%, transparent 38%, transparent 62%, #000 100%),
    linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  border-radius: 8px;
  cursor: crosshair;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.color-field:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.color-cursor {
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.28);
  height: 20px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 22%;
  transform: translate(-50%, -50%);
  width: 20px;
}

.color-controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 1fr;
}

.color-preview {
  background: var(--picked-color, #d35f8d);
  border: 3px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
  height: 42px;
  width: 42px;
}

.color-summary .color-preview {
  height: 34px;
  width: 34px;
}

.color-hex {
  border-radius: 999px !important;
  font-size: 0.84rem;
  font-weight: 400;
  text-align: center;
}

.color-swatches {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, 28px);
}

.color-swatches button {
  background: var(--swatch);
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(31, 41, 51, 0.16);
  cursor: pointer;
  height: 28px;
  padding: 0;
  width: 28px;
}

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

.color-actions .btn {
  font-size: 0.78rem;
  min-height: 31px;
  padding: 6px 9px;
}

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

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 10px 0 0;
}

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

.toolbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.toolbar p {
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 0;
  max-width: 720px;
}

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

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}

.workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  background: var(--bucket);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

details.panel {
  overflow: hidden;
}

details.panel > summary {
  cursor: pointer;
  list-style: none;
}

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

.panel-head {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.panel-head h2 {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
}

.panel-body {
  padding: 18px;
}

.task-board {
  display: grid;
  gap: 14px;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--task-color, var(--brand));
  border-radius: 8px;
  padding: 16px;
}

.task-card.done {
  border-left-color: var(--task-color, var(--brand));
}

.task-card.waiting {
  border-left-color: var(--task-color, var(--accent));
}

.task-card.revision {
  border-left-color: var(--task-color, var(--danger));
}

.task-top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.task-title {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.task-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 8px 12px;
  margin: 10px 0 0;
}

.task-meta .avatar {
  height: 20px;
  margin-right: 4px;
  width: 20px;
}

.task-briefing,
.comment-box {
  background: color-mix(in srgb, var(--accent) 42%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 8px;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  line-height: 1.48;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
  padding: 12px;
}

.comment-box {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
  color: color-mix(in srgb, var(--danger) 72%, var(--ink));
}

.status-pill.open {
  background: color-mix(in srgb, var(--brand) 9%, var(--panel));
  color: var(--brand-dark);
}

.status-pill.assigned {
  background: color-mix(in srgb, var(--muted) 11%, var(--panel));
  color: color-mix(in srgb, var(--brand) 70%, var(--muted));
}

.status-pill.waiting {
  background: color-mix(in srgb, var(--accent) 48%, var(--panel));
  color: color-mix(in srgb, var(--brand) 68%, var(--accent));
}

.status-pill.revision {
  background: #ffebe8;
  color: var(--danger);
}

.status-pill.approved {
  background: color-mix(in srgb, var(--brand) 10%, var(--panel));
  color: var(--brand);
}

.pill-stack {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  align-items: center;
  display: inline-flex;
  font-weight: 400;
  gap: 7px;
  justify-content: center;
  min-height: 34px;
  padding: 8px 11px;
  text-decoration: none;
}

.icon {
  height: 1em;
  width: 1em;
}

.icon-btn {
  min-width: 34px;
  padding-inline: 9px;
}

.btn-primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: white;
}

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

.btn-secondary {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  color: var(--brand);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--panel));
}

.btn-danger {
  background: #ffebe8;
  border: 1px solid #ffd2cb;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fbd5cf;
}

.btn-plain {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.btn-plain:hover {
  background: rgba(255, 255, 255, 0.2);
}

.file-row {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px;
}

.archive-box {
  background: #f8fafc;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.archive-box > strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.file-row span {
  color: #344054;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.empty {
  background: color-mix(in srgb, var(--muted) 5%, transparent);
  border: 1px dashed color-mix(in srgb, var(--muted) 22%, transparent);
  border-radius: 8px;
  color: color-mix(in srgb, var(--ink) 58%, var(--muted));
  padding: 20px;
  text-align: center;
}

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

.team-board {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.team-member,
.employee-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.team-member span,
.employee-row span,
.employee-row small {
  display: block;
  overflow-wrap: anywhere;
}

.team-member strong,
.employee-row strong {
  display: block;
  font-size: 0.88rem;
}

.team-member span,
.employee-row small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.employee-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.employee-row {
  align-items: flex-start;
  justify-content: space-between;
}

.employee-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.avatar {
  align-items: center;
  background: var(--avatar-color, #667085);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.portrait-avatar {
  overflow: hidden;
}

.portrait-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

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

.password-panel {
  background: #edf2f2;
  border-bottom: 1px solid var(--line);
  padding: 16px clamp(16px, 4vw, 48px);
}

.password-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 720px;
  padding: 16px;
}

.feedback-field {
  margin-top: 12px;
}

.revision-box {
  display: grid;
  gap: 8px;
}

.revision-box > summary {
  justify-self: start;
  list-style: none;
}

.revision-box > summary::-webkit-details-marker {
  display: none;
}

.toast {
  background: color-mix(in srgb, var(--accent) 78%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--brand));
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--brand);
  margin: 0 0 16px;
  max-width: min(520px, calc(100% - 28px));
  padding: 12px 14px;
}

@media (max-width: 980px) {
  .auth-page,
  .workspace {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    min-height: 380px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .toolbar,
  .task-top {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 12px;
  }

  .brand-subtitle,
  .role-name {
    display: none;
  }

  .brand-title {
    font-size: 0.96rem;
  }

  .session {
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .role-pill {
    padding: 6px;
  }

  .topbar .btn {
    width: auto;
  }

  .auth-page {
    padding: 12px;
  }

  .auth-stats,
  .metrics,
  .split {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    min-height: 320px;
    padding: 24px;
  }

  .btn {
    width: 100%;
  }
}

.compact-toolbar {
  margin-bottom: 14px;
}

.compact-toolbar h1 {
  font-size: 1.45rem;
}

.compact-toolbar p {
  font-size: 0.92rem;
  margin-top: 4px;
}

.team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-nav-shell {
  margin-bottom: 16px;
  width: 100%;
}

.nav-check,
.nav-toggle {
  display: none;
}

.admin-nav {
  background: #e8ebe8;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  padding: 4px;
  width: 100%;
}

.admin-nav .tab {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.admin-nav .tab:hover {
  background: rgba(255, 255, 255, 0.68);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

.tab-count {
  align-items: center;
  background: #d8eee9;
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 900;
  height: 18px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.tab.active .tab-count {
  background: #0f766e;
  color: white;
}

.team-chip {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 7px;
  min-height: 34px;
  padding: 4px 9px 4px 4px;
}

.team-chip .avatar {
  height: 26px;
  width: 26px;
}

.team-chip span {
  font-size: 0.8rem;
  font-weight: 850;
}

.team-chip small {
  color: var(--muted);
  font-size: 0.72rem;
}

.takeover-inbox {
  background: var(--bucket);
  border: 2px solid color-mix(in srgb, var(--brand) 38%, var(--line));
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}

.takeover-inbox header,
.takeover-alert {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.takeover-inbox h2 {
  font-size: 1rem;
  margin: 0;
}

.takeover-inbox header span {
  background: var(--brand);
  border-radius: 999px;
  color: white;
  min-width: 24px;
  padding: 3px 8px;
  text-align: center;
}

.takeover-list {
  display: grid;
  gap: 8px;
}

.takeover-alert {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.takeover-alert strong,
.takeover-alert small {
  display: block;
}

.takeover-alert small {
  color: var(--muted);
  margin-top: 2px;
}

.form-panel .panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 14px 16px;
}

.form-panel {
  margin: 14px auto 20px;
  max-width: min(760px, 100%);
}

.form-panel .panel-head::after {
  color: var(--muted);
  content: "Aufklappen";
  font-size: 0.72rem;
  font-weight: 750;
}

.form-panel[open] .panel-head::after {
  content: "Schliessen";
}

.kanban-board {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.kanban-column {
  background: var(--bucket);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1 1 270px;
  min-width: 0;
  padding: 0 10px 12px;
}

.kanban-column.my-tasks-column {
  background: color-mix(in srgb, var(--task-owner-color, var(--brand)) 5%, var(--bucket));
  border-color: color-mix(in srgb, var(--task-owner-color, var(--brand)) 18%, var(--line));
  flex: 1.35 1 360px;
}

.kanban-column.open-tasks-column,
.kanban-column.other-tasks-column {
  flex: 0.72 1 220px;
}

.kanban-column.other-tasks-column {
  border-left-style: dashed;
}

.kanban-head {
  align-items: center;
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  min-height: 42px;
  padding: 8px 2px 10px;
}

.kanban-head::-webkit-details-marker {
  display: none;
}

.kanban-head h2 {
  font-size: 0.84rem;
  font-weight: 850;
  margin: 0;
}

.kanban-head span {
  align-items: center;
  background: #edf2f6;
  border-radius: 999px;
  color: #667085;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  height: 22px;
  justify-content: center;
  min-width: 26px;
  padding: 0 8px;
}

.completed-column:not([open]) {
  align-self: start;
  padding-bottom: 0;
}

.completed-column:not([open]) .kanban-head {
  border-bottom: 0;
}

.kanban-list {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-card {
  background: color-mix(in srgb, var(--task-color, #a7d8f7) 24%, white);
  border: 1px solid color-mix(in srgb, var(--task-color, #a7d8f7) 34%, white);
  border-left: 0;
  border-radius: 7px;
  box-shadow: none;
  flex: 1 1 230px;
  overflow: hidden;
  padding: 0;
  transition:
    box-shadow 0.26s ease,
    transform 0.26s ease,
    border-color 0.26s ease,
    background-color 0.26s ease;
}

.compact-card[open] {
  flex-basis: 100%;
}

.compact-card:hover {
  box-shadow: 0 8px 22px rgba(20, 40, 40, 0.08);
  transform: translateY(-1px);
}

.compact-card[open] {
  box-shadow: 0 10px 26px rgba(20, 40, 40, 0.1);
}

.compact-card.proposed-card {
  background: color-mix(in srgb, var(--task-color, #ffb8a8) 18%, white);
  border-style: dashed;
}

.compact-card.done {
  background: #eef2f2;
  border-color: #d9e0e0;
  opacity: 0.82;
}

.compact-card.muted-card {
  background: color-mix(in srgb, var(--task-color, #a7d8f7) 8%, #f3f5f6);
  border: 1px dashed color-mix(in srgb, var(--task-color, #a7d8f7) 12%, #d8dde2);
  filter: saturate(0.45);
}

.compact-card.muted-card .avatar {
  opacity: 0.72;
}

.compact-card.due-soon-open {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.16), 0 12px 28px rgba(220, 38, 38, 0.16);
  margin: 4px;
}

.compact-card.due-soon-assigned {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 12px 28px rgba(245, 158, 11, 0.18);
  margin: 4px;
}

.card-summary {
  cursor: pointer;
  display: grid;
  gap: 7px;
  list-style: none;
  padding: 10px;
}

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

.card-main {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 28px;
}

.card-main .avatar {
  height: 28px;
  width: 28px;
}

.empty-avatar {
  background: #d8e4ec;
  color: #344054;
}

.compact-card .task-title {
  font-size: 1.04rem;
  font-weight: 750;
  line-height: 1.18;
}

.mini-meta,
.mini-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-meta {
  color: #475467;
  font-size: 0.72rem;
  justify-content: space-between;
}

.mini-badges {
  justify-content: flex-start;
}

.compact-card .status-pill {
  font-size: 0.68rem;
  min-height: 22px;
}

.status-pill.proposed {
  background: #fff1d6;
  color: #92400e;
}

.card-details {
  border-top: 1px solid rgba(31, 41, 51, 0.08);
  display: grid;
  gap: 8px;
  padding: 10px;
  position: relative;
}

.card-details:has(.task-edit) {
  padding-top: 10px;
}

.compact-card[open] .card-details,
.form-panel[open] .panel-body,
.task-edit[open] .task-edit-form {
  animation: detailReveal 0.32s ease-out;
}

.card-details .task-meta {
  align-items: center;
  display: grid;
  font-size: 0.76rem;
  gap: 6px 12px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0;
}

.card-details .task-briefing,
.card-details .comment-box {
  background: transparent;
  border: 0;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: 0.86rem;
  line-height: 1.48;
  margin: 0;
  padding: 2px 0;
}

.proposal-notice {
  align-items: center;
  background: #fff7e6;
  border: 1px solid #f6d79a;
  border-radius: 7px;
  color: #7a4b0b;
  display: flex;
  font-size: 0.76rem;
  font-weight: 750;
  gap: 7px;
  padding: 8px;
}

.proposal-notice .avatar {
  height: 24px;
  width: 24px;
}

.compact-actions {
  gap: 6px;
  margin-top: 0;
}

.compact-actions .btn,
.proposal-form .btn {
  font-size: 0.76rem;
  min-height: 32px;
  padding: 7px 9px;
}

.proposal-form {
  display: grid;
  gap: 7px;
}

.proposal-form select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  padding: 7px 9px;
  width: 100%;
}

.submission-choice {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(31, 41, 51, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 9px;
}

.submission-choice > strong {
  font-size: 0.78rem;
}

.submission-choice .compact-actions {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}

.submission-toggle {
  background: #e7ebee;
  border-radius: 999px;
  display: grid;
  gap: 3px;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
}

.submission-toggle label {
  cursor: pointer;
  min-width: 0;
}

.submission-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.submission-toggle span {
  align-items: center;
  border-radius: 999px;
  color: #475467;
  display: flex;
  font-size: 0.76rem;
  justify-content: center;
  min-height: 30px;
  padding: 6px 8px;
  text-align: center;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.submission-toggle input:checked + span {
  background: white;
  box-shadow: 0 1px 6px rgba(31, 41, 51, 0.12);
  color: var(--brand-dark);
}

.submission-panel {
  display: flex;
}

.submission-panel-final {
  display: none;
}

.submission-choice:has(.submission-toggle input[value="final"]:checked) .submission-panel-draft {
  display: none;
}

.submission-choice:has(.submission-toggle input[value="draft"]:checked) .submission-panel-draft,
.submission-choice:has(.submission-toggle input[value="final"]:checked) .submission-panel-final {
  display: flex;
}

.submission-choice .compact-actions span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.sketch-field {
  gap: 10px;
}

.sketch-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sketch-upload {
  align-items: center;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.25;
  min-height: 34px;
  padding: 8px 11px;
}

.sketch-upload:hover {
  background: color-mix(in srgb, var(--brand) 8%, var(--panel));
}

.sketch-upload input {
  display: none;
}

.sketch-board {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 280px;
  max-height: 72vh;
  max-width: min(92vw, 980px);
  min-height: 220px;
  min-width: 320px;
  overflow: hidden;
  position: relative;
  resize: both;
  width: 100%;
}

.sketch-board::after {
  background:
    linear-gradient(135deg, transparent 50%, #aab5bf 50%) 0 0 / 7px 7px;
  bottom: 7px;
  content: "";
  height: 18px;
  opacity: 0.55;
  pointer-events: none;
  position: absolute;
  right: 7px;
  width: 18px;
}

.sketch-canvas {
  background: white;
  cursor: crosshair;
  display: block;
  height: 100%;
  touch-action: none;
  width: 100%;
}

.sketch-preview {
  background: white;
  border: 1px solid #e3e8f2;
  border-radius: 7px;
  display: block;
  margin-bottom: 8px;
  max-height: 180px;
  object-fit: contain;
  width: 100%;
}

.compact-card .archive-box {
  margin-top: 0;
  padding: 8px;
}

.compact-card .file-row {
  align-items: stretch;
  display: grid;
  gap: 6px;
  margin-top: 7px;
  padding: 8px;
}

.compact-card .file-row .btn {
  min-height: 30px;
}

.compact-empty {
  font-size: 0.78rem;
  padding: 14px 8px;
}

.admin-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.employee-editor-list,
.trash-list {
  display: grid;
  gap: 12px;
}

.employee-editor {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.employee-editor-head {
  align-items: center;
  display: flex;
  gap: 10px;
}

.employee-editor-head strong,
.employee-editor-head small {
  display: block;
}

.employee-editor-head small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.editor-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.2fr) minmax(86px, 0.5fr) minmax(72px, 0.4fr) minmax(120px, 0.7fr);
}

.field-note {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  margin-top: 5px;
}

.asset-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

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

.asset-grid,
.archive-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.asset-folders {
  display: grid;
  gap: 16px;
}

.asset-folder {
  display: grid;
  gap: 10px;
}

.asset-folder h3 {
  align-items: center;
  display: flex;
  font-size: 0.94rem;
  gap: 8px;
  margin: 0;
}

.asset-folder h3 span {
  align-items: center;
  background: #edf2f6;
  border-radius: 999px;
  color: #667085;
  display: inline-flex;
  font-size: 0.7rem;
  min-height: 20px;
  padding: 0 7px;
}

.archive-sections {
  display: grid;
  gap: 16px;
}

.archive-grid .task-card {
  align-self: start;
}

.asset-card {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.asset-head {
  display: grid;
  gap: 4px;
}

.asset-head strong {
  font-size: 0.95rem;
}

.asset-head small,
.asset-card p {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.asset-type {
  align-self: start;
  background: #edf2f6;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  justify-self: start;
  min-height: 22px;
  padding: 5px 8px;
}

.asset-card .file-row {
  align-items: stretch;
  display: grid;
  gap: 7px;
  padding: 9px;
}

.settings-panel {
  max-width: none;
  width: 100%;
}

.settings-grid {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.settings-block {
  background: var(--bucket);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--brand));
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 40, 40, 0.05);
  display: grid;
  gap: 12px;
  grid-column: span 4;
  min-height: 190px;
  padding: 16px;
}

.settings-block h3 {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  font-size: 0.94rem;
  margin: 0;
  padding-bottom: 10px;
}

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

.mail-template {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.mail-template textarea {
  min-height: 118px;
}

.settings-block-wide {
  grid-column: span 8;
}

.settings-actions {
  grid-column: 1 / -1;
}

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

@media (max-width: 1100px) {
  .settings-block,
  .settings-block-wide {
    grid-column: span 6;
  }
}

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

  .settings-block,
  .settings-block-wide,
  .settings-actions {
    grid-column: 1;
  }
}

.smtp-box {
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.smtp-box h3 {
  font-size: 0.92rem;
  margin: 0;
}

.smtp-box code {
  background: #e7ebee;
  border-radius: 5px;
  padding: 2px 5px;
}

.trash-item {
  align-items: center;
  background: color-mix(in srgb, var(--task-color, #d8e4ec) 12%, white);
  border: 1px solid #d9e0e6;
  border-left: 5px solid var(--task-color, #d8e4ec);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px;
}

.trash-title {
  align-items: center;
  display: flex;
  gap: 9px;
}

.trash-item small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
}

.public-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 48px);
}

.public-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 860px;
  padding: clamp(20px, 4vw, 36px);
  width: 100%;
}

.public-brand {
  color: var(--ink);
  margin-bottom: 22px;
}

.public-panel h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 8px;
}

.public-panel p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}

.public-login-link {
  margin-top: 14px;
}

.request-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.share-link-box {
  display: grid;
  gap: 8px;
}

.share-link-box input {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-editor {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.request-head strong,
.request-head small {
  display: block;
}

.request-head small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 3px;
}

@keyframes detailReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .kanban-board {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .admin-overview-grid,
  .asset-layout,
  .editor-fields,
  .request-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    align-items: center;
    background: var(--brand);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
    min-height: 42px;
    padding: 10px 12px;
  }

  .nav-toggle .icon {
    height: 18px;
    width: 18px;
  }

  .admin-nav-shell .admin-nav {
    display: none;
    grid-template-columns: 1fr;
  }

  .admin-nav-shell .nav-check:checked ~ .admin-nav {
    display: grid;
  }

  .admin-nav .tab {
    justify-content: space-between;
    width: 100%;
  }

  .kanban-board {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .kanban-column.my-tasks-column {
    order: 1;
  }

  .kanban-column.proposed-tasks-column {
    order: 2;
  }

  .kanban-column.open-tasks-column {
    order: 3;
  }

  .kanban-column.other-tasks-column {
    order: 4;
  }

  .kanban-column {
    border-left: 0;
    border-top: 1px solid #e8edf2;
    padding: 0 0 12px;
  }

  .team-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .trash-item {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
