:root {
  --bg: #f5f5f0;
  --ink: #101010;
  --muted: #5a5a5a;
  --line: #e0ddd5;
  --panel: #ffffff;
  --sidebar: #fafaf7;
  --accent: #f9ca00;
  --accent-strong: #d4a900;
  --accent-soft: #fef9e7;
  --class: #101010;
  --class-soft: #f0f0f0;
  --warm: #f9ca00;
  --warm-strong: #d4a900;
  --soft: #f5f3ed;
  --danger: #c4320a;
  --shadow: 0 8px 22px rgba(16, 16, 16, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
  background: var(--bg);
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  box-shadow: var(--shadow);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card p,
.login-hint {
  color: var(--muted);
  font-size: 13px;
}

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

button {
  border: 0;
  cursor: pointer;
}

.link-button {
  justify-self: center;
  min-height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--link, #2563eb);
  padding: 0 8px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  background: #eff6ff;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #101010;
  color: #fff;
  font-weight: 800;
}

.brand h1,
.toolbar h2,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 22px;
}

.brand p,
.toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.room-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--class-soft);
  color: var(--class);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 9px;
}

.search-block,
.filter-block {
  margin-bottom: 18px;
}

label,
.mini-label {
  display: grid;
  gap: 7px;
  color: #354252;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f9ca00;
  box-shadow: 0 0 0 3px rgba(249, 202, 0, 0.18);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.user-mini {
  display: grid;
  gap: 3px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.user-mini span,
.user-mini small {
  color: var(--muted);
}

.profile-editor {
  margin-top: 8px;
}

.profile-editor summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.profile-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.profile-form input {
  padding: 9px 10px;
}

.profile-form button {
  min-height: 36px;
  border-radius: 8px;
  background: #101010;
  color: #fff;
  font-weight: 800;
}

.sidebar-check {
  margin: 10px 0 18px;
}

.stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stats div:first-child {
  border-left: 4px solid var(--class);
}

.stats div:last-child {
  border-left: 4px solid var(--accent);
}

.stats strong {
  display: block;
  font-size: 25px;
  line-height: 1;
}

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

.workspace {
  padding: 24px 28px 32px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 128px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--class);
  border-radius: 8px;
  background: #fff;
  padding: 22px 24px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  padding: 0 12px;
  text-decoration: none;
  font-weight: 750;
}

.toolbar h2 {
  font-size: 27px;
  line-height: 1.18;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.summary-card.pending {
  border-left: 5px solid #f9ca00;
}

.summary-card.reviewing {
  border-left: 5px solid var(--accent);
}

.summary-card.needs-fix {
  border-left: 5px solid #b42318;
}

.summary-card.done {
  border-left: 5px solid var(--class);
}

.summary-card.due {
  border-left: 5px solid #101010;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.note-form {
  display: grid;
  gap: 14px;
}

.note-form,
.send-panel {
  border-top: 4px solid #f9ca00;
}

.note-list-panel {
  border-top: 4px solid #101010;
}

.people-panel,
.log-panel {
  border-top: 4px solid #8792a2;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row.single {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.primary,
.boss,
.ghost,
.contact-form button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 750;
}

.primary {
  background: #101010;
  color: #ffffff;
}

.primary:hover {
  background: #2a2a2a;
}

.boss {
  background: #f9ca00;
  color: #101010;
  font-weight: 800;
}

.boss:hover {
  background: #e0b600;
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.wide {
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fef9e7;
  color: #101010;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.muted {
  background: var(--soft);
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.pending {
  background: #fef9e7;
  color: #8a7000;
}

.status-pill.reviewing {
  background: #f0f0f0;
  color: #101010;
}

.status-pill.needs-fix {
  background: #fee4e2;
  color: #912018;
}

.status-pill.done {
  background: var(--class-soft);
  color: #256344;
}

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

.note-list {
  max-height: 705px;
  overflow: auto;
  padding-right: 4px;
}

.note-card,
.log-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.note-card {
  display: grid;
  gap: 10px;
  border-left: 4px solid transparent;
}

.note-card.active {
  border-color: #b8d7dc;
  border-left-color: var(--class);
  background: #fbfdfc;
}

.note-card.mention-focus {
  border-color: #f9ca00;
  border-left-color: #f9ca00;
  background: #fffbea;
  box-shadow: 0 0 0 4px rgba(249, 202, 0, 0.22), 0 18px 34px rgba(16, 16, 16, 0.16);
  animation: mentionFocusPulse 1.15s ease-in-out 3;
}

@keyframes mentionFocusPulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.note-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.note-title {
  margin: 0;
  font-size: 17px;
}

.note-meta,
.log-meta,
.empty {
  color: var(--muted);
  font-size: 13px;
}

.note-summary {
  margin: 0;
  color: #354252;
  line-height: 1.55;
}

.tag-row,
.file-row,
.card-actions,
.recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  border-radius: 999px;
  background: var(--soft);
  color: #526171;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

.file-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fafafa;
  text-decoration: none;
  font-size: 12px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.file-chip button {
  min-height: 32px;
  border-radius: 0;
  background: #fff;
  color: var(--accent);
  padding: 0 9px;
  font-weight: 700;
}

.file-chip button + button {
  border-left: 1px solid var(--line);
  color: var(--danger);
}

.card-actions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--soft);
  color: #354252;
  font-weight: 700;
}

.card-actions button:hover {
  background: #e5eaf0;
}

.send-panel,
.people-panel,
.log-panel {
  margin-top: 0;
}

.send-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.recipient-list {
  margin-top: 8px;
}

.recipient {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #354252;
  font-size: 13px;
  font-weight: 650;
}

.recipient input,
.checkline input {
  width: auto;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.contact-form button {
  background: #2f3744;
  color: #fff;
}

.contact-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.contact-form-actions .ghost {
  background: #fff;
  color: var(--muted);
}

.checkline {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

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

.contact-card strong {
  display: block;
}

.contact-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-actions button {
  min-height: 30px;
  border-radius: 8px;
  background: var(--soft);
  color: #354252;
  padding: 0 9px;
  font-weight: 700;
}

.contact-actions button:hover {
  background: #fee4e2;
  color: var(--danger);
}

.log-panel {
  margin-top: 18px;
}

.history-panel {
  margin-top: 18px;
  border-top: 4px solid #f9ca00;
}

.card-comments {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.comment-form button:disabled,
.comment-form input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.comment-item {
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

.comment-item p {
  margin: 6px 0 0;
  color: #354252;
  line-height: 1.55;
}

.comment-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.comment-actions button {
  display: inline-grid;
  place-items: center;
  min-height: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #354252;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  font-weight: 750;
}

.comment-actions button:hover {
  border-color: #f9ca00;
  background: #fffbea;
  color: #101010;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.mention-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mention-row button,
.mention {
  border-radius: 999px;
  background: #fef9e7;
  color: #101010;
  font-weight: 750;
}

.mention-row button {
  min-height: 28px;
  padding: 0 9px;
}

.mention {
  display: inline-block;
  padding: 0 6px;
}

.mention.unknown {
  background: var(--soft);
  color: var(--muted);
}

.log-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.log-card {
  display: grid;
  gap: 6px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
}

.preview-dialog {
  width: min(980px, calc(100vw - 38px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.preview-body {
  min-height: 260px;
}

.preview-body img,
.preview-body iframe {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
}

.download-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: 8px;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Cleaner workspace layout */
.workspace {
  padding: 20px 24px 28px;
}

.toolbar {
  min-height: 96px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.toolbar h2 {
  font-size: 24px;
}

.dashboard-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  min-height: 70px;
  padding: 12px 14px;
}

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

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.detail-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 16px;
}

.panel {
  padding: 16px;
}

.compact-panel {
  box-shadow: none;
}

.compact-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.compact-panel summary::-webkit-details-marker {
  display: none;
}

.compact-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  flex: 0 0 auto;
}

.compact-panel[open] summary {
  margin-bottom: 14px;
}

.compact-panel[open] summary::after {
  content: "-";
}

.note-list {
  max-height: calc(100vh - 255px);
}

.form-dialog {
  width: min(760px, calc(100vw - 34px));
  max-height: min(90vh, 900px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.form-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.form-dialog .note-form {
  max-height: min(90vh, 900px);
  overflow: auto;
  border-top: 4px solid #f9ca00;
}

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

.history-panel,
.log-panel {
  margin-top: 0;
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-grid,
  .main-layout,
  .bottom-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .toolbar,
  .panel-head,
  .note-top {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    min-height: 0;
    padding: 18px;
  }

  .field-row,
  .contact-form,
  .comment-form {
    grid-template-columns: 1fr;
  }

  .send-actions button,
  .toolbar button,
  .toolbar a {
    width: 100%;
  }
}

/* Confirm Send Dialog */
.confirm-dialog {
  width: min(560px, calc(100vw - 34px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  box-shadow: 0 20px 60px rgba(16, 16, 16, 0.18);
}

.confirm-dialog::backdrop {
  background: rgba(16, 16, 16, 0.5);
}

.confirm-inner {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.confirm-header {
  background: #101010;
  color: #ffffff;
  padding: 20px 24px;
}

.confirm-header h3 {
  margin: 0;
  font-size: 18px;
  color: #f9ca00;
}

.confirm-header p {
  margin: 6px 0 0;
  color: #999;
  font-size: 13px;
}

.confirm-body {
  padding: 20px 24px;
  display: grid;
  gap: 14px;
}

.confirm-body .confirm-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 14px;
}

.confirm-row .confirm-label {
  color: #5a5a5a;
  font-weight: 700;
  font-size: 13px;
}

.confirm-row .confirm-value {
  color: #101010;
  font-weight: 600;
}

.confirm-recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.confirm-recipients .confirm-chip {
  display: inline-flex;
  align-items: center;
  background: #fef9e7;
  color: #101010;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}

.confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e0ddd5;
  background: #fafaf7;
}

.confirm-footer .btn-cancel {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #e0ddd5;
  background: #fff;
  color: #5a5a5a;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-footer .btn-confirm {
  min-height: 42px;
  border-radius: 8px;
  border: 0;
  background: #f9ca00;
  color: #101010;
  padding: 0 24px;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
}

.confirm-footer .btn-confirm:hover {
  background: #e0b600;
}

/* Notification Bell */
.notif-wrapper {
  position: relative;
}

.notif-bell {
  position: relative;
  min-height: 42px;
  min-width: 42px;
  border-radius: 8px;
  border: 1px solid #e0ddd5;
  background: #fff;
  color: #101010;
  padding: 0;
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.notif-bell:hover {
  background: #fef9e7;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f9ca00;
  color: #101010;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 5px;
  line-height: 1;
}

.notif-badge.hidden {
  display: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 460px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e0ddd5;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(16, 16, 16, 0.14);
  z-index: 999;
  display: none;
}

.notif-dropdown.open {
  display: block;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e0ddd5;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.notif-dropdown-header h4 {
  margin: 0;
  font-size: 15px;
  color: #101010;
}

.notif-dropdown-header button {
  border: 0;
  background: none;
  color: #f9ca00;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
}

.notif-dropdown-header button:hover {
  background: #fef9e7;
}

.notif-item {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f3ed;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover {
  background: #fef9e7;
}

.notif-item.unread {
  background: #fffdf0;
  border-left: 3px solid #f9ca00;
}

.notif-item .notif-message {
  font-size: 13px;
  color: #101010;
  line-height: 1.45;
}

.notif-item .notif-time {
  font-size: 12px;
  color: #5a5a5a;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #5a5a5a;
  font-size: 14px;
}

.auth-dialog {
  width: min(460px, calc(100vw - 34px));
}

.auth-form {
  display: grid;
  gap: 14px;
  max-height: min(86vh, 720px);
  overflow: auto;
  border-top: 4px solid #f9ca00;
}

.auth-note {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

/* WANTALK 2026 refresh */
:root {
  --bg: #f4f5f7;
  --ink: #101010;
  --muted: #667085;
  --line: #e4e7ec;
  --panel: #ffffff;
  --sidebar: #ffffff;
  --accent: #f9ca00;
  --accent-strong: #caa300;
  --accent-soft: #fff7cc;
  --soft: #f8fafc;
  --danger: #b42318;
  --link: #2563eb;
  --success: #147a4b;
  --shadow: 0 10px 24px rgba(16, 16, 16, 0.07);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Segoe UI", Tahoma, Arial, sans-serif;
}

a,
.ghost-link,
.file-link,
.download-link {
  color: var(--link);
}

.login-screen {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
}

.login-card {
  width: min(440px, 100%);
  justify-items: start;
  border-color: var(--line);
}

.brand-logo {
  display: block;
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff url("wantalk_notes_logo.png") center / contain no-repeat;
}

.brand-logo.compact {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

.brand {
  margin-bottom: 18px;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.25;
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background: #ffffff;
  overflow: auto;
}

.side-tabs {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
  font-weight: 800;
  text-align: left;
}

.tab-button:hover {
  background: #f8fafc;
  border-color: var(--line);
}

.tab-button.active {
  background: #101010;
  color: #ffffff;
  border-color: #101010;
  box-shadow: inset 4px 0 0 var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

input,
select,
textarea {
  border-color: #d0d5dd;
}

label,
.mini-label {
  color: #344054;
}

.toolbar {
  align-items: flex-start;
  min-height: 0;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  background: #ffffff;
}

.toolbar h2 {
  color: #101010;
  font-size: 28px;
}

.room-label {
  background: #101010;
  color: #ffffff;
}

.primary {
  background: #101010;
  color: #ffffff;
}

.primary:hover {
  background: #2b2b2b;
}

.boss,
.confirm-footer .btn-confirm {
  background: #f9ca00;
  color: #101010;
}

.boss:hover,
.confirm-footer .btn-confirm:hover {
  background: #e5ba00;
}

.ghost,
.ghost-link,
.notif-bell {
  border-color: #d0d5dd;
  background: #ffffff;
}

.dashboard-grid {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.summary-card {
  min-height: 76px;
  border-color: var(--line);
  box-shadow: none;
}

.summary-card.pending {
  border-left-color: #f9ca00;
}

.summary-card.reviewing {
  border-left-color: #2563eb;
}

.summary-card.needs-fix {
  border-left-color: #b42318;
}

.summary-card.done {
  border-left-color: #147a4b;
}

.summary-card.due {
  border-left-color: #101010;
}

.panel {
  border-color: var(--line);
  box-shadow: none;
}

.board-panel {
  padding: 14px;
}

.board-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.board-sidebar {
  position: sticky;
  top: 16px;
  min-width: 0;
}

.board-sidebar .send-panel {
  margin: 0;
}

.note-list.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
  max-height: calc(100vh - 256px);
  overflow: auto;
  padding: 2px 12px 2px 2px;
  scrollbar-gutter: stable;
}

.board-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.board-column-head h4 {
  margin: 0;
  color: #344054;
  font-size: 14px;
}

.board-column-head span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.board-column.pending {
  box-shadow: inset 0 4px 0 #f9ca00;
}

.board-column.reviewing {
  box-shadow: inset 0 4px 0 #2563eb;
}

.board-column.needs-fix {
  box-shadow: inset 0 4px 0 #b42318;
}

.board-column.done {
  box-shadow: inset 0 4px 0 #147a4b;
}

.board-column-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 180px;
}

.note-card {
  gap: 10px;
  border: 1px solid #dfe3e8;
  border-left: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
}

.note-card.active {
  border-color: #101010;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 202, 0, 0.32);
}

.note-top {
  align-items: flex-start;
}

.note-title {
  font-size: 15px;
  line-height: 1.45;
}

.note-summary {
  color: #475467;
  font-size: 15px;
  line-height: 1.55;
}

.task-lines {
  display: grid;
  border-top: 1px solid #edf0f3;
}

.task-lines div {
  display: grid;
  grid-template-columns: 34px 100px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border-bottom: 1px solid #edf0f3;
  color: #475467;
  font-size: 14px;
}

.task-lines span,
.task-lines strong {
  color: #667085;
  font-weight: 700;
}

.task-lines em {
  min-width: 0;
  color: #101010;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-line {
  border-radius: 8px;
  background: #fee4e2;
  color: #912018;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.note-url {
  color: var(--link);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-pill {
  min-height: 24px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
}

.status-pill.pending {
  background: #fff4b8;
  color: #6b5700;
}

.status-pill.reviewing {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.needs-fix {
  background: #fee4e2;
  color: #912018;
}

.status-pill.done {
  background: #dcfae6;
  color: #067647;
}

.tag {
  background: #eef2f6;
  color: #344054;
}

.file-chip button {
  color: var(--link);
}

.card-actions {
  justify-content: flex-end;
}

.card-actions button {
  background: #f2f4f7;
  color: #344054;
}

.compact-comments {
  border-top: 1px solid #edf0f3;
  padding-top: 8px;
}

.compact-comments > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.compact-comments > summary::-webkit-details-marker {
  display: none;
}

.mention-alert {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f9ca00;
  box-shadow: 0 0 0 3px #fff7cc;
  flex: 0 0 auto;
}

.done-list,
.trash-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  max-height: calc(100vh - 256px);
  overflow: auto;
  padding: 2px 12px 2px 2px;
  scrollbar-gutter: stable;
}

.trash-actions button[data-action="restore"] {
  background: #dcfae6;
  color: #067647;
}

.trash-actions button[data-action="delete-permanent"] {
  background: #fee4e2;
  color: #912018;
}

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

.people-panel .panel-head,
.log-panel .panel-head {
  margin-bottom: 16px;
}

.contact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-form .checkline,
.contact-form-actions {
  grid-column: 1 / -1;
}

.contact-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-card {
  align-items: flex-start;
  border-color: var(--line);
}

.log-list {
  max-height: calc(100vh - 270px);
  scrollbar-gutter: stable;
  padding-right: 10px;
}

.log-card {
  border-color: var(--line);
}

.notif-bell {
  color: #101010;
  font-weight: 800;
}

.notif-badge {
  background: #f04438;
  color: #ffffff;
}

.confirm-header {
  background: #101010;
}

.confirm-header h3 {
  color: #f9ca00;
}

@media (max-width: 1280px) {
  .note-list.board-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .board-with-sidebar {
    grid-template-columns: 1fr;
  }

  .board-sidebar {
    position: static;
  }
}

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

  .side-tabs {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

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

@media (max-width: 760px) {
  .side-tabs,
  .dashboard-grid,
  .note-list.board-grid,
  .done-list,
  .trash-list,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .toolbar-actions > *,
  .toolbar-actions button,
  .toolbar-actions a {
    width: 100%;
  }

  .task-lines div {
    grid-template-columns: 30px 92px minmax(0, 1fr);
  }
}
