@import url("https://fonts.googleapis.com/css2?family=DM+Mono&family=Inter:wght@400;500;600;700&display=swap");
:root {
  --ink: #172033;
  --paper: #f5f7fb;
  --line: #e2e8f0;
  --blue: #2563eb;
  --yellow: #e7bd39;
  --mint: #76c8a0;
  --coral: #d86550;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  display: flex;
  min-height: 100vh;
}
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--paper);
}
.login-overlay[hidden] { display: none; }
.login-card { width: min(390px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.login-card h1 { margin-bottom: 8px; }
.login-card .muted { margin: 0 0 24px; }
.login-card .button { width: 100%; margin-top: 8px; }
.login-error { margin: 0 0 12px; color: #b84134; font-size: 12px; }
.sidebar {
  width: 236px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
}
.brand {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 30px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 4px;
}
nav {
  display: grid;
  gap: 5px;
}
nav a {
  padding: 11px 12px;
  text-decoration: none;
  color: #5a675f;
  font-size: 14px;
  border-radius: 4px;
}
nav a.active {
  background: var(--ink);
  color: white;
  font-weight: 600;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 18px 10px 4px;
  font-size: 12px;
}
.sidebar-foot small {
  display: block;
  color: #7a847e;
  margin-top: 4px;
}
main {
  min-width: 0;
  flex: 1;
}
header {
  min-height: 142px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 28px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}
.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  color: #718077;
  margin: 0 0 7px;
}
h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
}
h1 {
  font-size: 28px;
}
.muted {
  font-size: 13px;
  color: #728078;
  margin: 8px 0 0;
}
.toolbar {
  display: flex;
  gap: 9px;
}
.button {
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font: 600 12px Inter;
  cursor: pointer;
}
.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.button.danger { background: #b84134; border-color: #b84134; }
.filters {
  display: flex;
  justify-content: space-between;
  padding: 13px 34px;
  border-bottom: 1px solid var(--line);
  font: 11px "DM Mono";
  color: #69756f;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 11px "DM Mono";
  text-decoration: underline;
  cursor: pointer;
}
.board-wrap {
  padding: 24px 34px;
  overflow: auto;
}
.board {
  min-width: 1180px;
  display: grid;
  grid-template-columns: 220px repeat(var(--status-count), minmax(255px, 1fr));
  border: 1px solid var(--line);
  background: #fff;
}
.management { grid-column: 1 / -1; padding: 26px; min-height: 340px; }
.management-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.management table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 13px; }
.management th { text-align: left; font-size: 11px; text-transform: uppercase; color: #718078; background: var(--paper); }
.management td, .management th { padding: 14px; border-bottom: 1px solid var(--line); }
.management td:last-child { width: 220px; }
.sidebar nav { height: 100%; }
#logout { margin-top: auto; }
.detail-card > form > .button { margin-bottom: 18px; }
.board { border-radius: 6px; overflow: clip; }
.card { box-shadow: 0 2px 4px #14251a08; }
[hidden] { display: none !important; }
.empty-board {
  grid-column: 1 / -1;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #6f7d74;
  font-size: 13px;
}
.empty-board strong { color: var(--ink); font-size: 16px; }
.corner,
.col-head {
  height: 61px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 18px;
}
.corner {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 4;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.col-head {
  border-left: 1px solid var(--line);
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}
.status-title {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.count {
  font: 10px "DM Mono";
  border: 1px solid var(--line);
  padding: 3px 5px;
  border-radius: 3px;
  color: #68756d;
}
.sector-name {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 18px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 174px;
}
.sector-name small {
  font: 10px "DM Mono";
  font-weight: 400;
  color: #78847d;
}
.cell {
  min-height: 174px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}
.triage {
  background: #fbfbf9;
}
.drop-zone.drag-over {
  background: #edf5ff;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.cell-label {
  font: 10px "DM Mono";
  color: #77837c;
  margin: 0 0 9px;
}
.card {
  background: #fff;
  border: 1px solid #cfd4d0;
  border-radius: 4px;
  padding: 11px;
  margin-bottom: 8px;
  cursor: grab;
  transition: 0.16s;
}
.card:hover {
  border-color: #788b80;
  transform: translateY(-1px);
}
.card.dragging {
  opacity: 0.45;
}
.card-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font: 9px "DM Mono";
  color: #6a776f;
}
.badge {
  font: 9px "DM Mono";
  padding: 3px 5px;
  border-radius: 2px;
}
.badge.urgent {
  background: #f9ddd8;
  color: #a94232;
}
.badge.high {
  background: #fff0c1;
  color: #886400;
}
.badge.normal {
  background: #e9f2ec;
  color: #397157;
}
.card h3 {
  font-size: 12px;
  line-height: 1.4;
  margin: 9px 0;
}
.card-foot {
  font-size: 10px;
  color: #718078;
  display: flex;
  justify-content: space-between;
}
.card-note {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: 600 10px Inter;
  text-decoration: underline;
  cursor: pointer;
}
.note-preview {
  margin: 0;
  color: #65736a;
  font-size: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
dialog {
  border: 0;
  border-radius: 7px;
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  box-shadow: 0 18px 55px #0e201633;
}
dialog::backdrop {
  background: #14251a66;
}
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #14251a66;
}
.detail-overlay[hidden] { display: none; }
.detail-card {
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 55px #0e201633;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2px 0 20px;
}
.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px;
  color: #617067;
  font-size: 11px;
}
.notes-section { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.notes-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; }
.note-item { border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; }
.note-item p { white-space: pre-wrap; margin: 0 0 8px; color: #405248; font-size: 12px; line-height: 1.45; }
.note-item button { border: 0; padding: 0; background: transparent; text-decoration: underline; color: var(--ink); font: 600 10px Inter; cursor: pointer; }
.notes-empty { margin: 0; color: #718078; font-size: 12px; }
form {
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-size: 22px;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #68756d;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 14px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font: 13px Inter;
  color: var(--ink);
}
textarea { resize: vertical; line-height: 1.45; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}
.modal-actions-right { display: flex; gap: 8px; }
@media (max-width: 800px) {
  .sidebar {
    display: none;
  }
  header,
  .board-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  .board {
    min-width: 1080px;
  }
  .toolbar {
    width: 100%;
  }
  .toolbar .button {
    flex: 1;
  }
}

/* Corporate activity workspace: compact rows, clear actions and accessible navigation. */
.sidebar { width: 228px; height: 100vh; position: sticky; top: 0; padding: 32px 16px 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; }
nav a { display: flex; align-items: center; gap: 10px; min-height: 46px; color: #526078; border-radius: 9px; font-size: 13px; }
nav a:hover { background: #f1f5fc; color: #1e40af; }
nav a.active { background: #eaf1ff; color: #1d4ed8; box-shadow: inset 3px 0 #2563eb; }
#logout { text-align: left; color: #526078; }
nav svg { width: 18px; height: 18px; flex-shrink: 0; }
nav a span { line-height: 1.45; }
.sidebar #logout { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 12px 0; margin-top: auto; font: 500 13px Inter,Arial,sans-serif; cursor: pointer; }
.sidebar #logout:hover { color: #1d4ed8; }
header { min-height: 108px; padding: 24px 32px; }
h1 { font-size: 26px; letter-spacing: -.7px; font-weight: 700; }
h2 { letter-spacing: -.5px; }
.button { background: #2563eb; border-color: #2563eb; border-radius: 8px; min-height: 40px; font: 600 13px Inter, Arial, sans-serif; padding: 10px 16px; transition: background .15s, box-shadow .15s; }
.button:hover { background: #1d4ed8; box-shadow: 0 3px 8px #2563eb1c; }
.button.secondary { color: #334155; }
.button.secondary:hover { background: #f8fafc; border-color: #b9c9e1; }
.button.danger { background: #dc2626; border-color: #dc2626; }
.filters { align-items: center; gap: 16px; padding: 18px 32px; font: 13px Inter, Arial, sans-serif; color: #64748b; background: #fff; }
.search-input { max-width: 310px; padding: 10px 14px; background: #f8fafc; }
.board-wrap { padding: 24px 32px; }
.board { min-width: 1080px; grid-template-columns: 250px repeat(var(--status-count), minmax(250px, 1fr)); border-radius: 12px; box-shadow: 0 4px 20px #17203305; }
.board:has(.management) { min-width: 0; display: block; }
.corner,.col-head { height: 58px; background: #f8faff; color: #334155; }
.count { background: #fff; border: 0; border-radius: 6px; min-width: 25px; text-align: center; font: 600 11px Inter, Arial, sans-serif; color: #64748b; padding: 5px; }
.sector-name { background: #fafbfe; min-height: 122px; padding: 18px; gap: 7px; }
.sector-name > span { font-size: 14px; }
.sector-name small { font: 11px Inter, Arial, sans-serif; color: #64748b; }
.cell { min-height: 122px; padding: 14px; }
.cell-label { color: #94a3b8; font: 500 9px Inter, Arial, sans-serif; letter-spacing: .7px; margin: 3px 0 5px; }
.card { border-color: #e0e7f0; border-radius: 9px; padding: 14px; box-shadow: 0 2px 5px #17203306; cursor: pointer; }
.card:hover { border-color: #93b4fa; box-shadow: 0 4px 12px #2563eb10; }
.card { background: var(--card-status-tint, #fff); border-color: var(--card-status-color, #e0e7f0); border-left: 4px solid var(--card-status-color, #e0e7f0); }
.card:hover { border-color: var(--card-status-color, #93b4fa); }
.card { width: 100%; max-width: 320px; padding: 9px 11px; margin-bottom: 6px; border-radius: 7px; }
.card h3 { margin: 7px 0; font-size: 12px; line-height: 1.35; }
.card-meta { font-size: 9px; }
.card-foot { font-size: 10px; }
.card .badge { font-size: 9px; padding: 3px 5px; }
.card-meta { font: 10px Inter, Arial, sans-serif; justify-content: space-between; color: #64748b; }
.card h3 { font-size: 13px; font-weight: 600; margin: 12px 0; }
.card-foot { font-size: 11px; color: #64748b; gap: 10px; }
.badge { font: 500 10px Inter, Arial, sans-serif; padding: 4px 7px; border-radius: 5px; }
.badge.normal { background: #eff6ff; color: #2563eb; }
.badge.alta { background: #fff7ed; color: #b45309; }
.badge.urgente { background: #fef2f2; color: #dc2626; }
dialog,.detail-card,.login-card { border-radius: 14px; box-shadow: 0 24px 80px #17203324; }
.detail-card { width: min(640px,100%); }
dialog::backdrop,.detail-overlay { background: #0f172a66; backdrop-filter: blur(3px); }
form { padding: 28px; }
input,select,textarea { border-radius: 8px; color: #172033; font-family: Inter,Arial,sans-serif; min-height: 40px; }
input:focus,select:focus,textarea:focus { outline: 2px solid #bfdbfe; border-color: #60a5fa; }
button:focus-visible,a:focus-visible,.card:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.eyebrow,.muted,.notes-empty { color: #64748b; }
.detail-meta { gap: 10px; }
.detail-meta span { background: #f8fafc; color: #64748b; border-radius: 8px; font-size: 12px; padding: 12px; }
.detail-meta strong { color: #172033; }
.detail-meta .activity-description { grid-column: 1 / -1; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.activity-description strong { display: block; margin-top: 5px; font-weight: 400; }
.note-item { border-radius: 8px; background: #f8fafc; padding: 14px; }
.note-item p { color: #334155; font-size: 13px; }
.note-item button { color: #2563eb; font-size: 11px; }
.management { padding: 28px; }
.management th { color: #64748b; background: #f8fafc; letter-spacing: .6px; }
.management td { font-size: 13px; padding: 16px 14px; }
.management tbody tr:hover { background: #fafcff; }
.login-overlay { background: #f1f5fb; }
.login-card { border: 1px solid #e2e8f0; padding: 32px; }
#sidebar-toggle { width: 40px; height: 40px; flex-shrink: 0; margin: 0 0 24px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; color: #526078; background: #fff; cursor: pointer; }
#sidebar-toggle svg { width: 20px; height: 20px; }
#sidebar-toggle:hover { background: #eaf1ff; color: #2563eb; }
.sidebar { flex-shrink: 0; transition: width .18s ease; }
.sidebar nav { flex: 1; min-height: 0; height: auto; }
.sidebar.collapsed { width: 76px; padding-left: 12px; padding-right: 12px; }
.sidebar.collapsed #sidebar-toggle { align-self: center; }
.sidebar.collapsed #sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed nav a,.sidebar.collapsed #logout { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed nav a span,.sidebar.collapsed #logout span { display: none; }
@media(max-width:800px) {
 body { flex-direction: column; }
 .sidebar { display: block; position: static; width: 100%; height: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
 .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
 nav a { min-height: 40px; padding: 9px; font-size: 11px; }
 #logout { margin: 0 0 0 auto; min-height: 40px; padding: 8px; }
 header,.filters,.board-wrap { padding: 18px; }
 .filters { flex-wrap: wrap; }
 .search-input { max-width: 100%; }
 .modal-actions { flex-wrap: wrap; }
 .modal-actions-right { flex-wrap: wrap; }
 .management { padding: 16px; overflow: auto; }
 .detail-meta { grid-template-columns: 1fr; }
 .sidebar,.sidebar.collapsed { width: 100%; padding: 10px; }
 #sidebar-toggle { margin: 0 0 8px; }
 .sidebar.collapsed nav a,.sidebar.collapsed #logout { min-width: 44px; padding: 10px; }
 .sidebar #logout { margin: 0 0 0 auto; padding: 10px; border-top: 0; }
}
