.atm-board {
  --atm-bg: #f7f9fc;
  --atm-surface: #ffffff;
  --atm-border: #dde5f2;
  --atm-border-strong: #c7d4ea;
  --atm-accent: #2e5fcc;
  --atm-accent-soft: #e8efff;
  --atm-text: #1a2640;
  --atm-muted: #5a6882;

  color: var(--atm-text);
  background: var(--atm-bg);
  padding: 20px;
}

.azua-subpage.atm-host-wide {
  max-width: none !important;
  margin-left: 24px;
  margin-right: 24px;
}

.atm-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #ccd9f3;
  border-radius: 8px;
  background: #eef3ff;
}

.atm-toolbar {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.atm-pending-filter-btn {
  min-height: 40px;
  border: 1px solid #e49a33;
  background: #ffb347;
  color: #4d2a00;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.atm-pending-filter-btn.is-active {
  background: #f39b1f;
  border-color: #d07f11;
  color: #ffffff;
}

.atm-pending-count-badge {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #8a4f00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1;
}

.atm-pending-filter-btn.is-active .atm-pending-count-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.atm-open-create-modal {
  min-height: 40px;
  border: 1px solid var(--atm-accent);
  background: var(--atm-accent);
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
}

.atm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.atm-main {
  min-width: 0;
}

.atm-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}

.atm-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.atm-filters select,
.atm-filters button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--atm-border);
  background: #fff;
  color: var(--atm-text);
}

.atm-filters button {
  background: var(--atm-accent);
  border-color: var(--atm-accent);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
}

.atm-list-header,
.atm-task-row {
  display: grid;
  grid-template-columns: 120px 120px minmax(160px, 1fr) minmax(220px, 1.5fr) 170px 150px 130px 90px;
  gap: 12px;
  align-items: center;
}

.atm-list-header {
  position: sticky;
  top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--atm-border);
  background: #edf2fc;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #2a416f;
  white-space: nowrap;
}

.atm-sortable-header {
  cursor: pointer;
  user-select: none;
}

.atm-sortable-header::after {
  content: ' ↕';
  color: #6f84aa;
  font-size: 11px;
}

.atm-sortable-header.is-sorted-asc::after {
  content: ' ↑';
  color: #2e5fcc;
}

.atm-sortable-header.is-sorted-desc::after {
  content: ' ↓';
  color: #2e5fcc;
}

.atm-task-list {
  border: 1px solid var(--atm-border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(40, 72, 132, 0.08);
}

.atm-task-row {
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid #e9eff9;
  background: #fff;
  color: var(--atm-text);
  padding: 11px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

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

.atm-task-row:hover,
.atm-task-row.is-active {
  background: #f3f7ff;
}

.atm-task-row.is-dragging {
  opacity: 0.45;
}

.atm-task-row.is-drop-target {
  box-shadow: inset 0 2px 0 0 #4d7de0;
}

.atm-col-title,
.atm-col-owner,
.atm-col-time,
.atm-col-content,
.atm-col-category,
.atm-col-reactions {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atm-col-content,
.atm-col-time,
.atm-col-category {
  color: var(--atm-muted);
}

.atm-category-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #d3d8e2;
  background: #eef1f6;
  color: #1f2430;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.atm-category-general {
  background: #eceff3;
  border-color: #d5dbe3;
  color: #1d2533;
}

.atm-category-bug {
  background: #ffe5e5;
  border-color: #f2b7b7;
  color: #a82222;
}

.atm-category-improvement {
  background: #e6f5ea;
  border-color: #bddfc8;
  color: #1f7f47;
}

.atm-category-feature {
  background: #e5efff;
  border-color: #bfd1f3;
  color: #2456b8;
}

.atm-category-none {
  background: #eff1f5;
  border-color: #d8dde6;
  color: #657285;
}

.atm-col-reactions {
  color: #34548a;
  font-weight: 700;
}

.atm-status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.atm-status-todo {
  background: #e9eef8;
  color: #465a86;
}

.atm-status-in-progress {
  background: #d9ecff;
  color: #1e5faf;
}

.atm-status-review {
  background: #fff0c9;
  color: #8b6300;
}

.atm-status-debug-wait {
  background: #ffe6cc;
  color: #944f00;
}

.atm-status-fixing {
  background: #ffd9e3;
  color: #8e1842;
}

.atm-status-done {
  background: #ddf5e6;
  color: #1d7c4a;
}

.atm-status-none {
  background: #eff2f7;
  color: #6a778f;
}

.atm-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.atm-modal[hidden] {
  display: none !important;
}

.atm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 30, 54, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.atm-detail-modal .atm-modal-backdrop {
  background: rgba(18, 30, 54, 0.35);
}

.atm-modal-dialog {
  position: relative;
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  margin: 0;
  border-radius: 10px;
  background: #fff;
  border: 0;
  box-shadow: none;
  padding: 16px;
  z-index: 1;
}

.atm-detail-dialog {
  width: min(1320px, calc(100vw - 16px));
  max-height: calc(100dvh - 12px);
  border: 1px solid #b7c9ea;
  box-shadow: 0 24px 56px rgba(21, 43, 86, 0.28);
  overflow: hidden;
}

.atm-detail-dialog h4 {
  margin: 0 0 12px;
  color: #17386f;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(180deg, #eff4ff 0%, #e5edff 100%);
  border: 1px solid #c2d2f2;
  border-radius: 12px;
  padding: 13px 16px;
}

.atm-detail-modal-body {
  max-height: calc(100dvh - 132px);
  overflow: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.atm-panel-task {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.atm-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 18px;
  min-height: clamp(520px, 72dvh, 860px);
}

.atm-detail-col,
.atm-comment-col {
  min-width: 0;
}

.atm-comment-col {
  border-left: 1px solid #d7e2f4;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.atm-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--atm-border);
  background: #fff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
}

.atm-create-task {
  margin-top: 10px;
}

.atm-create-modal {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
}

.atm-create-modal .atm-modal-dialog {
  width: min(1320px, calc(100vw - 16px));
  max-height: calc(100dvh - 12px);
  border: 1px solid #b9cbee;
  border-radius: 14px;
  box-shadow: 0 24px 56px rgba(20, 45, 92, 0.26);
  overflow: hidden;
  background: #ffffff;
  padding: 16px;
}

.atm-create-modal .atm-create-task {
  max-height: calc(100dvh - 84px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.atm-create-drop-hint {
  margin: -4px 0 2px;
  color: #435f8f;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.atm-create-task form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atm-create-task label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atm-create-modal .atm-create-task form {
  gap: 12px;
}

.atm-create-modal .atm-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.atm-create-modal .atm-create-left,
.atm-create-modal .atm-create-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atm-create-modal .atm-create-right {
  border-left: 1px solid #d7e2f5;
  padding-left: 14px;
  position: sticky;
  top: 0;
  align-self: start;
}

.atm-create-modal .atm-create-task label {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
  color: #1b3f7a;
}

.atm-create-task input[type='text'],
.atm-create-task select,
.atm-create-task input[type='file'] {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--atm-border);
  padding: 6px 8px;
}

.atm-create-modal .atm-create-task input[type='text'],
.atm-create-modal .atm-create-task select,
.atm-create-modal .atm-create-task input[type='file'] {
  min-height: 42px;
  border: 1px solid #b9cbed;
  background: #ffffff;
  color: #192e53;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.atm-create-task button[type='submit'] {
  align-self: flex-start;
  min-height: 38px;
  border: 1px solid var(--atm-accent);
  background: var(--atm-accent);
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
}

.atm-create-modal .atm-create-task button[type='submit'] {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff !important;
  background: var(--atm-accent) !important;
  border-color: var(--atm-accent) !important;
  line-height: 1.2;
  text-indent: 0;
  -webkit-text-fill-color: #ffffff;
}

.atm-create-modal .atm-create-right button[type='submit'] {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.atm-create-modal .atm-create-submit {
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 8px 18px rgba(46, 95, 204, 0.24);
  min-width: 180px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 16px;
  opacity: 1;
  visibility: visible;
  background: #2e5fcc !important;
  border-color: #2e5fcc !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 800;
}

.atm-create-modal button.atm-create-submit,
.atm-create-modal .atm-create-task button[type='submit'].atm-create-submit {
  background: #2e5fcc !important;
  border-color: #2e5fcc !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.atm-create-task .wp-editor-tabs,
.atm-create-task .quicktags-toolbar {
  display: none !important;
}

.atm-create-task .wp-editor-wrap,
.atm-create-task .wp-editor-container,
.atm-create-task .mce-toolbar-grp {
  border-color: var(--atm-border);
}

.atm-create-task .wp-media-buttons .button,
.atm-create-task .mce-btn button {
  border-color: var(--atm-border);
  background: #f3f6fb;
  color: var(--atm-text);
}

.atm-create-modal .wp-editor-wrap {
  border: 1px solid #bfd0ee;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.atm-create-modal .wp-editor-tools {
  padding: 6px 8px 0;
  background: #f4f8ff;
}

.atm-create-modal .tmce-active .wp-editor-area,
.atm-create-modal .wp-editor-area {
  font-size: 15px;
  line-height: 1.75;
  color: #1d3358;
  min-height: 320px;
}

.atm-create-modal .mce-edit-area iframe {
  min-height: 320px !important;
}

.atm-create-modal .mce-toolbar-grp,
.atm-create-modal .quicktags-toolbar {
  background: #f6f9ff !important;
}

.atm-create-modal .mce-content-body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

.atm-create-modal .mce-edit-area {
  border-top: 1px solid #d3def3 !important;
}

.atm-panel-task h5 {
  margin: 0;
  font-size: 18px;
  color: var(--atm-text);
}

.atm-panel-meta {
  margin: 8px 0 12px;
  color: var(--atm-muted);
  font-size: 12px;
}

.atm-panel-content {
  color: var(--atm-text);
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid var(--atm-border);
  padding-top: 12px;
  margin-top: 12px;
}

.atm-panel-content img {
  max-width: 100%;
  height: auto;
}

.atm-inline-edit-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atm-inline-edit-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--atm-text);
}

.atm-inline-edit-form input,
.atm-inline-edit-form textarea,
.atm-inline-edit-form select {
  border: 1px solid var(--atm-border-strong);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--atm-text);
  padding: 8px;
}

.atm-inline-edit-form textarea {
  min-height: 130px;
  resize: vertical;
}

.atm-inline-content-editable {
  border: 1px solid var(--atm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--atm-text);
  padding: 10px;
  min-height: 160px;
  line-height: 1.7;
}

.atm-inline-content-editable:focus {
  outline: 2px solid #83a7ea;
  outline-offset: 1px;
}

.atm-inline-content-editable img {
  max-width: 100%;
  height: auto;
}

.atm-inline-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.atm-inline-edit-form button {
  align-self: flex-start;
  min-height: 36px;
  border: 1px solid var(--atm-accent);
  background: var(--atm-accent);
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
}

.atm-inline-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.atm-inline-edit-actions .atm-delete-task-btn {
  border: 1px solid #d95c5c;
  background: #ffffff;
  color: #af2a2a;
}

.atm-inline-edit-actions .atm-delete-task-btn:hover {
  background: #fff1f1;
}

.atm-comment-list {
  margin-top: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.atm-comment-list h6 {
  margin: 0 0 8px;
  font-size: 14px;
}

.atm-comment-item {
  border: 1px solid var(--atm-border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fbfcff;
}

.atm-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--atm-muted);
  font-size: 12px;
}

.atm-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e8efff;
  border: 1px solid #c9d7f3;
  color: #234b94;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.atm-comment-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.atm-comment-head strong {
  color: var(--atm-text);
  font-size: 13px;
}

.atm-comment-head time {
  color: var(--atm-muted);
}

.atm-comment-body {
  font-size: 13px;
  color: var(--atm-text);
}

.atm-comment-body .atm-comment-attachment {
  margin: 8px 0 0;
}

.atm-comment-body .atm-comment-image {
  max-width: min(320px, 100%);
  height: auto;
  border: 1px solid #d6deec;
  border-radius: 8px;
}

.atm-comment-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.atm-comment-drop-hint {
  margin: -2px 0 0;
  color: #4a6593;
  font-size: 12px;
  line-height: 1.4;
}

.atm-comment-file-input {
  min-height: 34px;
  border: 1px dashed #bfd0ee;
  border-radius: 8px;
  background: #f8fbff;
  padding: 6px;
}

.atm-comment-form textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--atm-border);
  padding: 8px;
  color: var(--atm-text);
  background: #fcfdff;
}

.atm-comment-form button {
  align-self: flex-start;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--atm-accent);
  background: var(--atm-accent);
  color: #fff;
  padding: 0 12px;
}

.atm-detail-modal .atm-inline-edit-form,
.atm-detail-modal .atm-comment-form {
  position: relative;
  z-index: 5;
}

.atm-detail-modal .atm-inline-edit-form button,
.atm-detail-modal .atm-comment-form button {
  position: relative;
  z-index: 6;
  pointer-events: auto;
  cursor: pointer;
}

.atm-detail-modal .atm-comment-form button:disabled,
.atm-detail-modal .atm-inline-edit-form button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.atm-attachments {
  margin-top: 12px;
  border: 1px solid #bfd0ee;
  border-radius: 10px;
  background: #f7faff;
  padding: 10px;
}

.atm-attachment-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.atm-attachment-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d3ddeb;
  border-radius: 8px;
  background: #ffffff;
  color: #2455bd;
  text-decoration: none;
}

.atm-attachment-item:hover {
  border-color: #9db8ea;
  background: #f7faff;
}

.atm-attachment-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid #d8e1ef;
  border-radius: 6px;
}

.atm-attachment-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px;
  border: 1px dashed #b7c9e8;
  border-radius: 6px;
  color: #4a6593;
  background: #f5f8ff;
  font-size: 13px;
  font-weight: 700;
}

.atm-attachment-name {
  font-size: 12px;
  line-height: 1.4;
  color: #284c86;
  word-break: break-all;
}

.atm-reactions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.atm-reaction-btn {
  border: 1px solid var(--atm-border);
  border-radius: 999px;
  background: #fff;
  min-height: 30px;
  padding: 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.atm-reaction-btn.is-active {
  background: #eef4ff;
  border-color: var(--atm-accent);
}

.atm-detail-modal {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.atm-detail-modal .atm-detail-dialog {
  width: min(1320px, calc(100vw - 16px));
  max-height: calc(100dvh - 12px);
  height: calc(100dvh - 12px);
  border: 1px solid #d8dce4;
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(22, 33, 56, 0.2);
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.atm-detail-modal .atm-detail-modal-body {
  max-height: none;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.atm-detail-modal .atm-panel-task {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.atm-detail-modal .atm-detail-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.atm-detail-modal .atm-detail-col {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}

.atm-detail-modal .atm-comment-col {
  border-left: 1px solid #d7e2f5;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.atm-detail-modal .atm-panel-task h5 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 800;
  color: #112e5f;
}

.atm-detail-modal .atm-panel-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
}

.atm-detail-modal .atm-panel-topline-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.atm-detail-modal .atm-panel-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.atm-detail-modal .atm-info-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid #d0d5df;
  border-radius: 999px;
  background: #ffffff;
  color: #2d405f;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.atm-detail-modal .atm-info-status {
  border-color: #bfd0ee;
  color: #204479;
}

.atm-detail-modal .atm-info-category {
  border-color: #d5d9e1;
  color: #394a63;
}

.atm-detail-modal .atm-panel-meta {
  margin: 0;
  display: inline-block;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #d4d8df;
  background: #ffffff;
  color: #4e5f7b;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
}

.atm-detail-modal .atm-panel-topline-right .atm-reactions {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  flex-wrap: nowrap;
}

.atm-detail-modal .atm-inline-edit-form {
  gap: 12px;
  padding: 13px;
  border: 1px solid #d9dde5;
  border-radius: 12px;
  background: #ffffff;
}

.atm-detail-modal .atm-inline-edit-form.is-readonly {
  opacity: 1;
}

.atm-detail-modal .atm-inline-edit-form label {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
  color: #1b3f7a;
}

.atm-detail-modal .atm-inline-edit-form input,
.atm-detail-modal .atm-inline-edit-form select {
  min-height: 42px;
  border: 1px solid #d2d7e0;
  background: #ffffff;
  color: #192e53;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.atm-detail-modal .atm-inline-edit-form input:disabled,
.atm-detail-modal .atm-inline-edit-form select:disabled,
.atm-detail-modal .atm-inline-edit-form input[readonly] {
  opacity: 1;
  color: #192e53;
  -webkit-text-fill-color: #192e53;
}

.atm-detail-modal .atm-inline-content-editable {
  min-height: 190px;
  border: 1px solid #d2d7e0;
  background: #ffffff;
  color: #192e53;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  font-family: inherit;
}

.atm-detail-modal .atm-inline-content-editable[contenteditable='false'] {
  cursor: default;
}

.atm-detail-modal .atm-readonly-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d2d7e0;
  border-radius: 8px;
  background: #f7f9fc;
  color: #5f6d84;
  font-size: 13px;
  font-weight: 700;
}

.atm-detail-modal .atm-panel-content {
  margin-top: 0;
  padding: 14px 16px;
  border: 1px solid #d5dae3;
  border-radius: 11px;
  background: #ffffff;
  color: #243650;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 400;
}

.atm-detail-modal .atm-attachments {
  border: 1px solid #d4d9e2;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.atm-detail-modal .atm-comment-list {
  margin-top: 2px;
  border: 1px solid #d9dde5;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  height: clamp(240px, 44dvh, 430px);
  min-height: 240px;
  max-height: 430px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 0 0 auto;
  -webkit-overflow-scrolling: touch;
}

.atm-detail-modal .atm-comment-list h6 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  color: #20385f;
}

.atm-detail-modal .atm-comment-item {
  border: 1px solid #d6dae3;
  border-left: 3px solid #8e9bbb;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 10px;
  margin-bottom: 10px;
}

.atm-detail-modal .atm-comment-head {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.atm-detail-modal .atm-comment-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.atm-detail-modal .atm-comment-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid #cfd6e2;
  border-radius: 999px;
  background: #f4f6fa;
  color: #364764;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

.atm-detail-modal .atm-comment-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.atm-detail-modal .atm-comment-head strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #1d3356;
}

.atm-detail-modal .atm-comment-head time {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #66778f;
  white-space: nowrap;
}

.atm-detail-modal .atm-comment-body {
  padding-left: 36px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  color: #2a3a54;
}

.atm-detail-modal .atm-comment-form {
  margin-top: 12px;
  border: 1px solid #d9dde5;
  border-radius: 11px;
  background: #ffffff;
  padding: 11px;
  position: relative;
  z-index: 2;
}

.atm-detail-modal .atm-comment-form label {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  color: #183c77;
}

.atm-detail-modal .atm-comment-form textarea {
  min-height: 132px;
  border: 1px solid #d2d7e0;
  border-radius: 9px;
  background: #ffffff;
  color: #1b3055;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}

.atm-detail-modal .atm-inline-edit-form button,
.atm-detail-modal .atm-comment-form button {
  min-height: 38px;
  font-size: 14px;
  font-weight: 800;
  border-color: #2e5fcc;
  background: #2e5fcc;
  color: #ffffff;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.atm-detail-modal .atm-inline-edit-form button:disabled,
.atm-detail-modal .atm-comment-form button:disabled {
  opacity: 0.7;
  background: #8ca8df;
  border-color: #8ca8df;
  color: #ffffff;
}

.atm-detail-modal .atm-reactions {
  border-top: 1px solid #dde2ea;
  padding-top: 10px;
}

.atm-detail-modal .atm-reaction-btn {
  border-color: #d1d6df;
  background: #ffffff;
  color: #2e3f5f;
  font-weight: 700;
}

.atm-detail-modal .atm-reaction-btn.is-active {
  background: #f1f4f9;
  border-color: #2e5fcc;
  color: #254980;
}

body.atm-modal-open {
  overflow: hidden;
  height: 100%;
}

html.atm-modal-open {
  overflow: hidden;
  height: 100%;
}

@media (max-width: 1200px) {
  .atm-list-header,
  .atm-task-row {
    grid-template-columns: 90px 105px minmax(120px, 1fr) minmax(160px, 1.2fr) 145px 120px 100px 80px;
  }
}

@media (max-width: 900px) {
  .atm-create-modal .atm-modal-dialog {
    width: min(100vw - 10px, 1000px);
    grid-template-columns: 100px 100px minmax(140px, 1fr) minmax(180px, 1.2fr) 130px 120px 100px 80px;
    padding: 12px;
  }

  .atm-create-modal .atm-create-task {
    max-height: calc(100dvh - 82px);
  }

  .atm-create-modal .atm-create-task h3 {
    display: none;
  }

  .atm-create-modal .atm-create-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .atm-create-modal .atm-create-right {
    border-left: 0;
    border-top: 1px solid #d7e2f5;
    position: static;
    padding-left: 0;
    padding-top: 12px;
  }

  .atm-create-modal .atm-create-task label,
  .atm-create-drop-hint,
  .atm-create-modal .tmce-active .wp-editor-area,
  .atm-create-modal .wp-editor-area {
    font-size: 14px;
  }

  .atm-detail-modal .atm-detail-dialog {
    width: min(100vw - 10px, 1000px);
    max-height: calc(100dvh - 10px);
    height: calc(100dvh - 10px);
  }

  .atm-detail-modal .atm-detail-modal-body {
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
  }

  .atm-detail-modal .atm-panel-task {
    height: auto;
    overflow: visible;
  }

  .atm-detail-modal .atm-detail-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .atm-detail-modal .atm-detail-col {
    overflow: visible;
    padding-right: 0;
  }

  .atm-detail-modal .atm-comment-col {
    border-left: 0;
    border-top: 1px solid #d7e2f5;
    padding-left: 0;
    padding-top: 12px;
    overflow: visible;
  }

  .atm-detail-modal .atm-comment-list {
    height: clamp(220px, 36dvh, 360px);
    min-height: 220px;
    max-height: 360px;
  }

  .atm-detail-modal .atm-panel-task h5 {
    font-size: 21px;
  }

  .atm-detail-modal .atm-detail-dialog h4 {
    font-size: 22px;
  }

  .atm-detail-modal .atm-comment-list h6 {
    font-size: 18px;
  }

  .atm-detail-modal .atm-panel-content,
  .atm-detail-modal .atm-comment-body,
  .atm-detail-modal .atm-comment-form textarea,
  .atm-detail-modal .atm-inline-content-editable,
  .atm-detail-modal .atm-inline-edit-form input,
  .atm-detail-modal .atm-inline-edit-form select {
    font-size: 14px;
  }

  .atm-detail-modal .atm-comment-body {
    padding-left: 0;
  }

  .atm-detail-modal .atm-panel-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .atm-detail-modal .atm-panel-topline-right {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .atm-detail-modal .atm-panel-meta {
    margin-left: 0;
  }

  .atm-inline-edit-grid {
    grid-template-columns: 1fr;
  }

  .atm-list-header {
    display: none;
  }

  .atm-task-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .atm-col-title,
  .atm-col-owner,
  .atm-col-comments,
  .atm-col-time,
  .atm-col-content,
  .atm-col-category,
  .atm-col-reactions {
    white-space: normal;
  }
}
