:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --ink: #17191c;
  --muted: #6f7680;
  --border: #e3e6ea;
  --accent: #17191c;
  --accent-2: #2c3138;
  --success-bg: #e9f7ef;
  --success: #167443;
  --warning-bg: #fff4df;
  --warning: #9a6500;
  --danger-bg: #fff0ef;
  --danger: #b42b22;
  --blue-bg: #eef4ff;
  --blue: #315dca;
  --shadow: 0 18px 50px rgba(22, 26, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, select {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #111315;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: #111315;
  font-weight: 900;
}

.org-card {
  padding: 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
}

.org-card .eyebrow {
  color: rgba(255,255,255,.52);
}

.org-name {
  margin: 4px 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.org-card select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: #1b1e21;
  color: white;
  padding: 9px 10px;
  border-radius: 9px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  color: rgba(255,255,255,.68);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.nav a:hover, .nav a.active {
  color: white;
  background: rgba(255,255,255,.09);
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.user-card {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2b2f34;
  font-weight: 800;
}

.user-text {
  min-width: 0;
}

.user-text strong, .user-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-text strong {
  font-size: 13px;
}

.user-text small {
  margin-top: 2px;
  color: rgba(255,255,255,.52);
  font-size: 11px;
}

.main {
  min-width: 0;
}

.topbar {
  height: 86px;
  padding: 0 32px;
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h2, .panel h3 {
  margin: 2px 0 0;
  letter-spacing: -0.035em;
}

.content {
  padding: 28px 32px 52px;
  max-width: 1600px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  font-weight: 800;
}

.button,
button.button,
.buttonlike {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--accent);
  color: #fff;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
}

.button:hover {
  background: var(--accent-2);
}

.button.large {
  min-height: 48px;
  padding: 0 19px;
  border-radius: 12px;
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  font-weight: 650;
}

.sidebar .ghost {
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
}

.full {
  width: 100%;
}

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

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}

.grid.task-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px;
  box-shadow: 0 1px 1px rgba(20,22,25,.02);
}

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

.panel-head a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list {
  display: grid;
}

.list-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding: 10px 2px;
}

.list-row:first-child {
  border-top: 0;
}

.list-row:hover {
  background: var(--surface-soft);
}

.list-row.static:hover {
  background: transparent;
}

.list-row strong, .list-row small {
  display: block;
}

.list-row strong {
  font-size: 13px;
}

.list-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.right {
  text-align: right;
}

.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

.pill.low {
  background: #f2f3f5;
  color: #626872;
}

.pill.normal {
  background: var(--blue-bg);
  color: var(--blue);
}

.pill.high {
  background: var(--warning-bg);
  color: var(--warning);
}

.pill.urgent {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-chip {
  background: #f2f3f5;
  color: #5d636c;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-row {
  display: flex;
  gap: 8px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid #d9dde2;
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  min-height: 40px;
  padding: 9px 11px;
  outline: none;
}

textarea {
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: #9ea5ae;
  box-shadow: 0 0 0 3px rgba(30,34,39,.06);
}

.toolbar select {
  width: auto;
  min-width: 180px;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.column {
  min-height: 620px;
  padding: 10px;
  border-radius: 14px;
  background: #eceff2;
}

.column-head {
  height: 38px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #59616a;
  font-size: 12px;
}

.column-head span {
  background: rgba(255,255,255,.7);
  min-width: 24px;
  text-align: center;
  padding: 3px 7px;
  border-radius: 999px;
}

.dropzone {
  min-height: 560px;
  display: grid;
  align-content: start;
  gap: 8px;
  border-radius: 10px;
}

.dropzone.drag-over {
  outline: 2px dashed #9ca3ac;
  outline-offset: 2px;
}

.task-card {
  background: white;
  border: 1px solid #dfe3e7;
  border-radius: 11px;
  padding: 12px;
  box-shadow: 0 1px 1px rgba(20,24,28,.03);
}

.task-card.dragging {
  opacity: .5;
}

.task-card a,
.task-card small {
  display: block;
}

.task-card strong {
  display: block;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.4;
}

.task-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

tbody tr:hover {
  background: #fafbfc;
}

.form-panel {
  max-width: 900px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  color: #515862;
  font-size: 11px;
  font-weight: 750;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.form-actions .ghost {
  color: var(--ink);
}

.task-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.description {
  color: #41464d;
  line-height: 1.7;
  white-space: pre-wrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
}

.tags span {
  color: #4e5660;
  background: #f1f3f5;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.detail-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.comments {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
}

.comment {
  padding: 11px;
  background: #f6f7f9;
  border-radius: 10px;
}

.comment strong {
  font-size: 11px;
}

.comment p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.5;
}

.comment small {
  color: var(--muted);
  font-size: 9px;
}

.comment-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.comment-form .button {
  justify-self: end;
}

.empty {
  color: var(--muted);
  padding: 22px 10px;
  text-align: center;
  font-size: 12px;
}

.flash {
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 650;
}

.flash.success {
  background: var(--success-bg);
  color: var(--success);
}

.flash.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 42%) 1fr;
  background: white;
}

.landing-panel {
  padding: 34px 7vw;
  display: flex;
  flex-direction: column;
}

.landing-brand {
  align-self: flex-start;
}

.landing-copy {
  margin: auto 0;
  max-width: 520px;
}

.landing-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(46px, 5vw, 76px);
  line-height: .96;
  letter-spacing: -0.07em;
}

.landing-copy p {
  max-width: 480px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.landing-copy small {
  display: block;
  margin-top: 14px;
  color: #8a9098;
}

.landing-visual {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 5vw;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.85), transparent 35%),
    linear-gradient(145deg, #eceff3, #ced4dc);
}

.mock-window {
  width: min(860px, 100%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mock-top {
  height: 48px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid #e5e7ea;
}

.mock-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8dce1;
}

.mock-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 22px;
  min-height: 420px;
  background: #f5f6f8;
}

.mock-col {
  padding: 10px;
  border-radius: 13px;
  background: #eaedf1;
}

.mock-col > b {
  display: block;
  color: #636b75;
  padding: 5px;
  font-size: 11px;
}

.mock-task {
  margin-top: 9px;
  padding: 13px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e1e4e8;
}

.mock-task small,
.mock-task strong,
.mock-task span {
  display: block;
}

.mock-task small {
  color: #7e858d;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mock-task strong {
  margin: 10px 0 18px;
  font-size: 12px;
}

.mock-task span {
  color: #777f88;
  font-size: 9px;
}

@media (max-width: 1050px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .landing-visual {
    min-height: 55vh;
  }
}

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

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

  .nav {
    grid-template-columns: repeat(5, minmax(0,1fr));
    overflow-x: auto;
  }

  .sidebar-bottom {
    display: none;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 20px 16px 40px;
  }

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

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

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

  table {
    min-width: 760px;
  }

  .landing-panel {
    min-height: 75vh;
    padding: 28px;
  }

  .landing-visual {
    display: none;
  }
}
