/* ===========================
   SPECIALISTS DASHBOARD CSS
   Notion-like aesthetic
=========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --text-primary: #37352f;
  --text-secondary: #787774;
  --text-light: #acaba8;
  --bg-page: #ffffff;
  --bg-hover: #f7f6f3;
  --bg-hover-row: #f1f0ee;
  --border: #e9e9e7;
  --border-focus: #c7c6c3;

  --project-bg: #e2f6ea; --project-text: #245e3f;
  --perpetual-bg: #e3f2fd; --perpetual-text: #0d47a1;
  --ondemand-bg: #ffebee; --ondemand-text: #c62828;

  --academy-bg: #dbeafe; --academy-text: #1d4ed8;
  --school-bg: #dcfce7; --school-text: #166534;
  --emoa-bg: #ede9fe; --emoa-text: #5b21b6;
  --afterschool-bg: #ffedd5; --afterschool-text: #9a3412;
  --incompany-bg: #fce7f3; --incompany-text: #9d174d;

  --notstarted-bg: #f0f0ef; --notstarted-text: #787774;
  --inprogress-bg: #dbeafe; --inprogress-text: #1d4ed8;
  --standby-bg: #fef9c3; --standby-text: #854d0e;
  --blocked-bg: #fee2e2; --blocked-text: #991b1b;
  --done-bg: #dcfce7; --done-text: #166534;
  --delayeddone-bg: #ede9fe; --delayeddone-text: #5b21b6;

  --calidad-approved-bg: #dcfce7; --calidad-approved-text: #166534;
  --calidad-review-bg: #dbeafe; --calidad-review-text: #1d4ed8;
  --calidad-norev-bg: #fef9c3; --calidad-norev-text: #854d0e;
  --calidad-pending-bg: #fee2e2; --calidad-pending-text: #991b1b;

  /* Timeline / Fase de revisión de calidad */
  --fase1-bg: #e0f2fe; --fase1-text: #075985;
  --fase2-bg: #fef9c3; --fase2-text: #854d0e;
  --fase3-bg: #fee2e2; --fase3-text: #991b1b;
  --fase4-bg: #ede9fe; --fase4-text: #5b21b6;
  --fase5-bg: #dcfce7; --fase5-text: #166534;

  --kpi-track-bg: #f1f0ee;
  --kpi-done-fill: #22c55e;
  --kpi-calidad-fill: #3b82f6;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

.app { max-width: 100%; min-height: 100vh; padding: 32px 24px 64px; }

.page-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.page-header__icon { font-size: 28px; line-height: 1; }
.page-header__title { font-size: 28px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }

.tabs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-wrap: wrap;
}

.tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  border: none; background: transparent;
  color: var(--text-secondary);
  font-size: 13px; font-family: var(--font);
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color 0.1s, background 0.1s;
}
.tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.tab--active { color: var(--text-primary); font-weight: 500; border-bottom-color: var(--text-primary); }
.tab__icon { font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 4px; padding-bottom: 6px; flex-shrink: 0; }
.toolbar__btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 5px;
  border: 1px solid transparent;
  background: transparent; cursor: pointer;
  font-size: 13px; font-family: var(--font);
  color: var(--text-secondary);
  transition: background 0.1s, border-color 0.1s;
}
.toolbar__btn:hover { background: var(--bg-hover); border-color: var(--border); color: var(--text-primary); }
.toolbar__btn--icon svg { flex-shrink: 0; }
.toolbar__btn--new { background: #007aff; color: #fff; border-color: #0066d6; font-weight: 500; padding: 5px 12px; }
.toolbar__btn--new:hover { background: #0066d6; border-color: #0055c4; color: #fff; }

.search-bar { padding: 8px 0 0; }
.search-input {
  width: 280px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: var(--font); color: var(--text-primary);
  outline: none; transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 2px rgba(0,0,0,0.06); }

.content-area { padding-top: 0; }
.view { display: none; }
.view--active { display: block; }
.placeholder { padding: 64px 24px; text-align: center; color: var(--text-secondary); font-size: 15px; }

.table-wrapper { overflow-x: auto; width: 100%; }
.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-track { background: transparent; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.notion-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
}

.notion-table thead th:first-child,
.notion-table tbody td:first-child {
  position: sticky; left: 0; z-index: 2;
  background: var(--bg-page);
}
.notion-table tbody tr:hover td:first-child { background: var(--bg-hover-row); }

.notion-table thead th {
  padding: 6px 10px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.notion-table thead th:hover { background: var(--bg-hover); cursor: pointer; }
.th-inner { display: flex; align-items: center; gap: 5px; }
.th-icon { font-size: 11px; opacity: 0.6; }

.notion-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.08s; }
.notion-table tbody tr:hover { background: var(--bg-hover-row); }

.notion-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  min-width: 90px;
  height: auto;
}

.editable-cell { cursor: pointer; border: 1px solid transparent; }
.editable-cell:hover { background: #fafafa; border-color: #deddda; }
.editable-cell.editing { background: #fff; border-color: #bdbbb7; box-shadow: inset 0 0 0 1px #bdbbb7; min-width: 220px; }
.cell-empty { display: block; min-height: 22px; min-width: 80px; }
.editable-cell:hover .cell-empty::after { content: "Write…"; color: var(--text-light); font-size: 12px; }

.task-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
  min-width: 160px;
}

.text-truncate { white-space: normal; overflow: visible; color: var(--text-primary); width: 420px; min-width: 420px; line-height: 1.5; font-size: 12px; }
.text-secondary { color: var(--text-secondary); font-size: 12px; }
.text-small { font-size: 12px; color: var(--text-light); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  line-height: 1.6;
}
.badge + .badge { margin-top: 3px; }
.badges-col { display: flex; flex-direction: column; gap: 2px; }

.badge--project   { background: var(--project-bg);   color: var(--project-text); }
.badge--perpetual { background: var(--perpetual-bg);  color: var(--perpetual-text); }
.badge--ondemand  { background: var(--ondemand-bg);   color: var(--ondemand-text); }

.badge--academy     { background: var(--academy-bg);     color: var(--academy-text); }
.badge--school      { background: var(--school-bg);      color: var(--school-text); }
.badge--emoa        { background: var(--emoa-bg);        color: var(--emoa-text); }
.badge--afterschool { background: var(--afterschool-bg); color: var(--afterschool-text); }
.badge--incompany   { background: var(--incompany-bg);   color: var(--incompany-text); }

.badge--calidad-approved { background: var(--calidad-approved-bg); color: var(--calidad-approved-text); }
.badge--calidad-review   { background: var(--calidad-review-bg);   color: var(--calidad-review-text); }
.badge--calidad-norev    { background: var(--calidad-norev-bg);    color: var(--calidad-norev-text); }
.badge--calidad-pending  { background: var(--calidad-pending-bg);  color: var(--calidad-pending-text); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-pill--notstarted  { background: var(--notstarted-bg);  color: var(--notstarted-text); }
.status-pill--inprogress  { background: var(--inprogress-bg);  color: var(--inprogress-text); }
.status-pill--standby     { background: var(--standby-bg);     color: var(--standby-text); }
.status-pill--blocked     { background: var(--blocked-bg);     color: var(--blocked-text); }
.status-pill--done        { background: var(--done-bg);        color: var(--done-text); }
.status-pill--delayeddone { background: var(--delayeddone-bg); color: var(--delayeddone-text); }
.status-dot--notstarted  { background: var(--notstarted-text); }
.status-dot--inprogress  { background: var(--inprogress-text); }
.status-dot--standby     { background: var(--standby-text); }
.status-dot--blocked     { background: var(--blocked-text); }
.status-dot--done        { background: var(--done-text); }
.status-dot--delayeddone { background: var(--delayeddone-text); }

.specialists-col { display: flex; flex-wrap: wrap; gap: 4px; }
.avatar-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px 1px 1px;
  font-size: 11.5px; color: var(--text-primary); white-space: nowrap;
}
.avatar-initials {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.avatar-0 { background: #6366f1; }
.avatar-1 { background: #10b981; }
.avatar-2 { background: #f59e0b; }
.avatar-3 { background: #ef4444; }
.avatar-4 { background: #8b5cf6; }
.avatar-5 { background: #ec4899; }
.avatar-6 { background: #0ea5e9; }

.date-range { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.date-empty { color: var(--text-light); font-size: 12px; }
.rounds-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-hover); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
}

.loading-state, .error-state {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 48px; color: var(--text-secondary); font-size: 13px;
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Inline editor --- */
.inline-editor { min-width: 210px; max-width: 320px; }
.inline-input {
  width: 100%; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 12px;
  color: var(--text-primary); background: #fff; outline: none;
}
.inline-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 2px rgba(0,0,0,0.05); }
.inline-editor textarea.inline-input { resize: vertical; min-height: 70px; }
.inline-editor--date-range { display: flex; flex-direction: column; gap: 6px; }
.inline-actions { display: flex; gap: 6px; margin-top: 6px; }
.inline-actions button {
  padding: 4px 8px; border-radius: 5px; border: 1px solid var(--border);
  font-family: var(--font); font-size: 12px; cursor: pointer; background: #fff; color: var(--text-primary);
}
.inline-actions .inline-save { background: #007aff; border-color: #0066d6; color: #fff; }
.inline-actions .inline-save:hover { background: #0066d6; }
.inline-actions .inline-cancel:hover { background: var(--bg-hover); }
.multi-options {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 190px; overflow-y: auto;
  padding: 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
}
.multi-option, .checkbox-option {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-primary); cursor: pointer;
}
.multi-option { padding: 3px 4px; border-radius: 4px; }
.multi-option:hover { background: var(--bg-hover); }

/* --- Submit Form --- */
.submit-form-card {
  max-width: 620px; margin: 32px auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 32px;
}
.submit-form-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.form-note { color: var(--text-secondary); font-size: 13px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 5px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: var(--font); color: var(--text-primary);
  background: #fff; outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 2px rgba(0,0,0,0.06); }
.form-group textarea { min-height: 90px; resize: vertical; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
.form-submit-btn {
  background: #007aff; color: #fff; border: none;
  padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 500;
  font-family: var(--font); cursor: pointer;
  transition: background 0.1s;
}
.form-submit-btn:hover { background: #0066d6; }
.form-feedback { margin-top: 12px; font-size: 13px; }
.form-feedback--success { color: var(--done-text); }
.form-feedback--error   { color: var(--blocked-text); }

.toast {
  position: fixed; bottom: 22px; right: 22px;
  padding: 8px 12px; border-radius: 7px;
  background: #37352f; color: #fff;
  font-size: 13px; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .15s, transform .15s;
  z-index: 9999;
}
.toast--show { opacity: 1; transform: translateY(0); }
.toast--error { background: #991b1b; }
.toast--success { background: #37352f; }

@media (max-width: 768px) {
  .app { padding: 16px 12px 48px; }
  .page-header__title { font-size: 22px; }
  .tabs-toolbar-row { gap: 4px; }
  .tab { padding: 6px 8px; font-size: 12px; }
  .toolbar { gap: 2px; }
  .search-input { width: 100%; }
  .checkbox-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   MOA branded Submit Form
   Cleaner, warmer and closer to the MOA Education identity
========================================================= */
:root {
  --moa-deep: #0a6f78;
  --moa-deeper: #075a62;
  --moa-teal: #168c96;
  --moa-aqua: #21a9b3;
  --moa-soft: #e6f7f8;
  --moa-mint: #c9eff1;
  --moa-ink: #103f46;
  --moa-shadow: 0 24px 70px rgba(7, 90, 98, 0.18);
}

.toolbar__btn--new,
.form-submit-btn,
.inline-actions .inline-save {
  background: linear-gradient(135deg, var(--moa-teal), var(--moa-deep));
  border-color: var(--moa-deep);
}

.toolbar__btn--new:hover,
.form-submit-btn:hover,
.inline-actions .inline-save:hover {
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deeper));
  border-color: var(--moa-deeper);
}

#view-submit {
  min-height: calc(100vh - 120px);
}

.submit-hero-shell {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: start center;
  padding: 34px 20px 70px;
  overflow: hidden;
}

.submit-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 13% 12%, rgba(33, 169, 179, 0.34) 0 13rem, transparent 13.2rem),
    radial-gradient(circle at 92% 9%, rgba(10, 111, 120, 0.18) 0 16rem, transparent 16.2rem),
    linear-gradient(135deg, #f5fbfb 0%, #eefafa 42%, #ffffff 100%);
}

.submit-hero-bg::before,
.submit-hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.95;
}

.submit-hero-bg::before {
  width: 520px;
  height: 520px;
  left: -190px;
  bottom: -210px;
  background: linear-gradient(145deg, rgba(10, 111, 120, 0.16), rgba(33, 169, 179, 0.04));
}

.submit-hero-bg::after {
  width: 340px;
  height: 340px;
  right: -120px;
  bottom: 80px;
  background: linear-gradient(145deg, rgba(22, 140, 150, 0.14), rgba(10, 111, 120, 0.03));
}

.submit-form-card.submit-form-card--moa {
  width: min(760px, 100%);
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid rgba(10, 111, 120, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--moa-shadow);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.submit-brand-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 26px 28px 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.18) 0 5rem, transparent 5.2rem),
    linear-gradient(135deg, var(--moa-deep), var(--moa-teal));
  border-radius: 25px 25px 0 0;
  position: relative;
  overflow: hidden;
}

.submit-brand-header::after {
  content: "m";
  position: absolute;
  right: 28px;
  bottom: -42px;
  font-size: 150px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -18px;
  color: rgba(255, 255, 255, 0.09);
  font-family: var(--font);
  pointer-events: none;
}

.submit-logo-wrap {
  width: 76px;
  height: 76px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 14px 30px rgba(0,0,0,0.16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.submit-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

.submit-form-card.submit-form-card--moa h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: #ffffff;
}

.submit-form-card.submit-form-card--moa .form-note {
  margin: 0;
  max-width: 560px;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.55;
}

.moa-task-form {
  padding: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row--deadlines {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-group--full { grid-column: 1 / -1; }

.moa-task-form .form-group { margin-bottom: 18px; }

.moa-task-form .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 750;
  color: var(--moa-ink);
}

.moa-task-form .form-group input,
.moa-task-form .form-group select,
.moa-task-form .form-group textarea {
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid rgba(10, 111, 120, 0.16);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 0 rgba(10, 111, 120, 0.04);
}

.moa-task-form .form-group textarea {
  min-height: 120px;
  line-height: 1.5;
}

.moa-task-form .form-group input:focus,
.moa-task-form .form-group select:focus,
.moa-task-form .form-group textarea:focus,
.people-picker__trigger:focus,
.people-picker__search:focus {
  border-color: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33, 169, 179, 0.12);
}

.people-picker {
  position: relative;
}

.people-picker__trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(10, 111, 120, 0.16);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.people-picker__trigger:hover {
  background: #fbfefe;
  border-color: rgba(10, 111, 120, 0.26);
}

.people-picker__placeholder {
  color: var(--text-secondary);
}

.people-picker__chevron {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.15s;
}

.people-picker.is-open .people-picker__chevron {
  transform: rotate(180deg);
}

.selected-people {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  min-height: 0;
}

.selected-people:empty { display: none; }

.selected-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 5px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-ink);
  border: 1px solid rgba(10, 111, 120, 0.11);
  font-size: 12px;
  font-weight: 650;
}

.selected-person-chip__avatar,
.people-option__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.selected-person-chip__remove {
  border: 0;
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
}

.selected-person-chip__remove:hover {
  background: rgba(10, 111, 120, 0.16);
}

.people-picker__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  padding: 10px;
  border: 1px solid rgba(10, 111, 120, 0.16);
  border-radius: 16px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 45px rgba(7, 90, 98, 0.17);
}

.people-picker__search-wrap {
  margin-bottom: 8px;
}

.people-picker__search {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid rgba(10, 111, 120, 0.13);
  border-radius: 11px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}

.people-picker__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 3px;
}

.people-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  text-align: left;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
}

.people-option:hover {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.10);
}

.people-option.is-selected {
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.95), rgba(201, 239, 241, 0.85));
  border-color: rgba(10, 111, 120, 0.24);
}

.people-option__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.people-option__check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 111, 120, 0.10);
  color: transparent;
  font-size: 12px;
  font-weight: 900;
}

.people-option.is-selected .people-option__check {
  background: var(--moa-deep);
  color: #ffffff;
}

.empty-people-result {
  grid-column: 1 / -1;
  padding: 14px 10px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.submit-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.moa-task-form .form-submit-btn {
  min-height: 42px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.1px;
  box-shadow: 0 12px 26px rgba(10, 111, 120, 0.24);
}

.moa-task-form .form-feedback {
  margin-top: 0;
}

/* A cleaner checkbox-less visual style for inline multi-select editors */
.multi-option input,
.checkbox-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.multi-option,
.checkbox-option {
  position: relative;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.multi-option:hover,
.checkbox-option:hover {
  background: var(--moa-soft);
}

.multi-option:has(input:checked),
.checkbox-option:has(input:checked) {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.18);
  color: var(--moa-ink);
  font-weight: 650;
}

.multi-option:has(input:checked)::after,
.checkbox-option:has(input:checked)::after {
  content: "✓";
  margin-left: auto;
  color: var(--moa-deep);
  font-weight: 900;
}

@media (max-width: 768px) {
  .submit-hero-shell { padding: 20px 10px 48px; }
  .submit-brand-header {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 22px;
  }
  .submit-logo-wrap { width: 64px; height: 64px; }
  .submit-form-card.submit-form-card--moa h2 { font-size: 25px; }
  .moa-task-form { padding: 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .people-picker__list { grid-template-columns: 1fr; }
  .people-picker__dropdown { position: static; margin-top: 8px; }
}

.page-header__icon--logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(10, 111, 120, 0.18);
}

.page-header__icon--logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-header__subtitle {
  margin-top: -2px;
  font-size: 12px;
  color: var(--moa-deep);
  font-weight: 650;
}

/* =========================================================
   MOA branded dashboard shell + direct inline editing polish
========================================================= */
html, body {
  min-height: 100%;
  background:
    radial-gradient(circle at 4% 6%, rgba(33, 169, 179, 0.24) 0 15rem, transparent 15.2rem),
    radial-gradient(circle at 96% 2%, rgba(10, 111, 120, 0.16) 0 18rem, transparent 18.2rem),
    radial-gradient(circle at 78% 88%, rgba(201, 239, 241, 0.42) 0 20rem, transparent 20.2rem),
    linear-gradient(135deg, #f5fbfb 0%, #eefafa 45%, #ffffff 100%);
  background-attachment: fixed;
}

.app {
  position: relative;
  isolation: isolate;
}

.app::before,
.app::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

.app::before {
  width: 460px;
  height: 460px;
  left: -180px;
  bottom: -190px;
  background: linear-gradient(145deg, rgba(10, 111, 120, 0.13), rgba(33, 169, 179, 0.04));
}

.app::after {
  width: 340px;
  height: 340px;
  right: -130px;
  top: 150px;
  background: linear-gradient(145deg, rgba(22, 140, 150, 0.11), rgba(10, 111, 120, 0.03));
}

.page-header,
.tabs-toolbar-row,
.search-bar,
.table-wrapper,
.placeholder {
  position: relative;
}

.tabs-toolbar-row {
  margin-top: 8px;
  padding: 10px 12px 0;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(7, 90, 98, 0.06);
}

.content-area {
  padding: 0 0 40px;
}

.table-wrapper {
  min-height: 58vh;
  padding: 0;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 70px rgba(7, 90, 98, 0.10);
}

.notion-table thead th,
.notion-table tbody td,
.notion-table thead th:first-child,
.notion-table tbody td:first-child {
  background: transparent;
}

.notion-table thead th {
  background: rgba(255,255,255,0.55);
  color: var(--moa-ink);
}

.notion-table tbody tr:hover {
  background: rgba(230, 247, 248, 0.60);
}

.notion-table tbody tr:hover td:first-child {
  background: rgba(230, 247, 248, 0.65);
}

.editable-cell {
  position: relative;
}

.editable-cell:hover {
  background: rgba(230, 247, 248, 0.48);
  border-color: rgba(10, 111, 120, 0.14);
}

.editable-cell.editing {
  background: rgba(255,255,255,0.98);
  border-color: rgba(10, 111, 120, 0.34);
  box-shadow: 0 12px 34px rgba(7, 90, 98, 0.15), inset 0 0 0 1px rgba(10, 111, 120, 0.16);
  z-index: 25;
}

.inline-editor--quick-select {
  min-width: 260px;
  padding: 10px;
  border: 1px solid rgba(10, 111, 120, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(7, 90, 98, 0.18);
}

.quick-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--moa-deep);
}

.quick-cancel {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.quick-cancel:hover {
  background: var(--moa-mint);
}

.quick-options {
  display: grid;
  gap: 7px;
}

.quick-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
}

.quick-option:hover {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.14);
  transform: translateY(-1px);
}

.quick-option.is-selected {
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.98), rgba(201, 239, 241, 0.78));
  border-color: rgba(10, 111, 120, 0.24);
}

.quick-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.quick-option em {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.08);
  color: transparent;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.quick-option.is-selected em {
  background: var(--moa-deep);
  color: #fff;
}

.inline-editor--multi .multi-options {
  min-width: 280px;
  border-color: rgba(10, 111, 120, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(7, 90, 98, 0.14);
}

.mini-avatar {
  width: 22px;
  height: 22px;
  margin-right: 7px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deep));
  color: white;
  font-size: 9px;
  font-weight: 800;
  vertical-align: middle;
}

.inline-actions .inline-save {
  box-shadow: 0 8px 18px rgba(10, 111, 120, 0.20);
}

/* =========================================================
   Notion-like sub-items
========================================================= */
.task-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 360px;
  min-width: 190px;
}

.subitem-toggle,
.subitem-mini-add,
.subitem-new-button,
.subitem-create-save,
.subitem-create-cancel {
  font-family: var(--font);
}

.subitem-toggle {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.subitem-toggle:hover {
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
}

.subitem-toggle.is-open {
  color: var(--moa-deep);
  background: var(--moa-soft);
}

.subitem-mini-add {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s, background .12s, color .12s, border-color .12s;
  flex-shrink: 0;
}

.task-title-wrap:hover .subitem-mini-add,
.task-parent-row:hover .subitem-mini-add {
  opacity: 1;
}

.subitem-mini-add:hover {
  background: var(--moa-soft);
  color: var(--moa-deep);
  border-color: rgba(10, 111, 120, 0.12);
}

.subitem-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.subitem-row {
  background: rgba(250, 252, 252, 0.82);
}

.subitem-row:hover {
  background: rgba(230, 247, 248, 0.72) !important;
}

.subitem-cell {
  border-top-color: rgba(10, 111, 120, 0.05);
}

.task-title-wrap--subitem {
  padding-left: 34px;
  min-width: 230px;
}

.subitem-branch {
  width: 20px;
  display: inline-grid;
  place-items: center;
  color: var(--text-light);
  font-size: 16px;
  flex-shrink: 0;
}

.task-title--subitem {
  font-weight: 600;
  color: #4f4d47;
  max-width: 245px;
}

.subitem-create-row td {
  padding: 6px 12px 10px !important;
  background: rgba(255, 255, 255, 0.50);
}

.subitem-new-button {
  margin-left: 46px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
}

.subitem-new-button:hover {
  background: var(--moa-soft);
  color: var(--moa-deep);
  border-color: rgba(10, 111, 120, 0.10);
}

.subitem-create-box {
  margin-left: 46px;
  width: min(620px, calc(100vw - 120px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(10, 111, 120, 0.15);
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 14px 34px rgba(7, 90, 98, 0.12);
}

.subitem-create-box__branch {
  color: var(--text-light);
  font-size: 16px;
  flex-shrink: 0;
}

.subitem-create-input {
  min-width: 180px;
  flex: 1;
  height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(10, 111, 120, 0.15);
  border-radius: 10px;
  outline: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
}

.subitem-create-input:focus {
  border-color: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33, 169, 179, 0.12);
}

.subitem-create-save,
.subitem-create-cancel {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.subitem-create-save {
  border: 1px solid var(--moa-deep);
  background: linear-gradient(135deg, var(--moa-teal), var(--moa-deep));
  color: #fff;
}

.subitem-create-save:hover {
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deeper));
}

.subitem-create-cancel {
  border: 1px solid rgba(10, 111, 120, 0.13);
  background: #fff;
  color: var(--moa-deep);
}

.subitem-create-cancel:hover {
  background: var(--moa-soft);
}

.selected-person-chip--vertical {
  padding-left: 9px;
}

@media (max-width: 768px) {
  .task-title-wrap { min-width: 230px; }
  .task-title-wrap--subitem { padding-left: 20px; }
  .subitem-new-button { margin-left: 28px; }
  .subitem-create-box {
    margin-left: 28px;
    width: calc(100vw - 62px);
    flex-wrap: wrap;
  }
  .subitem-create-input { flex-basis: 100%; }
}

/* =========================================================
   Backlog-only navigation + Notion-like selection/trash
========================================================= */
.tabs {
  flex: 0 1 auto;
}

.tabs-toolbar-row {
  align-items: center;
}

.selection-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  margin-right: 8px;
  padding: 2px 5px 2px 9px;
  border: 1px solid rgba(10, 111, 120, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(7, 90, 98, 0.08);
}

.selection-toolbar[hidden] {
  display: none !important;
}

.selection-toolbar__count {
  color: var(--moa-ink);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.toolbar__btn--danger {
  color: #b42318;
}

.toolbar__btn--danger:hover {
  background: #fff1f0;
  border-color: rgba(180, 35, 24, 0.18);
  color: #b42318;
}

.table-wrapper--backlog {
  border-radius: 0 0 18px 18px;
}

.notion-table--backlog {
  min-width: 1720px;
  border-collapse: separate;
  border-spacing: 0;
}

.notion-table--backlog thead th {
  height: 34px;
  border-right: 1px solid rgba(10, 111, 120, 0.07);
}

.notion-table--backlog tbody td {
  height: 46px;
  border-right: 1px solid rgba(10, 111, 120, 0.055);
}

.notion-table--backlog thead th:first-child,
.notion-table--backlog tbody td:first-child {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0 8px;
  position: sticky;
  left: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
}

.notion-table--backlog thead th:nth-child(2),
.notion-table--backlog tbody td:nth-child(2) {
  position: sticky;
  left: 44px;
  z-index: 4;
  min-width: 282px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 1px 0 0 rgba(10, 111, 120, 0.07);
}

.notion-table--backlog thead th:nth-child(2) {
  z-index: 6;
}

.notion-table--backlog tbody tr:hover td:first-child,
.notion-table--backlog tbody tr:hover td:nth-child(2),
.notion-table--backlog tbody tr.selected-row td:first-child,
.notion-table--backlog tbody tr.selected-row td:nth-child(2) {
  background: rgba(230, 247, 248, 0.92);
}

.row-selector-head {
  cursor: default !important;
}

.row-selector-head__dot {
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 4px;
}

.row-selector-cell {
  text-align: center;
}

.row-selector {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}

.row-selector span {
  transform: translateY(-0.5px);
}

.task-parent-row:hover .row-selector,
.subitem-row:hover .row-selector {
  border-color: rgba(120, 119, 116, 0.42);
  background: rgba(255, 255, 255, 0.72);
}

.row-selector:hover {
  border-color: var(--moa-deep) !important;
  box-shadow: 0 0 0 3px rgba(33, 169, 179, 0.10);
}

.row-selector.is-selected {
  border-color: var(--moa-deep);
  background: var(--moa-deep);
  color: #ffffff;
}

.selected-row {
  background: rgba(230, 247, 248, 0.78) !important;
}

.selected-row td {
  border-bottom-color: rgba(10, 111, 120, 0.12) !important;
}

.row-selector-cell--subitem .row-selector {
  margin-left: 8px;
}

.notion-table--backlog .task-title-wrap {
  min-width: 246px;
  max-width: 280px;
}

.notion-table--backlog .task-title {
  max-width: 216px;
  min-width: 150px;
}

.notion-table--backlog .task-title--subitem {
  max-width: 200px;
}

.notion-table--backlog .specialists-col {
  min-width: 220px;
  max-width: 260px;
}

.notion-table--backlog td[data-key="Tipo de trabajo"] {
  min-width: 155px;
}

.notion-table--backlog td[data-key="Vertical"] {
  min-width: 145px;
}

.notion-table--backlog td[data-key="Deadline 1"],
.notion-table--backlog td[data-key="Deadline 2"],
.notion-table--backlog td[data-key="Deadline 3"],
.notion-table--backlog td[data-key="Deadline 4"] {
  min-width: 140px;
}


.notion-table--backlog td[data-key="Brief Description"] .text-truncate {
  width: 380px;
  min-width: 380px;
}

.notion-table--backlog td[data-key="Comments"] .text-truncate {
  width: 300px;
  min-width: 300px;
}

.notion-table--backlog td[data-type="specialist-note"] .text-truncate {
  width: 190px;
  min-width: 190px;
}

.notion-table--backlog td[data-key="Calidad"] {
  min-width: 180px;
}

.notion-table--backlog td[data-key="Estado"] {
  min-width: 150px;
}

.subitem-create-row td:first-child {
  position: static !important;
  left: auto !important;
  width: auto !important;
  max-width: none !important;
}

@media (max-width: 768px) {
  .selection-toolbar {
    order: -1;
    width: 100%;
    justify-content: space-between;
    margin-right: 0;
  }

  .notion-table--backlog {
    min-width: 1450px;
  }
}
/* Specialist note cells: darker text + shorter cell width */
.notion-table td[data-type="specialist-note"] .text-truncate,
.notion-table td[data-type="specialist-note"] .text-small {
  color: var(--text-primary) !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  font-size: 12px;
}

.notion-table td[data-type="specialist-note"] {
width: 250px !important;
min-width: 250px !important;
max-width: 250px !important;
}

/* =========================================================
   Calendar view — Notion-like month + specialist workflow
========================================================= */
#view-calendar {
  min-height: calc(100vh - 130px);
}

.calendar-shell {
  padding: 18px 0 44px;
}

.calendar-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 0 0 22px 22px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(7, 90, 98, 0.08);
}

.calendar-eyebrow {
  margin-bottom: 2px;
  color: var(--moa-deep);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .10em;
  text-transform: uppercase;
}

#calendar-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.5px;
}

.calendar-subtitle {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-btn,
.calendar-icon-btn,
.calendar-filter select {
  min-height: 36px;
  border: 1px solid rgba(10, 111, 120, 0.13);
  border-radius: 10px;
  background: #ffffff;
  color: var(--moa-ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}

.calendar-btn {
  padding: 0 14px;
}

.calendar-icon-btn {
  width: 36px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.calendar-btn:hover,
.calendar-icon-btn:hover,
.calendar-filter select:hover {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.24);
}

.calendar-nav {
  display: inline-flex;
  gap: 5px;
}

.calendar-filter {
  display: grid;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
}

.calendar-filter select {
  min-width: 180px;
  padding: 0 12px;
  outline: none;
}

.calendar-filter select:focus {
  border-color: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33, 169, 179, 0.12);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
}

.calendar-main-card,
.calendar-sidebar,
.calendar-lanes-card {
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(7, 90, 98, 0.10);
  overflow: hidden;
}

.calendar-main-card__head,
.calendar-sidebar__head,
.calendar-lanes-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.09);
  background: rgba(255, 255, 255, 0.68);
}

.calendar-main-card__head strong,
.calendar-sidebar__head strong,
.calendar-lanes-card__head strong {
  display: block;
  color: var(--moa-ink);
  font-size: 14px;
  font-weight: 850;
}

.calendar-main-card__head span,
.calendar-sidebar__head span,
.calendar-lanes-card__head span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.calendar-pill {
  margin-top: 0 !important;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep) !important;
  font-size: 11px !important;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-board {
  min-width: 760px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
}

.calendar-weekdays {
  border-bottom: 1px solid rgba(10, 111, 120, 0.09);
  background: rgba(230, 247, 248, 0.48);
}

.calendar-weekdays div {
  padding: 10px 10px;
  color: var(--moa-ink);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-right: 1px solid rgba(10, 111, 120, 0.07);
}

.calendar-day {
  min-height: 110px;
  max-height: 140px; /* Límite de altura para no deformar la vista */
  padding: 9px;
  border-right: 1px solid rgba(10, 111, 120, 0.07);
  border-bottom: 1px solid rgba(10, 111, 120, 0.07);
  background: rgba(255, 255, 255, 0.62);
  display: flex;
  flex-direction: column;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day--outside {
  background: rgba(247, 246, 243, 0.45);
  color: var(--text-light);
}

.calendar-day--today {
  background: linear-gradient(180deg, rgba(230, 247, 248, 0.92), rgba(255,255,255,0.78));
  box-shadow: inset 0 0 0 2px rgba(33, 169, 179, 0.24);
}

.calendar-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  min-height: 22px;
}

.calendar-day__head span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day--today .calendar-day__head span {
  background: var(--moa-deep);
  color: #fff;
}

.calendar-day__head strong {
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.calendar-day__items {
  display: grid;
  gap: 5px;
  overflow-y: auto; /* Activa el scroll si hay muchas tareas en un día */
  flex: 1;
  padding-right: 2px;
}

/* Scrollbar pequeñito y estilizado para las celdas */
.calendar-day__items::-webkit-scrollbar { width: 4px; }
.calendar-day__items::-webkit-scrollbar-thumb { 
  background: rgba(10, 111, 120, 0.2); 
  border-radius: 4px; 
}

.calendar-card,
.deadline-card,
.lane-chip {
  width: 100%;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s, border-color .12s;
}

.calendar-card:hover,
.deadline-card:hover,
.lane-chip:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(7, 90, 98, 0.12);
}

.calendar-card {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
}

.calendar-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.2;
}

.calendar-card__meta b {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 10px;
}

.calendar-card__meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-card__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.calendar-card__people {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.25;
}

.calendar-card--subitem {
  margin-left: 8px;
  width: calc(100% - 8px);
}

.calendar-more,
.lane-more {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 750;
  padding: 3px 6px;
}

.calendar-card--notstarted,
.deadline-card--notstarted,
.lane-chip--notstarted { border-left-color: var(--notstarted-text); }
.calendar-card--inprogress,
.deadline-card--inprogress,
.lane-chip--inprogress { border-left-color: var(--inprogress-text); }
.calendar-card--standby,
.deadline-card--standby,
.lane-chip--standby { border-left-color: var(--standby-text); }
.calendar-card--blocked,
.deadline-card--blocked,
.lane-chip--blocked { border-left-color: var(--blocked-text); }
.calendar-card--done,
.deadline-card--done,
.lane-chip--done { border-left-color: var(--done-text); }
.calendar-card--delayeddone,
.deadline-card--delayeddone,
.lane-chip--delayeddone { border-left-color: var(--delayeddone-text); }

.calendar-sidebar {
  align-self: start;
  max-height: 760px;
}

.calendar-deadlines-list {
  display: grid;
  gap: 9px;
  padding: 12px;
  max-height: 690px;
  overflow: auto;
}

.deadline-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 10px;
}

.deadline-card__date {
  display: grid;
  align-content: start;
  gap: 3px;
}

.deadline-card__date strong {
  color: var(--moa-deep);
  font-size: 13px;
  font-weight: 850;
}

.deadline-card__date span {
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 850;
}

.deadline-card__body strong,
.deadline-card__body span,
.deadline-card__body em {
  display: block;
}

.deadline-card__body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.25;
}

.deadline-card__body span {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 11px;
}

.deadline-card__body em {
  margin-top: 4px;
  color: var(--moa-deep);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}

.calendar-lanes-card {
  margin-top: 16px;
}

.calendar-specialist-lanes {
  display: grid;
  gap: 0;
}

.specialist-lane {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.08);
}

.specialist-lane:last-child {
  border-bottom: 0;
}

.specialist-lane__person {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 9px;
  align-items: center;
}

.specialist-lane__person span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deep));
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.specialist-lane__person strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moa-ink);
  font-size: 13px;
  font-weight: 850;
}

.specialist-lane__person em {
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
}

.specialist-lane__items {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.lane-chip {
  flex: 0 0 220px;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
}

.lane-chip span {
  color: var(--moa-deep);
  font-size: 10.5px;
  font-weight: 850;
}

.lane-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 850;
}

.lane-chip em {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-style: normal;
}

.lane-empty {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 650;
}

.calendar-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: var(--text-secondary);
  text-align: center;
}

.calendar-empty-state strong {
  color: var(--moa-ink);
  font-size: 13px;
}

.calendar-empty-state span {
  font-size: 12px;
}

.calendar-empty-state--lanes {
  padding: 24px;
}

@media (max-width: 1080px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-sidebar {
    max-height: none;
  }

  .calendar-deadlines-list {
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .calendar-topbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 0 0 18px 18px;
  }

  .calendar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-filter,
  .calendar-filter select {
    width: 100%;
  }

  .calendar-main-card {
    overflow-x: auto;
  }

  .calendar-deadlines-list {
    grid-template-columns: 1fr;
  }

  .specialist-lane {
    grid-template-columns: 1fr;
  }

  .specialist-lane__items {
    padding-left: 1px;
  }
}

/* =========================================================
   Functional Filter + Sort toolbar panels
========================================================= */
.toolbar__btn {
  position: relative;
}

.toolbar__btn.is-active {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.18);
  color: var(--moa-deep);
  font-weight: 750;
}

.toolbar__btn[data-count]:not([data-count=""])::after {
  content: attr(data-count);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moa-deep);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.toolbar-panels {
  position: relative;
  z-index: 70;
}

.toolbar-panel {
  position: absolute;
  right: 12px;
  top: 8px;
  width: min(760px, calc(100vw - 48px));
  max-height: min(78vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(10, 111, 120, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(7, 90, 98, 0.20);
  backdrop-filter: blur(18px);
}

.toolbar-panel--sort {
  width: min(420px, calc(100vw - 48px));
}

.toolbar-panel[hidden] {
  display: none !important;
}

.toolbar-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.10);
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.92), rgba(255, 255, 255, 0.88));
}

.toolbar-panel__header strong,
.filter-section__title {
  display: block;
  color: var(--moa-ink);
  font-size: 13px;
  font-weight: 900;
}

.toolbar-panel__header span {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.toolbar-panel__x {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.toolbar-panel__x:hover {
  background: rgba(10, 111, 120, 0.16);
}

.toolbar-panel__body {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  max-height: calc(min(78vh, 720px) - 60px);
  overflow: auto;
}

.toolbar-panel__body--filters {
  gap: 16px;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(10, 111, 120, 0.09);
  border-radius: 14px;
  background: rgba(230, 247, 248, 0.42);
}

.filter-summary--empty {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(10, 111, 120, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: var(--moa-ink);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 750;
}

.filter-chip span {
  color: var(--moa-deep);
  font-weight: 950;
}

.filter-chip:hover {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.22);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(10, 111, 120, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.filter-section--deadline {
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.62), rgba(255, 255, 255, 0.80));
}

.filter-section__title {
  margin-bottom: 9px;
}

.filter-options {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.filter-option {
  min-height: 34px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  transition: background .12s, border-color .12s;
}

.filter-option:hover {
  background: var(--moa-soft);
}

.filter-option.is-selected {
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.98), rgba(201, 239, 241, 0.72));
  border-color: rgba(10, 111, 120, 0.20);
  color: var(--moa-ink);
  font-weight: 750;
}

.filter-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--moa-deep);
}

.filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-option em {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.deadline-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, 1fr));
  gap: 10px;
}

.toolbar-field {
  display: grid;
  gap: 6px;
}

.toolbar-field span {
  color: var(--moa-ink);
  font-size: 11px;
  font-weight: 850;
}

.toolbar-field select,
.toolbar-field input {
  min-height: 38px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(10, 111, 120, 0.14);
  border-radius: 11px;
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}

.toolbar-field select:focus,
.toolbar-field input:focus {
  border-color: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33, 169, 179, 0.12);
}

.sort-direction-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sort-direction {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(10, 111, 120, 0.11);
  border-radius: 13px;
  background: #ffffff;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 750;
}

.sort-direction:hover,
.sort-direction.is-selected {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.22);
  color: var(--moa-ink);
}

.sort-direction input {
  accent-color: var(--moa-deep);
}

.sort-direction em {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
  font-style: normal;
  font-weight: 950;
}

.toolbar-panel__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.toolbar-primary-btn,
.toolbar-secondary-btn {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.toolbar-primary-btn {
  border: 1px solid var(--moa-deep);
  background: linear-gradient(135deg, var(--moa-teal), var(--moa-deep));
  color: #ffffff;
}

.toolbar-primary-btn:hover {
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deeper));
}

.toolbar-secondary-btn {
  border: 1px solid rgba(10, 111, 120, 0.13);
  background: #ffffff;
  color: var(--moa-deep);
}

.toolbar-secondary-btn:hover {
  background: var(--moa-soft);
}

.th-inner {
  position: relative;
}

.th--sorted {
  background: rgba(230, 247, 248, 0.82) !important;
  color: var(--moa-deep) !important;
}

.th-sort-indicator {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--moa-deep);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .toolbar-panel,
  .toolbar-panel--sort {
    right: 0;
    left: 0;
    width: 100%;
    max-height: 82vh;
    border-radius: 16px;
  }

  .filter-grid,
  .deadline-filter-grid,
  .sort-direction-group {
    grid-template-columns: 1fr;
  }

  .toolbar-panel__actions {
    justify-content: stretch;
  }

  .toolbar-primary-btn,
  .toolbar-secondary-btn {
    flex: 1;
  }
}

/* =========================================================
   MOA visible horizontal scrollbar for dashboard tables
   Keeps the current layout, but makes the table scrollbar
   thicker, darker and easier to grab.
========================================================= */
.table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: auto;
  scrollbar-color: var(--moa-deep) rgba(230, 247, 248, 0.95);
  scrollbar-gutter: stable;
}

.table-wrapper::-webkit-scrollbar {
  height: 18px !important;
  width: 18px !important;
}

.table-wrapper::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(230, 247, 248, 0.95), rgba(201, 239, 241, 0.82)) !important;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(10, 111, 120, 0.10);
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--moa-teal), var(--moa-deep)) !important;
  border: 4px solid rgba(230, 247, 248, 0.95);
  border-radius: 999px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 2px 8px rgba(7, 90, 98, 0.18);
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--moa-aqua), var(--moa-deeper)) !important;
  border-width: 3px;
}

.table-wrapper::-webkit-scrollbar-corner {
  background: transparent;
}

/* Backlog has the widest table, so the scrollbar needs to feel extra clear there. */
.table-wrapper--backlog::-webkit-scrollbar {
  height: 20px !important;
}

.table-wrapper--backlog::-webkit-scrollbar-thumb {
  border-width: 4px;
}

/* Also improve the small inner scrollbars so they do not disappear inside MOA colors. */
.calendar-day__items,
.calendar-deadlines-list,
.specialist-lane__items,
.toolbar-panel__body,
.filter-options,
.people-picker__list,
.multi-options {
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 111, 120, 0.72) rgba(230, 247, 248, 0.72);
}

.calendar-day__items::-webkit-scrollbar,
.calendar-deadlines-list::-webkit-scrollbar,
.specialist-lane__items::-webkit-scrollbar,
.toolbar-panel__body::-webkit-scrollbar,
.filter-options::-webkit-scrollbar,
.people-picker__list::-webkit-scrollbar,
.multi-options::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.calendar-day__items::-webkit-scrollbar-track,
.calendar-deadlines-list::-webkit-scrollbar-track,
.specialist-lane__items::-webkit-scrollbar-track,
.toolbar-panel__body::-webkit-scrollbar-track,
.filter-options::-webkit-scrollbar-track,
.people-picker__list::-webkit-scrollbar-track,
.multi-options::-webkit-scrollbar-track {
  background: rgba(230, 247, 248, 0.72);
  border-radius: 999px;
}

.calendar-day__items::-webkit-scrollbar-thumb,
.calendar-deadlines-list::-webkit-scrollbar-thumb,
.specialist-lane__items::-webkit-scrollbar-thumb,
.toolbar-panel__body::-webkit-scrollbar-thumb,
.filter-options::-webkit-scrollbar-thumb,
.people-picker__list::-webkit-scrollbar-thumb,
.multi-options::-webkit-scrollbar-thumb {
  background: rgba(10, 111, 120, 0.72) !important;
  border: 2px solid rgba(230, 247, 248, 0.72);
  border-radius: 999px;
}

.calendar-day__items::-webkit-scrollbar-thumb:hover,
.calendar-deadlines-list::-webkit-scrollbar-thumb:hover,
.specialist-lane__items::-webkit-scrollbar-thumb:hover,
.toolbar-panel__body::-webkit-scrollbar-thumb:hover,
.filter-options::-webkit-scrollbar-thumb:hover,
.people-picker__list::-webkit-scrollbar-thumb:hover,
.multi-options::-webkit-scrollbar-thumb:hover {
  background: var(--moa-deep) !important;
}


/* =========================================================
   MOA Guided Tutorial / Product Tour — Premium experience
========================================================= */
.toolbar__btn--tour {
  color: var(--moa-deep);
  border-color: rgba(10, 111, 120, 0.10);
  background: rgba(255, 255, 255, 0.58);
}

.toolbar__btn--tour:hover,
.toolbar__btn--tour:focus-visible {
  color: var(--moa-deeper);
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.96), rgba(201, 239, 241, 0.72));
  border-color: rgba(10, 111, 120, 0.24);
  box-shadow: 0 8px 20px rgba(7, 90, 98, 0.10);
}

.moa-tour-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  font-family: var(--font);
  isolation: isolate;
}

.moa-tour-veil {
  position: fixed;
  inset: 0;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(33, 169, 179, 0.18), transparent 26rem),
    radial-gradient(circle at 82% 88%, rgba(201, 239, 241, 0.12), transparent 24rem),
    rgba(4, 45, 50, 0.72);
  backdrop-filter: blur(4px) saturate(.9);
  transition: opacity .22s ease;
}

.moa-tour-root.is-centered .moa-tour-veil {
  opacity: 1;
}

.moa-tour-spotlight {
  position: fixed;
  z-index: 100001;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 2px solid rgba(111, 224, 229, 0.98);
  box-shadow:
    0 0 0 9999px rgba(4, 45, 50, 0.70),
    0 0 0 7px rgba(33, 169, 179, 0.18),
    0 0 34px rgba(111, 224, 229, 0.34),
    0 22px 60px rgba(0, 0, 0, 0.28);
  transition:
    top .24s cubic-bezier(.2, .8, .2, 1),
    left .24s cubic-bezier(.2, .8, .2, 1),
    width .24s cubic-bezier(.2, .8, .2, 1),
    height .24s cubic-bezier(.2, .8, .2, 1),
    opacity .18s ease;
  pointer-events: none;
}

.moa-tour-spotlight::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.42);
  animation: moa-tour-pulse 2.4s ease-in-out infinite;
}

.moa-tour-spotlight--hidden {
  opacity: 0;
  width: 0 !important;
  height: 0 !important;
  top: 50% !important;
  left: 50% !important;
}

@keyframes moa-tour-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.012); }
}

.moa-tour-card {
  --tour-card-border: rgba(255, 255, 255, 0.86);
  position: fixed;
  z-index: 100002;
  max-height: calc(100vh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: auto;
  color: var(--text-primary);
  border: 1px solid var(--tour-card-border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.985), rgba(247, 253, 253, 0.965));
  box-shadow:
    0 38px 110px rgba(1, 34, 38, 0.42),
    0 10px 35px rgba(7, 90, 98, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(1.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 111, 120, .48) transparent;
  animation: moa-tour-card-in .28s cubic-bezier(.18, .9, .24, 1.08) both;
  transition:
    top .24s cubic-bezier(.2, .8, .2, 1),
    left .24s cubic-bezier(.2, .8, .2, 1),
    width .2s ease;
}

.moa-tour-card::-webkit-scrollbar { width: 8px; }
.moa-tour-card::-webkit-scrollbar-track { background: transparent; }
.moa-tour-card::-webkit-scrollbar-thumb {
  background: rgba(10, 111, 120, .34);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

@keyframes moa-tour-card-in {
  from { opacity: 0; transform: translateY(10px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.moa-tour-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  z-index: 3;
  background: linear-gradient(90deg, var(--moa-deeper), var(--moa-aqua) 48%, #78d8dc 76%, var(--moa-deep));
}

.moa-tour-card::after {
  content: "";
  position: fixed;
  width: 16px;
  height: 16px;
  z-index: -1;
  opacity: 0;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(255, 255, 255, 0.86);
  transform: rotate(45deg);
  transition: opacity .12s ease;
}

.moa-tour-card[data-placement="bottom"]::after,
.moa-tour-card[data-placement="top"]::after,
.moa-tour-card[data-placement="left"]::after,
.moa-tour-card[data-placement="right"]::after {
  position: absolute;
  opacity: 1;
}

.moa-tour-card[data-placement="bottom"]::after {
  top: -8px;
  left: 44px;
  border-right: 0;
  border-bottom: 0;
}

.moa-tour-card[data-placement="top"]::after {
  bottom: -8px;
  left: 44px;
  border-left: 0;
  border-top: 0;
}

.moa-tour-card[data-placement="right"]::after {
  left: -8px;
  top: 42px;
  border-right: 0;
  border-top: 0;
}

.moa-tour-card[data-placement="left"]::after {
  right: -8px;
  top: 42px;
  border-left: 0;
  border-bottom: 0;
}

.moa-tour-card__glow {
  position: absolute;
  width: 230px;
  height: 230px;
  right: -95px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(33, 169, 179, 0.22), rgba(33, 169, 179, 0.02) 66%, transparent 68%);
  pointer-events: none;
}

.moa-tour-card__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 10px;
}

.moa-tour-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.moa-tour-brand__logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 10px 25px rgba(7, 90, 98, 0.18),
    inset 0 0 0 1px rgba(10, 111, 120, 0.08);
}

.moa-tour-brand__logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.moa-tour-brand__copy {
  min-width: 0;
  display: grid;
  line-height: 1.1;
}

.moa-tour-brand__copy small {
  color: var(--moa-teal);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.moa-tour-brand__copy strong {
  margin-top: 4px;
  color: var(--moa-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.1px;
}

.moa-tour-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 50%;
  background: rgba(230, 247, 248, 0.72);
  color: var(--moa-deep);
  font-family: var(--font);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.moa-tour-close:hover,
.moa-tour-close:focus-visible {
  transform: rotate(4deg) scale(1.04);
  background: var(--moa-mint);
  border-color: rgba(10, 111, 120, 0.22);
  outline: none;
}

.moa-tour-progress-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 22px 8px;
}

.moa-tour-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.moa-tour-category::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deep));
  box-shadow: 0 0 0 4px rgba(33, 169, 179, 0.10);
}

.moa-tour-progress {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 850;
}

.moa-tour-progress-track {
  position: relative;
  z-index: 2;
  height: 5px;
  margin: 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.09);
}

.moa-tour-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moa-teal), var(--moa-aqua));
  box-shadow: 0 0 14px rgba(33, 169, 179, 0.36);
  transition: width .28s cubic-bezier(.2, .8, .2, 1);
}

.moa-tour-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 17px;
  align-items: start;
  padding: 22px 22px 14px;
}

.moa-tour-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--moa-deep);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(201, 239, 241, 0.76));
  border: 1px solid rgba(10, 111, 120, 0.11);
  box-shadow:
    0 15px 32px rgba(7, 90, 98, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.moa-tour-icon svg {
  width: 39px;
  height: 39px;
  display: block;
}

.moa-tour-copy {
  min-width: 0;
  padding-top: 1px;
}

.moa-tour-copy h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.48px;
  line-height: 1.12;
  text-wrap: balance;
}

.moa-tour-copy p {
  margin: 9px 0 0;
  color: #5f7478;
  font-size: 13px;
  line-height: 1.62;
}

.moa-tour-tip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 2px 22px 0;
  padding: 11px 12px;
  border: 1px solid rgba(10, 111, 120, 0.09);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.82), rgba(255, 255, 255, 0.80));
  color: #49696e;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.moa-tour-tip[hidden] { display: none !important; }

.moa-tour-tip__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 111, 120, 0.09);
  color: var(--moa-deep);
}

.moa-tour-tip__icon svg {
  width: 17px;
  height: 17px;
}

.moa-tour-steps {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 17px 22px 0;
}

.moa-tour-steps button {
  min-width: 0;
  flex: 1 1 0;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.moa-tour-steps button span {
  width: 100%;
  height: 4px;
  display: block;
  border-radius: 999px;
  background: rgba(10, 111, 120, 0.11);
  transition: height .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
}

.moa-tour-steps button:hover span,
.moa-tour-steps button:focus-visible span {
  height: 7px;
  background: rgba(33, 169, 179, 0.44);
  outline: none;
}

.moa-tour-steps button.is-complete span {
  background: rgba(22, 140, 150, 0.48);
}

.moa-tour-steps button.is-active span {
  height: 7px;
  background: linear-gradient(90deg, var(--moa-teal), var(--moa-aqua));
  box-shadow: 0 4px 12px rgba(33, 169, 179, 0.28);
  transform: translateY(-1px);
}

.moa-tour-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px 22px;
}

.moa-tour-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #819194;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.moa-tour-shortcuts span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.moa-tour-shortcuts kbd {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(10, 111, 120, 0.12);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--moa-deep);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(7, 90, 98, 0.06);
}

.moa-tour-actions__buttons {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.moa-tour-btn {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    transform .14s ease,
    background .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    opacity .14s ease;
}

.moa-tour-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.moa-tour-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.moa-tour-btn:focus-visible {
  outline: 3px solid rgba(33, 169, 179, 0.22);
  outline-offset: 2px;
}

.moa-tour-btn:disabled {
  opacity: .34;
  cursor: default;
  transform: none;
}

.moa-tour-btn--primary {
  min-width: 108px;
  color: #ffffff;
  border-color: var(--moa-deep);
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deep));
  box-shadow: 0 11px 24px rgba(10, 111, 120, 0.24);
}

.moa-tour-btn--primary:hover:not(:disabled),
.moa-tour-btn--primary:focus-visible {
  background: linear-gradient(135deg, #2db7c0, var(--moa-deeper));
  box-shadow: 0 14px 30px rgba(10, 111, 120, 0.30);
}

.moa-tour-btn--primary.is-finish {
  background: linear-gradient(135deg, var(--moa-teal), var(--moa-deeper));
}

.moa-tour-btn--secondary {
  color: var(--moa-deep);
  border-color: rgba(10, 111, 120, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.moa-tour-btn--secondary:hover:not(:disabled),
.moa-tour-btn--secondary:focus-visible {
  background: var(--moa-soft);
  border-color: rgba(10, 111, 120, 0.22);
}

.moa-tour-btn--ghost {
  min-width: auto;
  padding-inline: 10px;
  color: #6b8084;
  border-color: transparent;
  background: transparent;
}

.moa-tour-btn--ghost:hover,
.moa-tour-btn--ghost:focus-visible {
  color: var(--moa-deep);
  background: rgba(230, 247, 248, 0.72);
}

.moa-tour-card--welcome {
  background:
    radial-gradient(circle at 85% 12%, rgba(33, 169, 179, 0.20), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.995), rgba(238, 250, 250, 0.985));
}

.moa-tour-card--welcome .moa-tour-content,
.moa-tour-card--finish .moa-tour-content {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  padding-top: 26px;
}

.moa-tour-card--welcome .moa-tour-icon,
.moa-tour-card--finish .moa-tour-icon {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(145deg, var(--moa-aqua), var(--moa-deeper));
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 42px rgba(10, 111, 120, 0.26);
}

.moa-tour-card--welcome .moa-tour-icon svg,
.moa-tour-card--finish .moa-tour-icon svg {
  width: 47px;
  height: 47px;
}

.moa-tour-card--welcome .moa-tour-copy h3,
.moa-tour-card--finish .moa-tour-copy h3 {
  font-size: 26px;
}

.moa-tour-card--finish {
  background:
    radial-gradient(circle at 12% 90%, rgba(201, 239, 241, 0.52), transparent 14rem),
    radial-gradient(circle at 88% 8%, rgba(33, 169, 179, 0.18), transparent 12rem),
    linear-gradient(145deg, #ffffff, #f0fbfb);
}

.moa-tour-active .toolbar-panel,
.moa-tour-active .user-menu {
  pointer-events: none;
}

@media (max-width: 760px) {
  .toolbar__btn--tour { padding-inline: 8px; }

  .moa-tour-card {
    max-height: calc(100vh - 18px);
    border-radius: 22px;
  }

  .moa-tour-card[data-placement]::after { display: none; }

  .moa-tour-card__header {
    padding: 17px 17px 8px;
  }

  .moa-tour-brand__logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
  }

  .moa-tour-progress-row {
    padding-inline: 17px;
  }

  .moa-tour-progress-track {
    margin-inline: 17px;
  }

  .moa-tour-content,
  .moa-tour-card--welcome .moa-tour-content,
  .moa-tour-card--finish .moa-tour-content {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    padding: 18px 17px 12px;
  }

  .moa-tour-icon,
  .moa-tour-card--welcome .moa-tour-icon,
  .moa-tour-card--finish .moa-tour-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .moa-tour-icon svg,
  .moa-tour-card--welcome .moa-tour-icon svg,
  .moa-tour-card--finish .moa-tour-icon svg {
    width: 33px;
    height: 33px;
  }

  .moa-tour-copy h3,
  .moa-tour-card--welcome .moa-tour-copy h3,
  .moa-tour-card--finish .moa-tour-copy h3 {
    font-size: 19px;
  }

  .moa-tour-copy p {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.52;
  }

  .moa-tour-tip {
    margin-inline: 17px;
  }

  .moa-tour-steps {
    padding: 14px 17px 0;
    gap: 3px;
  }

  .moa-tour-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 13px 17px 17px;
  }

  .moa-tour-shortcuts {
    justify-content: center;
    order: 2;
  }

  .moa-tour-actions__buttons {
    width: 100%;
    margin-left: 0;
  }

  .moa-tour-btn {
    flex: 1 1 auto;
  }

  .moa-tour-btn--ghost {
    flex: 0 0 auto;
  }
}

@media (max-width: 440px) {
  .moa-tour-brand__copy small { display: none; }
  .moa-tour-shortcuts span:last-child { display: none; }
  .moa-tour-btn { padding-inline: 10px; }
  .moa-tour-btn--primary { min-width: 92px; }
}

@media (prefers-reduced-motion: reduce) {
  .moa-tour-card,
  .moa-tour-spotlight,
  .moa-tour-spotlight::after,
  .moa-tour-progress-track span,
  .moa-tour-steps button span {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* ===========================
   KPIs view
=========================== */
.kpis-shell, .timeline-shell { padding: 20px 2px 40px; }
.kpis-topbar { margin-bottom: 18px; }
.kpis-topbar h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 2px 0 4px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.kpi-empty {
  grid-column: 1 / -1;
  padding: 48px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kpi-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-color: var(--border-focus); }

.kpi-card__header { display: flex; align-items: center; gap: 10px; }
.kpi-card__name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.kpi-card__sub { font-size: 11.5px; color: var(--text-secondary); }

.kpi-metric { display: flex; flex-direction: column; gap: 6px; }
.kpi-metric__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--text-secondary);
}
.kpi-metric__value { font-weight: 600; color: var(--text-primary); }

.kpi-progress-track {
  width: 100%; height: 7px; border-radius: 20px;
  background: var(--kpi-track-bg); overflow: hidden;
}
.kpi-progress-fill { height: 100%; border-radius: 20px; transition: width 0.25s ease; }
.kpi-progress-fill--done { background: var(--kpi-done-fill); }
.kpi-progress-fill--calidad { background: var(--kpi-calidad-fill); }

/* ===========================
   Timeline / Quality pipeline view
=========================== */
.timeline-legend {
  display: flex; gap: 16px; margin-bottom: 14px;
  font-size: 12px; color: var(--text-secondary);
}
.timeline-legend span { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.timeline-legend__dot--pending { background: var(--border); }
.timeline-legend__dot--active { background: #3b82f6; }
.timeline-legend__dot--done { background: var(--kpi-done-fill); }

.timeline-board { display: flex; flex-direction: column; gap: 10px; }

.timeline-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-row__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.timeline-row__title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }

.timeline-pipeline {
  display: flex; align-items: center; width: 100%;
  overflow-x: auto;
}

.timeline-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 96px; flex-shrink: 0;
  cursor: default;
  padding: 2px 4px;
  border-radius: 8px;
}
.timeline-step[data-set-fase] { cursor: pointer; }
.timeline-step[data-set-fase]:hover { background: var(--bg-hover); }

.timeline-step__dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  background: var(--kpi-track-bg); color: var(--text-secondary);
  border: 2px solid var(--border);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.timeline-step--active .timeline-step__dot {
  background: #dbeafe; color: #1d4ed8; border-color: #93c5fd;
}
.timeline-step--done .timeline-step__dot {
  background: var(--kpi-done-fill); color: #fff; border-color: var(--kpi-done-fill);
}

.timeline-step__label {
  font-size: 10.5px; color: var(--text-secondary); text-align: center;
  white-space: nowrap;
}
.timeline-step--active .timeline-step__label { color: var(--text-primary); font-weight: 600; }
.timeline-step--done .timeline-step__label { color: var(--text-primary); }

.timeline-connector {
  flex: 1; height: 2px; min-width: 24px;
  background: var(--border); margin: 0 -2px 18px;
}
.timeline-connector--done { background: var(--kpi-done-fill); }

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .timeline-step { min-width: 76px; }
}

/* =========================================================
   KPIs por rol — role-based cards
========================================================= */
.kpi-role-board {
  width: 100%;
  display: grid;
  gap: 16px;
}

.kpi-role-board__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(7, 90, 98, 0.08);
}

.kpi-role-board__intro h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.45px;
}

.kpi-role-board__intro p {
  margin-top: 4px;
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.kpi-role-board__pill {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.kpi-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.kpi-role-card {
  min-width: 0;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(7, 90, 98, 0.09);
  overflow: hidden;
}

.kpi-role-card__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.09);
  background: rgba(255, 255, 255, 0.66);
}

.kpi-role-card__header .avatar-initials {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.kpi-role-card__header h4 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.2px;
}

.kpi-role-card__header p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.kpi-role-table-wrap {
  overflow-x: auto;
}

.kpi-role-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.2px;
}

.kpi-role-table th,
.kpi-role-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(10, 111, 120, 0.075);
}

.kpi-role-table th {
  color: var(--moa-deep);
  background: rgba(230, 247, 248, 0.55);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.kpi-role-table td {
  color: var(--text-primary);
  line-height: 1.42;
}

.kpi-role-table td:nth-child(1) {
  width: 58%;
  font-weight: 650;
}

.kpi-role-table td:nth-child(2) {
  width: 42%;
  color: var(--moa-ink);
}

.kpi-role-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1080px) {
  .kpi-role-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .kpi-role-board__intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-role-table {
    min-width: 520px;
  }
}

/* =========================================================
   FIX — KPIs por rol full-width, clean and readable layout
   This fixes the KPI tab when #kpis-grid inherited the old
   auto-fill KPI card grid and compressed the role cards.
========================================================= */
#kpis-grid.kpi-grid,
#kpis-grid {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

#kpis-grid > .kpi-role-board {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.kpi-role-board {
  width: 100% !important;
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.kpi-role-board__intro {
  width: 100%;
  padding: 22px 24px;
  border-radius: 24px;
}

.kpi-role-board__intro h3 {
  font-size: 26px;
}

.kpi-role-board__intro p {
  max-width: 860px;
  font-size: 13.5px;
}

.kpi-role-grid {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 18px;
  align-items: start;
}

.kpi-role-card {
  width: 100%;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
}

.kpi-role-card__header {
  padding: 18px 20px;
}

.kpi-role-card__header h4 {
  font-size: 18px;
  line-height: 1.25;
}

.kpi-role-card__header p {
  max-width: 100%;
  font-size: 12.8px;
}

.kpi-role-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.kpi-role-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.kpi-role-table th,
.kpi-role-table td {
  padding: 11px 13px;
  word-break: normal;
  overflow-wrap: anywhere;
}

.kpi-role-table td:nth-child(1) { width: 58%; }
.kpi-role-table td:nth-child(2) { width: 42%; }

.kpi-role-table td strong {
  color: var(--moa-ink);
}

@media (max-width: 1180px) {
  .kpi-role-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .kpis-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .kpi-role-board__intro {
    padding: 18px;
  }

  .kpi-role-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kpi-role-table {
    min-width: 520px;
  }
}

/* =========================================================
   KPIs compact clean layout — final visual adjustment
   Removes the live-calculation subtitle and makes KPI cards
   lighter, smaller, and easier to scan.
========================================================= */
#view-kpis .kpis-topbar .calendar-subtitle {
  display: none !important;
}

#view-kpis .kpis-shell {
  padding: 16px 2px 32px !important;
}

#view-kpis .kpis-topbar {
  margin-bottom: 12px !important;
}

#view-kpis .kpis-topbar h2 {
  margin-bottom: 0 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

#view-kpis .kpi-role-board {
  max-width: 1280px !important;
  gap: 14px !important;
}

#view-kpis .kpi-role-board__intro {
  padding: 16px 20px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

#view-kpis .kpi-role-board__intro h3 {
  font-size: 22px !important;
  line-height: 1.15 !important;
  margin: 0 0 4px !important;
}

#view-kpis .kpi-role-board__intro p {
  max-width: 760px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

#view-kpis .kpi-role-board__pill {
  min-width: 70px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
}

#view-kpis .kpi-role-grid {
  grid-template-columns: repeat(2, minmax(360px, 1fr)) !important;
  gap: 14px !important;
}

#view-kpis .kpi-role-card {
  border-radius: 18px !important;
  box-shadow: 0 14px 38px rgba(7, 90, 98, 0.08) !important;
}

#view-kpis .kpi-role-card__header {
  padding: 14px 16px !important;
  gap: 12px !important;
}

#view-kpis .kpi-role-card__header .avatar-initials {
  width: 36px !important;
  height: 36px !important;
  font-size: 11px !important;
}

#view-kpis .kpi-role-card__header h4 {
  font-size: 17px !important;
  line-height: 1.2 !important;
  margin: 0 0 2px !important;
}

#view-kpis .kpi-role-card__header p {
  font-size: 12px !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

#view-kpis .kpi-role-table th {
  padding: 9px 12px !important;
  font-size: 11px !important;
}

#view-kpis .kpi-role-table td {
  padding: 9px 12px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  vertical-align: top !important;
}

#view-kpis .kpi-role-table td:nth-child(1) { width: 56% !important; }
#view-kpis .kpi-role-table td:nth-child(2) { width: 44% !important; }

@media (min-width: 1500px) {
  #view-kpis .kpi-role-grid {
    grid-template-columns: repeat(3, minmax(340px, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  #view-kpis .kpi-role-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  #view-kpis .kpi-role-board__intro {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  #view-kpis .kpi-role-table {
    min-width: 440px !important;
  }
}

/* =========================================================
   FINAL KPI REDESIGN — compact, aligned and easier to scan
   This replaces the bulky role-table look with clean KPI rows.
========================================================= */
#view-kpis .kpis-shell {
  padding: 12px 2px 34px !important;
}

#view-kpis .kpis-topbar {
  margin: 12px 0 10px !important;
}

#view-kpis .kpis-topbar h2 {
  font-size: 20px !important;
  letter-spacing: -0.25px !important;
}

#view-kpis #kpis-grid,
#view-kpis #kpis-grid.kpi-grid {
  display: block !important;
  width: 100% !important;
  max-width: 1320px !important;
  margin: 0 auto !important;
}

.kpi-clean-board {
  width: 100%;
  display: grid;
  gap: 12px;
}

.kpi-clean-board__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(7, 90, 98, 0.07);
}

.kpi-clean-board__summary > div:first-child {
  min-width: 0;
}

.kpi-clean-board__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.kpi-clean-board__summary strong {
  display: block;
  color: var(--moa-ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.kpi-clean-board__summary p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.kpi-clean-board__stats {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.kpi-clean-board__stats span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  border: 1px solid rgba(10, 111, 120, 0.08);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.kpi-clean-board__stats b {
  color: var(--moa-ink);
  font-size: 12px;
  font-weight: 950;
}

.kpi-clean-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.kpi-clean-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(10, 111, 120, 0.10);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.83);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 42px rgba(7, 90, 98, 0.08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.kpi-clean-card:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 111, 120, 0.18);
  box-shadow: 0 20px 50px rgba(7, 90, 98, 0.12);
}

.kpi-clean-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.08);
  background: linear-gradient(135deg, rgba(230, 247, 248, 0.72), rgba(255, 255, 255, 0.82));
}

.kpi-clean-card__avatar.avatar-initials {
  width: 32px;
  height: 32px;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(7, 90, 98, 0.14);
}

.kpi-clean-card__title {
  min-width: 0;
}

.kpi-clean-card__title h4 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 14.5px;
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.22px;
}

.kpi-clean-card__title p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 11.2px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kpi-clean-card__badge {
  align-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--moa-deep);
  border: 1px solid rgba(10, 111, 120, 0.11);
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.kpi-clean-list {
  display: grid;
}

.kpi-clean-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(128px, 0.65fr);
  gap: 9px;
  align-items: start;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(10, 111, 120, 0.065);
}

.kpi-clean-row:last-child {
  border-bottom: 0;
}

.kpi-clean-row:hover {
  background: rgba(230, 247, 248, 0.40);
}

.kpi-clean-row__kpi {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--text-primary);
  font-size: 11.9px;
  line-height: 1.32;
  font-weight: 720;
}

.kpi-clean-row__number {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(10, 111, 120, 0.08);
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  flex-shrink: 0;
}

.kpi-clean-row__target {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 11px;
  background: rgba(230, 247, 248, 0.68);
  border: 1px solid rgba(10, 111, 120, 0.07);
}

.kpi-clean-row__target small {
  display: block;
  margin-bottom: 2px;
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi-clean-row__target strong {
  display: block;
  color: var(--moa-ink);
  font-size: 11.6px;
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
}

@media (max-width: 1260px) {
  .kpi-clean-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .kpi-clean-board__summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-clean-board__stats {
    flex-wrap: wrap;
  }

  .kpi-clean-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .kpi-clean-card__header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .kpi-clean-card__badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .kpi-clean-row {
    grid-template-columns: 1fr;
  }
}


/* ========================================================================
   MOA DASHBOARD — PREMIUM VISUAL REFRESH 2026
   A polished operations workspace using the original MOA brand palette.
   This layer intentionally sits last so it can modernize the current UI
   without changing data logic, permissions or dashboard functionality.
======================================================================== */

:root {
  --moa-canvas: #eef8f8;
  --moa-surface: rgba(255, 255, 255, 0.90);
  --moa-surface-solid: #ffffff;
  --moa-line: rgba(7, 90, 98, 0.11);
  --moa-line-strong: rgba(7, 90, 98, 0.20);
  --moa-text: #173f44;
  --moa-muted: #6b8184;
  --moa-glow: rgba(39, 177, 186, 0.20);
  --moa-shadow-soft: 0 12px 35px rgba(7, 75, 81, 0.08);
  --moa-shadow-card: 0 24px 70px rgba(7, 75, 81, 0.12);
  --moa-shadow-float: 0 28px 80px rgba(7, 75, 81, 0.18);
  --moa-radius-xl: 26px;
  --moa-radius-lg: 20px;
  --moa-radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  background:
    radial-gradient(circle at 0% 0%, rgba(33, 169, 179, 0.22) 0 18rem, transparent 18.2rem),
    radial-gradient(circle at 100% 8%, rgba(10, 111, 120, 0.15) 0 21rem, transparent 21.2rem),
    radial-gradient(circle at 75% 100%, rgba(201, 239, 241, 0.50) 0 22rem, transparent 22.2rem),
    linear-gradient(145deg, #eef9f9 0%, #f7fcfc 44%, #edf7f7 100%);
  color: var(--moa-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  opacity: 0.34;
  background-image: radial-gradient(rgba(7, 90, 98, 0.16) 0.65px, transparent 0.65px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

.app {
  width: min(100%, 1920px);
  margin: 0 auto;
  padding: 24px clamp(16px, 2vw, 34px) 64px;
}

.app::before,
.app::after {
  filter: blur(2px);
  opacity: 0.7;
}

/* ── Brand header ─────────────────────────────────────────────────────── */
.page-header {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 24px 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--moa-radius-xl);
  background:
    linear-gradient(115deg, rgba(255,255,255,0.97) 0%, rgba(246,253,253,0.94) 52%, rgba(225,246,247,0.92) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    var(--moa-shadow-card);
  isolation: isolate;
}

.page-header::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -155px;
  top: -210px;
  z-index: -2;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(33, 169, 179, 0.30), rgba(10, 111, 120, 0.08));
}

.page-header::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: 48px;
  top: -51px;
  z-index: -1;
  opacity: 0.055;
  background: url("moa-logo.png") center / contain no-repeat;
  transform: rotate(-7deg);
  pointer-events: none;
}

.page-header__glow {
  position: absolute;
  width: 280px;
  height: 85px;
  right: 16%;
  bottom: -57px;
  z-index: -2;
  border-radius: 50%;
  background: rgba(33, 169, 179, 0.24);
  filter: blur(30px);
  pointer-events: none;
}

.page-header__brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 17px;
}

.page-header__icon--logo {
  width: 70px;
  height: 70px;
  padding: 6px;
  flex: 0 0 70px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 22px;
  background: rgba(255,255,255,0.80);
  box-shadow:
    0 14px 30px rgba(7, 90, 98, 0.18),
    inset 0 0 0 1px rgba(7,90,98,0.05);
}

.page-header__icon--logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 17px;
}

.page-header__copy {
  min-width: 0;
}

.page-header__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 3px;
  color: var(--moa-deep);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.page-header__eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moa-aqua);
  box-shadow: 0 0 0 5px rgba(33,169,179,0.10);
}

.page-header__title {
  margin: 0;
  color: #173a3f;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.75px;
}

.page-header__subtitle {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--moa-muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 550;
}

.page-header__actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.workspace-status {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(7, 90, 98, 0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.70);
  color: var(--moa-deep);
  box-shadow: 0 8px 22px rgba(7,90,98,0.07);
  backdrop-filter: blur(12px);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 0 0 4px rgba(47,191,143,0.12);
}

/* Authenticated user badge and menu */
.user-badge {
  min-height: 48px;
  max-width: 340px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(7, 90, 98, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  color: var(--moa-text);
  box-shadow: 0 10px 28px rgba(7,90,98,0.09);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.user-badge:hover,
.user-badge.is-open {
  transform: translateY(-1px);
  border-color: rgba(7,90,98,0.24);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(7,90,98,0.14);
}

.user-badge__avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(7,90,98,0.18);
  font-size: 11px;
  font-weight: 900;
}

.user-badge__avatar img,
.user-badge__avatar > span {
  width: 100%;
  height: 100%;
}

.user-badge__avatar img {
  display: block;
  object-fit: cover;
}

.user-badge__avatar > span {
  display: grid;
  place-items: center;
}

.user-badge__identity {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.user-badge__identity strong,
.user-badge__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge__identity strong {
  color: var(--moa-text);
  font-size: 12px;
  font-weight: 850;
}

.user-badge__identity small {
  margin-top: 3px;
  color: var(--moa-muted);
  font-size: 10.5px;
  font-weight: 650;
}

.user-badge__role {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}

.user-badge__role--admin {
  background: rgba(10,111,120,0.11);
  color: var(--moa-deep);
}

.user-badge__role--specialist {
  background: rgba(47,191,143,0.12);
  color: #187453;
}

.user-badge__chevron {
  color: var(--moa-muted);
  transition: transform .16s ease;
}

.user-badge.is-open .user-badge__chevron {
  transform: rotate(180deg);
}

.user-menu {
  position: fixed;
  z-index: 3000;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,0.13);
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: var(--moa-shadow-float);
  backdrop-filter: blur(18px);
  animation: moaMenuIn .16s ease both;
}

.user-menu__profile {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(230,247,248,0.82), rgba(255,255,255,0.92));
  border-bottom: 1px solid rgba(7,90,98,0.09);
}

.user-menu__avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(7,90,98,0.18);
  font-size: 11px;
  font-weight: 900;
}

.user-menu__profile > span:last-child {
  min-width: 0;
  display: grid;
}

.user-menu__profile strong,
.user-menu__profile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__profile strong {
  color: var(--moa-text);
  font-size: 13px;
  font-weight: 900;
}

.user-menu__profile small {
  margin-top: 3px;
  color: var(--moa-muted);
  font-size: 11px;
}

.user-menu__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  color: var(--moa-muted);
  font-size: 11px;
  font-weight: 650;
}

.user-menu__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 0 0 4px rgba(47,191,143,0.10);
}

.user-menu__logout {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 7px 7px;
  padding: 10px 11px;
  border-radius: 11px;
  color: #a53232;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  transition: background .12s ease;
}

.user-menu__logout:hover {
  background: #fff1f1;
}

@keyframes moaMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Navigation + commands ────────────────────────────────────────────── */
.tabs-toolbar-row {
  position: sticky;
  top: 12px;
  z-index: 120;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 8px 9px;
  border: 1px solid rgba(7,90,98,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 15px 38px rgba(7,75,81,0.10);
  backdrop-filter: blur(20px) saturate(130%);
}

.tabs {
  flex: 1 1 auto;
  gap: 5px;
  padding: 0;
}

.tab {
  min-height: 38px;
  gap: 7px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #647b7e;
  font-size: 12px;
  font-weight: 700;
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: rgba(7,90,98,0.08);
  background: rgba(230,247,248,0.70);
  color: var(--moa-deep);
}

.tab--active {
  border-color: rgba(7,90,98,0.11);
  background: linear-gradient(145deg, rgba(230,247,248,0.98), rgba(209,241,243,0.82));
  color: var(--moa-deep);
  box-shadow: 0 7px 18px rgba(7,90,98,0.09), inset 0 1px 0 rgba(255,255,255,0.72);
  font-weight: 850;
}

.tab__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(7,90,98,0.06);
  color: currentColor;
  font-size: 0;
}

.tab--active .tab__icon {
  background: rgba(7,90,98,0.10);
}

.tab__icon svg {
  width: 15px;
  height: 15px;
}

.toolbar {
  gap: 5px;
  padding: 0;
}

.toolbar__btn {
  min-height: 36px;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #657d80;
  font-size: 12px;
  font-weight: 700;
  transition: transform .14s ease, color .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.toolbar__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(7,90,98,0.10);
  background: rgba(230,247,248,0.74);
  color: var(--moa-deep);
}

.toolbar__btn.is-active {
  background: linear-gradient(145deg, rgba(230,247,248,0.98), rgba(209,241,243,0.82));
  border-color: rgba(7,90,98,0.14);
  color: var(--moa-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70);
}

.toolbar__btn--tour {
  border-color: rgba(7,90,98,0.08);
  background: rgba(255,255,255,0.66);
}

.toolbar__btn--new {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(6,82,89,0.24);
  border-radius: 11px;
  background: linear-gradient(135deg, #1ba0aa 0%, #0a737c 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(7,90,98,0.23), inset 0 1px 0 rgba(255,255,255,0.22);
  font-weight: 850;
}

.toolbar__btn--new:hover {
  transform: translateY(-1px);
  border-color: rgba(6,82,89,0.30);
  background: linear-gradient(135deg, #27adb6 0%, #075f68 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(7,90,98,0.28), inset 0 1px 0 rgba(255,255,255,0.24);
}

/* Search command bar */
.search-bar {
  padding: 12px 2px 0;
}

.search-bar__inner {
  width: min(660px, 100%);
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 14px;
  border: 1px solid rgba(7,90,98,0.13);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 14px 34px rgba(7,75,81,0.10);
  backdrop-filter: blur(18px);
}

.search-bar__icon {
  color: var(--moa-deep);
}

.search-input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--moa-text);
  box-shadow: none;
  font-size: 13px;
  font-weight: 550;
}

.search-input:focus {
  border: 0;
  box-shadow: none;
}

.search-input::placeholder {
  color: #8da0a2;
}

.search-bar__hint {
  padding: 4px 6px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 6px;
  background: #f3f8f8;
  color: #839598;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .05em;
}

/* ── Main content cards ───────────────────────────────────────────────── */
.content-area {
  padding: 13px 0 44px;
}

.table-wrapper {
  min-height: 58vh;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(7,90,98,0.11);
  border-radius: 22px;
  background: rgba(255,255,255,0.90);
  box-shadow: var(--moa-shadow-card);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
  scrollbar-color: rgba(10,111,120,0.72) rgba(223,243,244,0.80);
}

.table-wrapper::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
}

.table-wrapper::-webkit-scrollbar-track {
  margin: 4px;
  border-radius: 999px;
  background: rgba(223,243,244,0.82) !important;
  box-shadow: none;
}

.table-wrapper::-webkit-scrollbar-thumb {
  border: 3px solid rgba(223,243,244,0.86) !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #249ea7, #0a6f78) !important;
  box-shadow: none;
}

.notion-table {
  min-width: 1500px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--moa-text);
}

.notion-table thead th {
  height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(7,90,98,0.11);
  background: linear-gradient(180deg, rgba(242,251,251,0.98), rgba(234,247,248,0.96));
  color: #587276;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: none;
}

.notion-table thead th:hover {
  background: #e3f4f5;
  color: var(--moa-deep);
}

.notion-table thead th:first-child,
.notion-table tbody td:first-child {
  background: rgba(255,255,255,0.98);
}

.notion-table thead th:first-child {
  background: #eaf7f7;
}

.notion-table tbody tr {
  border: 0;
  background: transparent;
}

.notion-table tbody td {
  min-height: 54px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(7,90,98,0.075);
  background: rgba(255,255,255,0.64);
  color: var(--moa-text);
  transition: background .12s ease, box-shadow .12s ease;
}

.notion-table tbody tr:last-child td {
  border-bottom: 0;
}

.notion-table tbody tr:hover,
.notion-table tbody tr:hover td,
.notion-table tbody tr:hover td:first-child {
  background: rgba(230,247,248,0.82);
}

.notion-table tbody tr:hover td:first-child {
  box-shadow: 8px 0 18px -16px rgba(7,90,98,0.40);
}

.th-inner {
  gap: 7px;
}

.th-icon {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(7,90,98,0.07);
  color: var(--moa-deep);
  opacity: 1;
  font-size: 10px;
}

.task-title {
  color: #183b40;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.08px;
}

.task-title-wrap {
  gap: 6px;
}

.text-truncate {
  color: #334f53;
  line-height: 1.48;
}

.editable-cell:hover {
  border-color: rgba(7,90,98,0.12);
  background: rgba(237,249,249,0.96) !important;
  box-shadow: inset 0 0 0 1px rgba(7,90,98,0.07);
}

.editable-cell.editing {
  border-color: rgba(7,90,98,0.26);
  border-radius: 10px;
  background: #fff !important;
  box-shadow: 0 18px 50px rgba(7,75,81,0.18), inset 0 0 0 1px rgba(7,90,98,0.12);
}

.cell-empty {
  min-height: 24px;
}

/* Badges: pill-like, cleaner and more tactile */
.badge,
.status-pill,
.avatar-chip,
.rounds-badge {
  border: 1px solid rgba(7,90,98,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34);
}

.badge {
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
}

.status-pill {
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
}

.status-dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.45);
}

.avatar-chip {
  min-height: 28px;
  padding: 2px 9px 2px 3px;
  border-color: rgba(7,90,98,0.09);
  background: rgba(248,251,251,0.96);
  box-shadow: 0 4px 10px rgba(7,90,98,0.05);
  font-size: 10.5px;
  font-weight: 700;
}

.avatar-initials {
  width: 22px;
  height: 22px;
  box-shadow: 0 4px 9px rgba(0,0,0,0.10);
  font-size: 9px;
  font-weight: 850;
}

.date-range {
  color: #627b7e;
  font-size: 11px;
  font-weight: 600;
}

.subitem-row td {
  background: rgba(248,252,252,0.88);
}

.subitem-toggle,
.subitem-mini-add {
  border-radius: 8px;
}

.subitem-count {
  box-shadow: inset 0 0 0 1px rgba(7,90,98,0.06);
}

/* States */
.loading-state,
.error-state {
  min-height: 260px;
  flex-direction: column;
  gap: 12px;
  color: var(--moa-muted);
  font-weight: 650;
}

.spinner {
  width: 27px;
  height: 27px;
  border: 3px solid rgba(7,90,98,0.12);
  border-top-color: var(--moa-teal);
  box-shadow: 0 0 0 8px rgba(33,169,179,0.06);
}

.error-state span {
  max-width: 560px;
  padding: 14px 16px;
  border: 1px solid rgba(153,27,27,0.10);
  border-radius: 14px;
  background: #fff5f5;
  color: #8f3636;
  text-align: center;
}

/* ── Panels, forms and specialty views ────────────────────────────────── */
.toolbar-panel {
  right: 2px;
  top: 12px;
  border-color: rgba(7,90,98,0.13);
  border-radius: 20px;
  box-shadow: var(--moa-shadow-float);
}

.toolbar-panel__header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #e9f8f8, #ffffff);
}

.toolbar-panel__body {
  padding: 16px 18px 18px;
}

.filter-section,
.filter-summary,
.sort-direction,
.toolbar-field select,
.toolbar-field input {
  border-color: rgba(7,90,98,0.10);
}

.calendar-shell,
.kpis-shell,
.timeline-shell {
  padding-top: 0;
}

.calendar-topbar,
.kpis-topbar {
  padding: 20px 22px;
  border: 1px solid rgba(7,90,98,0.11);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(230,247,248,0.86));
  box-shadow: var(--moa-shadow-soft);
}

.calendar-main-card,
.calendar-sidebar,
.calendar-lanes-card,
.kpi-clean-card,
.timeline-row {
  border-color: rgba(7,90,98,0.10);
  background: rgba(255,255,255,0.90);
  box-shadow: var(--moa-shadow-soft);
}

.calendar-main-card,
.calendar-sidebar,
.calendar-lanes-card {
  border-radius: 20px;
}

.calendar-day {
  background: rgba(255,255,255,0.76);
}

.calendar-day:hover {
  background: rgba(239,249,249,0.94);
}

.calendar-card,
.deadline-card,
.lane-chip {
  box-shadow: 0 4px 12px rgba(7,90,98,0.05);
}

.calendar-card:hover,
.deadline-card:hover,
.lane-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(7,90,98,0.13);
}

.kpi-clean-board__summary,
.timeline-legend {
  border-color: rgba(7,90,98,0.10);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--moa-shadow-soft);
}

.kpi-clean-card {
  border-radius: 19px;
}

.timeline-board {
  gap: 13px;
}

.timeline-row {
  border-radius: 18px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.timeline-row:hover {
  transform: translateY(-2px);
  border-color: rgba(7,90,98,0.18);
  box-shadow: 0 19px 45px rgba(7,90,98,0.12);
}

.submit-hero-shell {
  padding-top: 4px;
}

.submit-form-card.submit-form-card--moa {
  border-color: rgba(7,90,98,0.12);
  box-shadow: 0 30px 80px rgba(7,75,81,0.16);
}

.submit-brand-header {
  background:
    radial-gradient(circle at 88% 10%, rgba(255,255,255,0.17) 0 5rem, transparent 5.2rem),
    linear-gradient(128deg, #0a737c, #168c96 62%, #1da0aa);
}

/* Modern focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(33,169,179,0.24);
  outline-offset: 2px;
}

.toast {
  bottom: 24px;
  right: 24px;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 13px;
  background: rgba(18,65,70,0.96);
  box-shadow: 0 18px 45px rgba(7,50,55,0.25);
  backdrop-filter: blur(16px);
  font-weight: 700;
}

/* ── Responsive refinement ────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .page-header {
    align-items: flex-start;
  }

  .page-header__actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .workspace-status {
    min-height: 32px;
  }

  .tabs-toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    width: 100%;
  }

  .toolbar {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 12px 10px 44px;
  }

  .page-header {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-radius: 21px;
  }

  .page-header::after {
    width: 180px;
    height: 180px;
    right: -28px;
    top: -36px;
  }

  .page-header__icon--logo {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 18px;
  }

  .page-header__icon--logo img {
    border-radius: 14px;
  }

  .page-header__title {
    font-size: 25px;
  }

  .page-header__subtitle {
    font-size: 12px;
  }

  .page-header__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: row;
  }

  .workspace-status {
    display: none;
  }

  .user-badge {
    width: 100%;
    max-width: none;
  }

  .tabs-toolbar-row {
    top: 7px;
    gap: 8px;
    margin-top: 10px;
    padding: 7px;
    border-radius: 15px;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
  }

  .toolbar {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 1px;
  }

  .toolbar__btn {
    flex: 0 0 auto;
  }

  .toolbar__btn--new {
    margin-left: auto;
  }

  .search-bar__inner {
    width: 100%;
  }

  .content-area {
    padding-top: 10px;
  }

  .table-wrapper {
    border-radius: 18px;
  }

  .calendar-topbar,
  .kpis-topbar {
    padding: 17px;
    border-radius: 18px;
  }

  .user-badge__role {
    display: none;
  }
}

@media (max-width: 480px) {
  .page-header__brand {
    align-items: flex-start;
  }

  .page-header__eyebrow {
    font-size: 9px;
  }

  .page-header__title {
    font-size: 22px;
  }

  .page-header__subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .toolbar__btn--icon:not(.toolbar__btn--tour) {
    padding-inline: 9px;
  }

  .toolbar__btn--tour {
    font-size: 0;
  }

  .toolbar__btn--tour svg {
    margin: 0;
  }

  .search-bar__hint {
    display: none;
  }

  .search-bar__inner {
    grid-template-columns: auto minmax(0,1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   FIX — Comments column wraps inside its cell
   Prevents long comments and unbroken strings from expanding
   horizontally across Deadline columns.
========================================================= */
.notion-table td[data-key="Comments"] {
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  vertical-align: top;
}

.notion-table td[data-key="Comments"] .text-truncate,
.notion-table--backlog td[data-key="Comments"] .text-truncate {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: pre-wrap !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
  line-height: 1.45;
}

.notion-table td[data-key="Comments"].editing {
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
}

.notion-table td[data-key="Comments"] .inline-editor,
.notion-table td[data-key="Comments"] .inline-editor--text,
.notion-table td[data-key="Comments"] textarea.inline-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.notion-table td[data-key="Comments"] textarea.inline-input {
  min-height: 110px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  resize: vertical;
}

@media (max-width: 768px) {
  .notion-table td[data-key="Comments"],
  .notion-table td[data-key="Comments"].editing {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }
}

/* ========================================================================
   MOA KPI + TIMELINE EXPERIENCE — PREMIUM REDESIGN
   Final visual layer for the two operational views. It preserves all
   permissions and data behavior while giving both areas a richer hierarchy.
======================================================================== */

#view-kpis,
#view-timeline {
  min-height: calc(100vh - 230px);
}

#view-kpis .kpis-shell,
#view-timeline .timeline-shell {
  padding: 0 0 54px !important;
}

/* ── Shared KPI / Timeline hero ────────────────────────────────────────── */
.view-hero {
  position: relative;
  isolation: isolate;
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.98) 0%, rgba(242,251,251,0.96) 53%, rgba(219,244,246,0.92) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.92) inset,
    0 26px 72px rgba(7, 75, 81, 0.12);
  animation: moaViewRise .42s ease both;
}

.view-hero::before {
  content: "";
  position: absolute;
  z-index: -3;
  width: 430px;
  height: 430px;
  right: -140px;
  top: -235px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(33,169,179,0.32), rgba(10,111,120,0.06));
}

.view-hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: 225px;
  height: 225px;
  right: 76px;
  bottom: -102px;
  opacity: .075;
  background: url("moa-logo.png") center / contain no-repeat;
  transform: rotate(-8deg);
  pointer-events: none;
}

.view-hero--timeline {
  background:
    linear-gradient(120deg, rgba(255,255,255,0.98) 0%, rgba(239,250,250,0.96) 48%, rgba(210,240,242,0.94) 100%);
}

.view-hero--timeline::before {
  right: -90px;
  top: -265px;
  width: 500px;
  height: 500px;
  background: linear-gradient(145deg, rgba(10,111,120,0.28), rgba(33,169,179,0.05));
}

.view-hero__texture {
  position: absolute;
  inset: 0;
  z-index: -4;
  opacity: .38;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0 62%, rgba(255,255,255,.52) 62% 63%, transparent 63%),
    radial-gradient(rgba(7,90,98,.15) .65px, transparent .65px);
  background-size: auto, 17px 17px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,.75), transparent 92%);
}

.view-hero__content {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.view-hero__icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.84);
  border-radius: 23px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(224,246,247,0.90));
  color: var(--moa-deep);
  box-shadow:
    0 16px 34px rgba(7,90,98,0.16),
    inset 0 0 0 1px rgba(7,90,98,0.045);
}

.view-hero__icon svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 10px rgba(7,90,98,0.10));
}

.view-hero__copy {
  min-width: 0;
}

.view-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--moa-deep);
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.view-hero__eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moa-aqua);
  box-shadow: 0 0 0 5px rgba(33,169,179,0.11);
}

.view-hero__copy h2 {
  margin: 0;
  color: #153f44;
  font-size: clamp(26px, 2.2vw, 35px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.75px;
}

.view-hero__copy > p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: #6b8285;
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 550;
}

.view-hero__metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  gap: 10px;
}

.view-hero__metric {
  min-width: 126px;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  box-shadow:
    0 12px 30px rgba(7,90,98,0.08),
    inset 0 1px 0 rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
}

.view-hero__metric-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 8px 17px rgba(7,90,98,0.20);
  font-size: 11px;
  font-weight: 950;
}

.view-hero__metric > div {
  min-width: 0;
  display: grid;
}

.view-hero__metric strong {
  color: var(--moa-ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.45px;
}

.view-hero__metric small {
  margin-top: 5px;
  color: var(--moa-muted);
  font-size: 10.5px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
}

/* ── KPI studio ────────────────────────────────────────────────────────── */
#view-kpis #kpis-grid,
#view-kpis #kpis-grid.kpi-grid {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.kpi-studio {
  width: 100%;
  display: grid;
  gap: 16px;
}

.kpi-studio__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 19px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 15px 38px rgba(7,75,81,0.08);
  backdrop-filter: blur(16px);
  animation: moaViewRise .44s .05s ease both;
}

.kpi-studio__intro-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 13px;
}

.kpi-studio__intro-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(230,247,248,.96), rgba(201,239,241,.80));
  color: var(--moa-deep);
  box-shadow: inset 0 0 0 1px rgba(7,90,98,.07);
}

.kpi-studio__intro-icon svg {
  width: 29px;
  height: 29px;
}

.kpi-studio__kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--moa-deep);
  font-size: 9.8px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.kpi-studio__intro h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.2px;
}

.kpi-studio__intro p {
  margin: 4px 0 0;
  max-width: 720px;
  color: var(--moa-muted);
  font-size: 12px;
  line-height: 1.45;
}

.kpi-studio__legend {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kpi-studio__legend > span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(7,90,98,0.09);
  border-radius: 999px;
  background: #fff;
  color: #6d8386;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.kpi-studio__legend b {
  color: var(--moa-ink);
  font-weight: 900;
}

.kpi-studio__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kpi-studio__legend-dot--kpi {
  background: var(--moa-teal);
  box-shadow: 0 0 0 4px rgba(22,140,150,.10);
}

.kpi-studio__legend-dot--target {
  background: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33,169,179,.10);
}

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

.kpi-premium-card {
  --role-accent: #0a6f78;
  --role-accent-2: #21a9b3;
  --role-soft: rgba(230,247,248,.78);
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,0.11);
  border-radius: 23px;
  background: rgba(255,255,255,0.91);
  box-shadow: 0 19px 52px rgba(7,75,81,0.10);
  backdrop-filter: blur(18px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: moaViewRise .46s ease both;
}

.kpi-premium-card:nth-child(2) { animation-delay: .035s; }
.kpi-premium-card:nth-child(3) { animation-delay: .07s; }
.kpi-premium-card:nth-child(4) { animation-delay: .105s; }
.kpi-premium-card:nth-child(5) { animation-delay: .14s; }
.kpi-premium-card:nth-child(6) { animation-delay: .175s; }

.kpi-premium-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--role-accent-2), var(--role-accent));
}

.kpi-premium-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 185px;
  height: 185px;
  right: -88px;
  top: -95px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--role-accent-2) 18%, transparent), transparent 67%);
  pointer-events: none;
}

.kpi-premium-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--role-accent) 28%, transparent);
  box-shadow: 0 27px 68px rgba(7,75,81,0.15);
}

.kpi-premium-card--evaluation { --role-accent:#0a6f78; --role-accent-2:#23a9b3; --role-soft:rgba(226,247,248,.83); }
.kpi-premium-card--school     { --role-accent:#176f78; --role-accent-2:#53b6ad; --role-soft:rgba(229,247,244,.86); }
.kpi-premium-card--quality    { --role-accent:#087b82; --role-accent-2:#2fbf8f; --role-soft:rgba(228,248,240,.86); }
.kpi-premium-card--pedagogy   { --role-accent:#146b82; --role-accent-2:#40a7bd; --role-soft:rgba(229,244,249,.86); }
.kpi-premium-card--materials  { --role-accent:#2b7076; --role-accent-2:#70b6a8; --role-soft:rgba(235,247,243,.88); }
.kpi-premium-card--academy    { --role-accent:#075a62; --role-accent-2:#168c96; --role-soft:rgba(226,244,246,.88); }

.kpi-premium-card__header {
  position: relative;
  z-index: 1;
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 17px 15px 20px;
  border-bottom: 1px solid rgba(7,90,98,0.075);
  background: linear-gradient(135deg, var(--role-soft), rgba(255,255,255,.90));
}

.kpi-premium-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--role-accent-2), var(--role-accent));
  color: #fff;
  box-shadow: 0 11px 23px color-mix(in srgb, var(--role-accent) 24%, transparent);
}

.kpi-premium-card__icon svg {
  width: 30px;
  height: 30px;
}

.kpi-premium-card__identity {
  min-width: 0;
}

.kpi-premium-card__identity > span {
  display: block;
  margin-bottom: 3px;
  color: var(--role-accent);
  font-size: 9.5px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.kpi-premium-card__identity h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 16.5px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -.28px;
}

.kpi-premium-card__count {
  min-width: 54px;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(7,90,98,0.09);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.kpi-premium-card__count strong {
  color: var(--role-accent);
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
}

.kpi-premium-card__count span {
  margin-top: 4px;
  color: #7a8f91;
  font-size: 8.8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .075em;
}

.kpi-premium-card__focus {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 17px 12px 20px;
  border-bottom: 1px solid rgba(7,90,98,0.065);
  background: rgba(249,253,253,.84);
}

.kpi-premium-card__focus > span {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--role-soft);
  color: var(--role-accent);
  font-size: 8.8px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi-premium-card__focus p {
  margin: 1px 0 0;
  color: #627b7e;
  font-size: 11.3px;
  line-height: 1.42;
  font-weight: 600;
}

.kpi-premium-card__list {
  position: relative;
  z-index: 1;
  display: grid;
}

.kpi-premium-item {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 10px;
  padding: 13px 16px 13px 20px;
  border-bottom: 1px solid rgba(7,90,98,0.065);
  transition: background .14s ease;
}

.kpi-premium-item:hover {
  background: color-mix(in srgb, var(--role-soft) 48%, #fff);
}

.kpi-premium-item__number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--role-soft);
  color: var(--role-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--role-accent) 10%, transparent);
  font-size: 9px;
  font-weight: 950;
}

.kpi-premium-item__body {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.kpi-premium-item__body > strong {
  color: #2f4c50;
  font-size: 12px;
  line-height: 1.38;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.kpi-premium-item__target {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 10%, transparent);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--role-soft), rgba(255,255,255,.84));
}

.kpi-premium-item__target > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  color: var(--role-accent);
}

.kpi-premium-item__target svg {
  width: 17px;
  height: 17px;
}

.kpi-premium-item__target small {
  display: block;
  margin-bottom: 2px;
  color: var(--role-accent);
  font-size: 8.5px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.kpi-premium-item__target p {
  margin: 0;
  color: var(--moa-ink);
  font-size: 11.3px;
  line-height: 1.35;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.kpi-premium-card__footer {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 10px 20px;
  background: rgba(248,252,252,.82);
  color: #7a8f91;
  font-size: 9.4px;
  font-weight: 800;
}

.kpi-premium-card__footer > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.kpi-premium-card__footer i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--role-accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--role-accent-2) 12%, transparent);
}

.kpi-premium-card__footer strong {
  color: var(--role-accent);
  font-size: 9.2px;
  font-weight: 950;
  letter-spacing: .08em;
}

/* ── Timeline overview ─────────────────────────────────────────────────── */
.timeline-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
  animation: moaViewRise .44s .05s ease both;
}

.timeline-stage-card {
  --stage-accent: #0a6f78;
  --stage-soft: rgba(230,247,248,.82);
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 13px 32px rgba(7,75,81,.075);
  backdrop-filter: blur(14px);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.timeline-stage-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -46px;
  top: -46px;
  border-radius: 50%;
  background: var(--stage-soft);
  pointer-events: none;
}

.timeline-stage-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--stage-accent) 24%, transparent);
  box-shadow: 0 18px 42px rgba(7,75,81,.11);
}

.timeline-stage-card--1 { --stage-accent:#0a6f78; --stage-soft:rgba(224,244,246,.82); }
.timeline-stage-card--2 { --stage-accent:#168c96; --stage-soft:rgba(224,247,248,.84); }
.timeline-stage-card--3 { --stage-accent:#2c8791; --stage-soft:rgba(230,245,247,.86); }
.timeline-stage-card--4 { --stage-accent:#397f87; --stage-soft:rgba(230,242,244,.88); }
.timeline-stage-card--5 { --stage-accent:#248b6c; --stage-soft:rgba(226,247,239,.88); }

.timeline-stage-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.timeline-stage-card__icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--stage-soft), rgba(255,255,255,.92));
  color: var(--stage-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage-accent) 10%, transparent);
}

.timeline-stage-card__icon svg {
  width: 23px;
  height: 23px;
}

.timeline-stage-card__count {
  position: relative;
  z-index: 1;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--stage-accent);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--stage-accent) 24%, transparent);
  font-size: 13px;
  font-weight: 950;
}

.timeline-stage-card__eyebrow {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 3px;
  color: var(--stage-accent);
  font-size: 8.8px;
  font-weight: 950;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.timeline-stage-card > strong {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 34px;
  color: var(--moa-ink);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
}

.timeline-stage-card__bar {
  position: relative;
  z-index: 1;
  height: 6px;
  margin: 10px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7,90,98,.08);
}

.timeline-stage-card__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--stage-accent), color-mix(in srgb, var(--stage-accent) 55%, #6dd1d7));
  box-shadow: 0 0 12px color-mix(in srgb, var(--stage-accent) 20%, transparent);
}

.timeline-stage-card > small {
  position: relative;
  z-index: 1;
  color: #7a8f91;
  font-size: 9.5px;
  font-weight: 750;
}

/* Timeline legend as a floating explanation bar */
#view-timeline .timeline-legend {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid rgba(7,90,98,0.09);
  border-radius: 15px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 12px 30px rgba(7,75,81,.065);
  backdrop-filter: blur(14px);
}

#view-timeline .timeline-legend > span:not(.timeline-legend__hint) {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f7fbfb;
  color: #617a7d;
  font-size: 10.5px;
  font-weight: 750;
}

.timeline-legend__hint {
  margin-left: auto;
  color: #7e9295;
  font-size: 10.5px;
  font-weight: 650;
}

#view-timeline .timeline-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(7,90,98,.06);
}

#view-timeline .timeline-legend__dot--pending { background: #cbd8d9; }
#view-timeline .timeline-legend__dot--active { background: var(--moa-aqua); }
#view-timeline .timeline-legend__dot--done { background: #2fbf8f; }

/* ── Timeline project cards ────────────────────────────────────────────── */
#view-timeline .timeline-board {
  display: grid;
  gap: 15px;
}

.timeline-project-card {
  --timeline-card-accent: #0a6f78;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,.11);
  border-radius: 23px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 20px 54px rgba(7,75,81,.10);
  backdrop-filter: blur(18px);
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease;
  animation: moaViewRise .46s ease both;
}

.timeline-project-card:nth-child(2) { animation-delay: .035s; }
.timeline-project-card:nth-child(3) { animation-delay: .07s; }
.timeline-project-card:nth-child(4) { animation-delay: .105s; }
.timeline-project-card:nth-child(5) { animation-delay: .14s; }

.timeline-project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--moa-aqua), var(--timeline-card-accent));
}

.timeline-project-card--stage-1 { --timeline-card-accent:#0a6f78; }
.timeline-project-card--stage-2 { --timeline-card-accent:#168c96; }
.timeline-project-card--stage-3 { --timeline-card-accent:#2c8791; }
.timeline-project-card--stage-4 { --timeline-card-accent:#397f87; }
.timeline-project-card--stage-5 { --timeline-card-accent:#248b6c; }

.timeline-project-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--timeline-card-accent) 24%, transparent);
  box-shadow: 0 28px 70px rgba(7,75,81,.15);
}

.timeline-project-card__header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) auto minmax(220px, .9fr);
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 15px 17px 15px 21px;
  border-bottom: 1px solid rgba(7,90,98,.075);
  background:
    linear-gradient(135deg, rgba(237,249,250,.82), rgba(255,255,255,.92));
}

.timeline-project-card__header::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -72px;
  top: -90px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--timeline-card-accent) 8%, transparent);
  pointer-events: none;
}

.timeline-project-card__identity {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 11px;
}

.timeline-project-card__number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--timeline-card-accent));
  color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--timeline-card-accent) 24%, transparent);
  font-size: 11px;
  font-weight: 950;
}

.timeline-project-card__identity > div {
  min-width: 0;
}

.timeline-project-card__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--timeline-card-accent);
  font-size: 8.8px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.timeline-project-card__identity h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moa-ink);
  font-size: 15.5px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.22px;
}

.timeline-project-card__tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-project-card__tags .badge {
  margin: 0;
}

.timeline-project-card__people {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.timeline-project-card__people .avatar-chip {
  max-width: 190px;
}

.timeline-project-card__unassigned {
  padding: 6px 9px;
  border: 1px dashed rgba(7,90,98,.14);
  border-radius: 999px;
  color: #829597;
  font-size: 10px;
  font-weight: 700;
}

.timeline-project-card__body {
  padding: 16px 18px 19px 21px;
}

.timeline-project-card__status {
  display: grid;
  grid-template-columns: minmax(250px,1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 13px;
}

.timeline-project-card__phase {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
}

.timeline-project-card__phase-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(230,247,248,.96), rgba(209,241,243,.84));
  color: var(--timeline-card-accent);
  box-shadow: inset 0 0 0 1px rgba(7,90,98,.07);
}

.timeline-project-card__phase-icon svg {
  width: 24px;
  height: 24px;
}

.timeline-project-card__phase small,
.timeline-project-card__metrics small {
  display: block;
  margin-bottom: 3px;
  color: #819497;
  font-size: 8.6px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.timeline-project-card__phase strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moa-ink);
  font-size: 12.5px;
  line-height: 1.25;
  font-weight: 900;
}

.timeline-project-card__metrics {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.timeline-project-card__metrics > div {
  min-width: 92px;
  min-height: 49px;
  display: grid;
  align-content: center;
  padding: 7px 9px;
  border: 1px solid rgba(7,90,98,.08);
  border-radius: 13px;
  background: #f8fcfc;
}

.timeline-project-card__metrics strong {
  color: var(--moa-ink);
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.timeline-project-card__metrics .status-pill {
  width: fit-content;
  min-height: 22px;
  padding: 2px 7px;
  font-size: 9.5px;
}

.timeline-project-progress {
  height: 7px;
  margin-bottom: 17px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7,90,98,.075);
  box-shadow: inset 0 1px 2px rgba(7,90,98,.06);
}

.timeline-project-progress > span {
  display: block;
  width: var(--timeline-project-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--timeline-card-accent), var(--moa-aqua));
  box-shadow: 0 0 14px rgba(33,169,179,.22);
  transition: width .32s ease;
}

#view-timeline .timeline-pipeline {
  width: 100%;
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 1px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(10,111,120,.55) rgba(230,247,248,.66);
}

#view-timeline .timeline-pipeline::-webkit-scrollbar {
  height: 8px;
}

#view-timeline .timeline-pipeline::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(230,247,248,.66);
}

#view-timeline .timeline-pipeline::-webkit-scrollbar-thumb {
  border: 2px solid rgba(230,247,248,.72);
  border-radius: 999px;
  background: rgba(10,111,120,.65);
}

#view-timeline .timeline-step {
  appearance: none;
  min-width: 112px;
  flex: 0 0 112px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 3px 5px 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #7b8e91;
  font-family: var(--font);
  text-align: center;
  cursor: default;
  transition: background .14s ease, transform .14s ease, color .14s ease;
}

#view-timeline button.timeline-step {
  cursor: pointer;
}

#view-timeline .timeline-step--editable:hover {
  transform: translateY(-2px);
  background: rgba(230,247,248,.66);
  color: var(--moa-deep);
}

#view-timeline .timeline-step--locked {
  opacity: .76;
}

#view-timeline .timeline-step__dot {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #d9e3e4;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fbfb, #eef4f4);
  color: #849698;
  box-shadow: 0 8px 18px rgba(7,75,81,.06);
}

#view-timeline .timeline-step__dot svg {
  width: 25px;
  height: 25px;
}

#view-timeline .timeline-step__dot b {
  position: absolute;
  right: -5px;
  top: -6px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #cbd8d9;
  color: #fff;
  box-shadow: 0 4px 10px rgba(7,75,81,.10);
  font-size: 8px;
  font-weight: 950;
}

#view-timeline .timeline-step--active .timeline-step__dot {
  border-color: rgba(33,169,179,.44);
  background: linear-gradient(145deg, #e7f8f8, #d4f0f2);
  color: var(--moa-deep);
  box-shadow:
    0 0 0 6px rgba(33,169,179,.08),
    0 11px 24px rgba(7,90,98,.12);
}

#view-timeline .timeline-step--active .timeline-step__dot b {
  background: var(--moa-deep);
}

#view-timeline .timeline-step--done .timeline-step__dot {
  border-color: #2fbf8f;
  background: linear-gradient(145deg, #3bc698, #23936f);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47,191,143,.22);
}

#view-timeline .timeline-step--done .timeline-step__dot b {
  background: #24795e;
}

#view-timeline .timeline-step__label {
  margin-top: 5px;
  color: #5f7679;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
}

#view-timeline .timeline-step > small {
  color: #94a4a6;
  font-size: 8.5px;
  line-height: 1.1;
  font-weight: 700;
}

#view-timeline .timeline-step--active .timeline-step__label,
#view-timeline .timeline-step--done .timeline-step__label {
  color: var(--moa-ink);
  font-weight: 900;
}

#view-timeline .timeline-step--active > small {
  color: var(--moa-deep);
  font-weight: 850;
}

#view-timeline .timeline-step--done > small {
  color: #24795e;
  font-weight: 850;
}

#view-timeline .timeline-connector {
  position: relative;
  min-width: 28px;
  flex: 1 1 44px;
  height: 3px;
  margin: 26px -2px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe5e6;
}

#view-timeline .timeline-connector i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fbf8f, var(--moa-aqua));
}

#view-timeline .timeline-connector--done {
  background: linear-gradient(90deg, #2fbf8f, var(--moa-aqua));
  box-shadow: 0 0 10px rgba(47,191,143,.16);
}

.timeline-empty-state {
  min-height: 270px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 32px;
  border: 1px dashed rgba(7,90,98,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  color: #71878a;
  text-align: center;
}

.timeline-empty-state > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--moa-soft);
  color: var(--moa-deep);
}

.timeline-empty-state svg {
  width: 34px;
  height: 34px;
}

.timeline-empty-state strong {
  color: var(--moa-ink);
  font-size: 16px;
  font-weight: 900;
}

.timeline-empty-state p {
  max-width: 480px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

@keyframes moaViewRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive KPI / Timeline ─────────────────────────────────────────── */
@media (min-width: 1640px) {
  .kpi-studio__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .view-hero {
    grid-template-columns: 1fr;
  }

  .view-hero__metrics {
    width: min(100%, 360px);
  }

  .timeline-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timeline-project-card__header {
    grid-template-columns: minmax(260px, 1fr) auto;
  }

  .timeline-project-card__people {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .timeline-project-card__status {
    grid-template-columns: 1fr;
  }

  .timeline-project-card__metrics {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .kpi-studio__grid {
    grid-template-columns: 1fr;
  }

  .kpi-studio__intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-studio__legend {
    justify-content: flex-start;
  }

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

@media (max-width: 700px) {
  .view-hero {
    min-height: auto;
    gap: 20px;
    padding: 20px;
    border-radius: 21px;
  }

  .view-hero__content {
    grid-template-columns: 1fr;
  }

  .view-hero__icon {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  .view-hero__icon svg {
    width: 39px;
    height: 39px;
  }

  .view-hero__copy h2 {
    font-size: 25px;
  }

  .view-hero__metrics {
    width: 100%;
  }

  .view-hero__metric {
    min-width: 0;
  }

  .kpi-premium-card__header {
    grid-template-columns: auto minmax(0,1fr);
  }

  .kpi-premium-card__count {
    grid-column: 1 / -1;
    width: fit-content;
    min-width: 62px;
    min-height: 38px;
    grid-auto-flow: column;
    gap: 5px;
    padding: 7px 10px;
  }

  .kpi-premium-card__count span {
    margin-top: 0;
  }

  .timeline-project-card__header {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .timeline-project-card__tags,
  .timeline-project-card__people {
    justify-content: flex-start;
  }

  .timeline-project-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .timeline-project-card__metrics > div {
    min-width: 0;
  }

  .timeline-legend__hint {
    width: 100%;
    margin-left: 0;
    padding: 3px 6px;
  }
}

@media (max-width: 520px) {
  .view-hero__metrics {
    grid-template-columns: 1fr 1fr;
  }

  .view-hero__metric {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .kpi-studio__intro-main {
    grid-template-columns: 1fr;
  }

  .kpi-premium-card__focus,
  .kpi-premium-item {
    padding-left: 16px;
  }

  .timeline-overview {
    grid-template-columns: 1fr;
  }

  .timeline-project-card__body,
  .timeline-project-card__header {
    padding-left: 17px;
  }

  .timeline-project-card__metrics {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOA CALENDAR STUDIO — premium operational calendar
   Clear daily workload, monthly milestones and team lanes
========================================================= */
#view-calendar {
  min-height: calc(100vh - 230px);
}

#view-calendar .calendar-shell {
  width: 100%;
  padding: 0 0 58px;
}

.view-hero--calendar {
  grid-template-columns: minmax(0, 1fr) auto;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.99) 0%, rgba(239,250,250,0.97) 48%, rgba(207,239,241,0.95) 100%);
}

.view-hero--calendar::before {
  width: 520px;
  height: 520px;
  right: -175px;
  top: -300px;
  background: linear-gradient(145deg, rgba(33,169,179,0.34), rgba(10,111,120,0.06));
}

.view-hero--calendar::after {
  right: 110px;
  bottom: -118px;
  width: 245px;
  height: 245px;
  opacity: .068;
}

.view-hero--calendar .view-hero__metrics {
  grid-template-columns: repeat(3, minmax(112px, 1fr));
}

.view-hero--calendar .view-hero__metric {
  min-width: 112px;
}

.calendar-commandbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.80);
  box-shadow: 0 16px 42px rgba(7,75,81,0.08), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
}

.calendar-commandbar__navigation {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-commandbar__hint {
  min-width: 0;
  margin-left: 7px;
  color: #71888b;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-calendar .calendar-btn,
#view-calendar .calendar-icon-btn,
#view-calendar .calendar-filter select {
  min-height: 40px;
  border: 1px solid rgba(7,90,98,0.13);
  border-radius: 12px;
  background: rgba(255,255,255,0.94);
  color: var(--moa-ink);
  box-shadow: 0 7px 18px rgba(7,75,81,0.055);
}

#view-calendar .calendar-icon-btn {
  width: 40px;
  padding: 0;
}

#view-calendar .calendar-icon-btn svg {
  width: 20px;
  height: 20px;
}

#view-calendar .calendar-btn--today {
  min-width: 72px;
  padding-inline: 16px;
  border-color: rgba(10,111,120,.22);
  background: linear-gradient(135deg, var(--moa-teal), var(--moa-deep));
  color: #fff;
  box-shadow: 0 10px 22px rgba(10,111,120,.18);
}

#view-calendar .calendar-btn--today:hover {
  background: linear-gradient(135deg, var(--moa-aqua), var(--moa-deeper));
  color: #fff;
}

#view-calendar .calendar-icon-btn:hover,
#view-calendar .calendar-filter select:hover {
  border-color: rgba(10,111,120,.24);
  background: var(--moa-soft);
}

#view-calendar .calendar-filter {
  min-width: 245px;
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--moa-deep);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

#view-calendar .calendar-filter select {
  min-width: 0;
  padding: 0 34px 0 13px;
  font-size: 12.5px;
  font-weight: 760;
  text-transform: none;
  letter-spacing: normal;
}

.calendar-focus-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 22px;
  background:
    radial-gradient(circle at 96% 10%, rgba(33,169,179,.13) 0 8rem, transparent 8.2rem),
    linear-gradient(128deg, rgba(255,255,255,.94), rgba(237,249,249,.91));
  box-shadow: 0 20px 52px rgba(7,75,81,0.09), inset 0 1px 0 rgba(255,255,255,.94);
}

.calendar-focus-card::after {
  content: "";
  position: absolute;
  right: 26px;
  top: -36px;
  width: 118px;
  height: 118px;
  opacity: .045;
  background: url("moa-logo.png") center / contain no-repeat;
  pointer-events: none;
}

.calendar-focus-card__head {
  position: relative;
  z-index: 1;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 17px;
  border-bottom: 1px solid rgba(7,90,98,.075);
}

.calendar-focus-card__title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-focus-card__icon,
.calendar-section-heading__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(10,111,120,.11);
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, var(--moa-soft));
  color: var(--moa-deep);
  box-shadow: 0 8px 20px rgba(7,90,98,.09);
}

.calendar-focus-card__icon svg,
.calendar-section-heading__icon svg {
  width: 23px;
  height: 23px;
}

.calendar-focus-card__title-wrap p {
  margin: 0 0 2px;
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.calendar-focus-card__title-wrap h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.28px;
}

.calendar-focus-card__count {
  flex-shrink: 0;
  padding: 7px 11px;
  border: 1px solid rgba(10,111,120,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--moa-deep);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day-agenda {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 9px;
  padding: 12px;
}

.calendar-agenda-item {
  --agenda-status: var(--notstarted-text);
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 4px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 0;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,.09);
  border-radius: 15px;
  background: rgba(255,255,255,.90);
  color: var(--text-primary);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(7,75,81,.055);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.calendar-agenda-item:hover {
  transform: translateY(-2px);
  border-color: rgba(10,111,120,.20);
  box-shadow: 0 16px 32px rgba(7,75,81,.11);
}

.calendar-agenda-item--inprogress { --agenda-status: var(--inprogress-text); }
.calendar-agenda-item--standby { --agenda-status: var(--standby-text); }
.calendar-agenda-item--blocked { --agenda-status: var(--blocked-text); }
.calendar-agenda-item--done { --agenda-status: var(--done-text); }
.calendar-agenda-item--delayeddone { --agenda-status: var(--delayeddone-text); }

.calendar-agenda-item__marker {
  align-self: stretch;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--agenda-status);
}

.calendar-agenda-item__time {
  min-width: 68px;
  padding: 5px 7px;
  border-radius: 9px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 900;
  text-align: center;
}

.calendar-agenda-item__content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.calendar-agenda-item__content strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #244c51;
  font-size: 12.5px;
  font-weight: 850;
}

.calendar-agenda-item__content small {
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 650;
}

.calendar-agenda-item__arrow,
.deadline-card__arrow {
  color: rgba(10,111,120,.45);
  font-size: 22px;
  font-weight: 500;
}

.calendar-focus-empty {
  grid-column: 1 / -1;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  color: var(--text-secondary);
  text-align: left;
}

.calendar-focus-empty > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(22,140,150,.10);
  color: var(--moa-deep);
  font-size: 17px;
  font-weight: 900;
}

.calendar-focus-empty strong {
  display: block;
  color: var(--moa-ink);
  font-size: 12.5px;
  font-weight: 850;
}

.calendar-focus-empty p {
  margin: 2px 0 0;
  font-size: 11.5px;
}

.calendar-status-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 0 2px 13px;
  padding: 0 2px;
  color: #708486;
  font-size: 10.5px;
  font-weight: 700;
}

.calendar-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--notstarted-text);
  box-shadow: 0 0 0 3px rgba(120,119,116,.10);
}

.calendar-status-dot--inprogress { background: var(--inprogress-text); box-shadow: 0 0 0 3px rgba(29,78,216,.10); }
.calendar-status-dot--standby { background: var(--standby-text); box-shadow: 0 0 0 3px rgba(133,77,14,.10); }
.calendar-status-dot--blocked { background: var(--blocked-text); box-shadow: 0 0 0 3px rgba(153,27,27,.10); }
.calendar-status-dot--done { background: var(--done-text); box-shadow: 0 0 0 3px rgba(22,101,52,.10); }

#view-calendar .calendar-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 15px;
  margin-top: 0;
}

#view-calendar .calendar-main-card,
#view-calendar .calendar-sidebar,
#view-calendar .calendar-lanes-card {
  border: 1px solid rgba(7,90,98,.10);
  border-radius: 23px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 24px 62px rgba(7,75,81,.10), inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
}

#view-calendar .calendar-main-card {
  overflow-x: auto;
  overflow-y: hidden;
}

#view-calendar .calendar-main-card__head,
#view-calendar .calendar-sidebar__head,
#view-calendar .calendar-lanes-card__head {
  min-height: 72px;
  padding: 13px 15px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,250,250,.78));
  border-bottom-color: rgba(7,90,98,.085);
}

.calendar-section-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.calendar-section-heading__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.calendar-section-heading__icon svg {
  width: 21px;
  height: 21px;
}

#view-calendar .calendar-section-heading strong {
  display: block;
  color: var(--moa-ink);
  font-size: 13.5px;
  font-weight: 900;
}

#view-calendar .calendar-section-heading span:not(.calendar-section-heading__icon) {
  display: block;
  max-width: 620px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10.8px;
  line-height: 1.35;
}

#view-calendar .calendar-pill {
  flex-shrink: 0;
  padding: 6px 9px;
  border: 1px solid rgba(10,111,120,.09);
  background: rgba(230,247,248,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

#view-calendar .calendar-pill--subtle {
  background: rgba(255,255,255,.72);
}

#view-calendar .calendar-board {
  min-width: 875px;
  background: rgba(249,253,253,.84);
}

#view-calendar .calendar-weekdays,
#view-calendar .calendar-days {
  grid-template-columns: repeat(7, minmax(125px, 1fr));
}

#view-calendar .calendar-weekdays {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(228,246,247,.96), rgba(239,250,250,.94));
  border-bottom-color: rgba(7,90,98,.10);
}

#view-calendar .calendar-weekdays div {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  color: #24535a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .10em;
  border-right-color: rgba(7,90,98,.075);
}

#view-calendar .calendar-day {
  position: relative;
  min-height: 156px;
  max-height: none;
  padding: 9px;
  border-right-color: rgba(7,90,98,.07);
  border-bottom-color: rgba(7,90,98,.07);
  background: rgba(255,255,255,.88);
  cursor: pointer;
  transition: background .14s ease, box-shadow .14s ease, transform .14s ease;
}

#view-calendar .calendar-day:hover {
  z-index: 1;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(10,111,120,.15), 0 10px 25px rgba(7,75,81,.07);
}

#view-calendar .calendar-day--outside {
  background: rgba(244,248,248,.62);
}

#view-calendar .calendar-day--outside .calendar-card {
  opacity: .68;
}

#view-calendar .calendar-day--today {
  background: linear-gradient(180deg, rgba(226,247,248,.94), rgba(255,255,255,.92));
  box-shadow: inset 0 0 0 2px rgba(33,169,179,.26);
}

#view-calendar .calendar-day--selected {
  z-index: 1;
  background: linear-gradient(180deg, rgba(219,244,246,.98), rgba(247,253,253,.98));
  box-shadow: inset 0 0 0 2px var(--moa-teal), 0 8px 22px rgba(7,90,98,.10);
}

#view-calendar .calendar-day__head {
  min-height: 27px;
  margin-bottom: 7px;
}

#view-calendar .calendar-day__head > span {
  width: 27px;
  height: 27px;
  color: #31585d;
  font-size: 11.5px;
  font-weight: 900;
}

#view-calendar .calendar-day--today .calendar-day__head > span,
#view-calendar .calendar-day--selected .calendar-day__head > span {
  background: linear-gradient(145deg, var(--moa-teal), var(--moa-deep));
  color: #fff;
  box-shadow: 0 6px 14px rgba(10,111,120,.20);
}

.calendar-day__head-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calendar-day__head-meta b {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(10,111,120,.075);
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 950;
}

#view-calendar .calendar-day__head-meta strong {
  color: var(--moa-deep);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#view-calendar .calendar-day__items {
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: visible;
  padding: 0;
}

#view-calendar .calendar-card {
  --calendar-status: var(--notstarted-text);
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 7px 7px 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,.09);
  border-left: 3px solid var(--calendar-status);
  border-radius: 11px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 12px rgba(7,75,81,.045);
}

#view-calendar .calendar-card--inprogress { --calendar-status: var(--inprogress-text); }
#view-calendar .calendar-card--standby { --calendar-status: var(--standby-text); }
#view-calendar .calendar-card--blocked { --calendar-status: var(--blocked-text); }
#view-calendar .calendar-card--done { --calendar-status: var(--done-text); }
#view-calendar .calendar-card--delayeddone { --calendar-status: var(--delayeddone-text); }

#view-calendar .calendar-card--workflow {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(230,247,248,.73));
}

#view-calendar .calendar-card:hover {
  transform: translateY(-1px);
  border-color: rgba(10,111,120,.20);
  border-left-color: var(--calendar-status);
  box-shadow: 0 11px 23px rgba(7,75,81,.10);
}

.calendar-card__topline,
.calendar-card__footer,
.deadline-card__topline,
.deadline-card__footer,
.lane-chip__meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.calendar-card__topline b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 8.5px;
  line-height: 1.25;
  font-weight: 950;
}

.calendar-card__status {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--calendar-status);
}

#view-calendar .calendar-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  color: #284d52;
  font-size: 10.5px;
  line-height: 1.22;
  font-weight: 850;
}

.calendar-card__footer small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 8.5px;
  font-weight: 700;
}

.calendar-people {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.calendar-person {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  margin-left: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #21a9b3, #0a6f78);
  color: #fff;
  box-shadow: 0 3px 8px rgba(7,75,81,.12);
  font-size: 7.5px;
  font-weight: 950;
}

.calendar-person:first-child { margin-left: 0; }
.calendar-person--1 { background: linear-gradient(145deg, #6477e8, #4f46c8); }
.calendar-person--2 { background: linear-gradient(145deg, #e79b2d, #c47700); }
.calendar-person--3 { background: linear-gradient(145deg, #e45d89, #b83263); }
.calendar-person--more { background: #e7f3f4; color: var(--moa-deep); }

#view-calendar .calendar-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 7px;
  border: 1px dashed rgba(10,111,120,.18);
  border-radius: 9px;
  background: rgba(230,247,248,.58);
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 900;
}

#view-calendar .calendar-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: hidden;
}

#view-calendar .calendar-deadlines-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  padding: 10px;
  overflow-y: auto;
}

#view-calendar .deadline-card {
  --deadline-status: var(--notstarted-text);
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 4px 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 8px 9px 0;
  overflow: hidden;
  border: 1px solid rgba(7,90,98,.09);
  border-left: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 20px rgba(7,75,81,.055);
}

#view-calendar .deadline-card--inprogress { --deadline-status: var(--inprogress-text); }
#view-calendar .deadline-card--standby { --deadline-status: var(--standby-text); }
#view-calendar .deadline-card--blocked { --deadline-status: var(--blocked-text); }
#view-calendar .deadline-card--done { --deadline-status: var(--done-text); }
#view-calendar .deadline-card--delayeddone { --deadline-status: var(--delayeddone-text); }

.deadline-card__rail {
  align-self: stretch;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--deadline-status);
}

#view-calendar .deadline-card:hover {
  transform: translateY(-2px);
  border-color: rgba(10,111,120,.18);
  box-shadow: 0 14px 30px rgba(7,75,81,.10);
}

#view-calendar .deadline-card__date {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  min-height: 46px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moa-soft), #fff);
}

#view-calendar .deadline-card__date strong {
  color: var(--moa-deep);
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

#view-calendar .deadline-card__date span {
  width: auto;
  margin-top: 2px;
  padding: 0;
  background: transparent;
  color: #688184;
  font-size: 8.5px;
  font-weight: 900;
  text-transform: uppercase;
}

#view-calendar .deadline-card__body {
  min-width: 0;
}

.deadline-card__topline > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moa-deep);
  font-size: 8.5px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.deadline-card__urgency {
  flex-shrink: 0;
  padding: 3px 5px;
  border-radius: 999px;
  background: #eef4f4;
  color: #64797c;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.deadline-card__urgency--overdue { background: #fee9e9; color: #a32828; }
.deadline-card__urgency--today { background: #fff0dd; color: #9a5700; }
.deadline-card__urgency--soon { background: #e7f0ff; color: #245bb4; }
.deadline-card__urgency--done { background: #e2f5e8; color: #21713e; }

#view-calendar .deadline-card__body > strong {
  margin-top: 4px;
  -webkit-line-clamp: 2;
  color: #284d52;
  font-size: 11.5px;
  line-height: 1.22;
}

.deadline-card__footer {
  margin-top: 6px;
}

.deadline-card__footer small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 8.8px;
  font-weight: 700;
}

#view-calendar .calendar-lanes-card {
  margin-top: 15px;
  overflow: hidden;
}

#view-calendar .calendar-specialist-lanes {
  display: grid;
}

#view-calendar .specialist-lane {
  min-width: 0;
  display: grid;
  grid-template-columns: 300px minmax(0,1fr);
  gap: 14px;
  padding: 13px 15px;
  border-bottom-color: rgba(7,90,98,.075);
  transition: background .14s ease;
}

#view-calendar .specialist-lane:hover {
  background: rgba(230,247,248,.33);
}

#view-calendar .specialist-lane__person {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 10px;
}

.specialist-lane__avatar {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,.92);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 9px 19px rgba(7,90,98,.16);
  font-size: 10px;
  font-weight: 950;
}

.specialist-lane__avatar--1 { background: linear-gradient(145deg, #6579e8, #5046c7); }
.specialist-lane__avatar--2 { background: linear-gradient(145deg, #e9a235, #be7100); }
.specialist-lane__avatar--3 { background: linear-gradient(145deg, #dc638b, #ad315f); }

.specialist-lane__identity {
  min-width: 0;
}

#view-calendar .specialist-lane__identity strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moa-ink);
  font-size: 12.5px;
  font-weight: 900;
}

#view-calendar .specialist-lane__identity em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 650;
}

.specialist-lane__count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  grid-column: 3;
  border-radius: 10px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 950;
}

.specialist-lane__meter {
  grid-column: 2;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10,111,120,.08);
}

.specialist-lane__meter i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moa-aqua), var(--moa-deep));
}

#view-calendar .specialist-lane__items {
  gap: 8px;
  padding: 3px 2px 5px;
  scrollbar-width: thin;
}

#view-calendar .lane-chip {
  --lane-status: var(--notstarted-text);
  flex: 0 0 205px;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid rgba(7,90,98,.09);
  border-left: 3px solid var(--lane-status);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 14px rgba(7,75,81,.045);
}

#view-calendar .lane-chip--inprogress { --lane-status: var(--inprogress-text); }
#view-calendar .lane-chip--standby { --lane-status: var(--standby-text); }
#view-calendar .lane-chip--blocked { --lane-status: var(--blocked-text); }
#view-calendar .lane-chip--done { --lane-status: var(--done-text); }
#view-calendar .lane-chip--delayeddone { --lane-status: var(--delayeddone-text); }

#view-calendar .lane-chip--workflow {
  background: linear-gradient(135deg, #fff, rgba(230,247,248,.66));
}

#view-calendar .lane-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(10,111,120,.18);
  border-left-color: var(--lane-status);
}

#view-calendar .lane-chip__date {
  color: var(--moa-deep);
  font-size: 9px;
  font-weight: 950;
}

#view-calendar .lane-chip strong {
  color: #284d52;
  font-size: 10.8px;
}

.lane-chip__meta {
  justify-content: flex-start;
  color: var(--text-secondary);
}

.lane-chip__meta em,
.lane-chip__meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
}

.lane-chip__meta i {
  width: 4px;
  height: 4px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lane-status);
}

#view-calendar .lane-empty {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px dashed rgba(10,111,120,.16);
  border-radius: 11px;
  background: rgba(230,247,248,.38);
}

#view-calendar .lane-more {
  flex-shrink: 0;
  align-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 900;
}

#view-calendar .calendar-empty-state--deadlines {
  padding: 32px 16px;
}

@media (max-width: 1240px) {
  .view-hero--calendar .view-hero__metrics {
    grid-template-columns: repeat(3, minmax(98px, 1fr));
  }

  #view-calendar .calendar-layout {
    grid-template-columns: 1fr;
  }

  #view-calendar .calendar-sidebar {
    position: static;
    max-height: none;
  }

  #view-calendar .calendar-deadlines-list {
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-height: 430px;
  }
}

@media (max-width: 980px) {
  .view-hero--calendar {
    grid-template-columns: 1fr;
  }

  .view-hero--calendar .view-hero__metrics {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .calendar-commandbar {
    align-items: stretch;
    flex-direction: column;
  }

  #view-calendar .calendar-filter {
    width: 100%;
    grid-template-columns: auto minmax(0,1fr);
  }

  #view-calendar .specialist-lane {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  #view-calendar .calendar-shell {
    padding-bottom: 42px;
  }

  .view-hero--calendar .view-hero__metrics {
    grid-template-columns: 1fr;
  }

  .calendar-commandbar__navigation {
    flex-wrap: wrap;
  }

  .calendar-commandbar__hint {
    width: 100%;
    margin: 3px 0 0;
    white-space: normal;
  }

  #view-calendar .calendar-filter {
    grid-template-columns: 1fr;
  }

  .calendar-focus-card__head,
  #view-calendar .calendar-main-card__head,
  #view-calendar .calendar-lanes-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-day-agenda,
  #view-calendar .calendar-deadlines-list {
    grid-template-columns: 1fr;
  }

  .calendar-status-legend {
    padding: 8px 10px;
    border: 1px solid rgba(7,90,98,.08);
    border-radius: 13px;
    background: rgba(255,255,255,.62);
  }

  #view-calendar .calendar-board {
    min-width: 805px;
  }

  #view-calendar .calendar-weekdays,
  #view-calendar .calendar-days {
    grid-template-columns: repeat(7, minmax(115px, 1fr));
  }

  #view-calendar .calendar-day {
    min-height: 150px;
  }

  #view-calendar .specialist-lane__person {
    grid-template-columns: auto minmax(0,1fr) auto;
  }
}

@media (max-width: 480px) {
  .calendar-focus-card__count {
    align-self: flex-start;
  }

  .calendar-agenda-item {
    grid-template-columns: 4px auto minmax(0,1fr) auto;
  }

  .calendar-agenda-item > .calendar-people {
    display: none;
  }

  .calendar-agenda-item__arrow {
    grid-column: 4;
  }
}

/* =========================================================
   Product Tour synchronization fix
   Keeps the dialog and spotlight hidden while the target view
   is re-rendering, scrolling or expanding, then fades both into
   their freshly calculated positions.
========================================================= */
.moa-tour-card {
  transition:
    top .24s cubic-bezier(.2, .8, .2, 1),
    left .24s cubic-bezier(.2, .8, .2, 1),
    width .2s ease,
    opacity .16s ease,
    transform .18s cubic-bezier(.2, .8, .2, 1);
  transform-origin: center;
}

.moa-tour-root.is-transitioning .moa-tour-card {
  opacity: 0;
  transform: translateY(8px) scale(.985);
  pointer-events: none;
}

.moa-tour-root:not(.is-transitioning) .moa-tour-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.moa-tour-root.is-transitioning .moa-tour-spotlight {
  opacity: 0;
}

.moa-tour-root.is-transitioning .moa-tour-veil {
  opacity: 1;
}

.moa-tour-root[aria-busy="true"] .moa-tour-actions__buttons,
.moa-tour-root[aria-busy="true"] .moa-tour-steps {
  pointer-events: none;
}

.moa-tour-root[aria-busy="true"] .moa-tour-progress-track span {
  filter: saturate(.8);
}

.moa-tour-btn:disabled,
.moa-tour-steps button:disabled {
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .moa-tour-card,
  .moa-tour-spotlight,
  .moa-tour-spotlight::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   Product Tour collision-safe adaptive layout
   The guide becomes compact only when the selected target does
   not leave enough free space. The dialog is always kept outside
   the highlighted area and may use its own scroll in tight cases.
========================================================= */
.moa-tour-card[data-placement="bottom"]::after,
.moa-tour-card[data-placement="top"]::after {
  left: calc(var(--tour-arrow-x, 52px) - 8px);
}

.moa-tour-card[data-placement="right"]::after,
.moa-tour-card[data-placement="left"]::after {
  top: calc(var(--tour-arrow-y, 50px) - 8px);
}

.moa-tour-card--compact {
  border-radius: 23px;
}

.moa-tour-card--compact .moa-tour-card__glow {
  width: 180px;
  height: 180px;
  right: -78px;
  top: -88px;
}

.moa-tour-card--compact .moa-tour-card__header {
  padding: 14px 17px 6px;
}

.moa-tour-card--compact .moa-tour-brand {
  gap: 9px;
}

.moa-tour-card--compact .moa-tour-brand__logo {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  padding: 3px;
  border-radius: 11px;
}

.moa-tour-card--compact .moa-tour-brand__logo img {
  border-radius: 8px;
}

.moa-tour-card--compact .moa-tour-brand__copy small {
  font-size: 8.5px;
}

.moa-tour-card--compact .moa-tour-brand__copy strong {
  margin-top: 2px;
  font-size: 12px;
}

.moa-tour-card--compact .moa-tour-close {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 19px;
}

.moa-tour-card--compact .moa-tour-progress-row {
  padding: 5px 17px 6px;
}

.moa-tour-card--compact .moa-tour-progress-track {
  height: 4px;
  margin-inline: 17px;
}

.moa-tour-card--compact .moa-tour-content,
.moa-tour-card--compact.moa-tour-card--welcome .moa-tour-content,
.moa-tour-card--compact.moa-tour-card--finish .moa-tour-content {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 14px 17px 9px;
}

.moa-tour-card--compact .moa-tour-icon,
.moa-tour-card--compact.moa-tour-card--welcome .moa-tour-icon,
.moa-tour-card--compact.moa-tour-card--finish .moa-tour-icon {
  width: 52px;
  height: 52px;
  border-radius: 17px;
}

.moa-tour-card--compact .moa-tour-icon svg,
.moa-tour-card--compact.moa-tour-card--welcome .moa-tour-icon svg,
.moa-tour-card--compact.moa-tour-card--finish .moa-tour-icon svg {
  width: 30px;
  height: 30px;
}

.moa-tour-card--compact .moa-tour-copy h3,
.moa-tour-card--compact.moa-tour-card--welcome .moa-tour-copy h3,
.moa-tour-card--compact.moa-tour-card--finish .moa-tour-copy h3 {
  font-size: 18px;
  line-height: 1.12;
}

.moa-tour-card--compact .moa-tour-copy p {
  margin-top: 6px;
  font-size: 11.7px;
  line-height: 1.46;
}

.moa-tour-card--compact .moa-tour-tip {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  margin: 0 17px;
  padding: 8px 10px;
  border-radius: 13px;
  font-size: 10.7px;
  line-height: 1.35;
}

.moa-tour-card--compact .moa-tour-tip__icon {
  width: 24px;
  height: 24px;
}

.moa-tour-card--compact .moa-tour-tip__icon svg {
  width: 15px;
  height: 15px;
}

.moa-tour-card--compact .moa-tour-steps {
  gap: 3px;
  padding: 9px 17px 0;
}

.moa-tour-card--compact .moa-tour-steps button {
  height: 12px;
}

.moa-tour-card--compact .moa-tour-steps button span {
  height: 3px;
}

.moa-tour-card--compact .moa-tour-steps button.is-active span,
.moa-tour-card--compact .moa-tour-steps button:hover span,
.moa-tour-card--compact .moa-tour-steps button:focus-visible span {
  height: 5px;
}

.moa-tour-card--compact .moa-tour-actions {
  gap: 9px;
  padding: 9px 17px 14px;
}

.moa-tour-card--compact .moa-tour-shortcuts {
  display: none;
}

.moa-tour-card--compact .moa-tour-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 10.8px;
}

.moa-tour-card--compact .moa-tour-btn--primary {
  min-width: 98px;
}

.moa-tour-card--tight {
  border-radius: 20px;
}

.moa-tour-card--tight .moa-tour-card__header {
  padding: 10px 14px 4px;
}

.moa-tour-card--tight .moa-tour-brand__logo {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.moa-tour-card--tight .moa-tour-brand__copy small {
  display: none;
}

.moa-tour-card--tight .moa-tour-brand__copy strong {
  margin-top: 0;
  font-size: 11.5px;
}

.moa-tour-card--tight .moa-tour-close {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 17px;
}

.moa-tour-card--tight .moa-tour-progress-row {
  padding: 3px 14px 4px;
}

.moa-tour-card--tight .moa-tour-progress-track {
  margin-inline: 14px;
}

.moa-tour-card--tight .moa-tour-content,
.moa-tour-card--tight.moa-tour-card--welcome .moa-tour-content,
.moa-tour-card--tight.moa-tour-card--finish .moa-tour-content {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px 7px;
}

.moa-tour-card--tight .moa-tour-icon,
.moa-tour-card--tight.moa-tour-card--welcome .moa-tour-icon,
.moa-tour-card--tight.moa-tour-card--finish .moa-tour-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.moa-tour-card--tight .moa-tour-icon svg,
.moa-tour-card--tight.moa-tour-card--welcome .moa-tour-icon svg,
.moa-tour-card--tight.moa-tour-card--finish .moa-tour-icon svg {
  width: 25px;
  height: 25px;
}

.moa-tour-card--tight .moa-tour-copy h3,
.moa-tour-card--tight.moa-tour-card--welcome .moa-tour-copy h3,
.moa-tour-card--tight.moa-tour-card--finish .moa-tour-copy h3 {
  font-size: 16.5px;
}

.moa-tour-card--tight .moa-tour-copy p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
}

.moa-tour-card--tight .moa-tour-tip {
  display: none !important;
}

.moa-tour-card--tight .moa-tour-steps {
  padding: 7px 14px 0;
}

.moa-tour-card--tight .moa-tour-actions {
  padding: 7px 14px 10px;
}

.moa-tour-card--tight .moa-tour-btn {
  min-height: 31px;
  padding: 6px 9px;
  font-size: 10.3px;
}

.moa-tour-card--tight .moa-tour-btn svg {
  width: 14px;
  height: 14px;
}

.moa-tour-card--constrained {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  box-shadow:
    0 26px 80px rgba(1, 34, 38, 0.40),
    0 8px 28px rgba(7, 90, 98, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.moa-tour-card--constrained .moa-tour-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(247,253,253,0), rgba(247,253,253,.98) 22%);
  padding-top: 13px;
}

@media (max-width: 760px) {
  .moa-tour-card--compact .moa-tour-actions,
  .moa-tour-card--tight .moa-tour-actions {
    flex-direction: row;
    align-items: center;
  }

  .moa-tour-card--compact .moa-tour-actions__buttons,
  .moa-tour-card--tight .moa-tour-actions__buttons {
    width: 100%;
  }

  .moa-tour-card--compact .moa-tour-btn,
  .moa-tour-card--tight .moa-tour-btn {
    flex: 1 1 auto;
  }

  .moa-tour-card--compact .moa-tour-btn--ghost,
  .moa-tour-card--tight .moa-tour-btn--ghost {
    flex: 0 0 auto;
  }
}

/* ========================================================================
   MOA SUBMIT TASK STUDIO — PREMIUM FINAL LAYER
   Visual-only redesign. All existing IDs, names and submit behavior remain.
======================================================================== */
#view-submit {
  min-height: calc(100vh - 230px);
}

.submit-studio {
  padding: 0 0 58px;
}

.view-hero--submit {
  margin-bottom: 18px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.985) 0%, rgba(239,250,250,0.97) 50%, rgba(207,239,241,0.95) 100%);
}

.view-hero--submit::before {
  width: 510px;
  height: 510px;
  right: -110px;
  top: -285px;
  background: linear-gradient(145deg, rgba(33,169,179,0.34), rgba(10,111,120,0.05));
}

.view-hero--submit::after {
  right: 56px;
  bottom: -112px;
  width: 245px;
  height: 245px;
  opacity: .065;
}

.view-hero__icon--submit {
  color: #08747d;
}

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

.submit-main-card,
.submit-side-card,
.submit-side-note {
  border: 1px solid rgba(7,90,98,0.10);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 24px 68px rgba(7,75,81,0.11);
  backdrop-filter: blur(18px);
}

.submit-main-card {
  min-width: 0;
  overflow: visible;
  border-radius: 24px;
}

.submit-main-card__head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  border-bottom: 1px solid rgba(7,90,98,0.09);
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(33,169,179,0.15), transparent 10rem),
    linear-gradient(135deg, rgba(248,253,253,0.98), rgba(231,247,248,0.88));
}

.submit-main-card__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.submit-main-card__title-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--moa-deep);
  box-shadow: 0 10px 22px rgba(7,90,98,0.10);
}

.submit-main-card__title-icon svg {
  width: 24px;
  height: 24px;
}

.submit-main-card__title p,
.submit-side-card__eyebrow {
  margin: 0 0 3px;
  color: var(--moa-teal);
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.submit-main-card__title h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.25px;
}

.submit-main-card__status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(7,90,98,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  color: #527276;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.submit-main-card__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moa-aqua);
  box-shadow: 0 0 0 4px rgba(33,169,179,0.11);
}

.moa-task-form--studio {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.submit-section {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(7,90,98,0.085);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,252,252,0.94));
  box-shadow: 0 8px 24px rgba(7,90,98,0.045);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.submit-section:focus-within {
  border-color: rgba(33,169,179,0.30);
  box-shadow: 0 15px 38px rgba(7,90,98,0.09), inset 0 0 0 1px rgba(33,169,179,0.07);
}

.submit-section__head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(7,90,98,0.075);
}

.submit-section__head--with-badge {
  grid-template-columns: auto minmax(0,1fr) auto;
}

.submit-section__number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #daf2f3, #eefafa);
  color: var(--moa-deep);
  box-shadow: inset 0 0 0 1px rgba(7,90,98,0.08);
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: .05em;
}

.submit-section__head h4 {
  margin: 0;
  color: #173f44;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -.12px;
}

.submit-section__head p {
  margin: 4px 0 0;
  color: #789093;
  font-size: 11.5px;
  line-height: 1.42;
  font-weight: 550;
}

.submit-optional-badge {
  padding: 5px 9px;
  border: 1px solid rgba(7,90,98,0.09);
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.moa-task-form--studio .form-group {
  min-width: 0;
  margin: 0;
}

.moa-task-form--studio .form-row {
  gap: 13px;
}

.moa-task-form--studio .form-group label {
  min-height: 20px;
  margin: 0 0 7px;
  color: #234d52;
  font-size: 11px;
  font-weight: 850;
}

.field-required {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(33,169,179,0.09);
  color: var(--moa-deep);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.moa-task-form--studio .form-group input,
.moa-task-form--studio .form-group select,
.moa-task-form--studio .form-group textarea,
.moa-task-form--studio .people-picker__trigger {
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(7,90,98,0.13);
  border-radius: 13px;
  background: rgba(255,255,255,0.96);
  color: #234348;
  box-shadow: 0 5px 15px rgba(7,90,98,0.035), inset 0 1px 0 rgba(255,255,255,0.92);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
}

.moa-task-form--studio .form-group input:hover,
.moa-task-form--studio .form-group select:hover,
.moa-task-form--studio .form-group textarea:hover,
.moa-task-form--studio .people-picker__trigger:hover {
  border-color: rgba(7,90,98,0.22);
  background: #fff;
}

.moa-task-form--studio .form-group input:focus,
.moa-task-form--studio .form-group select:focus,
.moa-task-form--studio .form-group textarea:focus,
.moa-task-form--studio .people-picker__trigger:focus {
  border-color: var(--moa-aqua);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(33,169,179,0.11), 0 12px 26px rgba(7,90,98,0.07);
}

.moa-task-form--studio .form-group textarea {
  min-height: 138px;
  padding: 13px 14px;
  line-height: 1.6;
  resize: vertical;
}

.moa-task-form--studio input::placeholder,
.moa-task-form--studio textarea::placeholder {
  color: #9aabad;
  font-weight: 500;
}

.field-shell {
  position: relative;
}

.field-shell__icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 13px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #6c898d;
  transform: translateY(-50%);
  pointer-events: none;
}

.field-shell__icon svg {
  width: 18px;
  height: 18px;
}

.field-shell--title input {
  padding-left: 42px !important;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: #8a9da0;
  font-size: 10.5px;
  line-height: 1.42;
  font-weight: 550;
}

.moa-task-form--studio .people-picker__trigger {
  text-align: left;
}

.moa-task-form--studio .people-picker__placeholder {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moa-task-form--studio .people-picker__chevron {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: #e8f7f7;
}

.moa-task-form--studio .people-picker__chevron svg {
  width: 17px;
  height: 17px;
  transition: transform .16s ease;
}

.moa-task-form--studio .people-picker.is-open .people-picker__chevron svg {
  transform: rotate(180deg);
}

.moa-task-form--studio .people-picker__dropdown {
  z-index: 120;
  top: calc(100% + 9px);
  padding: 11px;
  border-color: rgba(7,90,98,0.13);
  border-radius: 16px;
  background: rgba(255,255,255,0.99);
  box-shadow: 0 28px 70px rgba(7,75,81,0.20), inset 0 1px 0 rgba(255,255,255,0.92);
}

.people-picker__search-wrap {
  position: relative;
}

.people-picker__search-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 11px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #718c90;
  transform: translateY(-50%);
  pointer-events: none;
}

.people-picker__search-icon svg {
  width: 16px;
  height: 16px;
}

.moa-task-form--studio .people-picker__search {
  min-height: 40px;
  padding-left: 36px;
}

.moa-task-form--studio .selected-people {
  gap: 6px;
  margin-top: 8px;
}

.moa-task-form--studio .selected-person-chip {
  min-height: 29px;
  padding: 4px 8px 4px 5px;
  border-color: rgba(7,90,98,0.10);
  background: linear-gradient(135deg, #e8f7f7, #f4fbfb);
  box-shadow: 0 5px 12px rgba(7,90,98,0.045);
  font-size: 10.5px;
  font-weight: 750;
}

.submit-date-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row--deadlines {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
}

.deadline-field {
  padding: 11px;
  border: 1px solid rgba(7,90,98,0.075);
  border-radius: 14px;
  background: linear-gradient(145deg, #fbfefe, #f2fafa);
}

.deadline-field label span {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(7,90,98,0.07);
  color: var(--moa-deep);
  font-size: 8.5px;
  font-weight: 950;
}

.deadline-field input {
  min-width: 0;
  min-height: 43px !important;
  padding: 8px 9px !important;
  font-size: 11px !important;
}

.submit-action-dock {
  position: sticky;
  z-index: 30;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(7,90,98,0.14);
  border-radius: 17px;
  background: rgba(247,253,253,0.94);
  box-shadow: 0 18px 50px rgba(7,75,81,0.16), inset 0 1px 0 rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
}

.submit-action-dock__copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.submit-action-dock__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 9px 18px rgba(7,90,98,0.20);
}

.submit-action-dock__icon svg {
  width: 19px;
  height: 19px;
}

.submit-action-dock__copy strong,
.submit-action-dock__copy small {
  display: block;
}

.submit-action-dock__copy strong {
  color: var(--moa-ink);
  font-size: 11.5px;
  font-weight: 900;
}

.submit-action-dock__copy small {
  margin-top: 2px;
  color: #789093;
  font-size: 9.5px;
  font-weight: 600;
}

.submit-action-dock .submit-actions-row {
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin: 0;
}

.submit-action-dock .form-feedback {
  max-width: 210px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 750;
  text-align: right;
}

.moa-task-form--studio .form-submit-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px 10px 20px;
  border: 1px solid rgba(5,82,89,0.44);
  border-radius: 14px;
  background: linear-gradient(135deg, #1aa0aa 0%, #0a6f78 58%, #075a62 100%);
  color: #fff;
  box-shadow: 0 13px 27px rgba(7,90,98,0.25), inset 0 1px 0 rgba(255,255,255,0.23);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.05px;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.moa-task-form--studio .form-submit-btn svg {
  width: 18px;
  height: 18px;
}

.moa-task-form--studio .form-submit-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 17px 34px rgba(7,90,98,0.30), inset 0 1px 0 rgba(255,255,255,0.28);
}

.moa-task-form--studio .form-submit-btn:active {
  transform: translateY(0);
}

.submit-side-rail {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 13px;
}

.submit-side-card {
  padding: 18px;
  border-radius: 20px;
}

.submit-side-card--accent {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-color: rgba(255,255,255,0.30);
  background:
    radial-gradient(circle at 92% 8%, rgba(255,255,255,0.18), transparent 8rem),
    linear-gradient(145deg, #0a737c, #168c96 63%, #1ca2ac);
  box-shadow: 0 23px 56px rgba(7,90,98,0.22);
}

.submit-side-card--accent::after {
  content: "m";
  position: absolute;
  right: -3px;
  bottom: -48px;
  color: rgba(255,255,255,0.075);
  font-size: 150px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -15px;
  pointer-events: none;
}

.submit-side-card__icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 15px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.submit-side-card__icon svg {
  width: 25px;
  height: 25px;
}

.submit-side-card--accent .submit-side-card__eyebrow {
  color: rgba(255,255,255,0.72);
}

.submit-side-card h3 {
  margin: 0;
  color: var(--moa-ink);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -.2px;
}

.submit-side-card--accent h3 {
  max-width: 240px;
  color: #fff;
  font-size: 18px;
}

.submit-check-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 11px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

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

.submit-check-list > li > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  background: rgba(255,255,255,0.13);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.submit-check-list strong,
.submit-check-list small {
  display: block;
}

.submit-check-list strong {
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.submit-check-list small {
  margin-top: 2px;
  color: rgba(255,255,255,0.69);
  font-size: 9.5px;
  line-height: 1.35;
  font-weight: 600;
}

.submit-side-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.submit-flow-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--moa-soft);
  color: var(--moa-deep);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.submit-flow-list {
  display: grid;
  gap: 8px;
}

.submit-flow-item {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(7,90,98,0.075);
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfefe, #f3fafa);
}

.submit-flow-item__icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #dff4f5, #eefafa);
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 950;
}

.submit-flow-item strong,
.submit-flow-item small {
  display: block;
}

.submit-flow-item strong {
  color: #234a4f;
  font-size: 10.5px;
  font-weight: 900;
}

.submit-flow-item small {
  margin-top: 1px;
  color: #82979a;
  font-size: 9px;
  font-weight: 600;
}

.submit-side-note {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 10px;
  padding: 14px;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(238,250,250,0.96), rgba(255,255,255,0.94));
  box-shadow: 0 12px 35px rgba(7,75,81,0.08);
}

.submit-side-note > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(7,90,98,0.07);
  color: var(--moa-deep);
}

.submit-side-note svg {
  width: 18px;
  height: 18px;
}

.submit-side-note p {
  margin: 0;
  color: #6e8689;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
}

.submit-side-note strong {
  color: var(--moa-ink);
}

@media (max-width: 1100px) {
  .submit-workspace {
    grid-template-columns: minmax(0,1fr) 285px;
  }

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

@media (max-width: 900px) {
  .submit-workspace {
    grid-template-columns: 1fr;
  }

  .submit-side-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .submit-side-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .view-hero--submit {
    min-height: auto;
  }

  .submit-main-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .moa-task-form--studio {
    padding: 12px;
  }

  .submit-section {
    padding: 16px;
    border-radius: 16px;
  }

  .submit-section__head,
  .submit-section__head--with-badge {
    grid-template-columns: auto minmax(0,1fr);
  }

  .submit-optional-badge {
    grid-column: 2;
    justify-self: start;
  }

  .moa-task-form--studio .form-row,
  .submit-date-row,
  .form-row--deadlines,
  .submit-side-rail {
    grid-template-columns: 1fr;
  }

  .submit-action-dock {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .submit-action-dock .submit-actions-row {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .submit-action-dock .form-feedback {
    max-width: none;
    text-align: left;
  }

  .moa-task-form--studio .form-submit-btn {
    width: 100%;
  }

  .submit-side-note {
    grid-column: auto;
  }
}

/* Keep the custom SVG chevron readable when the picker opens. */
.moa-task-form--studio .people-picker.is-open .people-picker__chevron {
  transform: none;
}


/* =========================================================
   Dynamic deadlines + explicit delay comments
========================================================= */
.deadline-builder__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(7, 90, 98, 0.09);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(232, 248, 249, 0.92), rgba(255, 255, 255, 0.86));
}

.deadline-builder__summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.deadline-builder__summary-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 90, 98, 0.18);
  font-size: 18px;
  font-weight: 800;
}

.deadline-builder__summary strong,
.deadline-builder__summary small {
  display: block;
}

.deadline-builder__summary strong {
  color: var(--moa-ink);
  font-size: 12px;
  font-weight: 850;
}

.deadline-builder__summary small {
  margin-top: 2px;
  max-width: 470px;
  color: #6e8689;
  font-size: 10.5px;
  line-height: 1.45;
}

.deadline-add-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(7, 90, 98, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--moa-deep);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 90, 98, 0.07);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.deadline-add-button svg {
  width: 16px;
  height: 16px;
}

.deadline-add-button:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 90, 98, 0.30);
  background: var(--moa-soft);
  box-shadow: 0 12px 24px rgba(7, 90, 98, 0.11);
}

.deadline-field {
  position: relative;
}

.deadline-field--added {
  animation: deadline-field-in .2s ease both;
  border-color: rgba(33, 169, 179, 0.18);
  background: linear-gradient(145deg, #f6fcfc, #eaf8f9);
}

@keyframes deadline-field-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.deadline-field__head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.deadline-field__head label {
  margin-bottom: 0 !important;
}

.deadline-remove-button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border: 1px solid rgba(153, 27, 27, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #9b2c2c;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.deadline-remove-button:hover {
  border-color: rgba(153, 27, 27, 0.22);
  background: #fff1f0;
}

.field-optional {
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 90, 98, 0.07);
  color: var(--moa-deep);
  font-size: 9px;
  font-weight: 800;
}

/* Any future Deadline N column receives the same polished width automatically. */
.notion-table td[data-key^="Deadline "] {
  min-width: 140px;
}

.notion-table td[data-key^="Deadline "] .date-range {
  color: var(--moa-ink);
  font-weight: 650;
}

.notion-table td[data-key="Comments"] {
  min-width: 340px;
}

@media (max-width: 680px) {
  .deadline-builder__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .deadline-add-button {
    width: 100%;
  }
}

/* Per-row action for adding another deadline without recreating the task. */
.notion-table th[data-key="__addDeadline"],
.notion-table td[data-key="__addDeadline"] {
  min-width: 112px;
  width: 112px;
  text-align: center;
}

.notion-table th.th--action {
  cursor: default !important;
  background: rgba(230, 247, 248, 0.46);
}

.deadline-row-add {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px dashed rgba(7, 90, 98, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--moa-deep);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 850;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.deadline-row-add span {
  font-size: 14px;
  line-height: 1;
}

.deadline-row-add:hover {
  transform: translateY(-1px);
  border-style: solid;
  border-color: rgba(7, 90, 98, 0.38);
  background: var(--moa-soft);
}

.deadline-add-locked {
  color: var(--text-light);
  font-size: 12px;
}

/* ─── Deadline notifications bell ──────────────────────────────────────── */
.notif-bell {
  position: relative;
}

.notif-bell__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 127, 135, 0.18);
  background: #fff;
  color: #0f7f87;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.notif-bell__button:hover { background: rgba(15, 127, 135, 0.06); }

.notif-bell__button svg { width: 19px; height: 19px; }

.notif-bell__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f02a61;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.notif-bell__panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(15, 127, 135, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(7, 75, 81, 0.18);
  z-index: 200;
  animation: moaViewRise .18s ease both;
}

.notif-bell__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(15, 127, 135, 0.1);
}

.notif-bell__header strong { font-size: 14px; color: var(--moa-ink, #123f45); }
.notif-bell__header span { font-size: 11.5px; color: var(--text-secondary, #5b7377); }

.notif-bell__list { padding: 6px; }

.notif-bell__empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--text-secondary, #5b7377);
  font-size: 13px;
}

.notif-bell__section-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.notif-bell__section-label--overdue { color: #f02a61; }
.notif-bell__section-label--upcoming { color: #d68a1a; }

.notif-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
}

.notif-item:hover { background: rgba(15, 127, 135, 0.05); }

.notif-item__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.notif-item__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--moa-ink, #123f45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-item__meta {
  font-size: 11.5px;
  color: var(--text-secondary, #5b7377);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-item__pill {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.notif-item__pill--overdue { background: rgba(240, 42, 97, 0.12); color: #f02a61; }
.notif-item__pill--upcoming { background: rgba(214, 138, 26, 0.14); color: #b5720f; }

@media (max-width: 560px) {
  .notif-bell__panel { width: min(92vw, 360px); }
}

/* ========================================================================
   MOA Premium reliability layer — notifications
   ======================================================================== */

/* Author display rules must never override the semantic hidden state. */
.notif-bell__panel[hidden],
.notif-bell__badge[hidden] {
  display: none !important;
}

/* The panel is portalled to <body> by app.js, outside the clipped hero. */
.notif-bell__panel {
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid rgba(7, 90, 98, 0.15);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 169, 179, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.985);
  box-shadow:
    0 28px 70px rgba(7, 75, 81, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  z-index: 5000;
  transform-origin: top right;
}

.notif-bell__panel[data-placement="top"] {
  transform-origin: bottom right;
}

.notif-bell__header {
  position: relative;
  flex: 0 0 auto;
  align-items: center;
  min-height: 62px;
  padding: 15px 17px 13px;
  background: linear-gradient(135deg, rgba(239, 250, 250, 0.96), rgba(255, 255, 255, 0.94));
  border-bottom-color: rgba(7, 90, 98, 0.10);
}

.notif-bell__header::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--moa-aqua, #21a9b3);
  box-shadow: 0 0 0 5px rgba(33, 169, 179, 0.11);
}

.notif-bell__header strong {
  margin-right: auto;
  color: var(--moa-deep, #075a62);
  font-size: 14.5px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.notif-bell__header span {
  max-width: 46%;
  color: var(--moa-muted, #607c80);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.notif-bell__list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 8px;
}

.notif-bell__list::-webkit-scrollbar { width: 8px; }
.notif-bell__list::-webkit-scrollbar-track { background: transparent; }
.notif-bell__list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(7, 90, 98, 0.20);
  background-clip: padding-box;
}

.notif-bell__section-label {
  position: sticky;
  top: -8px;
  z-index: 1;
  margin: 0 -2px 4px;
  padding: 10px 10px 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.notif-item {
  position: relative;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.notif-item::before {
  content: "";
  width: 4px;
  align-self: stretch;
  flex: 0 0 4px;
  border-radius: 999px;
  background: rgba(214, 138, 26, 0.72);
}

.notif-item--overdue::before { background: rgba(240, 42, 97, 0.82); }

.notif-item:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 90, 98, 0.11);
  background: #fff;
  box-shadow: 0 9px 22px rgba(7, 75, 81, 0.08);
}

.notif-item__main {
  flex: 1 1 auto;
  gap: 4px;
}

.notif-item__title,
.notif-item__meta {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.notif-item__title {
  color: var(--moa-ink, #123f45);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.34;
}

.notif-item__meta {
  color: var(--moa-muted, #607c80);
  font-size: 11.25px;
  font-weight: 550;
  line-height: 1.42;
}

.notif-item__pill {
  max-width: 116px;
  padding: 5px 9px;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}

.notif-bell__empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 30px 18px;
  border: 1px dashed rgba(7, 90, 98, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(239,250,250,0.72), rgba(255,255,255,0.92));
  color: var(--moa-muted, #607c80);
  font-weight: 650;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .notif-bell__panel {
    width: calc(100vw - 16px);
    border-radius: 18px;
  }

  .notif-item {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    gap: 7px 10px;
  }

  .notif-item::before {
    grid-row: 1 / span 2;
  }

  .notif-item__pill {
    grid-column: 2;
    justify-self: start;
    max-width: none;
    white-space: nowrap;
  }

}


/* ========================================================================
   MOA Premium Operations — My Tasks, Activity Log, Trash and alerts
   ======================================================================== */
.tab[hidden],
.toolbar__btn[hidden] { display: none !important; }

.view-hero--personal {
  background:
    radial-gradient(circle at 83% 10%, rgba(255, 213, 106, .36), transparent 29%),
    linear-gradient(135deg, #075a62 0%, #0f7f87 52%, #27aab3 100%);
}

.view-hero--audit {
  background:
    radial-gradient(circle at 82% 12%, rgba(240, 42, 97, .22), transparent 28%),
    linear-gradient(135deg, #123f45 0%, #075a62 50%, #0f7f87 100%);
}

.view-hero--trash {
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 213, 106, .23), transparent 29%),
    linear-gradient(135deg, #294c50 0%, #123f45 53%, #075a62 100%);
}

.personal-workspace,
.audit-workspace,
.trash-workspace {
  display: grid;
  gap: 20px;
  padding-top: 20px;
}

.personal-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.personal-metric {
  min-height: 98px;
  border: 1px solid rgba(15, 127, 135, .13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,251,251,.82));
  box-shadow: 0 13px 34px rgba(4, 63, 69, .07);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  color: #123f45;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.personal-metric:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 127, 135, .28);
  box-shadow: 0 17px 38px rgba(4, 63, 69, .11);
}

.personal-metric.is-active {
  border-color: rgba(15, 127, 135, .48);
  background: linear-gradient(135deg, rgba(223,245,245,.96), rgba(255,255,255,.98));
  box-shadow: 0 16px 38px rgba(15, 127, 135, .15), inset 0 0 0 1px rgba(15,127,135,.08);
}

.personal-metric__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(15, 127, 135, .09);
  color: #0f7f87;
  font-size: 20px;
  font-weight: 800;
}

.personal-metric.is-active .personal-metric__icon {
  background: #0f7f87;
  color: white;
  box-shadow: 0 8px 20px rgba(15,127,135,.24);
}

.personal-metric div { display: grid; gap: 3px; }
.personal-metric small { font-size: 11.5px; color: #648084; font-weight: 650; }
.personal-metric strong { font-size: 27px; line-height: 1; color: #123f45; letter-spacing: -.04em; }

.premium-list-card,
.audit-table-card {
  border: 1px solid rgba(15,127,135,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 20px 55px rgba(4,63,69,.08);
  overflow: hidden;
}

.premium-list-card__head {
  min-height: 78px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(15,127,135,.1);
  background: linear-gradient(180deg, rgba(244,251,251,.82), rgba(255,255,255,.96));
}

.premium-list-card__head p {
  margin: 0 0 3px;
  color: #0f7f87;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.premium-list-card__head h3 {
  margin: 0;
  color: #123f45;
  font-size: 18px;
  letter-spacing: -.02em;
}

.premium-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15,127,135,.09);
  color: #075a62;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.personal-task-list,
.trash-list { display: grid; }

.personal-task-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 145px 40px;
  align-items: center;
  gap: 17px;
  min-height: 122px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(15,127,135,.09);
  background: white;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.personal-task-card:last-child { border-bottom: 0; }
.personal-task-card:hover { background: #f7fcfc; }
.personal-task-card--overdue { box-shadow: inset 4px 0 0 rgba(240,42,97,.78); }
.personal-task-card__status { display: flex; align-items: center; }
.personal-task-card__main { min-width: 0; }

.personal-task-card__eyebrow,
.trash-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #648084;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.personal-task-card__eyebrow i,
.trash-card__eyebrow i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #27aab3;
}

.personal-task-card h4,
.trash-card h4 {
  margin: 0;
  color: #123f45;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.personal-task-card__main > p,
.trash-card__main > p {
  margin: 5px 0 0;
  color: #648084;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.personal-task-card__meta,
.trash-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 8px;
  color: #789195;
  font-size: 10.5px;
}

.personal-task-card__deadline {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.personal-task-card__deadline small { color: #789195; font-size: 10.5px; font-weight: 700; }
.personal-task-card__deadline strong { color: #123f45; font-size: 13px; }
.personal-task-card__deadline.is-overdue small,
.personal-task-card__deadline.is-overdue strong { color: #f02a61; }

.personal-task-card__open {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15,127,135,.15);
  border-radius: 12px;
  background: rgba(15,127,135,.06);
  color: #0f7f87;
  font-size: 18px;
  cursor: pointer;
}

.premium-empty-state {
  min-height: 190px;
  padding: 38px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  color: #648084;
  background: radial-gradient(circle at 50% 0%, rgba(223,245,245,.65), transparent 60%);
}

.premium-empty-state strong { color: #123f45; font-size: 15px; }
.premium-empty-state span { max-width: 460px; font-size: 12px; }
.premium-empty-state--error strong { color: #d52758; }

.audit-commandbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(15,127,135,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px rgba(4,63,69,.07);
}

.audit-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.audit-search svg { width: 18px; height: 18px; color: #0f7f87; flex: 0 0 auto; }
.audit-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #123f45;
  font: inherit;
  font-size: 13px;
}

.audit-refresh-btn,
.trash-card__restore {
  min-height: 38px;
  border: 1px solid rgba(15,127,135,.17);
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, #ffffff, #f1fafa);
  color: #075a62;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(4,63,69,.06);
}
.audit-refresh-btn:hover,
.trash-card__restore:hover { border-color: rgba(15,127,135,.36); background: #e9f8f8; }

.audit-table-scroll { overflow: auto; max-height: 660px; }
.audit-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.audit-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 14px;
  background: #eff8f8;
  border-bottom: 1px solid rgba(15,127,135,.12);
  color: #527377;
  font-size: 10.5px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.audit-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(15,127,135,.08);
  color: #314f53;
  font-size: 11.5px;
  vertical-align: top;
}
.audit-table tbody tr:hover { background: #f8fcfc; }
.audit-date { white-space: nowrap; color: #648084 !important; }
.audit-user,
.audit-task { display: grid; gap: 2px; min-width: 150px; }
.audit-user strong,
.audit-task strong { color: #123f45; font-size: 11.5px; }
.audit-user span,
.audit-task span { color: #789195; font-size: 9.5px; word-break: break-all; }
.audit-action {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .04em;
  white-space: nowrap;
}
.audit-action--create { background: #dcfce7; color: #166534; }
.audit-action--update { background: #dbeafe; color: #1d4ed8; }
.audit-action--archive { background: #ffe4ea; color: #be1748; }
.audit-action--restore { background: #e0f2fe; color: #075985; }
.audit-action--manual { background: #fef3c7; color: #92400e; }
.audit-field { font-weight: 700; color: #075a62; }
.audit-value {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #7a8587;
}
.audit-value--new { color: #123f45; font-weight: 650; }
.audit-empty { height: 180px; text-align: center !important; color: #789195 !important; }
.audit-empty--error { color: #d52758 !important; }

.trash-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 17px;
  min-height: 126px;
  padding: 19px 21px;
  border-bottom: 1px solid rgba(15,127,135,.09);
  background: white;
}
.trash-card:last-child { border-bottom: 0; }
.trash-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15,127,135,.09);
  color: #0f7f87;
  font-size: 21px;
  font-weight: 800;
}
.trash-card__main { min-width: 0; }
.trash-card__restore { min-width: 100px; }

.task-row-highlight { animation: moaTaskHighlight 1.8s ease; }
@keyframes moaTaskHighlight {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,213,106,0); }
  18%, 72% { background: rgba(255, 213, 106, .22); box-shadow: inset 4px 0 0 #f3bc2e; }
}

.notif-bell__section-label--today { color: #d68a1a; }
.notif-bell__section-label--unassigned { color: #7c3aed; }
.notif-bell__section-label--stale { color: #64748b; }
.notif-item--today::before { background: #d68a1a; }
.notif-item--unassigned::before { background: #7c3aed; }
.notif-item--stale::before { background: #64748b; }
.notif-item__pill--today { background: rgba(214,138,26,.14); color: #a66408; }
.notif-item__pill--unassigned { background: rgba(124,58,237,.12); color: #6d28d9; }
.notif-item__pill--stale { background: rgba(100,116,139,.13); color: #475569; }
.notif-bell__empty strong,
.notif-bell__empty span { display: block; }
.notif-bell__empty strong { margin-bottom: 3px; color: #123f45; }
.notif-bell__empty span { font-size: 11px; line-height: 1.45; }

@media (max-width: 1180px) {
  .personal-metrics { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .personal-task-card { grid-template-columns: 105px minmax(0,1fr) 125px 36px; }
}

@media (max-width: 820px) {
  .personal-metrics { grid-template-columns: repeat(2, minmax(145px, 1fr)); }
  .personal-task-card { grid-template-columns: 1fr 36px; gap: 10px; }
  .personal-task-card__status { grid-column: 1; }
  .personal-task-card__main { grid-column: 1 / -1; }
  .personal-task-card__deadline { grid-column: 1; justify-items: start; text-align: left; }
  .personal-task-card__open { grid-column: 2; grid-row: 1; }
  .audit-commandbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .audit-search { min-height: 38px; }
  .trash-card { grid-template-columns: 40px minmax(0,1fr); }
  .trash-card__restore { grid-column: 2; justify-self: start; }
}

@media (max-width: 540px) {
  .personal-workspace,
  .audit-workspace,
  .trash-workspace { padding-top: 14px; gap: 14px; }
  .personal-metrics { grid-template-columns: 1fr; }
  .personal-metric { min-height: 78px; }
  .premium-list-card__head { align-items: flex-start; flex-direction: column; }
  .personal-task-card { padding: 16px; }
  .trash-card { padding: 16px; }
}

.notif-item {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}


/* ========================================================================== */
/* MOA Pace Control — 4 automatic checkpoints                                 */
/* ========================================================================== */
.checkpoint-shell { position: relative; }
.checkpoint-hero { overflow: hidden; }
.checkpoint-hero::after { content:""; position:absolute; right:-90px; top:-100px; width:300px; height:300px; border-radius:50%; background:radial-gradient(circle, rgba(64,204,212,.18), transparent 68%); pointer-events:none; animation: checkpointGlow 5s ease-in-out infinite; }
.checkpoint-explainer { margin:18px 0 14px; display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto; align-items:center; gap:12px; padding:14px 18px; border:1px solid rgba(15,127,135,.13); border-radius:18px; background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(236,249,249,.8)); box-shadow:0 12px 30px rgba(15,73,78,.06); }
.checkpoint-explainer > div { display:flex; align-items:center; gap:8px; min-width:max-content; }
.checkpoint-explainer strong { width:42px; height:30px; display:grid; place-items:center; border-radius:999px; background:#0f7f87; color:#fff; font-size:11px; letter-spacing:.02em; box-shadow:0 6px 16px rgba(15,127,135,.2); }
.checkpoint-explainer span { font-size:11px; font-weight:750; color:#36585c; }
.checkpoint-explainer i { height:2px; border-radius:10px; background:linear-gradient(90deg,rgba(15,127,135,.2),rgba(15,127,135,.55)); position:relative; overflow:hidden; }
.checkpoint-explainer i::after { content:""; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg,transparent,rgba(255,255,255,.9),transparent); animation:checkpointSweep 3.2s ease-in-out infinite; }
.checkpoint-overview { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.checkpoint-summary { position:relative; display:flex; gap:12px; align-items:center; padding:17px; min-height:94px; border-radius:18px; border:1px solid rgba(15,127,135,.1); background:rgba(255,255,255,.94); box-shadow:0 12px 28px rgba(21,69,73,.06); overflow:hidden; animation:checkpointCardIn .45s cubic-bezier(.22,1,.36,1) both; }
.checkpoint-summary::after { content:""; position:absolute; width:76px; height:76px; border-radius:50%; right:-28px; top:-28px; background:var(--checkpoint-summary-soft,rgba(15,127,135,.08)); }
.checkpoint-summary__icon { flex:0 0 42px; width:42px; height:42px; border-radius:14px; display:grid; place-items:center; font-weight:900; font-size:18px; color:var(--checkpoint-summary-color,#0f7f87); background:var(--checkpoint-summary-soft,rgba(15,127,135,.09)); }
.checkpoint-summary small { display:block; color:#74898b; font-size:10px; text-transform:uppercase; letter-spacing:.09em; font-weight:800; }
.checkpoint-summary strong { display:block; margin-top:2px; color:#173f43; font-size:24px; line-height:1; }
.checkpoint-summary p { margin:5px 0 0; color:#708386; font-size:10px; line-height:1.35; }
.checkpoint-summary--ontime { --checkpoint-summary-color:#138a69; --checkpoint-summary-soft:rgba(38,181,136,.11); }
.checkpoint-summary--pending { --checkpoint-summary-color:#b47a13; --checkpoint-summary-soft:rgba(242,183,64,.14); }
.checkpoint-summary--delayed { --checkpoint-summary-color:#c24b54; --checkpoint-summary-soft:rgba(218,82,92,.12); }
.checkpoint-summary--missing { --checkpoint-summary-color:#738386; --checkpoint-summary-soft:rgba(110,132,135,.1); }
.checkpoint-dot--good { background:#2bb58b !important; }
.checkpoint-dot--pending { background:#e0a52e !important; box-shadow:0 0 0 4px rgba(224,165,46,.12); }
.checkpoint-dot--delayed { background:#d65b63 !important; }
.checkpoint-board { gap:16px !important; }
.checkpoint-task-card { --checkpoint-accent:#0f7f87; border-radius:24px !important; border:1px solid rgba(15,127,135,.12) !important; overflow:hidden; background:linear-gradient(180deg,#fff,rgba(249,253,253,.97)) !important; box-shadow:0 18px 44px rgba(19,74,79,.08) !important; animation:checkpointCardIn .55s cubic-bezier(.22,1,.36,1) both !important; }
.checkpoint-task-card--pending { --checkpoint-accent:#c38715; border-color:rgba(207,151,38,.23) !important; }
.checkpoint-task-card--delayed { --checkpoint-accent:#c64d56; border-color:rgba(198,77,86,.22) !important; }
.checkpoint-task-card--ontime,.checkpoint-task-card--complete { --checkpoint-accent:#12866a; }
.checkpoint-task-card--missing { --checkpoint-accent:#74888a; }
.checkpoint-task-card::before { background:linear-gradient(180deg,var(--checkpoint-accent),#40cbd2) !important; }
.checkpoint-task-card__header { border-bottom:1px solid rgba(20,91,96,.07); }
.checkpoint-task-card__pulse { display:grid; grid-template-columns:minmax(180px,1.2fr) repeat(3,minmax(120px,.7fr)); gap:10px; padding:18px 22px 0; }
.checkpoint-health,.checkpoint-task-card__metric { min-height:68px; border:1px solid rgba(20,91,96,.09); border-radius:16px; background:rgba(247,252,252,.72); padding:12px 14px; }
.checkpoint-health { display:flex; align-items:center; gap:11px; }
.checkpoint-health > span { width:36px; height:36px; border-radius:12px; display:grid; place-items:center; font-weight:900; color:#fff; background:var(--checkpoint-accent); box-shadow:0 8px 18px color-mix(in srgb,var(--checkpoint-accent) 20%,transparent); }
.checkpoint-health small,.checkpoint-task-card__metric small { display:block; color:#7a8f91; font-size:9.5px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.checkpoint-health strong,.checkpoint-task-card__metric strong { display:block; margin-top:4px; color:#173f43; font-size:13px; }
.checkpoint-progress { padding:17px 22px 4px; }
.checkpoint-progress__track { position:relative; height:13px; border-radius:999px; background:#edf3f3; overflow:hidden; box-shadow:inset 0 1px 2px rgba(35,78,81,.07); display:grid; grid-template-columns:repeat(4,1fr); gap:2px; padding:2px; }
.checkpoint-progress__track > i { position:absolute; left:2px; top:2px; bottom:2px; border-radius:999px; width:0; background:linear-gradient(90deg,rgba(15,127,135,.2),rgba(64,203,210,.2)); transition:width .8s cubic-bezier(.22,1,.36,1); }
.checkpoint-progress__segment { z-index:1; border-radius:999px; background:transparent; transform:scaleX(0); transform-origin:left; animation:checkpointSegmentFill .55s cubic-bezier(.22,1,.36,1) forwards; animation-delay:var(--segment-delay); }
.checkpoint-progress__segment--yes { background:linear-gradient(90deg,#159b77,#34c698); }
.checkpoint-progress__segment--no { background:linear-gradient(90deg,#ca4f58,#ea767d); }
.checkpoint-progress__segment--pending { background:linear-gradient(90deg,#d99a20,#efc25c); animation:checkpointPendingPulse 1.7s ease-in-out infinite; }
.checkpoint-progress__segment--empty { background:rgba(255,255,255,.36); }
.checkpoint-progress__labels { display:flex; align-items:center; justify-content:space-between; margin-top:7px; color:#829496; font-size:9.5px; }
.checkpoint-progress__labels strong { color:var(--checkpoint-accent); font-size:10px; letter-spacing:.04em; }
.checkpoint-date-range { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:5px 22px 14px; color:#74898b; font-size:10px; font-weight:700; }
.checkpoint-date-range i { height:1px; background:linear-gradient(90deg,rgba(15,127,135,.15),rgba(15,127,135,.45),rgba(15,127,135,.15)); }
.checkpoint-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:0 22px 22px; }
.checkpoint-node { position:relative; min-height:158px; border:1px solid rgba(27,96,101,.1); border-radius:18px; background:#fff; padding:14px; overflow:hidden; transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease; }
.checkpoint-node:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(20,76,80,.07); }
.checkpoint-node::after { content:""; position:absolute; inset:auto 0 0; height:3px; background:#dce7e8; }
.checkpoint-node--good::after { background:#2ab287; }
.checkpoint-node--delayed::after { background:#d45962; }
.checkpoint-node--pending { border-color:rgba(216,156,35,.32); box-shadow:0 0 0 4px rgba(226,173,62,.06); }
.checkpoint-node--pending::after { background:#e0a42d; animation:checkpointLinePulse 1.6s ease-in-out infinite; }
.checkpoint-node--future { opacity:.78; }
.checkpoint-node__top { display:flex; gap:10px; align-items:center; margin-bottom:13px; }
.checkpoint-node__number { flex:0 0 32px; width:32px; height:32px; border-radius:11px; display:grid; place-items:center; background:#edf7f7; color:#0f7f87; font-size:12px; font-weight:900; }
.checkpoint-node--good .checkpoint-node__number { background:rgba(42,178,135,.1); color:#148465; }
.checkpoint-node--delayed .checkpoint-node__number { background:rgba(212,89,98,.1); color:#bd4750; }
.checkpoint-node--pending .checkpoint-node__number { background:rgba(224,164,45,.12); color:#a66f0c; }
.checkpoint-node__top small { display:block; color:#87999b; text-transform:uppercase; letter-spacing:.08em; font-size:8.5px; font-weight:800; }
.checkpoint-node__top strong { display:block; margin-top:2px; color:#294f53; font-size:11.5px; }
.checkpoint-node__state { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:7px 9px; font-size:9.5px; font-weight:800; }
.checkpoint-node__state--good { color:#117b5e; background:rgba(42,178,135,.11); }
.checkpoint-node__state--delayed { color:#b63d47; background:rgba(212,89,98,.11); }
.checkpoint-node__state--pending { color:#94610a; background:rgba(224,164,45,.12); }
.checkpoint-node__state--future,.checkpoint-node__state--missing { color:#718487; background:#f0f4f4; }
.checkpoint-node__reason { display:block; margin-top:10px; font-size:10.5px; line-height:1.45; color:#6f3d42; }
.checkpoint-node__audit { display:block; margin-top:9px; color:#93a1a2; font-size:8.5px; line-height:1.35; word-break:break-word; }
.checkpoint-question strong { display:block; color:#274d50; font-size:10.5px; line-height:1.4; }
.checkpoint-question__actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
.checkpoint-answer { border:0; border-radius:10px; min-height:34px; padding:7px 8px; font-size:9px; font-weight:850; cursor:pointer; transition:transform .18s ease,box-shadow .18s ease; }
.checkpoint-answer:hover { transform:translateY(-1px); }
.checkpoint-answer--yes { background:#e3f7ef; color:#13775c; }
.checkpoint-answer--yes:hover { box-shadow:0 7px 16px rgba(37,164,125,.14); }
.checkpoint-answer--no { background:#fff0f1; color:#b6414a; }
.checkpoint-answer--no:hover { box-shadow:0 7px 16px rgba(201,75,84,.12); }
.checkpoint-delay-panel { margin-top:10px; padding-top:10px; border-top:1px dashed rgba(186,128,27,.25); animation:checkpointPanelIn .22s ease both; }
.checkpoint-delay-panel[hidden] { display:none !important; }
.checkpoint-delay-panel label { display:block; font-size:9px; color:#765614; font-weight:800; margin-bottom:6px; }
.checkpoint-delay-select { width:100%; min-height:34px; border:1px solid rgba(188,134,31,.24); border-radius:9px; background:#fffdf7; color:#4d5556; padding:6px 8px; font-size:9px; outline:none; }
.checkpoint-delay-select:focus { border-color:#c99021; box-shadow:0 0 0 3px rgba(210,151,35,.08); }
.checkpoint-delay-panel__actions { display:flex; gap:6px; margin-top:7px; }
.checkpoint-delay-confirm,.checkpoint-delay-cancel { border:0; border-radius:8px; padding:7px 8px; font-size:8.5px; font-weight:800; cursor:pointer; }
.checkpoint-delay-confirm { background:#c98d1d; color:#fff; }
.checkpoint-delay-cancel { background:#eef3f3; color:#657779; }
.checkpoint-range-warning { margin:16px 22px 20px; border:1px dashed rgba(117,137,139,.32); border-radius:14px; padding:13px 15px; background:#f7f9f9; }
.checkpoint-range-warning strong { display:block; color:#4b6264; font-size:11px; }
.checkpoint-range-warning span { display:block; margin-top:3px; color:#869597; font-size:9.5px; }
.checkpoint-empty-state > span { font-size:28px; }

/* Trash: newest archived first + permanent delete + Excel */
.trash-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.trash-export-btn { display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 12px; border:1px solid rgba(15,127,135,.17); border-radius:10px; background:#eaf8f8; color:#0f7279; font-size:10px; font-weight:800; cursor:pointer; }
.trash-export-btn svg { width:15px; height:15px; }
.trash-export-btn:hover { background:#dcf3f4; transform:translateY(-1px); }
.trash-card--ordered { grid-template-columns:44px minmax(0,1fr) auto !important; gap:14px; }
.trash-card__order { width:36px; height:36px; border-radius:12px; display:grid; place-items:center; background:#eef8f8; color:#0f7f87; font-size:10px; font-weight:900; align-self:start; }
.trash-card__actions { display:flex; align-items:center; gap:7px; align-self:center; flex-wrap:wrap; justify-content:flex-end; }
.trash-card__purge { min-height:36px; border:1px solid rgba(197,68,78,.18); border-radius:10px; padding:0 11px; background:#fff3f4; color:#b53d47; font-size:9.5px; font-weight:800; cursor:pointer; }
.trash-card__purge:hover { border-color:rgba(197,68,78,.38); background:#ffe8ea; }
.trash-card__meta strong { color:#607779; }

@keyframes checkpointCardIn { from { opacity:0; transform:translateY(10px) scale(.994); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes checkpointSegmentFill { to { transform:scaleX(1); } }
@keyframes checkpointPendingPulse { 0%,100% { opacity:.6; } 50% { opacity:1; } }
@keyframes checkpointLinePulse { 0%,100% { opacity:.55; } 50% { opacity:1; box-shadow:0 -4px 18px rgba(224,164,45,.2); } }
@keyframes checkpointSweep { 0%,20% { transform:translateX(-100%); } 60%,100% { transform:translateX(100%); } }
@keyframes checkpointPanelIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes checkpointGlow { 0%,100% { transform:scale(.94); opacity:.7; } 50% { transform:scale(1.06); opacity:1; } }

@media (max-width:1100px) {
  .checkpoint-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .checkpoint-task-card__pulse { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .checkpoint-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .checkpoint-explainer { grid-template-columns:1fr 1fr; }
  .checkpoint-explainer i { display:none; }
  .checkpoint-overview,.checkpoint-task-card__pulse,.checkpoint-grid { grid-template-columns:1fr; }
  .checkpoint-task-card__pulse,.checkpoint-progress,.checkpoint-grid { padding-left:16px; padding-right:16px; }
  .checkpoint-date-range { padding-left:16px; padding-right:16px; }
  .trash-card--ordered { grid-template-columns:38px minmax(0,1fr) !important; }
  .trash-card__actions { grid-column:2; justify-content:flex-start; }
}
@media (prefers-reduced-motion:reduce) {
  .checkpoint-task-card,.checkpoint-summary,.checkpoint-progress__segment,.checkpoint-explainer i::after,.checkpoint-hero::after { animation:none !important; transition:none !important; }
}

.checkpoint-live { display:flex; align-items:center; gap:7px; margin:-2px 2px 13px; color:#718688; font-size:9.5px; }
.checkpoint-live strong { color:#2b666b; font-size:9.5px; text-transform:uppercase; letter-spacing:.08em; }
.checkpoint-live em { margin-left:auto; font-style:normal; color:#829496; }
.checkpoint-live__dot { width:8px; height:8px; border-radius:50%; background:#25b784; box-shadow:0 0 0 4px rgba(37,183,132,.1); }
.checkpoint-refresh-button { display:inline-flex; align-items:center; gap:5px; min-height:29px; margin-left:5px; padding:0 9px; border:1px solid rgba(15,127,135,.16); border-radius:9px; background:#eef9f9; color:#0f747b; font:inherit; font-weight:800; cursor:pointer; transition:background .18s ease,border-color .18s ease,transform .18s ease; }
.checkpoint-refresh-button:hover:not(:disabled) { background:#e1f5f5; border-color:rgba(15,127,135,.28); transform:translateY(-1px); }
.checkpoint-refresh-button:disabled { cursor:wait; opacity:.65; }
.checkpoint-refresh-button.is-loading span { display:inline-block; animation:checkpointRefreshSpin .8s linear infinite; }
.checkpoint-node__audit--saving { display:flex; align-items:center; gap:5px; color:#0f7f87; font-weight:800; }
.checkpoint-node__audit--saving span { width:8px; height:8px; border:2px solid rgba(15,127,135,.2); border-top-color:#0f7f87; border-radius:50%; animation:checkpointRefreshSpin .75s linear infinite; }
.checkpoint-answer:disabled,.checkpoint-delay-confirm:disabled { cursor:wait; opacity:.65; transform:none; }
@keyframes checkpointRefreshSpin { to { transform:rotate(360deg); } }
@media(max-width:720px){ .checkpoint-live { flex-wrap:wrap; } .checkpoint-live em { margin-left:0; width:100%; } .checkpoint-refresh-button { margin-left:0; } }

/* ──────────────────────────────────────────────────────────────────────────
   Live team presence — compact Google-Docs-style treatment
   ────────────────────────────────────────────────────────────────────────── */
.live-presence {
  position: relative;
  flex: 0 0 auto;
}

.live-presence__button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 6px;
  border: 1px solid rgba(7, 90, 98, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--moa-text);
  box-shadow: 0 7px 20px rgba(7, 90, 98, 0.065);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  font-family: var(--font);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.live-presence__button:hover,
.live-presence__button.is-open {
  transform: translateY(-1px);
  border-color: rgba(7, 90, 98, 0.22);
  background: #fff;
  box-shadow: 0 12px 28px rgba(7, 90, 98, 0.11);
}

.live-presence__stack {
  min-width: 28px;
  display: flex;
  align-items: center;
  padding-left: 1px;
}

.presence-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 3px 10px rgba(7, 90, 98, 0.16);
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1;
}

.presence-avatar img,
.presence-avatar > span {
  width: 100%;
  height: 100%;
}

.presence-avatar img {
  display: block;
  object-fit: cover;
}

.presence-avatar > span {
  display: grid;
  place-items: center;
}

.presence-avatar--stack + .presence-avatar--stack,
.presence-avatar--stack + .presence-avatar--more,
.presence-avatar--more + .presence-avatar--stack {
  margin-left: -9px;
}

.presence-avatar--stack-0 { z-index: 5; }
.presence-avatar--stack-1 { z-index: 4; }
.presence-avatar--stack-2 { z-index: 3; }
.presence-avatar--stack-3 { z-index: 2; }

.presence-avatar--more {
  z-index: 1;
  background: #eaf5f5;
  color: var(--moa-deep);
  font-size: 8px;
}

.presence-avatar--placeholder {
  background: #eef5f5;
  color: #7d9698;
  font-size: 7px;
  letter-spacing: -1px;
}

.live-presence__compact-copy {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.live-presence__compact-copy strong {
  display: inline-flex;
  align-items: center;
  color: var(--moa-deep);
  font-size: 10px;
  font-weight: 900;
}

.live-presence__compact-copy strong::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 0 0 3px rgba(47, 191, 143, 0.10);
}

.live-presence[data-status="connecting"] .live-presence__compact-copy strong::before,
.live-presence[data-status="reconnecting"] .live-presence__compact-copy strong::before {
  background: #f1b74d;
  box-shadow: 0 0 0 3px rgba(241, 183, 77, 0.12);
}

.live-presence[data-status="offline"] .live-presence__compact-copy strong::before {
  background: #9db0b2;
  box-shadow: 0 0 0 3px rgba(157, 176, 178, 0.12);
}

.live-presence__chevron {
  color: var(--moa-muted);
  transition: transform .16s ease;
}

.live-presence__button.is-open .live-presence__chevron {
  transform: rotate(180deg);
}

/* Portalled directly under <body>; this must sit above sticky dashboard nav. */
.presence-panel {
  position: fixed;
  z-index: 100010;
  overflow: hidden;
  width: min(320px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 24px));
  border: 1px solid rgba(7, 90, 98, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.992);
  box-shadow:
    0 24px 60px rgba(7, 75, 81, 0.20),
    0 1px 0 rgba(255,255,255,.9) inset;
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  animation: moaMenuIn .15s ease both;
  transform-origin: top right;
}

.presence-panel[data-placement="top"] {
  transform-origin: bottom right;
}

.presence-panel[hidden] {
  display: none !important;
}

.presence-panel__header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px 10px 14px;
  border-bottom: 1px solid rgba(7, 90, 98, 0.075);
  background: linear-gradient(135deg, rgba(237, 249, 249, .96), rgba(255,255,255,.98));
}

.presence-panel__header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.presence-panel__header strong {
  color: var(--moa-text);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.1px;
}

.presence-panel__header small {
  overflow: hidden;
  color: var(--moa-muted);
  font-size: 9.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-panel__count {
  min-width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(47, 191, 143, .12);
  color: #187453;
  font-size: 10.5px;
  font-weight: 950;
}

.presence-panel__list {
  max-height: min(356px, 52vh);
  overflow-y: auto;
  padding: 6px;
}

.presence-panel__list::-webkit-scrollbar { width: 7px; }
.presence-panel__list::-webkit-scrollbar-track { background: transparent; }
.presence-panel__list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(7, 90, 98, 0.15);
}

.presence-person {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  transition: background .14s ease;
}

.presence-person:hover,
.presence-person--me {
  background: rgba(230, 247, 248, 0.58);
}

.presence-person__avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
}

.presence-avatar--person {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  font-size: 10px;
}

.presence-person__online {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 2px 6px rgba(15, 91, 71, .18);
}

.presence-person__copy {
  min-width: 0;
  display: grid;
}

.presence-person__name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--moa-text);
  font-size: 11.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-person__name span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 127, 135, 0.10);
  color: var(--moa-deep);
  font-size: 8px;
  font-weight: 900;
}

.presence-person__meta {
  margin-top: 3px;
  overflow: hidden;
  color: var(--moa-muted);
  font-size: 9.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-panel__empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 18px;
  color: var(--moa-muted);
  text-align: center;
}

.presence-panel__empty strong {
  color: var(--moa-text);
  font-size: 11px;
  font-weight: 850;
}

.presence-panel__empty span {
  max-width: 250px;
  font-size: 9.5px;
  line-height: 1.45;
}

.presence-panel__empty--warning {
  background: rgba(255, 249, 236, .62);
}

.presence-panel__empty--warning strong {
  color: #80611f;
}

@media (max-width: 1180px) {
  .live-presence__compact-copy { display: none; }
  .live-presence__button { padding-right: 7px; }
  .live-presence__chevron { display: none; }
}

@media (max-width: 760px) {
  .live-presence__button {
    min-height: 38px;
    border-radius: 13px;
  }

  .presence-avatar {
    width: 27px;
    height: 27px;
  }

  .presence-avatar--stack:nth-child(n+4) {
    display: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Realtime collaboration status + soft edit locks
   ────────────────────────────────────────────────────────────────────────── */
.realtime-sync-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(7, 90, 98, .10);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: #4f7275;
  box-shadow: 0 5px 16px rgba(7,90,98,.045);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  pointer-events: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}

.realtime-sync-status__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 0 0 3px rgba(47,191,143,.10);
}

.realtime-sync-status[data-status="connecting"] .realtime-sync-status__dot,
.realtime-sync-status[data-status="reconnecting"] .realtime-sync-status__dot,
.realtime-sync-status[data-status="pending"] .realtime-sync-status__dot {
  background: #e9ad43;
  box-shadow: 0 0 0 3px rgba(233,173,67,.12);
}

.realtime-sync-status[data-status="updating"] .realtime-sync-status__dot {
  background: var(--moa-aqua);
  box-shadow: 0 0 0 3px rgba(33,169,179,.11);
  animation: moaRealtimePulse 1s ease-in-out infinite;
}

.realtime-sync-status[data-status="offline"] {
  color: #829496;
  background: rgba(245,248,248,.8);
}

.realtime-sync-status[data-status="offline"] .realtime-sync-status__dot {
  background: #9db0b2;
  box-shadow: 0 0 0 3px rgba(157,176,178,.12);
}

@keyframes moaRealtimePulse {
  0%,100% { transform: scale(.82); opacity: .72; }
  50% { transform: scale(1.16); opacity: 1; }
}

.presence-person--editing {
  background: linear-gradient(90deg, rgba(230,247,248,.74), rgba(255,255,255,.78));
}

.presence-person__name i {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(249,176,59,.14);
  color: #8a641f;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .02em;
}

#table-body td.is-remotely-edited {
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(33,169,179,.28);
  background: linear-gradient(180deg, rgba(234,249,249,.72), rgba(255,255,255,.92));
}

#table-body td.is-remotely-edited::after {
  content: attr(data-realtime-editor);
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 5;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid rgba(7,90,98,.11);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: var(--moa-deep);
  box-shadow: 0 3px 10px rgba(7,90,98,.08);
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

#table-body td.is-remotely-edited.editing::after {
  display: none;
}

@media (max-width: 1180px) {
  .realtime-sync-status { padding: 0 7px; }
  .realtime-sync-status [data-sync-label] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .realtime-sync-status__dot { animation: none !important; }
}

/* Live marker used by Activity Log now that entries refresh automatically. */
.view-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 7px;
  padding: 3px 7px;
  border: 1px solid rgba(47,191,143,.18);
  border-radius: 999px;
  background: rgba(47,191,143,.09);
  color: #247b63;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  vertical-align: middle;
  transform: translateY(-2px);
}

.view-live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2fbf8f;
  box-shadow: 0 0 0 3px rgba(47,191,143,.10);
}

/* Recent-presence history complements Supabase Presence without replacing it. */
.presence-panel__section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 11px 6px;
  color:#71888b;
  font-size:8px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.presence-panel__section-title--online { color:#277e69; }
.presence-panel__section-title small { font-size:8px; font-weight:850; letter-spacing:.02em; text-transform:none; }
.presence-person--recent { opacity:.82; }
.presence-person--recent:hover { opacity:1; }
.presence-avatar--recent { filter:saturate(.72); }
.presence-person__recent-dot {
  position:absolute;
  right:0;
  bottom:0;
  width:8px;
  height:8px;
  border:2px solid #fff;
  border-radius:50%;
  background:#9aaeb0;
}
.presence-person__meta b { color:inherit; font-weight:850; }
.presence-panel__recent-empty {
  margin:4px 9px 9px;
  padding:9px 10px;
  border:1px dashed rgba(7,90,98,.11);
  border-radius:10px;
  background:#f8fbfb;
  color:#7a8e90;
  font-size:9px;
  line-height:1.45;
}

/* Progressive table rendering keeps very large realtime workspaces light. */
.table-empty-state {
  padding:40px !important;
  text-align:center !important;
  color:#787774 !important;
}
.task-render-more-row > td {
  padding:13px 16px 18px !important;
  background:linear-gradient(180deg,rgba(248,252,252,.65),#fff) !important;
}
.task-render-more {
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:9px 14px;
  border:1px dashed rgba(15,127,135,.20);
  border-radius:12px;
  background:#f6fbfb;
  color:#38686d;
  font:inherit;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.task-render-more:hover { background:#edf8f8; border-color:rgba(15,127,135,.34); transform:translateY(-1px); }
.task-render-more strong { color:#0f747b; font-size:10.5px; }
.task-render-more span { color:#789092; font-size:9px; }

/* ========================================================================== 
   MOA TASK QUALITY CONTROL — premium compact task hygiene + structure assistant
   ========================================================================== */
.task-quality-center {
  --quality-teal:#0f7f87;
  --quality-teal-deep:#075f67;
  --quality-ink:#173f44;
  --quality-muted:#6d8589;
  --quality-danger:#df2b5e;
  --quality-warn:#c5941f;
  position:relative;
  margin:12px 22px 10px;
  border:1px solid rgba(7,95,103,.12);
  border-radius:19px;
  overflow:hidden;
  background:rgba(255,255,255,.94);
  box-shadow:0 15px 38px rgba(7,75,81,.085), 0 2px 7px rgba(7,75,81,.04);
  backdrop-filter:blur(16px);
  isolation:isolate;
}
.task-quality-center::before {
  content:"";
  position:absolute;
  z-index:0;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 4% -18%, rgba(45,190,196,.14), transparent 27%),
    radial-gradient(circle at 95% 0%, rgba(15,127,135,.08), transparent 22%);
}
.task-quality-center::after {
  content:"";
  position:absolute;
  z-index:1;
  top:0;
  left:19px;
  right:19px;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.96), transparent);
  pointer-events:none;
}
.task-quality-center[hidden], .task-quality-center__details[hidden] { display:none !important; }

.task-quality-center__compact {
  position:relative;
  z-index:2;
  min-height:76px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto auto;
  gap:13px;
  align-items:center;
  padding:12px 14px;
  background:linear-gradient(135deg,rgba(239,250,250,.94) 0%,rgba(255,255,255,.96) 68%);
}
.task-quality-center__compact--locked {
  background:linear-gradient(135deg,rgba(255,244,248,.97) 0%,rgba(255,255,255,.96) 70%);
}
.task-quality-center__icon {
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.88);
  border-radius:14px;
  color:#fff;
  background:linear-gradient(145deg,#28adb3,var(--quality-teal-deep));
  box-shadow:0 9px 19px rgba(15,127,135,.21), inset 0 1px 0 rgba(255,255,255,.28);
  font-size:17px;
  font-weight:950;
  text-shadow:0 1px 1px rgba(0,0,0,.10);
}
.task-quality-center__compact--locked .task-quality-center__icon {
  color:#fff;
  background:linear-gradient(145deg,#f0537c,#ba1f4c);
  box-shadow:0 9px 19px rgba(213,39,88,.19), inset 0 1px 0 rgba(255,255,255,.28);
}
.task-quality-center__copy { min-width:0; }
.task-quality-center__eyebrow {
  margin:0 0 3px;
  color:var(--quality-teal);
  font-size:9.6px;
  line-height:1.1;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.task-quality-center__headline {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:5px 9px;
}
.task-quality-center__headline strong {
  color:var(--quality-ink);
  font-size:14.7px;
  line-height:1.24;
  font-weight:900;
  letter-spacing:-.12px;
}
.task-quality-center__headline span { color:var(--quality-muted); font-size:11.2px; line-height:1.35; }

.task-quality-center__priority {
  max-width:100%;
  margin-top:5px;
  padding:0;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  gap:6px;
  color:#7d6670;
  font:inherit;
  font-size:10.6px;
  line-height:1.35;
  cursor:pointer;
  overflow:hidden;
}
.task-quality-center__priority::before {
  content:"";
  flex:0 0 auto;
  width:5px;
  height:5px;
  border-radius:999px;
  background:var(--quality-danger);
  box-shadow:0 0 0 3px rgba(223,43,94,.08);
}
.task-quality-center__priority span,
.task-quality-center__priority strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task-quality-center__priority span { max-width:195px; color:#536e72; }
.task-quality-center__priority strong { max-width:330px; color:#a61d46; font-weight:850; }
.task-quality-center__priority em {
  flex:0 0 auto;
  color:var(--quality-teal);
  font-style:normal;
  font-weight:950;
}

.task-quality-center__metrics { display:flex; gap:8px; }
.task-quality-metric {
  min-width:62px;
  height:44px;
  padding:5px 9px;
  border:1px solid transparent;
  border-radius:12px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:0;
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78);
}
.task-quality-metric strong { font-size:14.5px; line-height:1; font-weight:950; }
.task-quality-metric small { margin-top:3px; font-size:8.4px; font-weight:900; text-transform:uppercase; letter-spacing:.045em; }
.task-quality-metric--blocker {
  color:#aa1d49;
  border-color:rgba(223,43,94,.08);
  background:linear-gradient(180deg,#fff5f8,#ffedf3);
}
.task-quality-metric--suggestion {
  color:#77580d;
  border-color:rgba(197,148,31,.09);
  background:linear-gradient(180deg,#fffbea,#fff4cf);
}

.task-quality-center__toggle {
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 12px;
  border:1px solid rgba(15,127,135,.15);
  border-radius:11px;
  background:linear-gradient(180deg,#fff,#f7fbfb);
  box-shadow:0 4px 12px rgba(7,75,81,.055), inset 0 1px 0 rgba(255,255,255,.92);
  color:#3e686d;
  font:inherit;
  font-size:10.5px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
.task-quality-center__toggle:hover {
  transform:translateY(-1px);
  background:#f3f9f9;
  border-color:rgba(15,127,135,.28);
  box-shadow:0 7px 16px rgba(7,75,81,.08);
}

.task-quality-center__details {
  position:relative;
  z-index:2;
  border-top:1px solid rgba(18,63,69,.07);
  background:rgba(248,252,252,.86);
}
.task-quality-center__list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
  padding:12px;
  background:linear-gradient(180deg,rgba(248,252,252,.92),rgba(251,253,253,.98));
}
.task-quality-card {
  position:relative;
  min-width:0;
  border:1px solid rgba(18,63,69,.09);
  border-radius:15px;
  overflow:hidden;
  background:rgba(255,255,255,.97);
  box-shadow:0 8px 20px rgba(7,75,81,.045);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.task-quality-card::before {
  content:"";
  position:absolute;
  z-index:2;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg,#f15c83,#d52658);
}
.task-quality-card--suggestion::before { background:linear-gradient(180deg,#e3bc54,#bd8915); }
.task-quality-card:hover { transform:translateY(-1px); box-shadow:0 12px 26px rgba(7,75,81,.07); }
.task-quality-card--blocker { border-color:rgba(240,42,97,.18); }
.task-quality-card--suggestion { border-color:rgba(194,142,19,.20); }
.task-quality-card__head {
  min-height:57px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 13px 10px 14px;
  border-bottom:1px solid rgba(18,63,69,.055);
  background:linear-gradient(135deg,rgba(255,249,251,.78),rgba(255,255,255,.95));
}
.task-quality-card--suggestion .task-quality-card__head {
  background:linear-gradient(135deg,rgba(255,251,237,.80),rgba(255,255,255,.95));
}
.task-quality-card__kicker {
  display:block;
  margin-bottom:3px;
  color:#9a6675;
  font-size:8.7px;
  font-weight:950;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.task-quality-card--suggestion .task-quality-card__kicker { color:#8a6c21; }
.task-quality-card__head h3 {
  margin:0;
  color:var(--quality-ink);
  font-size:13px;
  line-height:1.33;
  font-weight:900;
  letter-spacing:-.08px;
}
.task-quality-card__count {
  flex:0 0 auto;
  min-width:27px;
  height:27px;
  padding:0 7px;
  border:1px solid rgba(223,43,94,.08);
  border-radius:999px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg,#fff6f9,#ffeaf1);
  color:#b31e49;
  box-shadow:inset 0 1px 0 #fff;
  font-size:10.4px;
  font-weight:950;
}
.task-quality-card--suggestion .task-quality-card__count {
  border-color:rgba(197,148,31,.10);
  background:linear-gradient(180deg,#fffbed,#fff4d2);
  color:#806210;
}
.task-quality-card__issues { display:grid; }
.task-quality-issue {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
  padding:10px 13px 10px 14px;
  transition:background .14s ease;
}
.task-quality-issue:hover { background:rgba(244,250,250,.58); }
.task-quality-issue + .task-quality-issue { border-top:1px solid rgba(18,63,69,.05); }
.task-quality-issue__dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#ef3568;
  box-shadow:0 0 0 4px rgba(239,53,104,.08);
}
.task-quality-issue--suggestion .task-quality-issue__dot { background:#d2a227; box-shadow:0 0 0 4px rgba(210,162,39,.09); }
.task-quality-issue__copy { min-width:0; display:grid; gap:2px; }
.task-quality-issue__copy strong { color:#264f54; font-size:11.4px; line-height:1.35; font-weight:850; }
.task-quality-issue__copy span { color:#71888c; font-size:10px; line-height:1.45; }
.task-quality-issue__actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.task-quality-issue__actions button {
  border:1px solid rgba(255,255,255,.45);
  border-radius:9px;
  padding:7px 10px;
  cursor:pointer;
  background:linear-gradient(145deg,#16939a,#08727a);
  box-shadow:0 5px 12px rgba(15,127,135,.16), inset 0 1px 0 rgba(255,255,255,.20);
  color:#fff;
  font:inherit;
  font-size:9.7px;
  font-weight:900;
  white-space:nowrap;
  transition:transform .14s ease,box-shadow .14s ease,filter .14s ease;
}
.task-quality-issue__actions button:hover { transform:translateY(-1px); filter:saturate(1.06); box-shadow:0 7px 15px rgba(15,127,135,.20); }
.task-quality-issue__actions button.is-secondary {
  color:#4f6d71;
  border-color:rgba(15,127,135,.09);
  background:linear-gradient(180deg,#f7fbfb,#edf6f6);
  box-shadow:none;
}
.task-quality-center__more {
  margin:0;
  padding:1px 13px 12px;
  color:#748b8e;
  font-size:10px;
  line-height:1.45;
  background:rgba(251,253,253,.98);
}

.task-quality-inline {
  flex:0 0 auto;
  min-width:22px;
  height:22px;
  padding:0 7px;
  display:inline-grid;
  place-items:center;
  border-radius:999px;
  font-size:9.5px;
  line-height:1;
  font-weight:950;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.task-quality-inline--blocker { color:#ad1946; background:#ffe7ee; border:1px solid rgba(240,42,97,.15); }
.task-quality-inline--suggestion { color:#80610e; background:#fff4c8; border:1px solid rgba(198,149,25,.16); }
.notion-table tr.task-row--quality-blocker > td:first-child { box-shadow:inset 3px 0 0 #ef3568; }
.notion-table tr.task-row--quality-suggestion:not(.task-row--quality-blocker) > td:first-child { box-shadow:inset 3px 0 0 #d2a227; }
.notion-table tr.task-row--quality-blocker > td { background-image:linear-gradient(rgba(255,246,249,.42),rgba(255,246,249,.42)); }
.task-row-quality-focus > td { animation:qualityRowPulse 1.25s ease both; }
@keyframes qualityRowPulse { 0%,100%{box-shadow:inset 0 0 0 0 rgba(15,127,135,0)} 45%{box-shadow:inset 0 0 0 2px rgba(15,127,135,.25)} }
.quality-gate-locked { cursor:not-allowed !important; }
.tab.quality-gate-locked { opacity:.52; }
.toolbar__btn--new.quality-gate-locked { opacity:.62; filter:saturate(.55); }

@media (max-width:980px) {
  .task-quality-center__compact { grid-template-columns:40px minmax(0,1fr) auto; }
  .task-quality-center__metrics { display:none; }
  .task-quality-center__list { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .task-quality-center { margin:8px 10px; border-radius:15px; }
  .task-quality-center__compact { min-height:68px; grid-template-columns:34px minmax(0,1fr) auto; gap:9px; padding:10px; }
  .task-quality-center__icon { width:34px; height:34px; border-radius:10px; font-size:14px; }
  .task-quality-center__eyebrow { font-size:8.7px; }
  .task-quality-center__headline strong { font-size:13.4px; }
  .task-quality-center__headline span { display:none; }
  .task-quality-center__priority { font-size:9.8px; }
  .task-quality-center__priority strong { max-width:145px; }
  .task-quality-center__toggle { min-height:36px; padding:0 8px; }
  .task-quality-center__toggle { font-size:0; }
  .task-quality-center__toggle span { font-size:11px; }
  .task-quality-issue { grid-template-columns:auto minmax(0,1fr); }
  .task-quality-issue__actions { grid-column:2; justify-content:flex-start; }
  .task-render-more { flex-direction:column; gap:2px; }
}

.description-structure-assistant {
  margin-top:9px;
  padding:11px 12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:9px;
  align-items:start;
  border:1px solid rgba(184,137,21,.20);
  border-radius:12px;
  background:#fff9e5;
  color:#6f5613;
}
.description-structure-assistant[hidden] { display:none !important; }
.description-structure-assistant--separate-tasks { border-color:rgba(135,79,168,.18); background:#fbf5ff; color:#68427d; }
.description-structure-assistant__icon { width:24px; height:24px; display:grid; place-items:center; border-radius:8px; background:rgba(255,255,255,.72); font-size:12px; font-weight:900; }
.description-structure-assistant strong { display:block; font-size:11.5px; line-height:1.35; }
.description-structure-assistant p { margin:3px 0 0; font-size:10.5px; line-height:1.5; opacity:.9; }
.submit-status-field { margin-top:4px; }


/* ========================================================================
   Submit Task — perpetual work mode + spacing refinement
   Keeps the existing visual system while giving labels, hints and fields
   enough breathing room. PERPETUAL tasks intentionally do not require dates.
======================================================================== */
.moa-task-form--studio .submit-section > .form-group + .form-group,
.moa-task-form--studio .submit-section > .form-group + .form-row,
.moa-task-form--studio .submit-section > .form-row + .form-group {
  margin-top: 18px;
}

.moa-task-form--studio .form-row {
  row-gap: 18px;
}

.moa-task-form--studio .form-group label {
  min-height: 22px;
  margin-bottom: 9px;
  line-height: 1.35;
}

.moa-task-form--studio .field-hint {
  margin-top: 9px;
  line-height: 1.5;
}

.moa-task-form--studio .form-group textarea + .field-hint,
.moa-task-form--studio .people-picker + input + .field-hint {
  margin-top: 10px;
}

.perpetual-work-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 2px 0 4px;
  padding: 13px 14px;
  border: 1px solid rgba(33, 169, 179, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(232, 248, 249, 0.96), rgba(248, 253, 253, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.perpetual-work-note[hidden] {
  display: none !important;
}

.perpetual-work-note__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--moa-aqua), var(--moa-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 90, 98, 0.17);
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.perpetual-work-note strong,
.perpetual-work-note small {
  display: block;
}

.perpetual-work-note strong {
  color: #17494f;
  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 900;
}

.perpetual-work-note small {
  margin-top: 3px;
  color: #708b8f;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 600;
}

.submit-section--work-window.is-perpetual {
  border-color: rgba(33, 169, 179, 0.16);
  background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(242,250,250,0.96));
}

.submit-section--work-window.is-perpetual .submit-status-field {
  margin-top: 18px;
}

@media (max-width: 680px) {
  .moa-task-form--studio .submit-section > .form-group + .form-group,
  .moa-task-form--studio .submit-section > .form-group + .form-row,
  .moa-task-form--studio .submit-section > .form-row + .form-group {
    margin-top: 15px;
  }
}


/* All Tasks Excel export */
.toolbar__btn--export {
  border-color: rgba(15,127,135,.12);
  background: rgba(234,248,248,.72);
  color: #0f7279;
}

.toolbar__btn--export:hover {
  border-color: rgba(15,127,135,.22);
  background: #dcf3f4;
  color: #075a62;
}

.toolbar__btn--export:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.toolbar-export-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(15,114,121,.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: toolbar-export-spin .7s linear infinite;
}

@keyframes toolbar-export-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .toolbar__btn--export {
    font-size: 0;
    gap: 0;
  }

  .toolbar__btn--export svg,
  .toolbar__btn--export .toolbar-export-spinner {
    margin: 0;
  }
}

/* Person chips: Google profile photo on top of the colored initials
   (if the photo can't load, the initials stay visible). */
.avatar-chip .avatar-initials {
  position: relative;
  overflow: hidden;
}
.avatar-chip .avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Non-academic staff: small tag with their unit next to the name. */
.area-tag {
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff4e5;
  border: 1px solid #f6d6a8;
  color: #9a5b00;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
