/* V2 workspace: layout and navy/cyan palette inspired by V1.
   Typography is NEW: OS system font, larger readable sizes, no Inter import. */
:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #17364b;
  --muted: #637d90;
  --brand-navy: #123b5d;
  --brand-deep: #0c2f4d;
  --blue: #168ed8;
  --cyan: #18a5b9;
  --line: #bfd1dd;
  --panel: #eaf3f8;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eaf4fa;
}
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #1aaac4;
  outline-offset: 3px;
}

/* Login keeps its independent minimal look; system font applies globally. */
.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(89, 177, 196, .11), transparent 34rem),
    #f4f7f9;
}
.auth-shell { width: min(100%, 420px); }
.login-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dce6ec;
  border-radius: 20px;
  box-shadow: 0 24px 65px rgba(24, 59, 78, .10);
  padding: 34px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #23b8c1, #118ac2);
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 24px #041e3455;
}
.login-card .brand-mark { width: 42px; height: 42px; margin-bottom: 28px; }
.login-heading h1 {
  margin: 8px 0;
  font-size: 30px;
  letter-spacing: -.03em;
}
.login-heading p {
  margin: 0 0 26px;
  color: #6a8291;
  line-height: 1.5;
  font-size: 14px;
}
.login-form { display: grid; gap: 17px; }
.login-form label {
  display: grid;
  gap: 7px;
  color: #39566a;
  font-size: 14px;
  font-weight: 650;
}
.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cad9e1;
  border-radius: 11px;
  padding: 10px 13px;
  background: #fff;
  color: #173247;
  outline: none;
}
.login-form input:focus {
  border-color: #168ca8;
  box-shadow: 0 0 0 3px rgba(22, 140, 168, .12);
}
.login-form button {
  min-height: 47px;
  margin-top: 4px;
  border: 0;
  border-radius: 11px;
  background: #168ca8;
  color: white;
  font-weight: 750;
  cursor: pointer;
}
.login-form button:hover { background: #117e98; }
.auth-error {
  margin: 0 0 18px;
  border: 1px solid #f0c8cc;
  border-radius: 10px;
  background: #fff1f2;
  color: #a23948;
  padding: 11px 13px;
  font-size: 14px;
}
.eyebrow {
  font-size: 11px;
  color: #7892a5;
  font-weight: 800;
  letter-spacing: .08em;
}
.auth-page .eyebrow { color: #6d8797; letter-spacing: .16em; }

/* Main workspace shell */
.app-shell { display: flex; min-height: 100vh; background: #cbdbe5; }
.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 224px;
  width: 224px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 20px;
  background: linear-gradient(180deg, #17466e 0%, #113957 52%, #0d2f4a 100%);
  box-shadow: 8px 0 28px #0c2b4324;
  color: white;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px 32px;
}
.brand-copy strong {
  display: block;
  font-size: 19px;
  line-height: 1.15;
  font-style: italic;
  letter-spacing: .45px;
}
.brand-copy small {
  display: block;
  margin-top: 4px;
  color: #a9dce8;
  font-size: 12px;
}
.side-section-label, .side-heading {
  padding: 0 12px;
  color: #a8c9d8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
}
.side-section-label { margin-bottom: 11px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #bcd9e6;
  font-size: 14px;
  font-weight: 650;
}
.side-link.active {
  background: linear-gradient(135deg, #1f91df, #297dd0);
  border-color: #53b5ed44;
  color: white;
  box-shadow: 0 8px 20px #071f3640;
}
.side-icon { font-size: 20px; }
.side-count {
  margin-left: auto;
  border-radius: 7px;
  padding: 3px 7px;
  background: #ffffff28;
  color: white;
  font-size: 12px;
}
.side-heading { margin: 29px 0 11px; }
.project-nav-placeholder {
  padding: 15px 13px;
  color: #96b8cb;
  font-size: 13px;
  line-height: 1.5;
}
.sidebar-bottom { margin-top: auto; padding: 0 8px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #2b7592;
  border-radius: 8px;
  background: #0d314d;
  color: #b3e0ec;
  font-size: 12px;
  font-weight: 700;
}
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #54ddbd;
}
.sidebar-bottom p { color: #8aafc2; font-size: 12px; line-height: 1.5; }
.signout-form { margin-top: 18px; }
.signout-button {
  border: 1px solid #ffffff29;
  border-radius: 9px;
  padding: 10px 13px;
  background: #ffffff0a;
  color: #cce3ee;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.signout-button:hover { border-color: #87b4cb; background: #ffffff1b; color: #fff; }
.main {
  flex: 1;
  min-width: 0;
  background: linear-gradient(145deg, #c9dbe6 0%, #dce7ee 48%, #cfdfe8 100%);
}
.topbar.workspace-hero {
  min-height: 82px;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background:
    linear-gradient(90deg, #eaf4f7f5 0%, #dfeff3ee 54%, #c8e2e7d9 100%),
    url('./invitro-brand.png') 72% 48% / cover no-repeat;
  border-bottom: 1px solid #b7d0da;
  box-shadow: 0 8px 24px #123b4d18;
}
.topbar-hero-copy { min-width: 0; }
.topbar-title-row {
  display: flex;
  align-items: baseline;
  gap: 15px;
  min-width: 0;
  margin-top: 6px;
}
.topbar-title-row h1 {
  font-size: clamp(22px, 1.7vw, 28px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 750;
  color: #15364e;
  white-space: nowrap;
  margin: 0;
}
.topbar-title-row p {
  margin: 0;
  min-width: 0;
  color: #55788a;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-actions { display: flex; gap: 14px; align-items: center; flex: none; }
.header-user { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: #33586c; }
.header-avatar, .avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #d3eff2;
  color: #087c91;
  font-size: 14px;
  font-weight: 750;
}
.settings-gear {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex: none;
  border: 1px solid #a7c8d9;
  border-radius: 10px;
  background: #ffffffc5;
  color: #315d73;
  text-decoration: none;
  cursor: pointer;
}
.settings-gear:hover, .settings-gear.is-active {
  background: #fff;
  border-color: #4a9cbe;
  color: #087fa7;
  box-shadow: 0 3px 13px #24658218;
}
.main-inner { max-width: 1510px; margin: 0 auto; padding: 22px 28px 76px; }

/* Read-only task interface skeleton - intentionally no JS and no misleading enabled controls */
.people-tabs { display: flex; gap: 16px; border-bottom: 1px solid #b6cad5; }
.person-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  color: #566d80;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 3px solid #138dcc;
}
.avatar { width: 29px; height: 29px; font-size: 13px; }
.tab-count { padding: 3px 7px; border-radius: 7px; background: #d5eaf2; color: #26799a; font-size: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 23px; }
.toolbar-right { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.search-wrap, .filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  border: 1px solid #b9cedc;
  background: #edf5f9;
  border-radius: 10px;
  padding: 0 13px;
  color: #708b9b;
  font-size: 14px;
}
.search-wrap { width: min(330px, 100%); }
.search-icon { font-size: 25px; line-height: 1; color: #7d9aab; }
.filter-wrap { color: #385b72; gap: 25px; }
.filter-value { color: #6d8697; font-weight: 650; }
.view-switch { display: inline-flex; gap: 3px; padding: 4px; border-radius: 10px; background: #bdcfdc; }
.view-button { display: inline-flex; align-items: center; border-radius: 7px; padding: 8px 12px; color: #728899; font-size: 13px; font-weight: 700; }
.view-button.active { color: #117da8; background: #f6fcff; box-shadow: 0 2px 8px #0e385619; }

/* Plan and kanban areas */
.section-kicker { color: #087fa8; font-size: 12px; font-weight: 800; letter-spacing: .11em; }
.focus-toolbar, .alternate-head { display: flex; justify-content: space-between; align-items: end; gap: 15px; }
.focus-toolbar { margin: 0 0 13px; }
.section-label-wrap { display: flex; align-items: baseline; gap: 12px; }
.focus-toolbar strong { color: #28475f; font-size: 16px; }
.date-placeholder, .section-description { color: #6b8494; font-size: 13px; }
.focus-day {
  border: 1px solid #b7cedb;
  border-top: 3px solid #1b95ce;
  border-radius: 14px;
  padding: 18px 20px 21px;
  background: #e8f3f8;
  box-shadow: 0 8px 24px #1749690e;
}
.focus-day-head { display: flex; justify-content: space-between; align-items: flex-start; }
.focus-kicker { color: #0d83b2; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.focus-day h2 { margin: 5px 0 0; font-size: 17px; font-weight: 750; }
.focus-count { display: grid; place-items: center; min-width: 29px; height: 29px; padding: 0 7px; border-radius: 7px; background: #d5eefa; color: #1683ad; font-size: 13px; font-weight: 750; }
.focus-empty { padding: 25px 18px; border: 1px dashed #bfd3df; border-radius: 9px; text-align: center; color: #829aaa; font-size: 14px; margin-top: 14px; background: #f4f9fc99; }
.kanban-section { margin-top: 29px; }
.alternate-head { margin-bottom: 16px; }
.alternate-head h2, .admin-heading h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.02em; }
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kanban-column {
  min-width: 0;
  min-height: 335px;
  padding: 14px 13px;
  border-radius: 14px;
  background: #cbd9e2;
  border: 1px solid #b6c8d3;
}
.kanban-column.inbox { background: #c6dce5; }
.kanban-column.queue { background: #d1d9e1; }
.kanban-column.progress { background: #c5dae6; }
.kanban-column.permanent { background: #d6d4e6; }
.kanban-column-head { display: flex; align-items: center; gap: 9px; padding: 3px 3px 8px; }
.kanban-column-head h3 { margin: 0; font-size: 16px; font-weight: 750; }
.kanban-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #4eb2cf; }
.queue .kanban-status-dot { background: #829bab; }
.progress .kanban-status-dot { background: #238bb7; }
.permanent .kanban-status-dot { background: #786db4; }
.column-count { margin-left: auto; font-size: 13px; color: #5e798a; }
.column-hint { margin: 0 3px 18px; color: #597589; font-size: 13px; }
.kanban-empty { display: grid; place-items: center; min-height: 140px; padding: 20px 12px; border: 1px dashed #afc3d0; border-radius: 9px; text-align: center; color: #758fa2; font-size: 14px; background: #f6faff44; }
.board-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; color: #557489; font-size: 14px; }
.board-footer strong { display: grid; place-items: center; min-width: 26px; height: 26px; background: #d5eee7; border-radius: 8px; color: #1d8e71; }

/* Admin placeholder, only accessible to authenticated admins */
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.back-link { display: inline-flex; align-items: center; border: 1px solid #aac9d9; background: #eaf4f9; border-radius: 9px; padding: 10px 13px; text-decoration: none; font-size: 14px; font-weight: 650; color: #146e9a; }
.back-link:hover { border-color: #1c98c8; background: #f5fbff; }
.admin-empty { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; border: 1px solid #b9d0df; border-radius: 16px; background: #ecf5fa; }
.admin-empty-mark { display: grid; place-items: center; height: 58px; width: 58px; border-radius: 16px; color: #1b8aab; background: #d9edf5; font-size: 31px; }
.admin-empty h3 { margin: 18px 0 5px; font-size: 20px; }
.admin-empty p { max-width: 470px; color: #6b8494; font-size: 15px; line-height: 1.6; }

@media (max-width: 1250px) {
  .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-title-row p { display: none; }
}
@media (max-width: 840px) {
  .sidebar { flex-basis: 185px; width: 185px; padding-inline: 11px; }
  .brand-copy strong { font-size: 17px; }
  .main-inner { padding: 20px 20px 52px; }
  .topbar.workspace-hero { padding: 14px 20px; }
}
@media (max-width: 650px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 10px 16px; flex-direction: row; align-items: center; justify-content: space-between; box-shadow: none; }
  .brand { padding: 0; }
  .brand-copy small { font-size: 10px; }
  .sidebar .side-section-label, .sidebar .side-link, .sidebar .side-heading, .sidebar .project-nav-placeholder, .status-chip, .sidebar-bottom p { display: none; }
  .sidebar-bottom { padding: 0; margin: 0; }
  .signout-form { margin: 0; }
  .signout-button { font-size: 12px; padding: 8px 10px; }
  .topbar.workspace-hero { gap: 12px; padding: 15px 16px; }
  .topbar-title-row h1 { font-size: 21px; white-space: normal; }
  .header-user { font-size: 12px; }
  .header-avatar { display: none; }
  .settings-gear { width: 40px; height: 40px; }
  .main-inner { padding: 21px 14px 45px; }
  .toolbar { gap: 10px; }
  .search-wrap { width: 100%; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .filter-wrap { gap: 8px; }
  .focus-toolbar { align-items: flex-start; }
  .section-label-wrap { flex-direction: column; gap: 4px; }
  .date-placeholder { display: none; }
  .kanban-board { grid-template-columns: 1fr; }
  .kanban-column { min-height: 175px; }
  .kanban-empty { min-height: 70px; }
  .alternate-head { align-items: start; flex-wrap: wrap; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-empty { min-height: 260px; }
}


/* V2 functional task board and dialog. The V1 font stack is intentionally NOT used. */
button.side-link {width:100%;text-align:left;background:transparent;border:1px solid transparent;cursor:pointer}
button.side-link.active{background:linear-gradient(135deg,#1f91df,#297dd0);border-color:#53b5ed44}
button.side-link:hover:not(.active),button.project-button:hover:not(.active){background:#ffffff15;color:#fff}
.project-button .project-dot{height:8px;width:8px;border-radius:50%;background:#47bdcf;flex:none}
#project-nav{display:grid;gap:4px}
.side-heading{display:flex;justify-content:space-between;align-items:center}
.side-add{border:1px solid #ffffff33;background:#ffffff13;color:#d9f3ff;border-radius:7px;font-size:19px;line-height:1;width:26px;height:26px;cursor:pointer}
.side-add:hover{background:#1d91c3}
.search-wrap input{border:0;outline:none;background:transparent;color:#21445b;min-width:0;width:100%;font-size:14px;padding:10px 0}
.search-wrap input::placeholder{color:#758fa0}
.filter-wrap select{border:0;background:transparent;color:#32566d;font-size:13px;font-weight:700;cursor:pointer;max-width:145px}
.kanban-cards{min-height:160px;display:grid;align-content:start;gap:9px;border-radius:9px}
.kanban-cards.drop-target{outline:2px dashed #1894bc;background:#dcf5fa}
.kanban-cards .task-card.drop-before{box-shadow:0 -4px 0 #1599c6}
.kanban-cards .task-card.drop-after{box-shadow:0 4px 0 #1599c6}
.task-card.dragging{opacity:.5}
.card-move-actions{display:flex;gap:3px;margin-left:auto}
.card-move-actions button{border:1px solid #bed9e6;border-radius:6px;background:#fff;color:#267996;min-width:25px;min-height:26px;padding:2px 5px;font-size:14px;cursor:pointer}
.card-move-actions button:hover,.card-move-actions button:focus-visible{background:#d9f0f9;border-color:#53add1}
.column-add{margin-left:8px;border:1px solid #bbd1dd;border-radius:8px;width:29px;height:29px;display:grid;place-items:center;background:#ffffffa1;color:#1883b2;font-size:20px;line-height:1;cursor:pointer}
.column-add:hover{background:white;border-color:#31a3c7}
.column-count{margin-left:auto}
.task-card{min-width:0;padding:11px 12px;border:1px solid #b4cbd9;border-left:3px solid #1f9dcd;border-radius:10px;background:#f7fbfe;box-shadow:0 3px 9px #1a3b4c0c;cursor:grab}
.task-card:hover{border-color:#64aec8;box-shadow:0 6px 18px #1a3b4c20}
.task-card:active{cursor:grabbing}
.task-card-top,.task-card-bottom{display:flex;align-items:center;gap:8px;min-width:0}
.task-project-name{font-size:11px;color:#6c8898;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-progress{margin-left:auto;background:#dbedf6;color:#127eaa;border-radius:5px;padding:3px 6px;font-size:11px;font-weight:700}
.task-card-title{display:block;margin:9px 0;border:0;background:none;text-align:left;color:#19374c;padding:0;font-size:14px;font-weight:750;line-height:1.42;overflow-wrap:anywhere;cursor:pointer}
.task-card-title:hover{color:#1284b5}
.task-card-bottom{justify-content:space-between;min-height:20px}
.task-date{font-size:11px;color:#66869b}
.task-date.overdue{color:#bb4555;font-weight:700}
.task-owner{display:grid;place-items:center;width:23px;height:23px;border-radius:6px;background:#d4e8ed;color:#137a91;font-size:12px;font-weight:800;margin-left:auto}
.today-list{display:grid;gap:8px;margin-top:15px}
.today-row{display:flex;align-items:center;gap:10px;padding:7px 10px;background:#f5fbfe;border-radius:10px;border:1px solid #cadee9}
.today-row .task-card{flex:1;min-width:0;display:flex;align-items:center;gap:12px;box-shadow:none;padding:8px 11px}
.today-row .task-card-top{max-width:180px}
.today-row .task-card-title{margin:0;flex:1;font-size:13px}
.today-row .task-card-bottom{flex:none}
.today-complete{border:1px solid #9fd4c4;background:#e8faf2;color:#1a8b6e;border-radius:9px;padding:10px 12px;cursor:pointer;font-size:13px;font-weight:750;white-space:nowrap}
.today-complete:hover{background:#d1f3e4}
.done-rail{position:fixed;right:0;top:40%;z-index:15;display:flex;align-items:center;flex-direction:column;justify-content:space-evenly;gap:10px;width:41px;height:164px;border:1px solid #9cced5;border-right:0;border-radius:11px 0 0 11px;background:#def5f4;color:#177f88;box-shadow:-5px 4px 18px #143c5125;cursor:pointer}
.done-rail{transition:transform .24s cubic-bezier(.2,.8,.2,1),box-shadow .24s ease,background-color .24s ease;will-change:transform}
.done-rail:hover:not(.drop-target),.done-rail:focus-visible{transform:translate(-5px,-6px);box-shadow:-10px 12px 24px #143c5140;background:#c8f1ec}
.done-rail:active{transform:translate(-2px,-2px)}
.done-rail strong{writing-mode:vertical-rl;transform:rotate(180deg);font-size:11px;letter-spacing:.16em}
.done-rail span{font-weight:800;font-size:12px}
.done-rail i{font-size:19px;font-style:normal}
.done-rail.drop-target{background:#a7eeda;box-shadow:0 0 0 4px #2fa48666}
.done-overlay{position:fixed;z-index:25;inset:0;background:#102d4575;display:flex;justify-content:flex-end;opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.done-overlay.is-open{opacity:1;visibility:visible}
.done-overlay[hidden]{display:none}
.done-drawer{width:min(420px,100vw);height:100%;background:#eaf4fa;padding:23px;box-shadow:-10px 0 32px #102d4533;overflow:auto;transform:translateX(28px);opacity:.7;transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .3s ease}
.done-overlay.is-open .done-drawer{transform:translateX(0);opacity:1}
.done-drawer-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #bfced9;padding-bottom:15px;margin-bottom:17px}
.done-drawer-head h2{margin:0;font-size:21px}
.done-drawer-head button{border:0;background:none;font-size:20px;color:#345b70;cursor:pointer}
.done-list{display:grid;gap:10px}
.task-dialog{position:fixed;z-index:40;width:min(1130px,calc(100vw - 40px));max-width:none;max-height:min(92vh,920px);border:1px solid #a9c5d6;border-radius:17px;background:#edf5f9;color:#17364b;padding:0;box-shadow:0 24px 90px #0a304a60;overflow:hidden}
.task-dialog::backdrop{background:#09283c99;backdrop-filter:blur(3px)}
.task-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(90deg,#f1fafc,#d8eef2);border-bottom:1px solid #bed4df;padding:19px 23px}
.task-dialog-header h2{font-size:22px;margin:5px 0 0}
.task-dialog-actions{display:flex;align-items:center;gap:15px}
.task-dialog-actions button{border:1px solid #bdd1db;border-radius:8px;background:#fff;color:#3b6178;padding:7px 10px;cursor:pointer}
#save-state{font-size:12px;color:#53818d}
.task-dialog-body{display:grid;grid-template-columns:minmax(0,1.66fr) minmax(290px,1fr);min-height:480px;max-height:calc(92vh - 100px)}
.task-editor{padding:24px;overflow-y:auto;min-width:0}
.comments-side{border-left:1px solid #c6dae5;background:#e5f0f5;padding:23px 20px;display:flex;flex-direction:column;min-width:0;overflow-y:auto}
.field{display:grid;gap:8px;font-size:13px;font-weight:700;color:#30556b;margin-bottom:16px}
.field input,.field select,.field textarea{width:100%;min-width:0;border:1px solid #bfd1dd;border-radius:9px;background:white;color:#183d52;padding:10px 12px;font:inherit;font-size:14px;outline:none}
.field textarea{resize:vertical;line-height:1.5}
.field :is(input,select,textarea):focus{border-color:#209ac5;box-shadow:0 0 0 3px #209ac51c}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.weekday-choices{display:flex;flex-wrap:wrap;gap:7px;padding:9px 0}
.weekday-choices label{display:flex;align-items:center;gap:3px;font-weight:600;font-size:12px}
.weekday-choices input{width:auto}
.primary-action,.small-action{border:0;border-radius:9px;padding:11px 16px;background:#168db6;color:white;cursor:pointer;font-weight:750;font-size:14px}
.primary-action:hover,.small-action:hover{background:#0d749e}
.form-submit{display:flex;justify-content:flex-end;padding:9px 0}
.task-section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.task-section-heading h3,.comments-heading h3{font-size:17px;margin:5px 0 0}
.task-section-heading small,.comments-heading small{color:#77909b;font-size:12px}
.checklist-section{margin-top:14px;padding-top:19px;border-top:1px solid #c0d3df}
.checklist-items{display:grid;gap:8px}
.checklist-row{display:grid;grid-template-columns:22px minmax(90px,1fr) 106px 132px 27px;align-items:center;gap:8px;padding:8px;background:#f8fbfd;border:1px solid #c6dae4;border-radius:9px}
.checklist-row input:not([type=checkbox]),.checklist-row select{width:100%;min-width:0;border:1px solid #d6e4eb;border-radius:7px;padding:8px 6px;color:#294b5e;background:#fff;font-size:12px}
.checklist-row .item-check input{width:17px;height:17px;accent-color:#168db6}
.checklist-row .struck{text-decoration:line-through;color:#90a4ac}
.item-delete{border:0;background:none;color:#96aab6;cursor:pointer;font-size:14px}
.item-delete:hover{color:#b24052}
.checklist-add-form{display:flex;gap:9px;margin-top:12px}
.checklist-add-form input{flex:1;min-width:0;border:1px dashed #9bc5d7;background:#f8fdff;border-radius:8px;padding:10px 12px;font-size:13px}
.checklist-add-form .small-action{white-space:nowrap}
.comments-heading{padding-bottom:13px;border-bottom:1px solid #c4d5de}
.comments-list{flex:1;display:flex;flex-direction:column;gap:10px;min-height:150px;margin-top:15px}
.comment-card{padding:12px 13px;border:1px solid #c5d9e4;border-radius:10px;background:#f8fcff}
.comment-meta{display:flex;gap:10px;align-items:center;justify-content:space-between}
.comment-meta strong{font-size:13px}
.comment-meta time{font-size:11px;color:#8197a4;white-space:nowrap}
.comment-card p{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0}
.comment-actions{display:flex;gap:12px}
.comment-actions button{border:0;background:none;padding:2px;color:#2682a7;font-size:12px;cursor:pointer}
.comment-form{display:flex;flex-direction:column;gap:9px;padding-top:13px;margin-top:15px;border-top:1px solid #c4d5de}
.comment-form textarea{width:100%;border:1px solid #bcd0dc;border-radius:9px;padding:12px;resize:vertical;font-size:13px}
.comment-form button{align-self:flex-end}
.task-empty-text,.comments-empty{margin:9px 0;color:#8299a8;font-size:13px;line-height:1.5}
.modal-error{background:#fff0f2;color:#a3314e;padding:12px 20px;border-top:1px solid #eab7c3;font-size:13px}
.occurrences-section{border-top:1px solid #c3d7e3;margin-top:25px;padding-top:12px}
.occurrences-section h3{margin:0 0 10px;font-size:15px}
.history-entry{font-size:12px;padding:6px 0;color:#53818f}

/* Audit log: independent scrollable card and true server-side pagination */
.activity-panel{background:#edf6fa;border:1px solid #b9cfdd;border-radius:15px;box-shadow:0 5px 20px #17496912;overflow:hidden}
.activity-panel-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 23px;border-bottom:1px solid #bdd2df;background:#e2f0f6}
.activity-panel-header h3{margin:5px 0;font-size:20px}
.activity-panel-header h3 small{font-size:13px;font-weight:650;color:#668698}
.activity-panel-header p{font-size:13px;color:#738f9e;margin:6px 0 0}
.activity-export{padding:8px 11px;border:1px solid #8dbfcf;border-radius:8px;background:#fff;color:#167d9f;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap}
.activity-export:hover{border-color:#1b95bf}
.activity-scroll{max-height:460px;overflow:auto;overscroll-behavior:contain}
.activity-table{border-collapse:collapse;width:100%;min-width:820px;font-size:12px}
.activity-table th{position:sticky;top:0;z-index:1;background:#d1e5ef;color:#34556b;text-align:left;font-weight:750;padding:12px;border-bottom:1px solid #bad0dc}
.activity-table td{padding:11px 12px;border-bottom:1px solid #d1e0e7;color:#3c596a;vertical-align:top}
.activity-table tbody tr:nth-child(even){background:#e6f1f7}
.activity-table .nowrap{white-space:nowrap}
.activity-table .details-cell{max-width:370px;overflow-wrap:anywhere}
.activity-empty{text-align:center;padding:40px!important;color:#7894a4}
.activity-pagination{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 22px;background:#e2edf4;color:#668296;font-size:13px}
.activity-pagination div{display:flex;gap:10px}
.activity-pagination a,.activity-pagination .page-disabled{display:inline-block;padding:8px 11px;border:1px solid #b7cdda;border-radius:8px;text-decoration:none;color:#167fa8;background:#f9fdff}
.activity-pagination .page-disabled{color:#9fb1bf;background:#ebf2f6}
.admin-coming{background:#e6f0f5;border:1px solid #c2d5e0;border-radius:13px;padding:19px 22px;margin-top:18px}
.admin-coming h3{font-size:16px;margin:0 0 7px}
.admin-coming p{margin:0;color:#66889a;font-size:13px;line-height:1.5}
@media(max-width:850px){
  .task-dialog-body{grid-template-columns:1fr;overflow-y:auto}
  .task-editor{overflow:visible}
  .comments-side{min-height:290px;overflow:visible;border-left:0;border-top:1px solid #c6dae5}
  .task-dialog{max-height:94vh}
  .checklist-row{grid-template-columns:22px 1fr 90px 110px 25px}
  .today-row .task-card{display:block}
}
@media(max-width:580px){
  .task-dialog{width:calc(100vw - 14px);max-height:95vh}
  .task-dialog-header{padding:14px}
  .task-dialog-header h2{font-size:18px}
  .task-editor{padding:16px}
  .field-grid{grid-template-columns:1fr;gap:0}
  .checklist-row{grid-template-columns:22px minmax(0,1fr) 26px;gap:7px}
  .checklist-row [data-item-assignee]{grid-column:2;grid-row:2}
  .checklist-row [data-item-due]{grid-column:2;grid-row:3}
  .checklist-row .item-delete{grid-column:3;grid-row:1}
  .today-row{display:block}
  .today-complete{margin:8px 0 0;width:100%}
  .done-rail{height:123px;top:auto;bottom:60px}
}

/* User teams, admin membership and settings */
.header-user{text-decoration:none;cursor:pointer}.header-user:hover{color:#127b9e}
.team-switch-row{display:flex;justify-content:space-between;gap:16px;align-items:center;border-bottom:1px solid #b6cad5;flex-wrap:wrap}
.team-switch-row .people-tabs{border:0;display:flex;gap:8px;overflow-x:auto;max-width:100%;padding-top:3px}
.people-tabs .person-tab{background:transparent;border:none;border-bottom:3px solid transparent;padding:0 11px 13px;display:inline-flex;align-items:center;gap:9px;cursor:pointer;white-space:nowrap}
.people-tabs .person-tab.active{border-bottom-color:#168ed8;color:#164b69}
.people-tabs .person-tab:not(.active):hover{color:#1d84b1}
.department-filter{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#517184;font-weight:700;padding-bottom:10px}
.department-filter select{max-width:210px;border:1px solid #aac6d5;border-radius:8px;background:#f0f8fc;padding:8px;color:#1e5671}
.admin-feedback{padding:12px 14px;border-radius:10px;font-size:13px;margin:8px 0 16px}
.admin-feedback.error{color:#a12d4c;background:#fcecef;border:1px solid #eac0c9}
.admin-feedback.success{color:#247758;background:#e8f7ec;border:1px solid #a2dbba}
.members-panel{background:#edf6fa;border:1px solid #b9cfdd;border-radius:15px;padding:22px;margin:0 0 22px;box-shadow:0 5px 20px #17496912}
.admin-section-title h3{margin:5px 0 4px;font-size:22px}
.admin-section-title p{color:#688394;font-size:14px;margin:0 0 21px}
.admin-forms{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(360px,1.55fr);gap:14px}
.admin-form-card{display:flex;flex-direction:column;align-items:stretch;gap:13px;background:#f8fcff;border:1px solid #c5dbe6;border-radius:12px;padding:17px}
.admin-form-card h4{font-size:16px;margin:0 0 3px;color:#214c65}
.admin-form-card label,.settings-form label{display:flex;flex-direction:column;gap:6px;color:#3c5f72;font-weight:700;font-size:13px}
.admin-form-card input,.admin-form-card select,.settings-form input,.member-edit select{min-width:0;width:100%;border:1px solid #b7cfdd;border-radius:8px;padding:10px 11px;background:#fff;color:#224960;font-size:13px}
.admin-form-card button{align-self:flex-start;margin-top:auto}
.admin-form-hint{font-size:12px;color:#748e9b;margin:0;line-height:1.5}
.admin-form-card .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.department-summary{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}
.department-summary div{display:inline-flex;align-items:center;gap:12px;padding:10px 12px;background:#dfeff5;border:1px solid #c3d9e4;border-radius:10px;font-size:13px}
.department-summary strong{color:#245574}.department-summary span{color:#6c899b}
.members-table-title{font-size:16px;margin:23px 0 10px}
.members-scroll{max-height:360px;border:1px solid #c6dbe4;border-radius:10px}
.members-table{min-width:810px}
.member-edit{display:grid;grid-template-columns:minmax(135px,1.4fr) minmax(110px,1fr) minmax(105px,1fr) auto;gap:8px;align-items:center}
.member-edit button{padding:10px}
.settings-card{max-width:630px;background:#edf6fa;border:1px solid #b9cfdd;border-radius:14px;padding:23px}
.settings-card p{color:#5f7c8e;font-size:14px;line-height:1.5;margin:0 0 18px}
.settings-form{display:flex;flex-direction:column;gap:16px}
.settings-form button{align-self:flex-start}
@media(max-width:1000px){.admin-forms{grid-template-columns:1fr}}
@media(max-width:650px){
 .team-switch-row{display:block}.team-switch-row .people-tabs{padding-top:4px}
 .department-filter{padding:10px 0}.admin-form-card .form-grid{grid-template-columns:1fr}
 .members-panel{padding:13px}.members-table{min-width:810px}
}


/* October 2026: readable task board, reliable hidden state, aligned controls. */
[hidden] { display: none !important; }

.side-add, .column-add, .checklist-plus {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  line-height: 0;
  vertical-align: middle;
}
.side-add svg, .column-add svg, .checklist-plus svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.side-add { margin-left: auto; width: 29px; height: 29px; }
.column-add { margin: 0; width: 32px; height: 32px; }
.kanban-column-head {
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) auto 32px;
  gap: 9px;
  align-items: center;
  min-width: 0;
}
.kanban-column-head .column-count { margin: 0 0 0 4px; }
.kanban-column-head h3 { min-width: 0; }
.settings-gear {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
}
.settings-gear svg {
  width: 23px;
  height: 23px;
  flex: none;
  display: block;
}
.settings-gear:hover svg { transform: rotate(22deg); transition: transform .18s ease; }

.person-tab.icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 53px;
  padding: 6px 10px 13px;
  gap: 0;
}
.person-tab.icon-only .avatar { width: 34px; height: 34px; }
.view-switch .view-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #547589;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 750;
  line-height: 1.3;
}
.view-switch .view-button.active { background: #f6fcff; color: #117da8; }
.view-switch .view-button:hover:not(.active) { background: #e5f4f9; }
.toolbar { align-items: center; }
.toolbar-right { margin-left: auto; }

.focus-navigation { display: flex; align-items: center; gap: 10px; }
.focus-navigation .date-placeholder {
  min-width: 92px;
  text-align: center;
  font-size: 13px;
  display: inline;
}
.focus-navigation button, .calendar-controls button {
  appearance: none;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  background: #eaf5fa;
  border: 1px solid #a9c8d8;
  border-radius: 9px;
  color: #217797;
  cursor: pointer;
  font-family: inherit;
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
  padding: 0;
}
.focus-navigation button:not(:disabled):hover,
.calendar-controls button:hover { background: white; border-color: #178bb3; }
.focus-navigation button:disabled { opacity: .35; cursor: not-allowed; }

/* Make a no-deadline field read "Без срока" while retaining native date picker. */
.deadline-input {
  display: flex;
  align-items: center;
  position: relative;
  background: #fff;
  color: #2a5065;
  min-height: 43px;
  border: 1px solid #bfd1dd;
  border-radius: 9px;
  overflow: hidden;
  padding-right: 5px;
  cursor: pointer;
}
.deadline-input:focus-within { outline: 2px solid #209ac544; border-color: #209ac5; }
#deadline-placeholder {
  position: absolute;
  inset: 0 38px 0 12px;
  display: flex;
  align-items: center;
  color: #2d576a;
  pointer-events: none;
  z-index: 1;
  font-size: 14px;
  font-weight: 600;
}
.field .deadline-input input[type=date] {
  width: 100%;
  min-width: 0;
  margin: 0;
  height: 42px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  padding: 9px 12px;
  color: #2a5065;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.field .deadline-input.is-empty input[type=date] {
  opacity: 0;
}
.deadline-input #deadline-clear {
  position: relative;
  z-index: 2;
  width: 27px;
  height: 27px;
  margin-left: -34px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 7px;
  background: #eff5f8;
  color: #638394;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.deadline-input #deadline-clear:hover { background: #daeaf1; color: #a43e54; }

.checklist-add-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) 35px;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}
.checklist-plus {
  height: 35px;
  width: 35px;
  border: 1px solid #86bbd3;
  background: #e5f5fa;
  color: #1382ab;
  border-radius: 9px;
  cursor: pointer;
}
.checklist-plus:hover { background: #d7eff8; border-color: #288fac; }
.checklist-section:has(.is-draft) { border-top-color: #7bc4da; }
.task-editor .form-submit { margin-top: 14px; border-top: 1px solid #c1d9e4; padding-top: 16px; }

/* V2 monthly calendar, modeled after the layout of V1, not its fonts. */
.calendar-panel { margin-top: 26px; }
.calendar-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}
.calendar-panel-header h2 { margin: 5px 0 0; font-size: 24px; }
.calendar-controls { display: flex; align-items: center; gap: 8px; }
.calendar-controls strong {
  font-size: 15px;
  color: #21435a;
  font-weight: 750;
  min-width: 138px;
  text-align: center;
  text-transform: capitalize;
}
.calendar-controls #calendar-today {
  width: auto;
  padding: 0 11px;
  font-size: 13px;
  margin-left: 6px;
}
.calendar-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border: 1px solid #b9d0df;
  border-radius: 9px;
  background: #e8f2f7;
  margin-bottom: 12px;
  color: #547587;
  font-size: 12px;
}
.calendar-legend span { display: flex; gap: 7px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.is-deadline { background: #278fc3; }
.legend-dot.is-checklist { background: #1fa79c; }
.legend-dot.is-recurring { background: #8473c3; }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  padding: 10px 0;
  text-align: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #648398;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 6px;
}
.calendar-day {
  min-width: 0;
  min-height: 114px;
  background: #e8f3f9;
  border: 1px solid #bfd4e1;
  border-radius: 10px;
  padding: 9px 8px;
}
.calendar-day.outside { background: #d9e6ed; opacity: .62; }
.calendar-day.is-today { border: 2px solid #2194b9; background: #effaff; }
.calendar-day.is-selected { box-shadow: inset 0 0 0 2px #55aec5; }
.calendar-day-num {
  appearance: none;
  border: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: transparent;
  width: 28px;
  height: 28px;
  color: #355970;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.calendar-day.is-today .calendar-day-num { color: white; background: #1594b9; }
.calendar-events { display: grid; gap: 4px; margin-top: 7px; }
.calendar-event, .calendar-more {
  appearance: none;
  border: 1px solid #bbdcea;
  background: #effbfe;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
  padding: 5px 6px;
  border-radius: 6px;
  text-align: left;
  color: #256784;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.calendar-event.is-checklist { background: #e6f8f3; border-color: #b6dfd3; color: #257c70; }
.calendar-event.is-recurring { background: #efebf8; border-color: #cfbee6; color: #7360a6; }
.calendar-event.is-done { opacity: .55; text-decoration: line-through; }
.calendar-event.is-projected { border-style: dashed; opacity: .76; }
.modal-error #task-reload { margin-left: 12px; margin-top: 6px; }
.calendar-event:hover { filter: brightness(.96); }
.calendar-event-icon { flex: 0 0 auto; }
.calendar-event-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more { border: 0; background: none; color: #60859b; }
.calendar-day-detail {
  border: 1px solid #b8d0dc;
  border-radius: 12px;
  background: #eff7fb;
  margin-top: 14px;
  padding: 17px;
}
.calendar-day-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-day-detail-head strong { font-size: 16px; }
.calendar-day-detail-head button { background: none; border: 0; color: #54788c; cursor: pointer; }
.calendar-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid #c5d9e4;
  border-radius: 9px;
  background: #fff;
  margin: 6px 0;
  padding: 10px 13px;
  color: #284a5d;
  text-align: left;
  cursor: pointer;
}
.calendar-detail-item:hover { border-color: #2894ba; }
.calendar-detail-item strong { font-size: 13px; }
.calendar-detail-item small { margin-left: auto; font-size: 11px; color: #64869b; }
.calendar-type { background: #e3eef5; border-radius: 6px; padding: 5px; font-size: 11px; color: #347f9d; }
.calendar-type.is-checklist { background: #def6ee; color: #248977; }
.calendar-type.is-recurring { background: #ece5f9; color: #745caf; }
.calendar-undated { margin-top: 22px; }
.calendar-undated h3 { font-size: 17px; margin: 0 0 12px; }
.calendar-undated small { color: #668b9c; }
#calendar-undated-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 10px; }
.calendar-empty { font-size: 13px; color: #69889b; padding: 12px; margin: 0; }

@media (max-width: 1100px) {
  .calendar-panel { overflow-x: auto; }
  .calendar-weekdays, .calendar-grid { min-width: 720px; }
}
@media (max-width: 650px) {
  .focus-navigation { gap: 5px; }
  .focus-navigation .date-placeholder { min-width: auto; font-size: 12px; }
  .calendar-panel-header { display: block; }
  .calendar-controls { margin-top: 12px; }
  .calendar-controls strong { min-width: 115px; font-size: 13px; }
}

/* Profile diagnostics: deliberately compact, below password settings. */
.diagnostics-card { margin-top: 20px; }
.diagnostics-card h3 { color: #203f53; margin: 8px 0; font-size: 18px; }
.diagnostics-card p { line-height: 1.55; }
.diagnostics-download { cursor: pointer; font-family: inherit; font-weight: 700; }
.diagnostics-download:disabled { opacity: .55; cursor: wait; }
.diagnostics-message { min-height: 19px; margin-bottom: 0; color: #527b91; font-size: 13px; }

/* Keep the same project navigation styling on /settings and /admin. */
.sidebar a.side-link { text-decoration: none; }
.sidebar #project-nav { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.sidebar .project-button { min-width: 0; }
.sidebar .project-button > span:not(.project-dot):not(.side-count) {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* Small, transient success notice with a five-second undo window. */
.action-toast{position:fixed;z-index:70;bottom:max(20px,env(safe-area-inset-bottom));left:50%;
  transform:translate(-50%,18px) scale(.98);opacity:0;pointer-events:none;
  display:flex;align-items:center;gap:12px;max-width:min(420px,calc(100vw - 26px));
  min-width:180px;padding:11px 14px;border-radius:12px;
  color:#f5fbff;background:#234459;border:1px solid #53758a;
  box-shadow:0 12px 34px #07293e40;font-size:13px;font-weight:600;
  transition:opacity .24s ease,transform .3s cubic-bezier(.2,.8,.2,1);}
.action-toast[hidden]{display:none}
.action-toast.is-visible{transform:translate(-50%,0) scale(1);opacity:1;pointer-events:auto}
.action-toast-message{display:flex;align-items:center;gap:8px;min-width:0;line-height:1.35}
.action-toast-check{display:grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;background:#3f9b87;color:white;font-size:12px}
.action-toast button{border:0;border-radius:7px;background:#ffffff17;color:#d7faff;padding:6px 9px;white-space:nowrap;font-weight:800;cursor:pointer}
.action-toast button:hover,.action-toast button:focus-visible{background:#ffffff30}
.action-toast button[hidden]{display:none}
@media(prefers-reduced-motion:reduce){
  .action-toast,.done-rail,.done-overlay,.done-drawer{transition:none!important}
}


/* Jira V2: quiet task markers and personal connection settings */
.jira-task-panel{border:1px solid #b3d5df;border-radius:11px;background:#e6f5f8;padding:13px 15px;margin:17px 0}
.jira-task-panel[hidden]{display:none}
.jira-task-line{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:13px;color:#476b7c}
.jira-task-line a{font-weight:800;color:#0879a7}
.jira-is-dirty{color:#b16a13!important;font-weight:800}
.jira-task-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:9px;font-size:12px;color:#53758a}
.jira-task-hint{font-size:12px;color:#617e89;margin:9px 0 0}
.jira-settings-card{margin-bottom:18px}
.jira-settings-card .settings-form[hidden]{display:none}
.jira-settings-card [hidden],.jira-task-panel [hidden]{display:none!important}
.jira-inspect-details{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.5;background:#fff;border:1px solid #d4e5ee;border-radius:8px;margin-top:9px;padding:11px;color:#315568}
.jira-settings-card h3{margin:5px 0 12px}
.jira-settings-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
.jira-settings-message{margin:10px 0;color:#246b71;font-size:13px}
.jira-settings-message.error{color:#aa314f}
.jira-security-note{font-size:12px!important;margin-top:13px!important}
.jira-card-indicator{font-size:11px;font-weight:800;color:#1a826b;padding:2px 5px;border-radius:5px;background:#e0f8ee}
.jira-card-indicator.is-dirty{color:#a66b10;background:#fff1d4}


/* V2 modal: constrained scrolling inside <dialog>, including Safari. */
.task-dialog[open] {
  display: flex;
  flex-direction: column;
  height: min(92vh, 920px);
  height: min(92dvh, 920px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
}
.task-dialog-header, .task-dialog > .modal-error {flex: 0 0 auto;}
.task-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}
.task-editor, .comments-side {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body:has(.task-dialog[open]) {overflow: hidden;}
@media (max-width:850px) {
  .task-dialog-body {
    display: block;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .task-editor, .comments-side {overflow: visible;min-height: 0;}
}
@media (max-width:580px) {
  .task-dialog[open] {
    height: calc(100vh - 14px);
    height: calc(100dvh - 14px);
  }
}


/* Administrative temporary-password reset: collapsed until explicitly opened. */
.members-table{min-width:1040px}
.password-reset-cell{min-width:165px;vertical-align:middle!important}
.password-reset-control{position:relative}
.password-reset-control summary{cursor:pointer;white-space:nowrap;color:#177ca6;font-weight:750;list-style-position:inside;font-size:12px}
.password-reset-control[open]{min-width:200px}
.password-reset-control form{display:grid;gap:8px;padding:11px 0 3px}
.password-reset-control label{display:grid;gap:5px;line-height:1.35;font-size:12px;font-weight:700}
.password-reset-control input{width:100%;min-width:0;border:1px solid #b7cfdd;border-radius:8px;padding:9px;background:#fff;color:#214a60}
.password-reset-control button{font-size:12px;white-space:nowrap;padding:9px}
.password-reset-control small{font-size:11px;color:#6e8897;line-height:1.45}
.password-reset-pending{display:block;margin-top:4px;font-size:11px;font-weight:750;color:#ab721d}
