:root {
  --bg: #050507;
  --surface: rgba(16, 17, 20, 0.88);
  --surface-strong: rgba(25, 26, 30, 0.96);
  --surface-frost: rgba(255, 255, 255, 0.035);
  --ink: #f5f5f7;
  --muted: #989aa4;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent-orange: #ff8f48;
  --accent-coral: #ff7a5c;
  --accent-amber: #d5b07f;
  --accent-violet: #a8a4b2;
  --accent-cyan: #c7cfd6;
  --danger: #ff5a56;
  --success: #3ccc8a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  font-family: "Manrope", "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.045), transparent 18%),
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.03), transparent 16%),
    linear-gradient(180deg, #040405 0%, #0b0c0e 42%, #131416 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.03), transparent 12%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.022), transparent 10%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

body.sheet-open {
  overflow: hidden;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: min(100%, 420px);
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  padding: 22px 18px 20px;
}

.auth-title {
  margin: 0;
  font-size: clamp(30px, 9vw, 40px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.auth-copy,
.auth-note,
.auth-error {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dadce0;
}

.auth-input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
}

.auth-input:focus {
  border-color: rgba(255, 143, 72, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 143, 72, 0.14);
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}

.auth-error {
  color: #ffd2c9;
}

.hero {
  display: grid;
  gap: 12px;
}

.hero-copy,
.hero-card,
.stat-card,
.accordion,
.task-card,
.project-card,
.alert-card,
.tab,
.detail-sheet {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card {
  border-radius: 28px;
  padding: 18px 18px 20px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #dadce0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 9vw, 42px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-card {
  gap: 18px;
  display: grid;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
}

.deadline-strip {
  border-radius: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 123, 34, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01)),
    var(--surface);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.deadline-strip-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.deadline-strip-head strong {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.deadline-strip-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.deadline-alert-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.045), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--surface-strong);
  color: inherit;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.deadline-alert-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.deadline-alert-copy strong {
  font-size: 14px;
  line-height: 1.28;
}

.deadline-alert-copy small {
  color: var(--muted);
  font-size: 12px;
}

.hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.badge,
.chip,
.summary-meta,
.quick-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: #e7e8eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.telegram-user {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.focus-card {
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.028);
}

.focus-card[data-kind] {
  cursor: pointer;
}

.focus-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #dfc8b4;
}

.focus-card h3 {
  margin: 8px 0 12px;
  font-size: 22px;
  line-height: 1.12;
}

.focus-note {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.stat-card {
  border-radius: 20px;
  padding: 14px 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--surface-strong);
}

.stat-card[data-tone="danger"] {
  background:
    radial-gradient(circle at top right, rgba(255, 90, 86, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(255, 90, 86, 0.12), rgba(255, 90, 86, 0.04)),
    var(--surface-strong);
  border-color: rgba(255, 90, 86, 0.22);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.sections {
  display: grid;
  gap: 12px;
}

.accordion {
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.accordion::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--section-accent, var(--accent-orange));
  box-shadow: 0 0 24px color-mix(in srgb, var(--section-accent, var(--accent-orange)) 35%, transparent);
}

.accordion::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 26px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.section-today {
  --section-accent: var(--accent-orange);
}

.section-tasks {
  --section-accent: var(--accent-amber);
}

.section-projects {
  --section-accent: var(--accent-violet);
}

.section-control {
  --section-accent: var(--accent-coral);
}

.section-archive {
  --section-accent: #b6bac1;
}

.section-reports {
  --section-accent: #c3c7cd;
}

.section-admin {
  --section-accent: var(--accent-cyan);
}

.section-logs {
  --section-accent: color-mix(in srgb, var(--accent-violet) 65%, white);
}

.section-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 16px 16px 16px 18px;
  position: relative;
}

.summary-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  justify-self: end;
  flex-wrap: nowrap;
}

.summary-tool {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  appearance: none;
  cursor: pointer;
  padding: 0;
}

.summary-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: color-mix(in srgb, var(--section-accent, var(--accent-orange)) 80%, white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  appearance: none;
}

.summary-toggle-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.summary-toggle-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accordion:not(.is-open) .summary-toggle-icon {
  transform: rotate(180deg);
}

.summary-copy {
  min-width: 0;
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: color-mix(in srgb, var(--section-accent, var(--accent-orange)) 72%, white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-summary h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.02;
}

.summary-meta {
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
  justify-content: center;
  flex: 0 0 auto;
}

.section-content {
  padding: 6px 14px 14px 18px;
}

.accordion:not(.is-open) .section-content {
  display: none;
}

.card-list,
.alert-list,
.log-list {
  display: grid;
  gap: 10px;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.filter-chip strong {
  color: #d9dbe0;
  font-size: 12px;
}

.filter-chip.active {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.05);
}

.task-card,
.project-card,
.alert-card,
.link-card,
.subtask-row {
  border-radius: 22px;
  padding: 14px;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.task-card,
.project-card,
.alert-card,
.link-card,
.subtask-row {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.045), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.014)),
    var(--surface-strong);
}

.task-card {
  box-shadow: var(--shadow);
}

.task-card.mine {
  border-color: rgba(255, 123, 34, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(255, 123, 34, 0.08),
    0 0 0 1px rgba(255, 123, 34, 0.04),
    var(--shadow);
}

.empty-card {
  border-radius: 22px;
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.empty-card strong {
  display: block;
  margin-bottom: 8px;
}

.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.project-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.014)),
    var(--surface-strong);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.owner-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  color: #f2f3f6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.owner-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.owner-label.mine {
  border-color: rgba(60, 204, 138, 0.26);
  background: linear-gradient(180deg, rgba(60, 204, 138, 0.18), rgba(60, 204, 138, 0.06));
  color: #e5fff1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(60, 204, 138, 0.12);
}

.deadline-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e6d6c8;
}

.deadline-chip.urgent {
  background: linear-gradient(180deg, rgba(255, 90, 86, 0.18), rgba(255, 90, 86, 0.08));
  border-color: rgba(255, 90, 86, 0.25);
  color: #ffd4d2;
}

.deadline-chip.today {
  background: linear-gradient(180deg, rgba(255, 176, 67, 0.16), rgba(255, 123, 34, 0.08));
  border-color: rgba(255, 176, 67, 0.22);
  color: #ffe2bf;
}

.deadline-chip.done {
  color: var(--muted);
}

.task-card h3,
.project-card h3,
.link-card strong {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.22;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta span,
.milestone-chip,
.sheet-meta > span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-frost);
  border: 1px solid var(--line);
  font-size: 11px;
  color: #dde0e8;
}

.priority-p1 {
  border-color: rgba(255, 123, 34, 0.22) !important;
  color: #ffb78c !important;
}

.priority-p2 {
  border-color: rgba(255, 176, 67, 0.2) !important;
  color: #ffd98e !important;
}

.priority-p3 {
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #d7d8de !important;
}

.status-work,
.status-active {
  border-color: rgba(60, 204, 138, 0.2) !important;
  color: #a2e7c1 !important;
}

.status-hold,
.status-on_hold,
.status-warning {
  border-color: rgba(255, 176, 67, 0.18) !important;
  color: #ffd796 !important;
}

.status-done,
.status-archived,
.status-info {
  color: var(--muted) !important;
}

.status-danger {
  border-color: rgba(255, 90, 86, 0.22) !important;
  color: #ffc4c2 !important;
}

.card-secondary {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.card-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-action.primary {
  border-color: rgba(255, 143, 72, 0.22);
  background: linear-gradient(180deg, rgba(255, 143, 72, 0.14), rgba(255, 122, 92, 0.06));
  color: #fff1e6;
}

.link-card.compact {
  border-radius: 18px;
  padding: 12px 14px;
}

.link-card.compact strong {
  font-size: 15px;
  margin-bottom: 6px;
}

.admin-panel {
  display: grid;
  gap: 12px;
}

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

.admin-card {
  border-radius: 20px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.014)),
    var(--surface-strong);
}

.admin-card-kicker {
  display: block;
  color: #d9dce1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.admin-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 12px;
}

.admin-card-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-users-block {
  margin-top: 2px;
}

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

.admin-user-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.admin-user-copy {
  display: grid;
  gap: 4px;
}

.admin-user-copy strong {
  font-size: 14px;
}

.admin-user-copy small,
.admin-user-metric {
  color: var(--muted);
  font-size: 12px;
}

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

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-grid {
  margin-bottom: 12px;
}

.archive-panel,
.report-panel {
  display: grid;
  gap: 12px;
}

.alert-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.alert-card strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.3;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.alert-danger {
  border-color: rgba(255, 90, 86, 0.24);
  background:
    radial-gradient(circle at top right, rgba(255, 90, 86, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(255, 90, 86, 0.09), rgba(255, 90, 86, 0.04)),
    var(--surface-strong);
}

.alert-warning {
  border-color: rgba(255, 123, 34, 0.22);
  background:
    radial-gradient(circle at top right, rgba(255, 123, 34, 0.15), transparent 44%),
    linear-gradient(180deg, rgba(255, 123, 34, 0.08), rgba(255, 123, 34, 0.03)),
    var(--surface-strong);
}

.alert-info {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    var(--surface-strong);
}

.log-card {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--surface-strong);
}

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

.log-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.log-line {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.log-line strong {
  color: var(--ink);
  margin: 0 6px 0 0;
  font-weight: 700;
}

.log-time {
  display: inline-block;
  min-width: 46px;
  color: #d8d9dd;
  font-weight: 700;
}

.log-line.log-danger strong {
  color: #ffd4d2;
}

.log-line.log-warning strong {
  color: #ffe1b8;
}

.log-line.log-info strong {
  color: #eef0f3;
}

.log-card strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.35;
}

.log-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.log-danger {
  border-color: rgba(255, 90, 86, 0.24);
}

.log-warning {
  border-color: rgba(255, 176, 67, 0.22);
}

.log-info {
  border-color: rgba(111, 217, 255, 0.18);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.58);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.detail-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 21;
  border-radius: 26px 26px 0 0;
  max-height: 95vh;
  border-bottom: none;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(18, 18, 24, 0.96);
}

.hidden {
  display: none !important;
}

.sheet-handle {
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin: 10px auto 0;
}

.sheet-shell {
  padding: 10px 14px 28px;
  overflow-y: auto;
  max-height: calc(95vh - 20px);
}

.sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.sheet-title-wrap {
  min-width: 0;
}

.sheet-kicker {
  display: block;
  color: #d9dce1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.sheet-header h3 {
  margin: 0;
  font-size: clamp(18px, 8.4vw, 30px);
  line-height: 1.06;
}

.sheet-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.sheet-close,
.action-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 12px;
}

.sheet-close {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 9px 12px;
  font-size: 13px;
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sheet-admin-hints {
  margin: -2px 0 12px;
}

.action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.utility-row {
  display: flex;
  gap: 8px;
  margin: -4px 0 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.utility-row.single {
  margin-top: -2px;
}

.utility-row.single .utility-button {
  padding: 8px 11px;
  font-size: 12px;
}

.action-button.active {
  border-color: rgba(255, 123, 34, 0.24);
  background: linear-gradient(180deg, rgba(255, 123, 34, 0.2), rgba(255, 104, 64, 0.08));
  color: #fff5eb;
}

.action-button.danger {
  border-color: rgba(255, 122, 92, 0.22);
  color: #ffd4cb;
}

.utility-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  white-space: nowrap;
}

.utility-button.active {
  border-color: rgba(255, 143, 72, 0.26);
  background: linear-gradient(180deg, rgba(255, 143, 72, 0.18), rgba(255, 122, 92, 0.07));
  color: #fff4e8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 18px rgba(255, 143, 72, 0.1);
}

.assignee-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.assignee-actions .utility-button {
  width: 100%;
  text-align: center;
}

.utility-button.danger {
  border-color: rgba(255, 122, 92, 0.2);
  color: #ffd4cb;
}

.assignee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.assignee-list.compact {
  margin-bottom: 0;
}

.assignee-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
}

.assignee-chip.current {
  border-color: rgba(60, 204, 138, 0.24);
  color: #ddffe9;
  background: rgba(60, 204, 138, 0.08);
}

.sheet-body {
  display: grid;
  gap: 12px;
}

.detail-block {
  border-radius: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--surface-strong);
}

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

.detail-head h4 {
  margin: 0;
  font-size: 16px;
}

.detail-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.detail-head-actions small {
  color: var(--muted);
  font-size: 12px;
}

.detail-block p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  line-height: 1.45;
}

.detail-list.muted,
.detail-list.muted li {
  color: var(--muted);
}

.note-list {
  display: grid;
  gap: 10px;
}

.note-row {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.note-row p {
  margin: 0;
  line-height: 1.45;
}

.note-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
}

.inline-control {
  min-height: 28px;
  padding-inline: 9px;
}

.deadline-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.7fr) auto;
  gap: 8px;
}

.project-deadline-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.deadline-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
}

.deadline-input.active,
.deadline-input:focus {
  border-color: rgba(255, 143, 72, 0.26);
  background: linear-gradient(180deg, rgba(255, 143, 72, 0.12), rgba(255, 122, 92, 0.05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 16px rgba(255, 143, 72, 0.08);
  outline: none;
}

.inline-action {
  border: none;
  background: transparent;
  color: #f0c39e;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.composer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(10px);
  z-index: 24;
}

.composer-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 25;
  border-radius: 26px 26px 0 0;
  max-height: 92vh;
  border: 1px solid var(--line);
  border-bottom: none;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(18, 18, 24, 0.98);
  box-shadow: var(--shadow);
}

.composer-shell {
  padding: 10px 14px 22px;
  display: grid;
  gap: 12px;
  max-height: 92vh;
  overflow-y: auto;
}

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

.composer-field {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
}

.composer-field.half {
  grid-column: span 1;
}

.composer-label {
  color: #eef0f3;
  font-size: 13px;
  font-weight: 700;
}

.composer-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.composer-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
}

.composer-input:focus {
  border-color: rgba(255, 143, 72, 0.36);
  box-shadow: 0 0 0 3px rgba(255, 143, 72, 0.08);
}

.composer-textarea {
  resize: vertical;
  min-height: 132px;
}

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

.subtask-list,
.link-card-list {
  display: grid;
  gap: 8px;
}

.subtask-row,
.link-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtask-row {
  align-items: flex-start;
}

.subtask-row.done {
  opacity: 0.82;
}

.subtask-row.done .subtask-copy strong {
  text-decoration: line-through;
  color: var(--muted);
}

.subtask-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffbe8b;
  flex: 0 0 auto;
}

.subtask-toggle.done {
  color: #e4fff0;
  border-color: rgba(60, 204, 138, 0.34);
  background: rgba(60, 204, 138, 0.08);
  font-size: 17px;
  font-weight: 900;
}

.subtask-toggle.archived {
  color: #ffd4cb;
  border-color: rgba(255, 90, 86, 0.34);
  background: rgba(255, 90, 86, 0.08);
  font-size: 16px;
  font-weight: 900;
}

.subtask-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.subtask-copy strong {
  font-size: 14px;
  line-height: 1.3;
}

.subtask-copy small,
.link-card small {
  color: var(--muted);
  font-size: 12px;
}

.subtask-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.subtask-done {
  color: #ffc08d !important;
}

.subtask-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  align-items: stretch;
  min-width: 88px;
}

.subtask-mini {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.subtask-mini[data-subtask-action="archive"] {
  border-color: rgba(255, 122, 92, 0.18);
  color: #ffd4cb;
}

.subtask-assign-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subtask-assign {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subtask-assign.current {
  border-color: rgba(60, 204, 138, 0.24);
  color: #ddffe9;
  background: rgba(60, 204, 138, 0.08);
}

.subtask-row.archived {
  opacity: 0.72;
}

.subtask-row.archived .subtask-copy strong {
  color: var(--muted);
}

.milestone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-card {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

@media (min-width: 960px) {
  .app-shell {
    width: min(100%, 1120px);
    padding: 24px 18px 40px;
  }

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

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

@media (max-width: 560px) {
  .section-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .summary-side {
    width: 100%;
    margin-left: 0;
    justify-self: stretch;
    justify-content: flex-end;
  }

  .summary-meta {
    margin-right: auto;
  }

  .section-summary h2 {
    font-size: 20px;
  }

  .section-kicker {
    margin-bottom: 6px;
  }

  .composer-fields {
    grid-template-columns: 1fr;
  }

  .composer-field.half {
    grid-column: 1 / -1;
  }
}
