:root {
  --task-ink: #10243d;
  --task-muted: #667891;
  --task-line: #dbe5ef;
  --task-surface: #ffffff;
  --task-blue: #087fa8;
  --task-blue-dark: #075b7b;
  --task-gold: #e4a410;
  --task-red: #d34f4f;
  --task-green: #14836d;
}

.keiri-task-nav {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.keiri-task-nav svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.keiri-task-nav:hover {
  background: rgba(255, 255, 255, 0.09);
}

.paulo-task-app {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  overflow: auto;
  color: var(--task-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(26, 175, 211, 0.15), transparent 30rem),
    radial-gradient(circle at 100% 100%, rgba(228, 164, 16, 0.12), transparent 34rem),
    #eef3f8;
}

.paulo-task-app.is-open {
  display: block;
}

.task-shell {
  width: min(1480px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

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

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

.task-brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #092943, #0793bd);
  box-shadow: 0 12px 28px rgba(8, 66, 96, 0.22);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.task-brand-eyebrow {
  margin: 0 0 2px;
  color: var(--task-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.task-brand h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.task-icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--task-line);
  border-radius: 15px;
  color: var(--task-ink);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 24px;
}

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

.task-summary-card {
  padding: 17px 19px;
  border: 1px solid rgba(219, 229, 239, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(36, 60, 86, 0.06);
}

.task-summary-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--task-muted);
  font-size: 13px;
  font-weight: 700;
}

.task-summary-card strong {
  font-size: 27px;
  line-height: 1;
}

.task-summary-card.is-alert strong {
  color: var(--task-red);
}

.task-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 180px;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(219, 229, 239, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(36, 60, 86, 0.06);
}

.task-button,
.task-toolbar input,
.task-toolbar select,
.task-form input,
.task-form textarea,
.task-form select {
  min-height: 46px;
  border: 1px solid #cedbe7;
  border-radius: 13px;
  color: var(--task-ink);
  background: #fff;
  font: inherit;
}

.task-toolbar input,
.task-toolbar select,
.task-form input,
.task-form textarea,
.task-form select {
  width: 100%;
  padding: 10px 13px;
  outline: none;
}

.task-toolbar input:focus,
.task-toolbar select:focus,
.task-form input:focus,
.task-form textarea:focus,
.task-form select:focus {
  border-color: var(--task-blue);
  box-shadow: 0 0 0 3px rgba(8, 127, 168, 0.12);
}

.task-button {
  padding: 0 18px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--task-blue-dark), #0e9aca);
  cursor: pointer;
  font-weight: 800;
}

.task-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.task-button.is-danger {
  background: #fff0f0;
  color: #b53232;
}

.task-button.is-quiet {
  border: 1px solid var(--task-line);
  color: var(--task-ink);
  background: #fff;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.task-column {
  min-height: 410px;
  padding: 14px;
  border: 1px solid rgba(219, 229, 239, 0.9);
  border-radius: 22px;
  background: rgba(248, 251, 253, 0.84);
}

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 3px 12px;
}

.task-column-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 17px;
}

.task-column-title::before {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--task-blue);
  content: "";
}

.task-column[data-status="doing"] .task-column-title::before { background: var(--task-gold); }
.task-column[data-status="done"] .task-column-title::before { background: var(--task-green); }

.task-column-count {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--task-muted);
  background: #e8eff5;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

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

.task-card {
  position: relative;
  padding: 15px;
  border: 1px solid var(--task-line);
  border-radius: 17px;
  background: var(--task-surface);
  box-shadow: 0 7px 22px rgba(36, 60, 86, 0.07);
}

.task-card.is-overdue {
  border-color: rgba(211, 79, 79, 0.45);
}

.task-card-top,
.task-card-meta,
.task-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card-top {
  justify-content: space-between;
}

.task-card h3 {
  margin: 10px 0 5px;
  font-size: 16px;
  line-height: 1.45;
}

.task-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 11px;
  color: var(--task-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.55;
}

.task-badge {
  padding: 4px 8px;
  border-radius: 99px;
  color: #7c5810;
  background: #fff3d6;
  font-size: 11px;
  font-weight: 800;
}

.task-badge[data-priority="high"] { color: #a02e2e; background: #ffe7e7; }
.task-badge[data-priority="low"] { color: #276b78; background: #e3f5f8; }

.task-project {
  overflow: hidden;
  color: var(--task-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.task-card-meta {
  justify-content: space-between;
  color: var(--task-muted);
  font-size: 12px;
}

.task-due.is-overdue {
  color: var(--task-red);
  font-weight: 800;
}

.task-card-actions {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf2f6;
}

.task-card-actions select {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--task-line);
  border-radius: 10px;
  color: var(--task-ink);
  background: #f8fafc;
}

.task-card-edit {
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: var(--task-blue-dark);
  background: #e7f4f8;
  cursor: pointer;
  font-weight: 800;
}

.task-empty,
.task-loading {
  padding: 42px 15px;
  color: var(--task-muted);
  text-align: center;
  font-size: 13px;
}

.task-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 25, 44, 0.52);
  backdrop-filter: blur(5px);
}

.task-dialog-backdrop.is-open { display: flex; }

.task-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 25, 44, 0.3);
}

.task-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.task-dialog h2 { margin: 0; font-size: 22px; }
.task-form { display: grid; gap: 14px; }
.task-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.task-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; }
.task-form textarea { min-height: 100px; resize: vertical; }
.task-form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; }
.task-form-actions-right { display: flex; gap: 10px; margin-left: auto; }
.task-error { display: none; padding: 10px 12px; border-radius: 12px; color: #a02e2e; background: #ffe9e9; font-size: 13px; }
.task-error.is-visible { display: block; }

@media (max-width: 900px) {
  .task-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-board { grid-template-columns: 1fr; }
  .task-column { min-height: 150px; }
}

@media (max-width: 600px) {
  .task-shell { padding: 14px 12px 28px; }
  .task-topbar { margin-bottom: 14px; }
  .task-brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .task-summary { gap: 8px; }
  .task-summary-card { padding: 13px 14px; border-radius: 16px; }
  .task-summary-card strong { font-size: 22px; }
  .task-toolbar { grid-template-columns: 1fr 1fr; }
  .task-toolbar .task-button { grid-column: 1 / -1; }
  .task-toolbar input { grid-column: 1 / -1; }
  .task-board { gap: 10px; }
  .task-column { padding: 11px; border-radius: 18px; }
  .task-dialog { padding: 19px 15px; border-radius: 20px; }
  .task-form-row { grid-template-columns: 1fr; }
  .task-form-actions { flex-wrap: wrap; }
}
