/* Zettai Process Tracker — Odoo-inspired enterprise UI (Zettai brand blue) */
:root {
  /* Brand primary (Zettai logo). Legacy names --o-purple* kept for class compatibility. */
  --o-purple: #00579a;
  --o-purple-d: #004578;
  --o-purple-l: #e6f1f8;
  --o-purple-m: #3d7eb0;
  --ink: #212529;
  --muted: #6c757d;
  --line: #dee2e6;
  --soft: #f8f9fa;
  --white: #fff;
  --ok: #28a745;
  --warn: #ddad1a;
  --bad: #dc3545;
  --info: #017e84;
  --sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Roboto Mono', ui-monospace, Consolas, monospace;
  --bs-primary: #00579a;
  --bs-primary-rgb: 0, 87, 154;
  --bs-link-color: #00579a;
  --bs-link-hover-color: #004578;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  background: #f0f1f2;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); font-size: .84em; }
.link-muted { color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--o-purple); }

.btn-primary {
  --bs-btn-bg: var(--o-purple);
  --bs-btn-border-color: var(--o-purple);
  --bs-btn-hover-bg: var(--o-purple-d);
  --bs-btn-hover-border-color: var(--o-purple-d);
  --bs-btn-active-bg: var(--o-purple-d);
  --bs-btn-active-border-color: var(--o-purple-d);
}
.btn-outline-primary {
  --bs-btn-color: var(--o-purple);
  --bs-btn-border-color: var(--o-purple);
  --bs-btn-hover-bg: var(--o-purple);
  --bs-btn-hover-border-color: var(--o-purple);
  --bs-btn-active-bg: var(--o-purple-d);
  --bs-btn-active-border-color: var(--o-purple-d);
}
.nav-tabs .nav-link.active {
  color: var(--o-purple);
  border-color: transparent transparent var(--o-purple);
  border-bottom-width: 2px;
  font-weight: 500;
}
.nav-tabs .nav-link { color: var(--muted); border: none; border-bottom: 2px solid transparent; }
.nav-tabs { border-bottom: 1px solid var(--line); }
.form-check-input:checked {
  background-color: var(--o-purple);
  border-color: var(--o-purple);
}
.progress-bar { background-color: var(--o-purple); }

/* Login */
#login-screen {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px clamp(20px, 5vw, 64px);
  overflow: hidden;
  background: #e8f1f8;
}
.login-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, .78) 0%,
    rgba(255, 255, 255, .42) 30%,
    rgba(255, 255, 255, .08) 48%,
    transparent 62%
  );
}
.login-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(0, 87, 154, .12);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 12px 36px rgba(0, 87, 154, .14);
  backdrop-filter: blur(10px);
}
@media (max-width: 900px) {
  #login-screen {
    justify-content: center;
  }
  .login-bg-img {
    object-position: 70% 35%;
  }
  #login-screen::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, .28) 0%,
      rgba(255, 255, 255, .55) 45%,
      rgba(255, 255, 255, .72) 100%
    );
  }
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.login-brand img {
  width: auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  border-radius: 4px;
}
.login-brand h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--o-purple);
  margin: 0;
}
.login-note { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.login-card-form { width: min(420px, 100%); }
.login-form .form-label {
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.login-password-wrap { position: relative; }
.login-password-wrap .form-control { padding-right: 42px; }
.login-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.zpt-editor {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 140px;
}
.zpt-editor:focus-within {
  border-color: #9bb8d0;
}
.zpt-editor-surface {
  min-height: 140px;
  padding: 12px 12px 44px;
  outline: none;
  border: 0;
  box-shadow: none;
  font-size: .92rem;
  line-height: 1.45;
  background: transparent;
}
.zpt-editor-surface:focus,
.zpt-editor-surface:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}
.zpt-editor-surface > :first-child {
  margin-top: 0;
}
.zpt-editor-surface h1 { font-size: 1.45rem; font-weight: 700; margin: .4rem 0; }
.zpt-editor-surface h2,
.zpt-editor-view h2 { font-size: 1.2rem; font-weight: 700; margin: .35rem 0; }
.zpt-editor-surface h3,
.zpt-editor-view h3 { font-size: 1.05rem; font-weight: 700; margin: .3rem 0; }
.zpt-editor-surface p,
.zpt-editor-view p { margin: 0 0 .4rem; }
.zpt-editor-surface img,
.zpt-editor-view img { max-width: 100%; height: auto; border-radius: 4px; }
.zpt-editor-surface blockquote,
.zpt-editor-view blockquote {
  margin: .4rem 0;
  padding: 8px 12px;
  border-left: 3px solid var(--o-purple);
  background: var(--o-purple-l);
}
.zpt-editor-surface .zpt-cols,
.zpt-editor-view .zpt-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: .4rem 0;
}
.zpt-editor-surface .zpt-cols > div,
.zpt-editor-view .zpt-cols > div {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 8px;
  min-height: 48px;
}
.zpt-editor-surface .zpt-check,
.zpt-editor-view .zpt-check { list-style: none; padding-left: 0; }
.zpt-editor-surface .zpt-check li,
.zpt-editor-view .zpt-check li { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.zpt-editor-surface .zpt-check input,
.zpt-editor-view .zpt-check input { margin-top: 4px; flex: 0 0 auto; }
.zpt-editor-surface .zpt-check-text,
.zpt-editor-view .zpt-check-text { flex: 1; min-width: 0; min-height: 1.45em; }
.zpt-editor-placeholder {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #adb5bd;
  pointer-events: none;
  font-size: .92rem;
}
.zpt-editor-placeholder.is-hidden { display: none; }
.zpt-editor-toolbar {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.zpt-editor-tool {
  border: 0;
  background: transparent;
  color: #6c757d;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zpt-editor-tool:hover { background: var(--o-purple-l); color: var(--o-purple); }
.zpt-editor-menu {
  position: absolute;
  z-index: 30;
  width: min(320px, calc(100% - 16px));
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px;
}
.zpt-editor-menu-group {
  font-size: .68rem;
  letter-spacing: .04em;
  color: #868e96;
  font-weight: 700;
  padding: 6px 8px 2px;
}
.zpt-editor-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 6px;
  padding: 6px 8px;
}
.zpt-editor-menu-item.is-active,
.zpt-editor-menu-item:hover { background: #f1f3f5; }
.zpt-editor-menu-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #495057;
  background: #fff;
}
.zpt-editor-menu-icon.is-h1 { font-size: .95rem; font-weight: 700; }
.zpt-editor-menu-icon.is-h2 { font-size: .82rem; font-weight: 700; }
.zpt-editor-menu-icon.is-h3 { font-size: .72rem; font-weight: 700; }
.zpt-editor-menu-icon.is-p { font-family: Georgia, serif; font-weight: 700; }
.zpt-editor-menu-text { display: flex; flex-direction: column; min-width: 0; }
.zpt-editor-menu-label { font-size: .86rem; font-weight: 600; }
.zpt-editor-menu-hint { font-size: .74rem; color: var(--muted); }
.zpt-editor-menu-empty { padding: 8px; color: var(--muted); font-size: .82rem; }
.zpt-editor-view { font-size: .92rem; line-height: 1.45; }
.zpt-editor-view h1 { font-size: 1.45rem; font-weight: 700; margin: .4rem 0; }
.emp-action-btn {
  padding: 2px 6px !important;
  line-height: 1;
  color: var(--o-purple);
  vertical-align: middle;
  text-decoration: none;
}
.emp-action-btn .bi { font-size: 1.05rem; }
.emp-action-btn.is-activate { color: var(--ok); }
.emp-action-btn.is-deactivate { color: #c98512; }
.emp-action-btn:hover { opacity: .85; }
.employee-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.employee-form .mb-3 { margin-bottom: 0; }
.employee-form .form-label {
  margin-bottom: 2px;
  font-size: .8rem;
  font-weight: 600;
}
.employee-form .form-control,
.employee-form .form-select {
  min-height: 34px;
  padding-top: .3rem;
  padding-bottom: .3rem;
}
#appModal .modal-body:has(.employee-form) {
  padding-top: 4px;
  padding-bottom: 4px;
}
@media (max-width: 480px) {
  .employee-form { grid-template-columns: 1fr; }
}
.login-users {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.login-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 6px;
  padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.login-user-card:hover {
  border-color: var(--o-purple);
  background: var(--o-purple-l);
}

/* ===== Odoo navbar ===== */
#app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.o-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 46px;
  background: var(--o-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 6px;
}
.o-navbar-left, .o-navbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.o-nav-icon {
  background: transparent;
  border: 0;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.o-nav-icon:hover { background: rgba(255,255,255,.12); }
.o-apps-wrap { position: relative; }
.o-apps-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1100;
  min-width: 220px;
  max-height: min(70vh, 480px);
  overflow: auto;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  padding: 6px;
}
.o-apps-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
}
.o-apps-item i {
  width: 22px;
  color: var(--o-purple);
  font-size: 1.05rem;
}
.o-apps-item:hover { background: var(--soft); }
.o-apps-item.active {
  background: var(--o-purple-l);
  color: var(--o-purple-d);
  font-weight: 700;
}
.o-app-name {
  color: #fff;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  padding: 0 12px 0 6px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .22);
  margin-right: 4px;
}
.o-app-name:hover { color: #fff; }
.o-app-logo {
  display: none;
  align-items: center;
  padding: 0 10px 0 4px;
  text-decoration: none;
  line-height: 0;
}
.o-app-logo img {
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  border-radius: 2px;
}
.o-top-nav {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  max-width: min(72vw, 900px);
}
.o-top-nav a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  padding: 12px 11px;
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.o-top-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.o-top-nav a.active {
  color: #fff;
  border-bottom-color: #fff;
  background: rgba(0,0,0,.08);
}
.o-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #28a745;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.o-user-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
}
.o-user-text .name { font-size: .82rem; font-weight: 600; line-height: 1.15; }
.o-user-text .role { font-size: .7rem; opacity: .8; line-height: 1.1; }
.o-user-switch {
  max-width: 170px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 4px;
  font-size: .78rem;
  padding: 4px 6px;
}
.o-user-switch option { color: #212529; }

.project-gear {
  color: var(--muted) !important;
  font-size: 1rem;
  line-height: 1;
}
.project-gear:hover { color: var(--o-purple) !important; }
.member-alloc-box {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: var(--soft);
}
.inline-form .form-label { font-weight: 500; color: var(--muted); }

/* Compact task create/edit form */
.task-form-page {
  padding-top: 12px;
  padding-bottom: 12px;
}
.task-form-layout {
  padding: 14px 16px;
}
.task-form-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px 20px;
  align-items: start;
}
.task-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 8px;
}
.task-form-field {
  min-width: 0;
}
.task-form-field .form-label {
  margin-bottom: 2px;
  font-size: .78rem;
}
.task-form-field.span-2 {
  grid-column: span 2;
}
.task-form-field.span-3 {
  grid-column: 1 / -1;
}
.billing-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  min-height: 31px;
  padding-top: 4px;
}
.billing-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.billing-radio input {
  margin: 0;
  accent-color: var(--o-purple);
}
.task-form-main-col > .task-form-field {
  margin-bottom: 8px;
}
.task-form-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px 16px;
  align-items: start;
  margin-bottom: 8px;
}
.task-form-meta-row > .task-form-field {
  margin-bottom: 0;
}
.task-form-side-col {
  position: sticky;
  top: 64px;
}
.task-form-side-col .member-alloc-box {
  padding: 10px;
}
.member-alloc-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 32px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.member-alloc-line .alloc-hours {
  padding-left: 6px;
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
  font-family: 'Roboto Mono', ui-monospace, monospace;
  text-align: center;
}
@media (max-width: 992px) {
  .task-form-split { grid-template-columns: 1fr; }
  .task-form-side-col { position: static; }
}
@media (max-width: 768px) {
  .task-form-grid { grid-template-columns: 1fr; }
  .task-form-field.span-2,
  .task-form-field.span-3 { grid-column: auto; }
}
.inline-edit-table .form-control,
.inline-edit-table .form-select { min-width: 0; }
.inline-new-row { background: #faf7f9; }

.o-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.o-breadcrumb {
  padding: 10px 24px 0;
  color: var(--muted);
  font-size: .82rem;
}

/* Control panel (secondary toolbar) */
.o-control-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  position: sticky;
  top: 46px;
  z-index: 20;
}
.o-cp-left, .o-cp-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.o-cp-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 200px;
}
.o-cp-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.o-cp-title .gear,
.o-cp-gear {
  color: var(--muted);
  margin-left: 6px;
  font-size: .95rem;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 4px;
}
.o-cp-gear:hover:not(:disabled) {
  color: var(--o-purple);
  background: rgba(113, 75, 103, .08);
}
.o-cp-gear:disabled {
  cursor: default;
  opacity: .55;
}
.btn-o-new {
  background: var(--o-purple);
  color: #fff;
  border: 1px solid var(--o-purple);
  border-radius: 4px;
  font-weight: 600;
  font-size: .86rem;
  padding: 6px 14px;
}
.btn-o-new:hover {
  background: var(--o-purple-d);
  color: #fff;
}
.o-search {
  width: min(480px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 5px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.o-search i { color: var(--muted); }
.o-search input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  font-size: .9rem;
  background: transparent;
}

/* Odoo-style facet search (Filters / Group By / Favorites) */
.o-facet-search {
  position: relative;
  width: min(560px, 100%);
}
.o-facet-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 3px 6px 3px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  cursor: text;
}
.o-facet-search.is-open .o-facet-bar {
  border-color: var(--o-purple);
  box-shadow: 0 0 0 1px rgba(113, 75, 103, .25);
}
.o-facet-icon,
.o-facet-funnel {
  color: var(--muted);
  font-size: .95rem;
  flex-shrink: 0;
}
.o-facet-funnel {
  color: var(--o-purple);
  cursor: pointer;
}
.o-facet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 55%;
}
.o-facet-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e9ecef;
  color: #333;
  border-radius: 3px;
  padding: 2px 6px 2px 8px;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.o-facet-chip-x {
  border: 0;
  background: transparent;
  color: #6c757d;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.o-facet-chip-x:hover { color: #c0392b; }
.o-facet-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 2px 2px;
  flex-shrink: 0;
}
.o-facet-input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 72px;
  font-size: .9rem;
  background: transparent;
  padding: 4px 2px;
}
.o-facet-caret {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
}
.o-facet-caret:hover {
  background: #f4f0f3;
  color: var(--o-purple);
}
.o-facet-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  padding: 8px 0;
  grid-template-columns: 1fr 1fr 1fr;
  min-width: min(560px, 92vw);
}
.o-facet-search.is-open .o-facet-menu {
  display: grid;
}
.o-facet-col {
  padding: 4px 8px;
  border-right: 1px solid var(--line);
  max-height: 340px;
  overflow: auto;
}
.o-facet-col:last-child { border-right: 0; }
.o-facet-col-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 4px 10px 8px;
}
.o-facet-col-title .bi { margin-right: 4px; color: var(--o-purple); }
.o-facet-col-title .bi-star-fill { color: #c5a000; }
.o-facet-chip.is-favorite {
  background: #fff8e1;
  border-color: #f0d78c;
}
.o-facet-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: .86rem;
  color: #333;
  cursor: pointer;
}
.o-facet-item:hover { background: #f4f0f3; }
.o-facet-item.is-active {
  color: var(--o-purple);
  font-weight: 600;
}
.o-facet-item.is-nested { padding-left: 22px; font-size: .84rem; }
.o-facet-check {
  font-size: .9rem;
  color: var(--o-purple);
}
.o-facet-group-head {
  justify-content: space-between;
}
.o-facet-group-head .bi {
  font-size: .7rem;
  color: var(--muted);
  transition: transform .15s ease;
}
.o-facet-group-head.is-expanded .bi {
  transform: rotate(90deg);
}
.o-facet-group-body {
  display: none;
  padding-bottom: 4px;
}
.o-facet-group-body.is-open { display: block; }
.o-facet-fav-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.o-facet-fav-row .o-facet-item { flex: 1; }
.o-facet-fav-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 24px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.o-facet-fav-del:hover { color: #c0392b; }
@media (max-width: 720px) {
  .o-facet-menu {
    grid-template-columns: 1fr;
    max-height: 70vh;
    overflow: auto;
  }
  .o-facet-col {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }
  .o-facet-col:last-child { border-bottom: 0; }
  .o-facet-chips { max-width: 100%; }
}
.o-export-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #1d6f42;
  width: 34px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.o-export-btn .bi { font-size: 1.05rem; }
.o-export-btn:hover {
  background: #e8f5ee;
  color: #1d6f42;
}
.o-view-btns {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.o-view-btns button {
  border: 0;
  background: #fff;
  color: var(--muted);
  width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
}
.o-view-btns button:first-child { border-left: 0; }
.o-view-btns button.active,
.o-view-btns button:hover {
  background: var(--o-purple-l);
  color: var(--o-purple);
}
.o-page-body {
  padding: 20px 28px 32px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Safety: any direct page content without o-page-body still gets side padding */
#main-content > .page-toolbar,
#main-content > .filters-bar,
#main-content > .stat-strip,
#main-content > .detail-cols,
#main-content > .card-panel,
#main-content > .alert,
#main-content > .table-responsive,
#main-content > .kanban-board,
#main-content > .project-grid,
#main-content > .empty-state,
#main-content > .btn {
  margin-left: 24px;
  margin-right: 24px;
}
#main-content > .breadcrumb-bar:not(.in-body) {
  padding-left: 24px;
  padding-right: 24px;
}

/* Shared panels */
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 2px;
}
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}
.filters-bar .form-control,
.filters-bar .form-select { width: auto; min-width: 140px; }
.card-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
}
.mywork-group {
  margin-top: 0.65rem;
}
.mywork-group-head {
  background: #f0f0f0;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 0.4rem 0.65rem;
}
.mywork-group-body {
  padding-left: 0.25rem;
}
.mywork-group-body .mywork-item:last-child {
  border-bottom: 0 !important;
}
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.empty-state h3 { font-size: 1rem; color: var(--ink); }

.avatar-xs, .avatar-sm, .avatar-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  flex: none;
}
.avatar-xs { width: 22px; height: 22px; font-size: .65rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .72rem; }
.avatar-md { width: 40px; height: 40px; font-size: .85rem; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.stat-strip > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b {
  display: block;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.stat-strip span { font-size: .8rem; color: var(--muted); }
.stat-strip .bad b { color: var(--bad); }

.detail-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.chip {
  display: inline-block;
  font-size: .72rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.status-chip {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
}
.tag-pill {
  font-size: .72rem;
  background: var(--o-purple-l);
  color: var(--o-purple-d);
  border-radius: 10px;
  padding: 1px 8px;
}

/* Odoo-style colored tags */
.o-tags-field {
  position: relative;
  min-height: 28px;
}
.o-tags-field.is-editable {
  cursor: text;
}
.o-tags-value {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  overflow: visible;
  position: relative;
  z-index: 2;
}
.o-tags-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 26px;
}
.o-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px 6px;
  white-space: nowrap;
}
.o-tag-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.o-tag-pill-x {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .65;
  font-size: .95rem;
  line-height: 1;
  padding: 0 0 0 2px;
  cursor: pointer;
}
.o-tag-pill-x:hover { opacity: 1; }
.o-tags-input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 72px;
  flex: 1 1 72px;
  font-size: .86rem;
  padding: 2px 0;
  color: inherit;
}
.o-tags-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  max-height: 220px;
  overflow: auto;
  padding: 4px 0;
}
.o-tags-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: .86rem;
  color: inherit;
}
.o-tags-menu-item:hover { background: #f1f5f9; }
.o-tags-menu-item.is-create { color: var(--o-purple); font-weight: 600; }
.o-tags-menu-empty {
  padding: 8px 12px;
  font-size: .82rem;
  color: var(--muted);
}
.kanban-card-tagline.o-tags-pills { gap: 3px; }
.kanban-card-tagline .o-tag-pill {
  font-size: .68rem;
  padding: 1px 5px;
}
.priority-stars { color: #f0c325; letter-spacing: 1px; }
.priority-stars .bi-star { color: #c5d0d8; }

/* ===== Project cards (Odoo kanban) ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px 14px 10px;
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0,0,0,.03);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s;
}
.project-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.project-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.project-card-top .star-fav {
  color: #adb5bd;
  font-size: .95rem;
  line-height: 1.2;
}
.project-card-top h3 {
  font-size: .98rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  line-height: 1.25;
}
.project-client {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 10px;
}
.project-card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}
.project-card-meta {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project-card-meta i { margin-right: 3px; }
.project-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  flex: 0 0 auto;
}
.project-kanban .kanban-col-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-kanban .project-card {
  margin-bottom: 8px;
  min-height: 0;
  cursor: grab;
}
.project-kanban .project-card.dragging {
  opacity: .55;
  cursor: grabbing;
}
.project-kanban .kanban-col.drag-over,
.project-kanban .kanban-col-body.drag-over {
  outline: 2px dashed var(--o-purple);
  outline-offset: -2px;
}
.project-kanban .kanban-col-body {
  padding: 8px;
}

/* ===== Task / Bug Kanban ===== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 10px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}
/* Odoo-style task/bug kanban: open scrollbars (L/R + U/D), fixed cols, fold */
.o-page-body:has(.o-kanban-scroll),
.o-page-body:has(.bug-kanban-scroll),
.o-page-body:has(.task-kanban-scroll) {
  max-width: none;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 112px);
  min-height: 280px;
  padding-bottom: 8px;
  box-sizing: border-box;
}
body.has-timer-bar .o-page-body:has(.o-kanban-scroll),
body.has-timer-bar .o-page-body:has(.bug-kanban-scroll),
body.has-timer-bar .o-page-body:has(.task-kanban-scroll) {
  height: calc(100vh - 160px);
}
.o-kanban-scroll,
.bug-kanban-scroll,
.task-kanban-scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: scroll; /* force both bars visible */
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #8a97a3 #e4e9ee;
  border: 1px solid #dde3e8;
  border-radius: 4px;
  background: #f6f8fa;
  -webkit-overflow-scrolling: touch;
}
.o-kanban-scroll::-webkit-scrollbar,
.bug-kanban-scroll::-webkit-scrollbar,
.task-kanban-scroll::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
.o-kanban-scroll::-webkit-scrollbar-thumb,
.bug-kanban-scroll::-webkit-scrollbar-thumb,
.task-kanban-scroll::-webkit-scrollbar-thumb {
  background: #8a97a3;
  border-radius: 8px;
  border: 3px solid #e4e9ee;
}
.o-kanban-scroll::-webkit-scrollbar-thumb:hover,
.bug-kanban-scroll::-webkit-scrollbar-thumb:hover,
.task-kanban-scroll::-webkit-scrollbar-thumb:hover {
  background: #6f7d8a;
}
.o-kanban-scroll::-webkit-scrollbar-track,
.bug-kanban-scroll::-webkit-scrollbar-track,
.task-kanban-scroll::-webkit-scrollbar-track {
  background: #e4e9ee;
}
.o-kanban-scroll::-webkit-scrollbar-corner,
.bug-kanban-scroll::-webkit-scrollbar-corner,
.task-kanban-scroll::-webkit-scrollbar-corner {
  background: #e4e9ee;
}
.kanban-board.o-kanban,
.kanban-board.bug-kanban,
.kanban-board.task-kanban {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  overflow: visible;
  padding: 10px 10px 16px;
  box-sizing: border-box;
}
/* Tasks: only 4 stages — stretch columns to fill board width */
.kanban-board.task-kanban,
.kanban-board.project-kanban {
  width: 100%;
  max-width: 100%;
}
.kanban-board.o-kanban .kanban-col,
.kanban-board.bug-kanban .kanban-col {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  min-height: calc(100vh - 190px);
  align-self: stretch;
}
.kanban-board.task-kanban .kanban-col,
.kanban-board.project-kanban .kanban-col {
  flex: 1 1 0;
  width: auto;
  min-width: 220px;
  max-width: none;
  min-height: calc(100vh - 190px);
  align-self: stretch;
}
.kanban-board.o-kanban .kanban-card,
.kanban-board.bug-kanban .kanban-card,
.kanban-board.task-kanban .kanban-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.bug-blocking-flag {
  flex: 0 0 auto;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  background: var(--bad);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
}
.kanban-col {
  background: #e9ecef;
  border: 1px solid #dde1e5;
  border-radius: 3px;
  padding: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.kanban-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 6px;
  font-size: .88rem;
  font-weight: 600;
  background: #e9ecef;
}
.kanban-col-head .kanban-col-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-col-head-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.kanban-col-head .count {
  color: var(--muted);
  font-weight: 500;
  font-size: .8rem;
}
.kanban-col-head-right .kanban-add {
  padding: 0 2px;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
}
.kanban-col-head-right .kanban-add:hover { color: var(--o-purple); }
.kanban-col-gear {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  line-height: 1;
  font-size: .95rem;
}
.kanban-col-gear:hover { color: var(--o-purple); }
.kanban-col-menu {
  position: absolute;
  top: 34px;
  right: 8px;
  z-index: 20;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  padding: 4px;
}
.kanban-col-menu.d-none { display: none !important; }
.kanban-col-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  border-radius: 3px;
  font-size: .86rem;
  color: var(--ink);
}
.kanban-col-menu-item:hover { background: #f4f0f3; }
.kanban-col-menu-item .bi { color: var(--muted); }
.kanban-add {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 12px 6px;
  text-align: left;
  font-size: 1rem;
  line-height: 1;
}
.kanban-add:hover { color: var(--o-purple); }
.kanban-col-body {
  flex: 1;
  padding: 4px 8px 10px;
  min-height: 200px;
}
.kanban-col-body.drag-over {
  outline: 2px dashed var(--o-purple);
  background: rgba(0, 87, 154, .06);
}
/* Folded column (Odoo-style vertical strip) */
.kanban-board.o-kanban .kanban-col.is-folded,
.kanban-board.bug-kanban .kanban-col.is-folded,
.kanban-board.task-kanban .kanban-col.is-folded {
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  min-height: calc(100vh - 190px);
  cursor: pointer;
  overflow: hidden;
}
.kanban-col.is-folded .kanban-col-body,
.kanban-col.is-folded .kanban-add,
.kanban-col.is-folded .kanban-col-menu,
.kanban-col.is-folded .kanban-col-gear {
  display: none !important;
}
.kanban-col.is-folded .kanban-col-head {
  flex: 1;
  flex-direction: column-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: 100%;
  min-height: 360px;
}
.kanban-col.is-folded .kanban-col-title {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: .82rem;
}
.kanban-col.is-folded .kanban-col-head-right {
  writing-mode: horizontal-tb;
  transform: rotate(180deg);
}
.kanban-col.is-folded.drag-over,
.kanban-col.is-folded .kanban-col-head.drag-over {
  outline: 2px dashed var(--o-purple);
  background: rgba(0, 87, 154, .08);
}
.kanban-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.kanban-card:hover { border-color: #cfcfcf; }
.kanban-card.dragging { opacity: .55; }
.kanban-card-title {
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 2px;
  line-height: 1.3;
}
.kanban-card-sub {
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.kanban-card-tagline {
  font-size: .78rem;
  color: #495057;
  margin-bottom: 8px;
}
.kanban-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.time-badge {
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--muted);
}
.time-badge.over {
  border-color: #f1aeb5;
  color: var(--bad);
  background: #fff5f5;
}
.kanban-card-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .85rem;
}

/* Odoo-style assignee facepile on kanban cards */
.kanban-facepile {
  display: inline-flex;
  align-items: center;
}
.kanban-facepile > * {
  border: 1.5px solid #fff;
  box-sizing: content-box;
  position: relative;
}
.kanban-facepile > * + * {
  margin-left: -6px;
}
.kanban-facepile-more {
  background: #875a7b !important;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
}

/* ===== Task form / detail (Odoo form + chatter) ===== */
.task-form-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  min-height: calc(100vh - 120px);
}
.task-form-main {
  padding: 16px 24px 28px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.task-chatter {
  background: #fff;
  padding: 16px 20px 28px;
  min-width: 0;
}
.stage-statusbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 8px 0 16px;
  gap: 0;
  overflow-x: auto;
}
.stage-statusbar button {
  --arrow: 12px;
  position: relative;
  border: 0;
  background: #e9ecef;
  color: #495057;
  font-size: .8rem;
  font-weight: 500;
  padding: 9px calc(14px + var(--arrow)) 9px calc(14px + var(--arrow));
  margin: 0 0 0 calc(var(--arrow) * -1);
  clip-path: polygon(
    0 0,
    calc(100% - var(--arrow)) 0,
    100% 50%,
    calc(100% - var(--arrow)) 100%,
    0 100%,
    var(--arrow) 50%
  );
  min-width: 130px;
  flex: 1 1 0;
  z-index: 1;
  line-height: 1.2;
  white-space: nowrap;
}
.stage-statusbar button:first-child {
  margin-left: 0;
  padding-left: 16px;
  clip-path: polygon(
    0 0,
    calc(100% - var(--arrow)) 0,
    100% 50%,
    calc(100% - var(--arrow)) 100%,
    0 100%
  );
  border-radius: 4px 0 0 4px;
  z-index: 4;
}
.stage-statusbar button:nth-child(2) { z-index: 3; }
.stage-statusbar button:nth-child(3) { z-index: 2; }
.stage-statusbar button:last-child {
  z-index: 1;
  padding-right: 16px;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    0 100%,
    var(--arrow) 50%
  );
  border-radius: 0 4px 4px 0;
}
.stage-statusbar button:hover {
  filter: brightness(0.97);
}
.stage-statusbar button.active {
  background: #017e84;
  color: #fff;
  z-index: 5;
}
.stage-statusbar button.done-stage {
  background: var(--o-purple);
  color: #fff;
  z-index: 5;
}
.bug-statusbar button {
  min-width: 0;
  font-size: .72rem;
  padding-left: 16px;
  padding-right: 16px;
}
.bug-statusbar button:nth-child(4) { z-index: 3; }
.bug-statusbar button:nth-child(5) { z-index: 2; }
.bug-statusbar button:nth-child(6) { z-index: 1; }
.stage-statusbar button:disabled,
.bug-statusbar button:disabled {
  cursor: not-allowed;
  opacity: .85;
  filter: none;
}
.stage-statusbar.statusbar-readonly button:not(.active):not(.done-stage) {
  opacity: .7;
}
.kanban-card.not-draggable {
  cursor: pointer;
  opacity: .96;
}
.task-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.task-title-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}
.task-title-row h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
}
.btn-title-edit {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
}
.btn-title-edit:hover {
  color: var(--o-purple);
  background: rgba(113, 75, 103, .08);
}

/* Odoo-style inline edit (task detail) */
.o-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.btn-inline-save,
.btn-inline-discard {
  display: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding: 0;
  cursor: pointer;
}
.btn-inline-save.is-visible,
.btn-inline-discard.is-visible {
  display: inline-flex;
}
.btn-inline-save.is-visible {
  color: #fff;
  background: var(--o-purple);
}
.btn-inline-save.is-visible:hover {
  filter: brightness(1.08);
}
.btn-inline-save:disabled {
  opacity: .45;
  cursor: default;
}
.btn-inline-discard.is-visible {
  color: var(--muted);
  background: #f0ecee;
}
.btn-inline-discard.is-visible:hover {
  color: var(--bad, #c0392b);
  background: #fdecea;
}
.o-inline-value.is-editable,
.o-inline-title.is-editable,
.o-inline-text.is-editable,
.priority-stars.is-editable {
  cursor: pointer;
  border-radius: 3px;
}
.o-inline-value.is-editable:hover,
.o-inline-title.is-editable:hover,
.o-inline-text.is-editable:hover {
  background: #f4f0f3;
  box-shadow: inset 0 0 0 1px #e2d6de;
}
.o-inline-value.is-editing {
  cursor: default;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--o-purple);
  padding: 4px;
  border-radius: 3px;
}
.o-inline-title-input {
  font-size: 1.35rem;
  font-weight: 700;
  max-width: min(100%, 640px);
}
.o-inline-input {
  max-width: 100%;
}
.o-inline-textarea {
  min-height: 90px;
}
.o-inline-text.is-editable {
  padding: 6px 8px;
  margin: 0 -8px;
}
.o-inline-assignees,
.o-inline-alloc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  max-height: 240px;
  overflow: auto;
  min-width: 220px;
}
.o-inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .86rem;
  margin-bottom: 4px;
  cursor: pointer;
}
.o-inline-alloc-line {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.o-inline-billing {
  padding: 4px 0;
}

/* Task bugs tab list */
.bug-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bug-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.bug-list-row:last-child { border-bottom: 0; }
.bug-list-row:hover { background: #faf7f9; }
.bug-list-main { min-width: 0; flex: 1; }
.bug-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-size: .75rem;
}
.bug-list-title {
  font-weight: 500;
  font-size: .92rem;
  color: var(--ink);
}
.bug-blocking-tag {
  color: #b02a37;
  background: #f8d7da;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: .7rem;
  font-weight: 600;
}
.bug-status-chip {
  flex-shrink: 0;
  display: inline-block;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bug-status-chip.open { color: #842029; background: #f8d7da; border-color: #f5c2c7; }
.bug-status-chip.assigned { color: #664d03; background: #fff3cd; border-color: #ffecb5; }
.bug-status-chip.progress { color: #084298; background: #cfe2ff; border-color: #b6d4fe; }
.bug-status-chip.retest { color: #055160; background: #cff4fc; border-color: #b6effb; }
.bug-status-chip.reopened { color: #984c0c; background: #ffe5d0; border-color: #ffd8b5; }
.bug-status-chip.closed { color: #0f5132; background: #d1e7dd; border-color: #badbcc; }
.priority-star-btn {
  border: 0;
  background: transparent;
  padding: 0 1px;
  line-height: 1;
  color: #c5d0d8;
  font-size: 1.25rem;
  cursor: pointer;
}
.priority-star-btn .bi-star { color: #c5d0d8; }
.priority-star-btn.is-on,
.priority-star-btn.is-on .bi-star,
.priority-star-btn.is-on .bi-star-fill { color: #f0c325; }
.priority-star-btn:disabled { cursor: default; opacity: .85; }
.priority-star-btn:not(:disabled):hover { transform: scale(1.08); }
.task-form-priority .priority-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1.35rem;
}
.status-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px 12px;
  font-size: .8rem;
  color: #495057;
  background: #fff;
  line-height: 1.4;
}
button.status-pill {
  cursor: default;
  font-family: inherit;
}
button.status-pill.is-editable {
  cursor: pointer;
}
button.status-pill.is-editable:hover {
  background: #f4f0f3;
  border-color: #d4c4cf;
}
button.status-pill:disabled {
  opacity: 1;
  cursor: default;
}
.status-pill-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: 4px;
}
.status-pill-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: .86rem;
  color: #333;
  cursor: pointer;
}
.status-pill-item:hover { background: #f4f0f3; }
.status-pill-item.is-active {
  background: rgba(113, 75, 103, .12);
  color: var(--o-purple);
  font-weight: 600;
}
.status-pill-item.is-muted {
  opacity: .55;
  color: #6c757d;
}
.status-pill-item.is-muted:hover {
  opacity: .85;
  background: #f8f5f7;
}
.status-pill-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}
.status-pill.is-closed {
  opacity: .7;
}
.status-pill.is-done {
  border-color: #198754;
  color: #198754;
}
.status-pill.is-cancelled {
  border-color: #adb5bd;
  color: #6c757d;
  text-decoration: line-through;
}
.status-pill-empty {
  padding: 8px 10px;
  font-size: .82rem;
  color: var(--muted);
}
.kanban-card.is-closed {
  opacity: .55;
  filter: grayscale(.15);
}
.kanban-state-dot {
  font-size: .85rem;
  line-height: 1;
}
.o-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  margin-bottom: 18px;
}
.o-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 30px;
}
.o-field label {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}
.o-field .value {
  font-size: .9rem;
  font-weight: 500;
}
.alloc-time-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alloc-time-value {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.alloc-time-clock {
  font-size: .9rem;
  color: var(--muted);
}
.alloc-util-pct {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.alloc-util-pct.is-ok { color: var(--muted); }
.alloc-util-pct.is-warn { color: #c98512; }
.alloc-util-pct.is-over { color: #c4452f; }
.alloc-time-sub { font-weight: 400; }
.btn-field-info {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 2px;
  line-height: 1;
  font-size: .9rem;
  vertical-align: middle;
}
.btn-field-info:hover { color: var(--o-purple); }
.assignee-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f5;
  border-radius: 14px;
  padding: 2px 10px 2px 2px;
  margin: 2px 4px 2px 0;
  font-size: .82rem;
}
.task-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chatter-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.chatter-icon-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.chatter-icon-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.chatter-icon-btn:hover,
.chatter-icon-btn.is-active { color: var(--o-purple); background: rgba(0, 87, 154, .08); }
.chatter-icon-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--o-purple);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.chatter-search-wrap { margin-bottom: 12px; }
.btn-chatter-primary {
  background: var(--o-purple);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: .84rem;
  font-weight: 600;
}
.btn-chatter-ghost {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 10px;
  font-size: .84rem;
  font-weight: 500;
}
.btn-chatter-ghost:hover,
.btn-chatter-ghost.active { color: var(--o-purple); }
.btn-chatter-ghost.active { font-weight: 700; }
.attachment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.attachment-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.attachment-row-icon {
  font-size: 1.35rem;
  color: var(--muted);
  margin-top: 2px;
}
.attachment-row-meta { min-width: 0; }
.attachment-row-name {
  font-weight: 600;
  word-break: break-word;
}
.attachment-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
}
.attachment-preview-body { min-height: 200px; }
.attachment-preview-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border-radius: 4px;
}
.attachment-preview-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.attachment-preview-text {
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 12px;
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: pre-wrap;
  font-size: .84rem;
}
.note-composer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.note-composer-avatar {
  flex: 0 0 auto;
  border-radius: 4px;
}
.note-composer-main { flex: 1; min-width: 0; }
.note-composer-input {
  resize: vertical;
  min-height: 72px;
  font-size: .9rem;
}
.note-composer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.note-item { position: relative; }
.note-item-tools {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}
.note-item:hover .note-item-tools { display: inline-flex; }
.btn-note-tool {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px 5px;
  line-height: 1;
  border-radius: 3px;
}
.btn-note-tool:hover {
  background: #eee;
  color: var(--o-purple);
}
.btn-note-tool.text-danger:hover { color: var(--bad); background: #fdecea; }
.note-kind-pill {
  font-size: .68rem;
  font-weight: 600;
  color: #017e84;
  background: #e7f6f7;
  border-radius: 3px;
  padding: 1px 6px;
}
.note-kind-internal {
  color: var(--o-purple);
  background: var(--o-purple-l);
}
.note-body-text {
  font-size: .9rem;
  white-space: pre-wrap;
  line-height: 1.45;
}
.note-edit-input { margin-top: 4px; }
.activity-details { color: #495057; }
.activity-item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.activity-item:last-child { border-bottom: 0; }
.chatter-date {
  text-align: center;
  color: var(--muted);
  font-size: .75rem;
  margin: 12px 0 6px;
  position: relative;
}
.chatter-date::before,
.chatter-date::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: var(--line);
}
.chatter-date::before { left: 0; }
.chatter-date::after { right: 0; }

/* ===== Schedule Activity (Odoo-like) ===== */
.modal-activity.modal-dialog {
  max-width: 760px;
}
.modal-activity:not(.modal-dialog-scrollable) .modal-body {
  overflow: visible;
  max-height: none;
}
.modal-activity .modal-header {
  border-bottom: 0;
  padding-bottom: 4px;
}
.modal-activity .modal-title {
  font-weight: 700;
  font-size: 1.15rem;
}
.modal-activity .modal-body {
  padding-top: 8px;
  padding-bottom: 4px;
}
.schedule-activity-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.schedule-activity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .schedule-activity-row { grid-template-columns: 1fr; }
}
.activity-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.activity-type-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: .86rem;
  font-weight: 500;
  min-width: 96px;
}
.activity-type-btn i { color: var(--muted); }
.activity-type-btn:hover {
  border-color: var(--o-purple-m);
  background: var(--soft);
}
.activity-type-btn.active {
  background: var(--o-purple-l);
  border-color: var(--o-purple-l);
  color: var(--o-purple-d);
}
.activity-type-btn.active i { color: var(--o-purple); }
.activity-type-check {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .75rem;
  color: var(--o-purple) !important;
}
.schedule-activity-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-field label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.schedule-note {
  min-height: 64px;
  max-height: 96px;
  resize: vertical;
}

/* Activities board */
.activities-page.o-page-body {
  padding-top: 20px;
  padding-bottom: 32px;
}
.activities-kanban {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin: 0;
  align-items: start;
}
.activities-col {
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.activities-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: .86rem;
}
.activities-col-count {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  padding: 1px 8px;
  color: var(--muted);
}
.activities-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-board-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.activity-board-card:hover { border-color: var(--o-purple-m); }
.activity-board-card.is-done { opacity: .8; }
.activity-board-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--o-purple-d);
  margin-bottom: 4px;
}
.activity-board-summary {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.activity-board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .76rem;
  color: var(--muted);
}
.activity-board-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.activities-table-wrap {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}
.activities-table-wrap table { margin: 0; }
.activities-table-wrap th,
.activities-table-wrap td {
  padding: 10px 14px;
  vertical-align: middle;
}
.activities-table-wrap th {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
}
.activities-group-row td {
  background: #f4f6f8;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}
@media (max-width: 768px) {
  .activities-kanban { grid-template-columns: 1fr; }
}
.schedule-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.planned-act-heading {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  margin: 4px 0 10px;
}
.planned-act-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.planned-act-card.is-done {
  opacity: .72;
  background: var(--soft);
}
.planned-act-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.planned-act-type {
  font-size: .78rem;
  font-weight: 600;
  color: var(--o-purple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.planned-act-due {
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.planned-act-summary {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 2px;
}
.planned-act-note {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
  white-space: pre-wrap;
}
.planned-act-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.planned-act-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-footer-start {
  justify-content: flex-start !important;
}

.member-picker {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: var(--soft);
}

/* Project create / edit form */
.project-form-page {
  padding: 20px 24px 40px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.project-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.project-form-crumb {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.project-form-crumb a {
  color: var(--muted);
  text-decoration: none;
}
.project-form-crumb a:hover { color: var(--o-purple); }
.project-form-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.project-form-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}
.project-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}
.project-form-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.project-form-side {
  position: sticky;
  top: 70px;
  min-width: 0;
}
.project-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 20px;
  box-shadow: 0 1px 2px rgba(33, 37, 41, .04);
}
.project-form-card-title {
  margin: 0 0 14px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
}
.project-form-card-lead {
  margin: -6px 0 14px;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}
.project-rule-group {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #eef1f4;
}
.project-rule-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.project-rule-group-title {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--o-purple-d);
}
.project-form-field {
  margin-bottom: 14px;
}
.project-form-field:last-child { margin-bottom: 0; }
.project-form-field .form-label {
  display: block;
  margin-bottom: 5px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
}
.project-form-field .form-label .req {
  color: #dc3545;
  margin-left: 2px;
}
.project-form-field .form-control,
.project-form-field .form-select {
  border-radius: 8px;
  border-color: #d7dce1;
  font-size: .9rem;
}
.project-form-field .form-control:focus,
.project-form-field .form-select:focus {
  border-color: var(--o-purple-m);
  box-shadow: 0 0 0 .2rem rgba(0, 87, 154, .12);
}
.project-form-field textarea.form-control {
  min-height: 96px;
  resize: vertical;
}
.project-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.project-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}
.project-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.project-color-swatch:hover {
  transform: scale(1.06);
}
.project-color-swatch.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(33, 37, 41, .35);
}
.project-color-swatch.is-selected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.5 11.2 3.2 7.9l1.1-1.1 2.2 2.2 5.2-5.2 1.1 1.1z'/%3E%3C/svg%3E") center/14px no-repeat;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, .35));
}
.project-yn-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f4;
}
.project-yn-row:first-of-type { padding-top: 0; }
.project-yn-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.project-yn-copy {
  min-width: 0;
  flex: 1;
}
.project-yn-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.project-yn-help {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.35;
}
.project-yn-toggle {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid #d7dce1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.project-yn-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 14px;
  min-width: 52px;
  line-height: 1.2;
}
.project-yn-toggle button.is-active {
  background: var(--o-purple);
  color: #fff;
}
.project-form-team-admin {
  margin-bottom: 14px;
}
.project-member-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.project-member-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
}
.project-member-row:hover { background: #f7f9fb; }
.project-member-row .form-check-input {
  margin: 0;
  width: 1.05em;
  height: 1.05em;
  accent-color: var(--o-purple);
  cursor: pointer;
}
.project-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.project-member-meta {
  min-width: 0;
}
.project-member-name {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-member-role {
  display: block;
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-member-row .form-select {
  width: auto;
  min-width: 118px;
  max-width: 140px;
  font-size: .78rem;
  padding: 4px 28px 4px 8px;
  border-radius: 8px;
}
.project-form-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--o-purple-l);
  color: var(--o-purple-d);
  font-size: .78rem;
  line-height: 1.4;
}
@media (max-width: 992px) {
  .project-form-layout { grid-template-columns: 1fr; }
  .project-form-side { position: static; }
}
@media (max-width: 768px) {
  .project-form-page { padding: 16px; }
  .project-form-header { flex-direction: column; }
  .project-form-row-2 { grid-template-columns: 1fr; }
  .project-yn-row { flex-direction: column; align-items: stretch; }
  .project-member-row {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .project-member-row .form-select {
    grid-column: 2 / -1;
    max-width: none;
    width: 100%;
  }
}

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 6px;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.app-toast.show { opacity: 1; transform: none; }

.breadcrumb-bar {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 10px;
  padding: 0;
}
.breadcrumb-bar.in-body { padding: 0 0 4px; }

/* Grouped timesheets (Odoo-style) */
.ts-panel { padding: 0; overflow: hidden; }
.ts-grouped-table { font-size: .86rem; }
.ts-grouped-table thead th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  padding: 8px 10px;
}
.ts-grouped-table td { padding: 6px 10px; vertical-align: middle; }
.ts-group-row { background: #f1f3f5; }
.ts-actions { white-space: nowrap; }
.ts-action-btn {
  padding: 2px 6px !important;
  line-height: 1;
  color: var(--o-purple);
  vertical-align: middle;
}
.ts-action-btn .bi { font-size: 1rem; }
.ts-action-btn.text-danger { color: var(--bad) !important; }
.ts-action-btn.text-success { color: var(--ok) !important; }
.ts-action-btn:hover { opacity: .85; }
.ts-group-row.depth-1 { background: #f6f7f9; }
.ts-group-row td { border-top: 1px solid #e9ecef; }
.ts-group-label { font-weight: 600; }
.ts-group-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: #212529;
  cursor: pointer;
  text-align: left;
}
.ts-group-toggle:hover { color: var(--o-purple); }
.ts-group-row.depth-1 .ts-group-toggle { padding-left: 14px; }

/* Odoo-style Group By expand/collapse (Tasks, Bugs, Activities, Projects) */
.o-group-row td {
  background: #f0f0f0;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  padding: 0.45rem 0.75rem;
  vertical-align: middle;
}
.o-group-label { font-weight: 600; }
.o-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: #212529;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
}
.o-group-toggle .bi {
  font-size: 0.75rem;
  width: 0.85rem;
  color: #495057;
  flex-shrink: 0;
}
.o-group-toggle:hover { color: var(--brand, #00579a); }
.o-group-toggle:hover .bi { color: var(--brand, #00579a); }
.o-group-row + tr td { border-top: 0; }
.ts-entry-row td { background: #fff; }
.ts-hours {
  font-variant-numeric: tabular-nums;
  font-family: 'Roboto Mono', ui-monospace, monospace;
  white-space: nowrap;
}
.ts-hhmm-input {
  max-width: 88px;
  font-variant-numeric: tabular-nums;
  font-family: 'Roboto Mono', ui-monospace, monospace;
}
.ts-add-row td { background: #fff; padding: 4px 10px 10px; }
.ts-add-line {
  background: transparent;
  border: 0;
  color: #0d6efd;
  font-size: .84rem;
  font-weight: 500;
  padding: 2px 0;
  cursor: pointer;
}
.ts-add-line:hover { text-decoration: underline; }
.ts-footer-total {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 28px;
  padding: 12px 4px 4px;
  margin-top: 4px;
  background: transparent;
  border: 0;
  font-size: .9rem;
}
.ts-footer-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 110px;
}
.ts-footer-item .text-muted {
  font-size: .78rem;
}
.ts-footer-total strong {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  min-width: 72px;
  text-align: right;
  font-size: 1rem;
}
.ts-inline-table .ts-inline-input {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.ts-inline-table .ts-inline-input:hover,
.ts-inline-table .ts-inline-input:focus {
  border-color: var(--line);
  background: #fff;
}
.ts-inline-table tr.is-saving { opacity: .72; }
.ts-inline-table th:first-child,
.ts-inline-table td:first-child {
  width: 1%;
  white-space: nowrap;
  padding-right: 4px;
}
.ts-inline-table .ts-date-input,
.ts-inline-table td:first-child input[type="date"] {
  width: 8.75rem;
  max-width: 8.75rem;
  min-width: 0;
  padding-right: 4px;
}
.ts-inline-table th:nth-child(3),
.ts-inline-table td:nth-child(3) {
  width: auto;
}
.ts-hours-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 110px;
}
.ts-hours-cell .ts-hhmm-input { max-width: 72px; }
.ts-trash-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
}
.ts-trash-btn:hover { color: #c4452f; background: #fdecea; }
.ts-emp-readonly {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
}
.ts-cat-cell { max-width: 140px; }
.ts-spent-cell { white-space: nowrap; }

@media (max-width: 1100px) {
  .task-form-wrap { grid-template-columns: 1fr; }
  .task-form-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .o-field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
  .detail-cols { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
  .o-page-body:has(.o-kanban-scroll),
  .o-page-body:has(.bug-kanban-scroll),
  .o-page-body:has(.task-kanban-scroll) {
    height: calc(100vh - 150px);
  }
  .kanban-board.o-kanban .kanban-col,
  .kanban-board.bug-kanban .kanban-col {
    flex-basis: 260px;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
  }
  .kanban-board.task-kanban .kanban-col {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .o-top-nav { max-width: 42vw; }
}
@media (max-width: 768px) {
  .o-navbar { flex-wrap: wrap; padding: 6px; }
  .o-top-nav { max-width: 100%; order: 3; width: 100%; }
  .o-control-panel { top: auto; position: static; padding: 12px 16px; }
  .o-page-body { padding: 16px 16px 24px; }
  #main-content > .page-toolbar,
  #main-content > .filters-bar,
  #main-content > .stat-strip,
  #main-content > .detail-cols,
  #main-content > .card-panel,
  #main-content > .alert,
  #main-content > .table-responsive,
  #main-content > .kanban-board,
  #main-content > .project-grid,
  #main-content > .empty-state,
  #main-content > .btn {
    margin-left: 16px;
    margin-right: 16px;
  }
  .task-form-main { padding: 14px 16px 24px; }
  .task-chatter { padding: 14px 16px 24px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .o-field { grid-template-columns: 1fr; gap: 2px; }
  .timer-float {
    flex-wrap: wrap;
    height: auto;
    min-height: 52px;
    padding: 10px 12px;
    gap: 10px;
  }
  .timer-float-clock { font-size: 1.1rem; }
}

/* ===== Floating work timer ===== */
.o-field-span-2 {
  grid-column: 1 / -1;
}
.detail-timer-field {
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px dashed var(--line);
}
.detail-timer-field .value {
  font-weight: 400;
}
.timer-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: 8px;
}
.timer-controls-compact {
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 4px 0 8px;
  flex-shrink: 0;
}
.timer-controls-live {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .92rem;
  color: var(--ok);
  min-width: 72px;
}
.timer-controls-live.is-compact {
  min-width: 0;
  font-size: .78rem;
  margin-right: 2px;
}
.timer-controls-live.is-paused { color: var(--warn); }
.timer-btn { font-weight: 600; }
.timer-icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
}
.timer-icon-btn i { font-size: 1rem; margin: 0; }
.task-title-row .timer-controls-compact { align-self: center; }

.timer-float {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 20px;
  background: #2c2130;
  color: #fff;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .22);
}
.timer-float.d-none { display: none !important; }
body.has-timer-bar .o-content {
  padding-bottom: 64px;
}
.timer-float-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.timer-float-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7dcea0;
  white-space: nowrap;
}
.timer-float-status.is-paused { color: #f0c325; }
.timer-float-status .bi-record-circle-fill {
  color: #e74c3c;
  animation: timer-pulse 1.2s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.timer-float-title {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 520px);
}
.timer-float-title:hover { color: #e6f1f8; text-decoration: underline; }
.timer-float-clock {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  min-width: 96px;
  text-align: center;
}
.timer-float-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.timer-float-actions .btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, .35);
  --bs-btn-hover-bg: rgba(255, 255, 255, .12);
  --bs-btn-hover-border-color: #fff;
  --bs-btn-hover-color: #fff;
}

/* ===== Time Off (Odoo-like) ===== */
.leave-page { padding-top: 8px; }
.leave-mgmt-tabs,
.leave-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.leave-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .84rem;
  font-weight: 500;
}
.leave-tab:hover { color: var(--o-purple); }
.leave-tab.active {
  background: var(--o-purple-l);
  color: var(--o-purple-d);
  font-weight: 700;
}

/* Time Off Request modal */
.modal-dialog:not(.modal-dialog-scrollable) .modal-body {
  overflow: visible;
  max-height: none;
}
.leave-apply-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leave-apply-field .form-label {
  margin-bottom: 4px;
  font-size: .8rem;
  font-weight: 600;
}
.leave-apply-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.leave-apply-days {
  font-weight: 600;
  color: var(--ink);
  padding-top: 6px;
}
.leave-apply-desc {
  min-height: 56px;
  max-height: 80px;
  resize: vertical;
}
@media (max-width: 640px) {
  .leave-apply-row { grid-template-columns: 1fr; }
}

.leave-balance-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 14px;
}
.leave-balance-card {
  padding: 18px 16px 16px;
  min-height: 118px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.leave-balance-card:last-child { border-right: 0; }
.leave-balance-type {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.leave-balance-days {
  font-size: 2rem;
  font-weight: 700;
  color: var(--o-purple);
  line-height: 1.05;
}
.leave-balance-unit {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  margin: 4px 0 6px;
  text-transform: uppercase;
}
.leave-balance-unit .bi {
  font-size: .7rem;
  margin-left: 2px;
}
.leave-balance-meta {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
}
.leave-balance-link {
  display: inline-block;
  margin-top: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--o-purple);
  text-decoration: none;
  text-transform: uppercase;
}
.leave-balance-link:hover { text-decoration: underline; }
.leave-balance-pending .leave-balance-days { color: var(--o-purple); }
.leave-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  min-height: 520px;
}
.leave-main {
  padding: 12px 16px 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.leave-year-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.leave-nav-btn {
  width: 32px;
  padding: 0;
}
.leave-scale { width: auto; min-width: 90px; }
.leave-year-label {
  margin-left: 8px;
  font-size: 1rem;
}
.leave-year-cal {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px 24px;
}
.leave-month {
  background: transparent;
  border: 0;
  padding: 0;
}
.leave-month-name {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.leave-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  text-align: center;
  font-size: .7rem;
  color: var(--muted);
}
.leave-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 0;
  row-gap: 2px;
}
.leave-day {
  border: 0;
  background: transparent;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  margin: 0 auto;
  font-size: .78rem;
  color: var(--ink);
  line-height: 1;
  box-sizing: border-box;
}
.leave-day.empty { visibility: hidden; }
.leave-day:hover { background: #eee; }
.leave-day.is-holiday {
  background: #e9ecef;
  color: var(--ink);
  font-weight: 500;
}
.leave-day.is-validated {
  background: var(--o-purple);
  color: #fff;
}
.leave-day.is-pending {
  background: repeating-linear-gradient(
    -45deg,
    var(--o-purple),
    var(--o-purple) 2px,
    #fff 2px,
    #fff 5px
  );
  color: var(--o-purple-d);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--o-purple);
}
.leave-day.is-refused {
  background: transparent;
  color: var(--muted);
  text-decoration: line-through;
  box-shadow: inset 0 -2px 0 #adb5bd;
  border-radius: 0;
}
/* Continuous multi-day leave: one joined bar (round only at ends / single day) */
.leave-day.range-start,
.leave-day.range-mid,
.leave-day.range-end {
  width: 100%;
  margin: 0;
}
.leave-day.range-single {
  width: 30px;
  margin: 0 auto;
  border-radius: 50%;
}
.leave-day.is-validated.range-start,
.leave-day.is-pending.range-start {
  border-radius: 15px 0 0 15px;
}
.leave-day.is-validated.range-mid,
.leave-day.is-pending.range-mid {
  border-radius: 0;
}
.leave-day.is-validated.range-end,
.leave-day.is-pending.range-end {
  border-radius: 0 15px 15px 0;
}
.leave-day.is-validated.range-single,
.leave-day.is-pending.range-single {
  border-radius: 50%;
}
.leave-day.is-refused.range-start,
.leave-day.is-refused.range-mid,
.leave-day.is-refused.range-end {
  border-radius: 0;
}
.leave-day.is-refused.range-single {
  border-radius: 0;
  width: 30px;
}
.leave-sidebar {
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 16px 18px 20px;
}
.leave-side-head {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}
.leave-type-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.leave-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .86rem;
  margin-bottom: 8px;
}
.leave-legend {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  display: inline-block;
  flex: 0 0 auto;
}
.leave-legend.validated { background: var(--o-purple); }
.leave-legend.pending {
  background: repeating-linear-gradient(
    -45deg,
    var(--o-purple),
    var(--o-purple) 2px,
    #fff 2px,
    #fff 5px
  );
  border: 1px solid var(--o-purple);
}
.leave-legend.refused {
  background: transparent;
  border-top: 3px solid #adb5bd;
  height: 0;
  width: 18px;
  margin-top: 8px;
  border-radius: 0;
}
.leave-holiday-item {
  font-size: .84rem;
  padding: 5px 0;
  color: var(--ink);
}
.leave-status-pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 2px 8px;
}
.leave-status-validated { background: #e7f6f0; color: #198754; }
.leave-status-pending { background: var(--o-purple-l); color: var(--o-purple-d); }
.leave-status-refused { background: #fdecea; color: #c4452f; }

@media (max-width: 1100px) {
  .leave-balance-strip { grid-template-columns: repeat(3, 1fr); }
  .leave-balance-card:nth-child(3n) { border-right: 0; }
  .leave-year-cal { grid-template-columns: repeat(2, 1fr); }
  .leave-layout { grid-template-columns: 1fr; }
  .leave-main { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 768px) {
  .leave-balance-strip { grid-template-columns: 1fr 1fr; }
  .leave-balance-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .leave-year-cal { grid-template-columns: 1fr; }
}

/* Release / Deadline Tracking */
.rel-table { font-size: .86rem; }
.rel-table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.rel-project-row { background: #eef2f5; }
.rel-project-row.has-overdue { background: #fdecea; }
.rel-project-cell { padding: 10px 12px !important; }
.rel-project-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(200px, 260px);
  align-items: center;
  gap: 10px 18px;
}
.rel-project-meta {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.35;
}
.rel-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--ink);
  font-size: .92rem;
}
.rel-toggle:hover { color: var(--o-purple); }
.rel-deadline-row { background: #f7f9fb; }
.rel-deadline-row td { padding: 11px 12px !important; }
.rel-deadline-head {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) auto minmax(200px, 260px);
  align-items: center;
  gap: 12px 18px;
  padding-left: 10px;
}
.rel-deadline-toggle {
  font-weight: 600;
  font-size: .84rem;
  letter-spacing: .01em;
  color: #243442;
}
.rel-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  max-width: 260px;
  justify-self: end;
}
.rel-progress-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #e7edf2;
  box-shadow: inset 0 1px 1px rgba(15, 35, 55, .06);
}
.rel-progress-seg {
  display: block;
  height: 100%;
  min-width: 0;
  /* seamless stack — no gaps */
  flex-shrink: 0;
}
.rel-progress-seg.backlog { background: #c5ced6; }
.rel-progress-seg.progress { background: #00579a; }
.rel-progress-seg.review { background: #c9a227; }
.rel-progress-seg.blocked { background: #b42318; }
.rel-progress-seg.done { background: #1f8a5b; }
.rel-progress-seg.empty {
  flex: 1 0 0;
  background: #e7edf2;
}
.rel-progress-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  min-width: 3.2rem;
}
.rel-progress-pct {
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: #1c2b36;
}
.rel-progress-sub {
  margin-top: 2px;
  font-size: .65rem;
  font-weight: 600;
  color: #7a8794;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.rel-progress.is-low .rel-progress-pct { color: #8a4b3a; }
.rel-progress.is-mid .rel-progress-pct { color: #00579a; }
.rel-progress.is-high .rel-progress-pct { color: #1f8a5b; }
.rel-project-head > .rel-progress { justify-self: end; }

@media (max-width: 900px) {
  .rel-project-head,
  .rel-deadline-head {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .rel-progress {
    max-width: none;
    justify-self: stretch;
  }
}
.rel-task-row td { padding: 7px 10px; }
.rel-task-row td:first-child { width: 28px; }
.rel-task-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.rel-task-link:hover { color: var(--o-purple); text-decoration: underline; }
.rel-kind {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.rel-kind.overdue {
  background: #fdf1ef;
  color: #9f2d20;
  border-color: #f0d0cb;
}
.rel-kind.today {
  background: #fbf6e9;
  color: #8a6a1a;
  border-color: #ead9a8;
}
.rel-kind.upcoming {
  background: #eef5fa;
  color: #00579a;
  border-color: #c9dceb;
}
.rel-stage {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 3px;
  padding: 2px 7px;
  background: #e9ecef;
  color: var(--ink);
}
.rel-stage.progress { background: #e7f1f8; color: var(--o-purple-d); }
.rel-stage.review { background: #fff3cd; color: #856404; }
.rel-stage.done { background: #e7f6f0; color: #198754; }
.rel-stage.backlog { background: #e9ecef; color: #495057; }
.rel-stage.overdue-stage { background: #fdecea; color: #c4452f; }
.rel-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.rel-type {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: .02em;
}
.rel-type.task { background: #e7f1f8; color: var(--o-purple-d); }
.rel-type.subtask { background: #eef2f5; color: #495057; }
.rel-type.bug { background: #fdecea; color: #c4452f; }
.rel-type.released { background: #e8f5e9; color: #2e7d32; }
.rel-task-row.is-released { opacity: 0.78; }
.rel-blocking {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bad);
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
}
.rel-item-bug .rel-task-link { color: #8a2b1c; }
