:root {
  --surface: rgba(255, 252, 247, 0.74);
  --surface-strong: #fffdf9;
  --surface-muted: #f5efe6;
  --surface-deep: #213547;
  --text: #1c2733;
  --text-soft: #5e6875;
  --primary: #0d8c7a;
  --primary-deep: #0a6357;
  --primary-soft: rgba(13, 140, 122, 0.14);
  --warning: #d99a1d;
  --warning-soft: rgba(217, 154, 29, 0.18);
  --danger-soft: rgba(183, 63, 63, 0.14);
  --line: rgba(28, 39, 51, 0.08);
  --shadow: 0 24px 60px rgba(27, 42, 56, 0.14);
  --shadow-soft: 0 14px 28px rgba(27, 42, 56, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 154, 29, 0.28), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(13, 140, 122, 0.22), transparent 26%),
    linear-gradient(135deg, #efe4d2 0%, #f5efe7 42%, #ebe6db 100%);
}

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

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
  position: relative;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.5;
  pointer-events: none;
}

.app-shell::before {
  width: 260px;
  height: 260px;
  top: 90px;
  right: 80px;
  background: rgba(13, 140, 122, 0.12);
}

.app-shell::after {
  width: 320px;
  height: 320px;
  left: -80px;
  bottom: 40px;
  background: rgba(217, 154, 29, 0.12);
}

.auth-view {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.auth-card,
.modal-card,
.column,
.toolbar,
.board-summary,
.topbar {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 460px);
  padding: 36px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(13, 140, 122, 0.18), rgba(217, 154, 29, 0.16));
  transform: rotate(16deg);
}

.brand h1,
.topbar h2,
.modal-header h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand p,
.auth-help p,
.history-panel-header p,
.user-badge small,
.eyebrow,
.column-header p,
.task-card p,
.meta-pill,
.history-item p,
.user-row p {
  color: var(--text-soft);
}

.brand-tag,
.column-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-tag {
  background: rgba(13, 122, 105, 0.12);
  color: var(--primary-deep);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.topbar-text {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.auth-form,
.user-form,
.task-form,
.toolbar {
  display: grid;
  gap: 16px;
}

.task-form {
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.task-form label {
  gap: 6px;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

textarea {
  resize: vertical;
}

.rich-editor {
  display: grid;
  gap: 6px;
  position: relative;
}

.rich-editor-toolbar {
  display: flex;
  gap: 6px;
}

.rich-editor-btn {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.rich-editor-btn.is-active {
  background: rgba(13, 122, 105, 0.14);
  border-color: rgba(13, 122, 105, 0.35);
  color: #0d7a69;
}

.rich-editor-content {
  min-height: 92px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 400;
  font-style: normal;
  border-radius: 16px;
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.rich-editor-content,
.rich-editor-content div,
.rich-editor-content p,
.rich-editor-content span {
  font-weight: 400;
  font-style: normal;
  text-decoration: none;
}

.rich-editor-content strong,
.rich-editor-content b {
  font-weight: 700;
}

.rich-editor-content em,
.rich-editor-content i {
  font-style: italic;
}

.rich-editor-content u {
  text-decoration: underline;
}

.rich-editor-content[data-rows="4"] {
  min-height: 92px;
}

.rich-editor-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-soft);
}

.rich-editor-content.is-disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.mention {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-right: 4px;
  margin-bottom: 3px;
  border-radius: 999px;
  background: rgba(13, 122, 105, 0.12);
  color: var(--primary-deep);
  font-weight: 700;
  vertical-align: middle;
  max-width: 100%;
  user-select: none;
}

.mention-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 4;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}

.mention-item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
}

.mention-item.is-active,
.mention-item:hover {
  background: rgba(13, 122, 105, 0.08);
}

.mention-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.mention-item-meta {
  font-size: 11px;
  color: var(--text-soft);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #1aa58d);
  color: white;
  font-weight: 800;
}

.secondary-btn {
  background: rgba(13, 122, 105, 0.1);
  color: var(--primary-deep);
  font-weight: 800;
}

.ghost-btn,
.icon-btn {
  background: rgba(24, 32, 42, 0.06);
  color: var(--text);
}

.notification-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  padding: 0.85rem 0.9rem;
}

.notification-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d54b4b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.danger-btn {
  background: var(--danger-soft);
  color: #8f3131;
  font-weight: 800;
}

.icon-btn {
  min-width: 88px;
}

.auth-help {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(240, 180, 41, 0.14);
}

.app-view {
  display: grid;
  gap: 18px;
}

.topbar,
.toolbar,
.board-summary {
  border-radius: 24px;
  padding: 18px 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.92), rgba(242, 248, 245, 0.82)),
    var(--surface);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-badge {
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(24, 32, 42, 0.06);
  display: grid;
}

.toolbar {
  grid-template-columns: 1.4fr 1fr;
}

.toggle-box {
  align-content: end;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
}

.toggle-inline input {
  width: 18px;
  height: 18px;
}

.report-group {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.report-group p {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-soft);
}

.report-group strong {
  font-size: 13px;
}

.report-group + .report-group {
  margin-top: 12px;
}

.report-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.report-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.report-item strong {
  font-size: 13px;
  margin-bottom: 4px;
}

.report-item p {
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-soft);
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.summary-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary), var(--warning));
}

.summary-card strong {
  display: block;
  font-size: 26px;
  margin-top: 6px;
}

.summary-card.alert::before {
  background: linear-gradient(180deg, #d54b4b, #ff8a65);
}

.summary-card.alert strong {
  color: #972d2d;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.column {
  min-height: 68vh;
  border-radius: 28px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 250, 244, 0.76)),
    var(--surface);
}

.column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.column-header h3,
.column-header p {
  margin: 0;
}

.column-toggle-btn {
  border: 1px solid var(--line);
  background: rgba(24, 32, 42, 0.05);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.column-toggle-btn:hover {
  background: rgba(24, 32, 42, 0.1);
  color: var(--text);
}

.column.is-collapsed {
  min-height: auto;
}

.column.is-collapsed .card-list {
  display: none;
}

.column.is-collapsed .column-toggle-btn {
  background: rgba(13, 122, 105, 0.1);
  border-color: rgba(13, 122, 105, 0.25);
  color: #0d7a69;
}

.column-tag.todo {
  background: rgba(24, 32, 42, 0.08);
}

.column-tag.doing {
  background: rgba(240, 180, 41, 0.2);
  color: #865d00;
}

.column-tag.done {
  background: rgba(13, 122, 105, 0.16);
  color: var(--primary-deep);
}

.column-tag.cancelled {
  background: rgba(183, 63, 63, 0.14);
  color: #8f3131;
}

.card-list {
  min-height: 160px;
  display: grid;
  gap: 14px;
}

.card-list.drag-over {
  outline: 2px dashed rgba(13, 122, 105, 0.35);
  outline-offset: 6px;
  border-radius: 18px;
}

.task-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 24px rgba(31, 38, 46, 0.07);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), #49bca8);
}

.task-card.locked {
  border-color: rgba(185, 60, 60, 0.25);
}

.task-card.locked::before {
  background: linear-gradient(180deg, #c05a5a, #e0a5a5);
}

.task-card.overdue {
  border-color: rgba(185, 60, 60, 0.35);
  background: linear-gradient(180deg, #fff9f7, #fff3f0);
  box-shadow: 0 18px 34px rgba(185, 60, 60, 0.22);
  animation: overduePulse 1.15s ease-in-out infinite;
}

.task-card.overdue::before {
  width: 8px;
  background: linear-gradient(180deg, #d54b4b, #ff8a65);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.task-card h4 {
  margin: 0;
  font-size: 17px;
}

.task-card p {
  margin: 0;
  font-size: 13px;
}

.task-card-meta,
.meta-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.meta-pill.alert {
  background: rgba(213, 75, 75, 0.12);
  border-color: rgba(213, 75, 75, 0.24);
  color: #972d2d;
}

.due-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(213, 75, 75, 0.14), rgba(255, 138, 101, 0.14));
  border: 1px solid rgba(213, 75, 75, 0.2);
  color: #8c2f2f;
  font-size: 13px;
  font-weight: 800;
}

.due-warning::before {
  content: "!";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d54b4b;
  color: #fff;
}

@keyframes overduePulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 28px rgba(185, 60, 60, 0.16);
  }
  50% {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 22px 38px rgba(213, 75, 75, 0.34);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 28px rgba(185, 60, 60, 0.16);
  }
}

.field-title {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.assignee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.assignee-option {
  position: relative;
}

.assignee-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.assignee-option input:checked + .assignee-chip {
  background: var(--primary-soft);
  border-color: rgba(13, 140, 122, 0.26);
  color: var(--primary-deep);
}

.assignee-avatar,
.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--surface-deep);
  background: linear-gradient(135deg, #d9efe9, #f6dca6);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 6px rgba(24, 32, 42, 0.08);
}

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

.mini-avatar {
  width: auto;
  min-width: 28px;
  padding: 0 8px;
  border-radius: 999px;
}

.mini-avatar.is-creator {
  box-shadow: 0 0 0 2px rgba(24, 32, 42, 0.18);
}

.mini-avatar.is-current-user {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(13, 122, 105, 0.35), 0 4px 10px rgba(13, 122, 105, 0.18);
}

.empty-assignees {
  color: var(--text-soft);
  font-size: 13px;
}

.approval-panel {
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid var(--line);
}

.approval-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

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

.approval-step-toolbar {
  display: flex;
  justify-content: flex-end;
}

.approval-steps {
  display: grid;
  gap: 10px;
}

.approval-step-card {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.approval-step-card.is-current-step {
  border-color: rgba(13, 122, 105, 0.32);
  box-shadow: 0 0 0 1px rgba(13, 122, 105, 0.12);
}

.approval-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.approval-step-header strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.approval-step-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.approval-step-meta {
  margin-top: 8px;
}

.approval-step-meta p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-soft);
}

.approval-step-meta p + p {
  margin-top: 3px;
}

.approval-step-files {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.approval-step-file {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(245, 241, 233, 0.82);
}

.approval-step-file p,
.approval-step-empty {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--text-soft);
}

.approval-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.approval-summary p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.approval-summary p + p {
  margin-top: 4px;
}

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

.approval-reason {
  margin-top: 12px;
}

.approval-reason .history-list {
  margin-top: 8px;
}

.approval-viewer-info {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.approval-viewer-info p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.approval-viewer-info p + p {
  margin-top: 4px;
}

.approval-viewer-content {
  max-height: 62vh;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 6px;
}

.approval-preview-item {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.approval-preview-meta {
  margin-bottom: 10px;
}

.approval-preview-meta strong {
  display: inline-block;
  margin-right: 8px;
  font-size: 13px;
}

.approval-preview-meta p {
  margin: 6px 0 0;
  font-size: 12px;
}

.approval-preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.approval-preview-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}

.approval-preview-fallback {
  padding: 14px;
  border-radius: 14px;
  background: rgba(245, 241, 233, 0.82);
}

.approval-preview-fallback p {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.approval-badge {
  font-weight: 800;
}

.approval-badge.pending {
  background: rgba(214, 157, 25, 0.15);
  color: #8b6200;
}

.approval-badge.blocked {
  background: rgba(94, 111, 130, 0.12);
  color: #57697c;
}

.approval-badge.approved {
  background: rgba(13, 122, 105, 0.14);
  color: #0d7a69;
}

.approval-badge.rejected {
  background: rgba(213, 75, 75, 0.14);
  color: #972d2d;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.column[data-status="todo"] .task-card,
.column[data-status="doing"] .task-card,
.column[data-status="done"] .task-card,
.column[data-status="cancelled"] .task-card {
  padding: 12px 14px;
  gap: 8px;
  border-radius: 18px;
}

.column[data-status="todo"] .task-card h4,
.column[data-status="doing"] .task-card h4,
.column[data-status="done"] .task-card h4,
.column[data-status="cancelled"] .task-card h4 {
  font-size: 15px;
}

.column[data-status="todo"] .task-card p,
.column[data-status="doing"] .task-card p,
.column[data-status="done"] .task-card p,
.column[data-status="cancelled"] .task-card p {
  font-size: 12px;
}

.column[data-status="todo"] .meta-pill,
.column[data-status="doing"] .meta-pill,
.column[data-status="done"] .meta-pill,
.column[data-status="cancelled"] .meta-pill {
  padding: 5px 8px;
  font-size: 11px;
}

.column[data-status="todo"] .task-card-footer,
.column[data-status="doing"] .task-card-footer,
.column[data-status="done"] .task-card-footer,
.column[data-status="cancelled"] .task-card-footer {
  align-items: flex-start;
}

.column[data-status="todo"] .task-card-actions .small-btn,
.column[data-status="doing"] .task-card-actions .small-btn,
.column[data-status="done"] .task-card-actions .small-btn,
.column[data-status="cancelled"] .task-card-actions .small-btn {
  padding: 8px 10px;
  font-size: 12px;
}

.column[data-status="todo"] .due-warning,
.column[data-status="doing"] .due-warning,
.column[data-status="done"] .due-warning,
.column[data-status="cancelled"] .due-warning {
  padding: 8px 10px;
  font-size: 12px;
}

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

.card-status-control {
  display: none;
  min-width: 128px;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.card-status-control select {
  min-height: 34px;
  padding: 7px 30px 7px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  background-color: rgba(255, 255, 255, 0.86);
}

.small-btn {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 19, 22, 0.45);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 20;
}

.modal-card {
  width: min(100%, 620px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 28px;
  padding: 24px;
}

.modal-large {
  width: min(100%, 880px);
}

.modal-header,
.history-panel-header,
.user-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.history-panel-header {
  gap: 6px;
}

.history-panel-header h4,
.history-panel-header p {
  margin: 0;
}

.history-panel-header h4 {
  font-size: 13px;
}

.history-panel-header p {
  font-size: 10px;
  line-height: 1.1;
}

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

.inline-triplet {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.full-width {
  grid-column: 1 / -1;
}

.history-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface-muted);
}

.history-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.history-item,
.user-row {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px;
}

.history-item strong,
.user-row strong {
  display: block;
  margin-bottom: 2px;
}

.mention-notification-item {
  width: 100%;
  text-align: left;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px;
  min-height: 0;
}

.mention-notification-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.mention-notification-item p {
  margin: 0 0 4px;
  font-size: 0.88rem;
  line-height: 1.3;
}

.mention-notification-item p:last-child {
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.mention-notification-item.is-unread {
  border-color: rgba(13, 122, 105, 0.28);
  background: rgba(13, 122, 105, 0.06);
}

.history-item strong {
  font-size: 12px;
}

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

.user-row p {
  font-size: 12px;
  line-height: 1.3;
}

.user-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.history-item p {
  font-size: 10px;
  line-height: 1.15;
}

.attachment-link {
  display: block;
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
}

.task-card .report-item {
  padding: 8px 10px;
  border-radius: 14px;
}

.task-card .attachment-link {
  font-size: 11px;
  line-height: 1.15;
  font-weight: 600;
}

.task-card .report-item p {
  font-size: 10px;
}

.attachment-link:hover {
  text-decoration: underline;
}

.modal-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 18px;
}

.user-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(13, 122, 105, 0.12);
  color: var(--primary-deep);
}

.role-badge.consultor {
  background: rgba(24, 32, 42, 0.08);
  color: var(--text);
}

.role-badge.consultor_operacional {
  background: rgba(24, 32, 42, 0.08);
  color: var(--text);
}

.role-badge.administrativo {
  background: rgba(24, 32, 42, 0.08);
  color: var(--text);
}

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

.agenda-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.agenda-table-wrap {
  margin-top: 12px;
}

.agenda-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.agenda-pagination span {
  font-size: 12px;
  color: var(--text-soft);
}

.agenda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.agenda-table th,
.agenda-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.agenda-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #17212d;
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 30;
}

@media (max-width: 1024px) {
  .board,
  .board-summary,
  .toolbar,
  .form-grid,
  .inline-triplet {
    grid-template-columns: 1fr;
  }

  .column {
    min-height: auto;
  }

  .board {
    gap: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .card-status-control {
    display: grid;
  }

  .task-card-actions {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px;
  }

  .auth-card,
  .topbar,
  .toolbar,
  .board-summary,
  .column,
  .modal-card {
    padding: 14px;
    border-radius: 20px;
  }

  .topbar,
  .topbar-actions,
  .task-card-footer,
  .modal-actions,
  .modal-header,
  .history-panel-header,
  .user-row {
    flex-direction: column;
    align-items: stretch;
  }

  .brand h1,
  .topbar h2,
  .modal-header h3 {
    font-size: 1.35rem;
  }

  .topbar-actions,
  .modal-actions,
  .task-card-actions {
    gap: 8px;
  }

  .topbar-actions > button,
  .modal-actions > button,
  .task-card-actions > button,
  .card-status-control,
  .notification-btn {
    width: 100%;
  }

  .notification-btn {
    min-width: 0;
    height: 44px;
  }

  .toolbar {
    gap: 10px;
  }

  input,
  select,
  textarea,
  .rich-editor-content {
    min-height: 44px;
    font-size: 14px;
  }

  .board {
    gap: 12px;
  }

  .column {
    padding: 12px;
  }

  .column-header {
    align-items: center;
  }

  .column-tag {
    padding: 5px 10px;
    font-size: 11px;
  }

  .column-header h3 {
    font-size: 15px;
  }

  .task-card {
    border-radius: 16px;
  }

  .task-card-header {
    align-items: flex-start;
  }

  .task-card h4 {
    font-size: 14px;
  }

  .task-card p,
  .meta-pill {
    font-size: 11px;
  }

  .role-badge {
    font-size: 11px;
    padding: 6px 9px;
  }

  .modal {
    padding: 8px;
    align-items: start;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
  }

  .form-grid,
  .inline-triplet {
    gap: 10px;
  }

  .history-item,
  .mention-notification-item,
  .report-item {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    text-align: center;
  }
}
