/*
 * Clubwiser central stylesheet
 * Shared shell, typography, navigation, forms, modal primitives and reusable components.
 * Page-specific additions live in css/modules/*.css (plus established specialist sheets).
 */
* {
  box-sizing: border-box;
}

:root {
  --brand-primary: #f68b1f;
  --brand-secondary: #343a40;
  --brand-sidebar-text: #ffffff;
  --brand-text: #142033;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  background: #ffffff;
  color: var(--brand-text);
}

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

strong,
b {
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

.sidebar {
  width: 260px;
  height: 100vh;
  background: var(--brand-primary);
  color: var(--brand-sidebar-text);
  position: fixed;
  left: 0;
  top: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar h2 {
  margin: 0 0 20px;
  font-size: 24px;
}

.sidebar-logo {
  width: 150px;
  height: auto;
  display: block;
}

.sidebar-brand {
  position: relative;
  display: block;
  width: 150px;
  height: 38px;
  flex: 0 0 auto;
}

.sidebar-brand .sidebar-logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity .14s ease;
}

.sidebar-brand .sidebar-logo-icon {
  width: 42px;
  opacity: 0;
}

.sidebar.is-collapsed .sidebar-brand {
  width: 42px;
  height: 42px;
}

.sidebar.is-collapsed .sidebar-brand .sidebar-logo-full {
  opacity: 0;
}

.sidebar.is-collapsed .sidebar-brand .sidebar-logo-icon {
  opacity: 1;
}

.sidebar.is-collapsed .sidebar-brand .sidebar-logo {
  content: normal !important;
}

.sidebar-header {
  margin-bottom: 20px;
}

.mobile-close {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
}

.club-switcher {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid white;
  background: #f68b1f;
  color: white;
  margin-bottom: 22px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  color: white;
  font-size: 15px;
}

.side-nav a:hover,
.side-nav a.active {
  background: #4B4B4B;
  color: white;
}

.sidebar-footer {
  margin-top: auto;
}

.user-chip {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;
  background: #4B4B4B;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.user-chip small {
  display: block;
  color: #c9d5e6;
}

.main {
  margin-left: 260px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 6px 0 0;
  color: #68758a;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4B4B4B;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card,
.panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 31, 51, 0.05);
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  font-size: 26px;
}

.stat-card h2 {
  margin: 12px 0 4px;
  font-size: 30px;
}

.stat-card p {
  margin: 0;
  color: #68758a;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
}

.panel-header a {
  color: #4B4B4B;
  font-weight: 700;
  font-size: 14px;
}

.list-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf2f7;
}

.list-row:last-child {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge.red {
  background: #ffe5e5;
  color: #d12d2d;
}

.badge.blue {
  background: #e3efff;
  color: #4B4B4B;
}

.badge.green {
  background: #e5f8ee;
  color: #16834a;
}

.badge.orange {
  background: #fff0d9;
  color: #c76a00;
}

.badge.grey {
  background: #edf2f7;
  color: #4a5568;
}

.progress-bar {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 18px 0 8px;
  overflow: hidden;
}

.progress-bar div {
  height: 100%;
  background: var(--brand-primary, #f68b1f);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tabs button {
  border: none;
  background: #edf2f7;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.tabs button.active {
  background: #4B4B4B;
  color: white;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 15px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
}

th {
  color: #68758a;
  font-size: 13px;
}

.mobile-menu-btn {
  display: none;
}

@media (max-width: 950px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-close {
    display: block;
  }

  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 15;
    background: #4B4B4B;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 18px;
  }

  .main {
    margin-left: 0;
    padding: 76px 18px 24px;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

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

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

  .list-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 24px;
  }
}

.side-nav i,
.mobile-menu-btn i {
  width: 19px;
  height: 19px;
}

.stat-card svg {
  width: 28px;
  height: 28px;
  color: #4B4B4B;
}

.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar::-webkit-scrollbar,
.side-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb,
.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.38);
  border-radius: 999px;
}

.sidebar {
  width: 250px;
  overflow: hidden;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.side-nav::-webkit-scrollbar {
  width: 5px;
}

.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.42);
  border-radius: 999px;
}

.side-nav a svg,
.mobile-menu-btn svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.main {
  margin-left: 250px;
}

@media (max-width: 950px) {
  .main {
    margin-left: 0;
  }
}

.login-page {
  background: #f4f7fb;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 18px 40px rgba(15, 31, 51, 0.08);
}

.login-card h1 {
  margin: 0 0 8px;
}

.login-card p {
  color: #68758a;
}

.login-card form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.login-card input {
  border: 1px solid #d8e0eb;
  border-radius: 12px;
  padding: 13px;
  font: inherit;
}

#loginMessage {
  margin-top: 16px;
  color: #d12d2d;
}

.login-card select {
  border: 1px solid #d8e0eb;
  border-radius: 12px;
  padding: 13px;
  font: inherit;
  background: white;
}

.main {
  animation: pageFadeIn 0.22s ease both;
}

.panel,
.stat-card,
.summary-card {
  animation: cardLiftIn 0.28s ease both;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardLiftIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.side-nav a {
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.side-nav a:hover {
  transform: translateX(3px);
}

.primary-btn,
.secondary-btn,
.stat-card,
.panel,
.summary-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.stat-card:hover,
.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 31, 51, 0.08);
}
/* Fast-feeling loading states -------------------------------------------------
   Keep boxes in place while Firebase/auth data arrives so the page does not
   flash empty states and then jump into position. */
.skeleton-row td,
.skeleton-card {
  cursor: default;
}

.skeleton-line,
.skeleton-pill {
  display: inline-block;
  background: linear-gradient(90deg, #edf2f7 0%, #f8fafc 45%, #edf2f7 90%);
  background-size: 220% 100%;
  animation: skeletonPulse 1.15s ease-in-out infinite;
}

.skeleton-line {
  height: 13px;
  border-radius: 999px;
  vertical-align: middle;
}

.skeleton-line.tiny { width: 34px; }
.skeleton-line.small { width: 76px; }
.skeleton-line.medium { width: 135px; }
.skeleton-line.wide { width: 220px; max-width: 78%; }

.skeleton-pill {
  width: 72px;
  height: 25px;
  border-radius: 999px;
}

.skeleton-row .skeleton-line + .skeleton-line {
  display: block;
  margin-top: 8px;
}

.skeleton-card {
  pointer-events: none;
}

.loading-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #68758a;
}

@keyframes skeletonPulse {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .main,
  .panel,
  .stat-card,
  .summary-card,
  .skeleton-line,
  .skeleton-pill {
    animation: none !important;
    transition: none !important;
  }
}

/* Documents module ---------------------------------------------------------- */
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f68b1f;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-btn,
.text-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dce5ef;
  background: #fff;
  color: #344054;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
}

.secondary-btn svg,
.primary-btn svg {
  width: 18px;
  height: 18px;
}

.text-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: #f68b1f;
  font-size: 13px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.documents-page {
  max-width: 1480px;
}

.documents-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.doc-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 31, 51, 0.05);
}

.doc-stat-card.attention {
  border-color: #ffd9b0;
  background: linear-gradient(180deg, #fffaf4 0%, #fff 100%);
}

.doc-stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f4f7fb;
  color: #f68b1f;
  flex: 0 0 auto;
}

.doc-stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.doc-stat-card small {
  display: block;
  margin-top: 4px;
  color: #68758a;
  font-weight: 700;
}

.documents-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.documents-sidebar {
  position: sticky;
  top: 20px;
}

.documents-sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.documents-sidebar-heading h3 {
  margin: 0;
}

.doc-category-list {
  display: grid;
  gap: 4px;
}

.doc-category-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.doc-category-btn:hover,
.doc-category-btn.active {
  background: #f4f7fb;
  color: #142033;
}

.doc-category-btn span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.doc-category-btn svg {
  width: 17px;
  height: 17px;
  color: #f68b1f;
}

.doc-category-count {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #68758a;
  font-size: 12px;
  text-align: center;
}

.document-focus-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: #142033;
  color: white;
}

.document-focus-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  margin-bottom: 10px;
}

.document-focus-card h4 {
  margin: 0 0 6px;
}

.document-focus-card p {
  margin: 0;
  color: #d8e0eb;
  font-size: 13px;
  line-height: 1.45;
}

.documents-main {
  min-width: 0;
}

.documents-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px;
  gap: 10px;
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dce5ef;
  background: #fff;
  border-radius: 12px;
  padding: 0 12px;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: #68758a;
  flex: 0 0 auto;
}

.search-box input,
.documents-toolbar select,
.document-form input,
.document-form select,
.document-form textarea {
  width: 100%;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
  color: #142033;
}

.search-box input {
  border: none;
  padding-left: 0;
  outline: none;
}

.documents-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #ffd9b0;
  border-radius: 14px;
  background: #fff8ef;
  color: #553000;
}

.documents-alert svg {
  color: #f68b1f;
  flex: 0 0 auto;
}

.documents-alert span {
  display: block;
  margin-top: 3px;
  color: #7a4a11;
}

.documents-table-wrap {
  overflow: auto;
}

.documents-table {
  min-width: 940px;
}

.documents-table .document-title-cell {
  min-width: 260px;
}

.document-title-button {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.file-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #f4f7fb;
  color: #f68b1f;
}

.document-title-button strong {
  display: block;
  margin-bottom: 4px;
}

.document-title-button small,
.muted-small {
  color: #68758a;
}

.linked-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.row-action-btn {
  border: 1px solid #dce5ef;
  background: #fff;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: #344054;
}

.row-action-btn svg {
  width: 16px;
  height: 16px;
}

.documents-empty {
  padding: 50px 20px;
  text-align: center;
}

.documents-empty svg {
  width: 42px;
  height: 42px;
  color: #f68b1f;
}

.documents-empty h3 {
  margin: 14px 0 6px;
}

.documents-empty p {
  margin: 0 auto 18px;
  max-width: 460px;
  color: #68758a;
}

.document-detail-panel,
.template-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 92vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -18px 0 40px rgba(15, 31, 51, 0.12);
  transform: translateX(106%);
  transition: transform 0.22s ease;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.document-detail-panel.open,
.template-drawer.open {
  transform: translateX(0);
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 51, 0.22);
  z-index: 50;
}

.detail-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid #e2e8f0;
}

.detail-panel-header h2 {
  margin: 0;
  font-size: 22px;
}

.detail-panel-body,
.template-list {
  padding: 22px;
  overflow: auto;
}

.detail-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.detail-item small {
  display: block;
  margin-bottom: 4px;
  color: #68758a;
  font-weight: 800;
}

.detail-item strong,
.detail-item span {
  display: block;
}

.detail-notes {
  white-space: pre-wrap;
  color: #344054;
  line-height: 1.55;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.template-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.template-card h3 {
  margin: 0;
  font-size: 16px;
}

.template-card p {
  margin: 0;
  color: #68758a;
  line-height: 1.45;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  border: none;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(15, 31, 51, 0.25);
}

.modal::backdrop {
  background: rgba(15, 31, 51, 0.38);
}

.document-form {
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

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

.document-form label span {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-weight: 800;
  font-size: 13px;
}

.full-width {
  grid-column: 1 / -1;
}

.file-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop svg {
  width: 28px;
  height: 28px;
  color: #f68b1f;
}

.file-drop small {
  color: #68758a;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #68758a;
}

.form-message.error {
  color: #d12d2d;
}

.form-message.success {
  color: #16834a;
}

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

  .documents-sidebar {
    position: static;
  }

  .doc-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar,
  .documents-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

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

  .documents-toolbar {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .detail-grid,
  .doc-category-list {
    grid-template-columns: 1fr;
  }

  .modal-actions,
  .topbar-actions {
    width: 100%;
  }

  .modal-actions button,
  .topbar-actions button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .documents-stats-grid {
    grid-template-columns: 1fr;
  }
}


/* Site-wide professional refresh ------------------------------------------------
   Extends the Documents page visual language across Clubwiser without changing
   the orange / charcoal brand palette. */
:root {
  --cw-orange: #f68b1f;
  --cw-charcoal: #4B4B4B;
  --cw-ink: #142033;
  --cw-muted: #68758a;
  --cw-border: #e2e8f0;
  --cw-panel: #ffffff;
  --cw-soft: #f4f7fb;
  --cw-soft-2: #f8fafc;
  --cw-shadow: 0 12px 30px rgba(15, 31, 51, 0.07);
  --cw-shadow-strong: 0 22px 55px rgba(15, 31, 51, 0.11);
}

html {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f4f7fb;
}

body {
  background:
    radial-gradient(circle at top right, rgba(246,139,31,0.08), transparent 30rem),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.documents-table-wrap::-webkit-scrollbar,
.detail-panel-body::-webkit-scrollbar,
.template-list::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.documents-table-wrap::-webkit-scrollbar-track,
.detail-panel-body::-webkit-scrollbar-track,
.template-list::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track {
  background: #f4f7fb;
}

body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.documents-table-wrap::-webkit-scrollbar-thumb,
.detail-panel-body::-webkit-scrollbar-thumb,
.template-list::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.sidebar,
.side-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.42) transparent;
}

.sidebar::-webkit-scrollbar,
.side-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.side-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.42) !important;
  border-radius: 999px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 28%),
    var(--cw-orange);
  border-right: 1px solid rgba(255,255,255,0.22);
  box-shadow: 14px 0 34px rgba(75,75,75,0.10);
}

.club-switcher {
  border: 1px solid rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.side-nav a {
  border: 1px solid transparent;
  color: rgba(255,255,255,0.92);
  font-weight: 760;
}

.side-nav a:hover,
.side-nav a.active {
  background: rgba(75,75,75,0.92);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 10px 18px rgba(75,75,75,0.12);
}

.user-chip {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
}

.user-chip small {
  color: rgba(255,255,255,0.72);
}

.avatar {
  background: rgba(75,75,75,0.92);
}

.main {
  padding: 30px;
  max-width: 1480px;
}

.topbar {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--cw-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(246,139,31,0.12), transparent 22rem),
    linear-gradient(135deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--cw-shadow);
}

.topbar::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -56px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 36px solid rgba(246,139,31,0.06);
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h1 {
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -0.04em;
  color: var(--cw-ink);
}

.topbar p {
  max-width: 760px;
  color: var(--cw-muted);
  line-height: 1.55;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.tabs button,
.club-tabs button,
.meeting-tabs button {
  min-height: 44px;
  border-radius: 14px;
}

.primary-btn {
  gap: 8px;
  background: linear-gradient(180deg, #5a5a5a 0%, var(--cw-charcoal) 100%);
  box-shadow: 0 12px 22px rgba(75,75,75,0.16);
}

.primary-btn:hover {
  box-shadow: 0 16px 30px rgba(75,75,75,0.22);
}

.primary-btn.small,
.secondary-btn.small {
  min-height: 38px;
  border-radius: 12px;
}

.secondary-btn {
  background: #fff;
  border-color: #dce5ef;
  color: #344054;
  box-shadow: 0 8px 16px rgba(15,31,51,0.04);
}

.panel,
.stat-card,
.summary-card,
.location-card,
.documents-sidebar,
.documents-main,
.doc-stat-card,
.detail-card,
.template-card {
  border-color: var(--cw-border) !important;
  box-shadow: var(--cw-shadow);
}

.panel {
  position: relative;
  overflow: hidden;
}

.panel::before,
.stat-card::before,
.summary-card::before,
.doc-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cw-orange), rgba(246,139,31,0));
  opacity: 0.75;
  pointer-events: none;
}

.stat-card,
.summary-card,
.doc-stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card span,
.summary-card svg,
.file-icon,
.doc-stat-icon,
.empty-state svg,
.documents-empty svg {
  color: var(--cw-orange) !important;
}

.stat-card span,
.summary-card svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: #fff7ed;
  margin-bottom: 14px;
}

.stat-card h2,
.summary-card h2,
.doc-stat-card strong {
  letter-spacing: -0.04em;
}

.panel-header {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 14px;
}

.panel-header h3,
.panel-header h4 {
  margin: 0;
  letter-spacing: -0.02em;
}

.panel-header a,
.back-link,
.text-btn {
  color: var(--cw-orange) !important;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f8fafc;
  color: #667085;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
}

th:first-child {
  border-top-left-radius: 14px;
}

th:last-child {
  border-top-right-radius: 14px;
}

tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

tbody tr:hover {
  background: #fffaf4 !important;
}

td {
  background: rgba(255,255,255,0.68);
}

.badge {
  border: 1px solid rgba(0,0,0,0.04);
  font-weight: 850;
}

.badge.blue {
  background: #f3f4f6;
  color: var(--cw-charcoal);
}

.progress-bar div,
.tabs button.active,
.club-tabs button.active,
.meeting-tabs button.active {
  background: var(--cw-charcoal) !important;
  color: #fff !important;
}

.tabs,
.club-tabs,
.meeting-tabs {
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: rgba(255,255,255,0.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.tabs button,
.club-tabs button,
.meeting-tabs button {
  background: transparent !important;
  color: #667085;
}

.tabs button.active,
.club-tabs button.active,
.meeting-tabs button.active {
  box-shadow: 0 10px 18px rgba(75,75,75,0.14);
}

.empty-state,
.documents-empty {
  border: 1px dashed #d6dee9;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modal-backdrop {
  backdrop-filter: blur(6px);
}

.modal-card,
.modal {
  border: 1px solid rgba(255,255,255,0.65);
}

input:focus,
select:focus,
textarea:focus,
.search-box:focus-within {
  outline: none;
  border-color: rgba(246,139,31,0.55) !important;
  box-shadow: 0 0 0 4px rgba(246,139,31,0.12);
}

.pro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pro-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--cw-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--cw-shadow);
}

.pro-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cw-orange), rgba(246,139,31,0));
}

.pro-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff7ed;
  color: var(--cw-orange);
  margin-bottom: 14px;
}

.pro-card-icon svg {
  width: 22px;
  height: 22px;
}

.pro-card h3 {
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.pro-card p {
  margin: 0;
  color: var(--cw-muted);
  line-height: 1.5;
}

.pro-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

.pro-metric {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--cw-ink);
}

.pro-list {
  display: grid;
  gap: 12px;
}

.pro-list-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  background: #fff;
}

.pro-list-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f4f7fb;
  color: var(--cw-orange);
}

.pro-list-item strong {
  display: block;
  margin-bottom: 3px;
}

.pro-list-item small {
  color: var(--cw-muted);
}

.coming-soon-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}

.feature-stack {
  display: grid;
  gap: 12px;
}

@media (max-width: 1100px) {
  .pro-grid,
  .coming-soon-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 950px) {
  .main {
    padding: 82px 18px 24px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 20px;
    border-radius: 20px;
  }

  .pro-list-item {
    grid-template-columns: 38px 1fr;
  }

  .pro-list-item > :last-child {
    grid-column: 2;
    justify-self: start;
  }
}

/* Login and workspace identity refresh ------------------------------------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 500px);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
}

.login-brand-panel,
.modern-login-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15, 31, 51, 0.10);
}

.login-brand-panel {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background:
    radial-gradient(circle at 80% 10%, rgba(246, 139, 31, 0.24), transparent 32%),
    linear-gradient(135deg, #142033 0%, #3c3c3c 58%, #f68b1f 160%);
  color: white;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -120px -150px auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  border: 70px solid rgba(255, 255, 255, 0.08);
}

.login-brand-top,
.login-card-header,
.login-help-row,
.workspace-brand,
.table-org-cell,
.relationship-card {
  display: flex;
  align-items: center;
}

.login-brand-top {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 18px;
}

.login-logo {
  width: 170px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  font-weight: 800;
  font-size: 13px;
}

.login-pill svg,
.login-feature-grid svg {
  width: 17px;
  height: 17px;
}

.login-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 70px 0;
}

.login-hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 6vw, 78px);
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.login-hero-copy p:not(.eyebrow) {
  margin: 20px 0 0;
  max-width: 620px;
  color: rgba(255,255,255,0.78);
  font-size: 18px;
  line-height: 1.55;
}

.login-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-feature-grid article,
.setup-principles div {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.login-feature-grid span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(246,139,31,0.24);
  color: #fff;
}

.login-feature-grid strong,
.login-feature-grid small {
  display: block;
}

.login-feature-grid small {
  margin-top: 6px;
  color: rgba(255,255,255,0.68);
  line-height: 1.4;
}

.modern-login-card {
  align-self: center;
  max-width: none;
  padding: 34px;
}

.login-card-header {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.login-card-header h2 {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-card-header p:not(.eyebrow) {
  margin: 0;
  color: #68758a;
  line-height: 1.5;
}

.login-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff3e5;
  color: #f68b1f;
  flex: 0 0 auto;
}

.login-icon svg {
  width: 22px;
  height: 22px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  margin-bottom: 8px;
}

.login-form input,
.login-form select,
.login-form textarea {
  width: 100%;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  background: #fff;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  padding: 15px 18px;
  border-radius: 14px;
}

.login-help-row {
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: #68758a;
  font-size: 13px;
  font-weight: 700;
}

.form-message {
  min-height: 20px;
  color: #68758a;
  font-size: 14px;
}

.setup-principles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.setup-principles div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setup-principles strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f68b1f;
}

.workspace-brand {
  gap: 12px;
  padding: 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
}

.workspace-logo,
.mini-org-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
  color: #4B4B4B;
  font-weight: 900;
}

.workspace-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.workspace-logo img,
.workspace-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.workspace-brand strong,
.workspace-brand small {
  display: block;
}

.workspace-brand small {
  margin-top: 2px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
}

.sidebar,
.side-nav {
  scrollbar-color: rgba(255,255,255,0.42) transparent;
}

.sidebar::-webkit-scrollbar,
.side-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.side-nav::-webkit-scrollbar-track {
  background: transparent !important;
}

.sidebar::-webkit-scrollbar-thumb,
.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.42) !important;
  border-radius: 999px;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-brand-panel {
    min-height: auto;
  }

  .login-hero-copy {
    padding: 50px 0;
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-brand-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .modern-login-card,
  .login-brand-panel {
    padding: 24px;
    border-radius: 22px;
  }
}

/* Clubwiser platform admin + club-facing relationship refinement */
.field-help {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted, #7a7f86);
  font-size: 0.78rem;
  line-height: 1.35;
}

input[readonly] {
  background: #f6f4f1;
  color: #4a423c;
  border-color: rgba(35, 31, 32, 0.09);
}

.admin-note-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid rgba(35, 31, 32, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf5, #ffffff);
  box-shadow: 0 14px 32px rgba(35, 31, 32, 0.05);
}

.admin-note-card strong,
.admin-note-card small {
  display: block;
}

.admin-note-card small {
  margin-top: 0.25rem;
  color: var(--muted, #737373);
  line-height: 1.45;
}

.large-relationship-card {
  min-height: 120px;
  align-items: center;
  background: linear-gradient(135deg, rgba(244, 119, 32, 0.1), rgba(255, 255, 255, 0.96));
}

.club-network-readonly .panel {
  min-height: 100%;
}

.platform-admin-link[hidden] {
  display: none !important;
}

.admin-denied-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.empty-state-block {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem;
}

.empty-state-block.compact {
  padding: 1.5rem;
  max-width: 680px;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(244, 119, 32, 0.12);
  color: var(--orange, #f47720);
  margin-bottom: 1rem;
}

.admin-workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.3fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.25rem;
}

.admin-create-card,
.admin-list-card,
.admin-detail-panel {
  border: 1px solid rgba(35, 31, 32, 0.08);
  box-shadow: 0 18px 50px rgba(35, 31, 32, 0.06);
}

.admin-filter-row {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-table-wrap {
  max-height: 480px;
  overflow: auto;
}

.admin-org-row,
.admin-child-row {
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.admin-org-row:hover,
.admin-child-row:hover {
  background: #fff8f1;
}

.admin-org-row.selected {
  background: rgba(244, 119, 32, 0.1);
  box-shadow: inset 3px 0 0 var(--orange, #f47720);
}

.admin-detail-panel {
  margin-top: 1.25rem;
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1rem;
}

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

.panel-header.tight {
  margin-bottom: 0.8rem;
}

.mini-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@media (max-width: 1100px) {
  .admin-workspace-grid,
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-row {
    grid-template-columns: 1fr;
  }
}


/* === Clubwiser Admin page hard fix === */
[hidden] {
  display: none !important;
}

body[data-page="clubwiser-admin"] {
  background:
    radial-gradient(circle at top right, rgba(246,139,31,0.08), transparent 34rem),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

body[data-page="clubwiser-admin"] .main {
  max-width: none;
  width: auto;
  min-height: 100vh;
  padding: 30px 34px 42px;
}

body[data-page="clubwiser-admin"] .topbar {
  margin-bottom: 22px;
}

body[data-page="clubwiser-admin"] #adminContent {
  display: block;
}

body[data-page="clubwiser-admin"] .admin-denied-panel[hidden],
body[data-page="clubwiser-admin"] #adminContent[hidden] {
  display: none !important;
}

body[data-page="clubwiser-admin"] .admin-denied-panel {
  min-height: 340px;
}

body[data-page="clubwiser-admin"] .documents-stats-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

body[data-page="clubwiser-admin"] .doc-stat-card {
  min-height: 94px;
  padding: 18px 20px;
  align-items: center;
}

body[data-page="clubwiser-admin"] .doc-stat-card strong {
  font-size: 32px;
  line-height: 1;
}

body[data-page="clubwiser-admin"] .doc-stat-card small {
  margin-top: 5px;
  font-size: 13px;
}

body[data-page="clubwiser-admin"] .admin-workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 0;
}

body[data-page="clubwiser-admin"] .admin-create-card,
body[data-page="clubwiser-admin"] .admin-list-card,
body[data-page="clubwiser-admin"] .admin-detail-panel {
  border-radius: 22px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--cw-border);
  box-shadow: var(--cw-shadow);
}

body[data-page="clubwiser-admin"] .admin-create-card {
  position: sticky;
  top: 24px;
}

body[data-page="clubwiser-admin"] .panel-header {
  gap: 16px;
  align-items: flex-start;
}

body[data-page="clubwiser-admin"] .panel-header .eyebrow,
body[data-page="clubwiser-admin"] .eyebrow {
  margin-bottom: 5px;
}

body[data-page="clubwiser-admin"] .stacked-form,
body[data-page="clubwiser-admin"] .admin-edit-grid {
  display: grid;
  gap: 14px;
}

body[data-page="clubwiser-admin"] .form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="clubwiser-admin"] label {
  display: block;
  margin: 0 0 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-page="clubwiser-admin"] input,
body[data-page="clubwiser-admin"] select,
body[data-page="clubwiser-admin"] textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid #dce5ef;
  border-radius: 13px;
  background: #fff;
  color: var(--cw-ink);
  font: inherit;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

body[data-page="clubwiser-admin"] textarea {
  min-height: 92px;
  resize: vertical;
}

body[data-page="clubwiser-admin"] .admin-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin: 0 0 14px;
  align-items: center;
}

body[data-page="clubwiser-admin"] .search-input-wrap {
  position: relative;
}

body[data-page="clubwiser-admin"] .search-input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--cw-muted);
  pointer-events: none;
}

body[data-page="clubwiser-admin"] .search-input-wrap input {
  padding-left: 42px;
}

body[data-page="clubwiser-admin"] .admin-table-wrap {
  max-height: 435px;
  overflow: auto;
  border: 1px solid #edf2f7;
  border-radius: 17px;
  background: #fff;
}

body[data-page="clubwiser-admin"] .admin-table-wrap table,
body[data-page="clubwiser-admin"] .admin-detail-panel table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

body[data-page="clubwiser-admin"] th,
body[data-page="clubwiser-admin"] td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
}

body[data-page="clubwiser-admin"] tr:last-child td {
  border-bottom: 0;
}

body[data-page="clubwiser-admin"] .table-org-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

body[data-page="clubwiser-admin"] .table-org-cell div {
  min-width: 0;
}

body[data-page="clubwiser-admin"] .table-org-cell strong,
body[data-page="clubwiser-admin"] .table-org-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="clubwiser-admin"] .table-org-cell small {
  margin-top: 3px;
  color: var(--cw-muted);
  font-size: 12px;
}

body[data-page="clubwiser-admin"] .mini-org-logo {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border: 1px solid rgba(246,139,31,0.18);
  color: var(--cw-orange);
  font-weight: 900;
  font-size: 13px;
}

body[data-page="clubwiser-admin"] .admin-org-row,
body[data-page="clubwiser-admin"] .admin-child-row {
  cursor: pointer;
}

body[data-page="clubwiser-admin"] .admin-org-row.selected td {
  background: #fff7ed;
}

body[data-page="clubwiser-admin"] .admin-detail-panel {
  margin-top: 18px;
}

body[data-page="clubwiser-admin"] .admin-edit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="clubwiser-admin"] .form-grid-full {
  grid-column: 1 / -1;
}

body[data-page="clubwiser-admin"] .form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body[data-page="clubwiser-admin"] .form-message {
  margin: 0;
  color: var(--cw-muted);
  font-size: 13px;
  font-weight: 700;
}

body[data-page="clubwiser-admin"] .soft-divider {
  border: 0;
  border-top: 1px solid #edf2f7;
  margin: 22px 0;
}

body[data-page="clubwiser-admin"] .empty-state-block {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
}

body[data-page="clubwiser-admin"] .empty-state-block h3 {
  margin: 0 0 8px;
}

body[data-page="clubwiser-admin"] .empty-state-block p {
  margin: 0;
  color: var(--cw-muted);
  line-height: 1.45;
}

body[data-page="clubwiser-admin"] .skeleton-line,
body[data-page="clubwiser-admin"] .skeleton-pill {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s linear infinite;
}

body[data-page="clubwiser-admin"] .skeleton-line.wide { width: min(260px, 100%); }
body[data-page="clubwiser-admin"] .skeleton-line.medium { width: min(170px, 100%); }
body[data-page="clubwiser-admin"] .skeleton-line.small { width: min(95px, 100%); }
body[data-page="clubwiser-admin"] .skeleton-pill { width: 90px; height: 28px; }

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body[data-page="clubwiser-admin"] .admin-table-wrap::-webkit-scrollbar,
body[data-page="clubwiser-admin"] .table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body[data-page="clubwiser-admin"] .admin-table-wrap::-webkit-scrollbar-track,
body[data-page="clubwiser-admin"] .table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

body[data-page="clubwiser-admin"] .admin-table-wrap::-webkit-scrollbar-thumb,
body[data-page="clubwiser-admin"] .table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  body[data-page="clubwiser-admin"] .documents-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="clubwiser-admin"] .admin-workspace-grid,
  body[data-page="clubwiser-admin"] .admin-edit-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="clubwiser-admin"] .admin-create-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  body[data-page="clubwiser-admin"] .main {
    padding: 18px;
  }

  body[data-page="clubwiser-admin"] .documents-stats-grid,
  body[data-page="clubwiser-admin"] .admin-filter-row,
  body[data-page="clubwiser-admin"] .form-grid.two {
    grid-template-columns: 1fr;
  }
}

/* Clubwiser Admin: organisation user assignment */
body[data-page="clubwiser-admin"] .panel-subcopy {
  margin: 4px 0 0;
  color: var(--cw-muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 760px;
}

body[data-page="clubwiser-admin"] .admin-user-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(190px, 1fr) minmax(170px, 0.8fr) minmax(150px, 0.7fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

body[data-page="clubwiser-admin"] .admin-active-check {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 0 2px;
  color: var(--cw-ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="clubwiser-admin"] .admin-active-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--cw-orange);
}

body[data-page="clubwiser-admin"] .admin-user-form .primary-btn {
  grid-column: 3 / 5;
  min-height: 48px;
}

body[data-page="clubwiser-admin"] .admin-user-form .form-message {
  grid-column: 1 / -1;
}

body[data-page="clubwiser-admin"] .admin-members-wrap {
  border: 1px solid #edf2f7;
  border-radius: 17px;
  overflow: auto;
  background: #fff;
}

body[data-page="clubwiser-admin"] .table-actions {
  width: 90px;
  text-align: right;
}

body[data-page="clubwiser-admin"] .text-btn.danger {
  color: #b42318;
  font-weight: 900;
}

.club-switcher:disabled {
  opacity: 0.88;
  cursor: default;
}

@media (max-width: 1180px) {
  body[data-page="clubwiser-admin"] .admin-user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="clubwiser-admin"] .admin-active-check,
  body[data-page="clubwiser-admin"] .admin-user-form .primary-btn,
  body[data-page="clubwiser-admin"] .admin-user-form .form-message {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body[data-page="clubwiser-admin"] .admin-user-form {
    grid-template-columns: 1fr;
  }
}

/* Modern sidebar workspace/profile switcher refresh ------------------------ */
.sidebar {
  padding: 20px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.18s ease, padding 0.18s ease;
}

.main {
  transition: margin-left 0.18s ease;
}

.sidebar-header {
  margin-bottom: 18px;
}

.sidebar-identity {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  margin-bottom: 18px;
}

.org-switch-button,
.profile-switch-button {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.13);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 24px rgba(75,75,75,0.10);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.org-switch-button:hover,
.profile-switch-button:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.19);
  border-color: rgba(255,255,255,0.34);
}

.org-switch-button {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 18px;
  text-align: left;
}

.org-switch-copy {
  min-width: 0;
}

.org-switch-copy strong,
.org-switch-copy small {
  display: block;
  line-height: 1.15;
}

.org-switch-copy strong {
  overflow: hidden;
  max-width: 100%;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-switch-copy small {
  margin-top: 3px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  font-weight: 800;
}

.switch-icon {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.78);
}

.profile-switch-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  padding: 0;
  border-radius: 18px;
}

.workspace-brand,
.club-switcher,
.sidebar-footer {
  display: none !important;
}

.workspace-logo,
.mini-org-logo,
.avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
  color: #4B4B4B;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.workspace-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(75,75,75,0.13);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(75,75,75,0.95);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 16px rgba(75,75,75,0.14);
}

.workspace-logo img,
.mini-org-logo img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace-logo img,
.mini-org-logo img {
  object-fit: contain;
  padding: 2px;
}

.sidebar-popover {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 80;
  padding: 10px;
  border: 1px solid rgba(20,32,51,0.10);
  border-radius: 18px;
  background: #fff;
  color: #142033;
  box-shadow: 0 24px 52px rgba(21,31,48,0.24);
}

.org-popover {
  top: 126px;
}

.profile-popover {
  top: 126px;
}

.popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid #e7edf5;
  color: #344055;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.popover-heading small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #68758a;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.workspace-list {
  display: grid;
  gap: 6px;
  max-height: 270px;
  overflow: auto;
  padding-top: 8px;
}

.workspace-option {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #142033;
  cursor: pointer;
  text-align: left;
}

.workspace-option:hover,
.workspace-option.active {
  border-color: rgba(246,139,31,0.22);
  background: rgba(246,139,31,0.08);
}

.workspace-option strong,
.workspace-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-option strong {
  font-size: 13px;
  font-weight: 900;
}

.workspace-option small {
  margin-top: 2px;
  color: #68758a;
  font-size: 11px;
  font-weight: 800;
}

.mini-org-logo {
  width: 36px;
  height: 36px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #fff;
  color: #4B4B4B;
  font-size: 12px;
}

.profile-popover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid #e7edf5;
}

.profile-popover-head strong,
.profile-popover-head small {
  display: block;
}

.profile-popover-head strong {
  font-size: 14px;
  font-weight: 950;
}

.profile-popover-head small {
  margin-top: 2px;
  color: #68758a;
  font-size: 12px;
  font-weight: 800;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  background: #4B4B4B;
}

.profile-popover a,
.profile-popover button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #344055;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}

.profile-popover a:hover,
.profile-popover button:hover {
  background: #f3f6fa;
  color: #142033;
}

.profile-popover a:first-of-type {
  margin-top: 8px;
}

.side-nav {
  gap: 4px;
  padding-top: 4px;
}

.side-nav a {
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 14px;
}

@media (max-width: 980px) {
  .sidebar-popover {
    left: 18px;
    right: 18px;
  }
}

/* My Clubwiser single sidebar account/workspace control ------------------- */
.mycw-shell {
  position: relative;
  margin: 2px 0 18px;
}

.mycw-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 28px rgba(75,75,75,0.12);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.mycw-button:hover,
.mycw-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.20);
}

.mycw-copy {
  min-width: 0;
}

.mycw-copy small,
.mycw-copy strong,
.mycw-copy em {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mycw-copy small {
  margin-bottom: 3px;
  color: rgba(255,255,255,0.74);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mycw-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.mycw-copy em {
  margin-top: 3px;
  color: rgba(255,255,255,0.70);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.mycw-org-logo {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.mycw-user-avatar {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255,255,255,0.34);
  background: #4B4B4B;
  color: #fff;
}

.mycw-popover {
  top: 86px;
  left: 0;
  right: 0;
  padding: 10px;
  border-radius: 22px;
}

.mycw-popover-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(246,139,31,0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(246,139,31,0.10), rgba(255,255,255,0.96));
}

.mycw-popover-head small,
.mycw-popover-head strong,
.mycw-popover-head em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mycw-popover-head small,
.profile-popover-head small {
  margin-bottom: 3px;
  color: #f58220;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mycw-popover-head strong {
  color: #142033;
  font-size: 14px;
  font-weight: 950;
}

.mycw-popover-head em,
.profile-popover-head em {
  color: #68758a;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.mycw-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e7edf5;
}

.compact-heading {
  padding: 0 2px 8px;
  border-bottom: 0;
}

.mycw-user-section {
  padding-bottom: 2px;
}

.mycw-user-section .profile-popover-head {
  padding: 4px 2px 10px;
  border-bottom: 0;
}

.mycw-user-section .profile-popover-head span:last-child {
  min-width: 0;
}

.mycw-user-section .profile-popover-head strong,
.mycw-user-section .profile-popover-head em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mycw-user-section .profile-popover-head strong {
  color: #142033;
  font-size: 13px;
  font-weight: 950;
}

.sidebar-identity,
.org-switch-button,
.profile-switch-button,
.org-popover,
.profile-popover:not(.mycw-popover) {
  display: none !important;
}

.mycw-popover[hidden],
.platform-admin-link[hidden] {
  display: none !important;
}

.workspace-list {
  max-height: 220px;
  padding-right: 2px;
}

.workspace-option {
  grid-template-columns: 36px minmax(0, 1fr) 18px;
}

.workspace-option.active {
  order: -1;
}

.workspace-option i {
  width: 16px;
  height: 16px;
  color: #f58220;
}

.side-nav {
  padding-top: 2px;
}

@media (max-width: 980px) {
  .mycw-popover {
    top: 86px;
    left: 0;
    right: 0;
  }
}

/* Simple My Clubwiser account switcher cleanup ----------------------------- */
.sidebar-identity,
.org-switch-button,
.profile-switch-button,
.org-popover,
.profile-popover,
.mycw-shell,
.mycw-popover,
.mycw-button,
.workspace-brand,
.club-switcher,
.sidebar-footer {
  display: none !important;
}

.account-switcher-shell {
  position: relative;
  margin: 4px 0 18px;
}

.account-switcher-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 74px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 28px rgba(75,75,75,0.12);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.account-switcher-button:hover,
.account-switcher-button[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.40);
  background: rgba(255,255,255,0.20);
}

.account-org-logo,
.mini-org-logo,
.account-user-avatar,
.profile-photo-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  color: #4B4B4B;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.account-org-logo {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,0.52);
  box-shadow: 0 10px 22px rgba(75,75,75,0.16);
}

.account-org-logo img,
.mini-org-logo img,
.account-user-avatar img,
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-main-copy {
  min-width: 0;
}

.account-main-copy small,
.account-main-copy strong,
.account-main-copy em {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-main-copy small {
  margin-bottom: 4px;
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.account-main-copy strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
}

.account-main-copy em {
  margin-top: 4px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.account-switch-icon {
  width: 17px;
  height: 17px;
  color: rgba(255,255,255,0.78);
}

.account-popover {
  position: absolute;
  top: 86px;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px;
  border: 1px solid rgba(20,32,51,0.10);
  border-radius: 22px;
  background: #fff;
  color: #142033;
  box-shadow: 0 26px 58px rgba(21,31,48,0.27);
}

.account-popover[hidden],
.platform-admin-link[hidden] {
  display: none !important;
}

.account-menu-section + .account-menu-section,
.account-menu-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7edf5;
}

.account-menu-title {
  margin: 0 2px 10px;
  color: #f58220;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.clean-workspace-list {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.clean-workspace-list .workspace-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #142033;
  cursor: pointer;
  text-align: left;
}

.clean-workspace-list .workspace-option:hover,
.clean-workspace-list .workspace-option.active {
  border-color: rgba(246,139,31,0.28);
  background: rgba(246,139,31,0.08);
}

.clean-workspace-list .workspace-option.active {
  order: -1;
}

.clean-workspace-list .workspace-option strong,
.clean-workspace-list .workspace-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clean-workspace-list .workspace-option strong {
  color: #142033;
  font-size: 13px;
  font-weight: 950;
}

.clean-workspace-list .workspace-option small {
  margin-top: 2px;
  color: #68758a;
  font-size: 11px;
  font-weight: 800;
}

.clean-workspace-list .workspace-option i {
  width: 16px;
  height: 16px;
  color: #f58220;
}

.mini-org-logo {
  width: 38px;
  height: 38px;
  border: 1px solid #e7edf5;
  font-size: 12px;
}

.account-user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.account-user-avatar {
  width: 42px;
  height: 42px;
  background: #4B4B4B;
  color: #fff;
  font-size: 13px;
}

.account-user-card small,
.account-user-card strong,
.account-user-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-user-card small {
  color: #68758a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-user-card strong {
  margin-top: 2px;
  color: #142033;
  font-size: 14px;
  font-weight: 950;
}

.account-user-card em {
  margin-top: 2px;
  color: #68758a;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.account-menu-actions {
  display: grid;
  gap: 6px;
}

.account-menu-actions a,
.account-menu-actions button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #344055;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.account-menu-actions a:hover,
.account-menu-actions button:hover {
  background: #f3f6fa;
  color: #142033;
}

.account-menu-actions button {
  color: #4B4B4B;
}

.side-nav {
  gap: 4px;
  padding-top: 3px;
}

.side-nav a {
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 14px;
}

@media (max-width: 980px) {
  .account-popover {
    top: 86px;
    left: 0;
    right: 0;
  }
}

/* Personal profile page ---------------------------------------------------- */
.profile-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.profile-form-panel,
.profile-photo-panel {
  border-top: 4px solid #f58220;
}

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

.profile-photo-panel {
  display: grid;
  justify-items: center;
  text-align: center;
}

.profile-photo-preview {
  width: 132px;
  height: 132px;
  margin-bottom: 18px;
  background: #4B4B4B;
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(75,75,75,0.18);
}

.profile-photo-panel h3 {
  margin: 0 0 6px;
}

.profile-photo-panel p {
  max-width: 250px;
  margin: 0 0 18px;
  color: #68758a;
}

.profile-photo-panel .secondary-btn,
.profile-photo-panel .text-btn {
  width: 100%;
  justify-content: center;
}

.profile-photo-panel small {
  display: block;
  min-height: 20px;
  margin-top: 10px;
  color: #68758a;
  font-weight: 750;
}

body[data-page="profile"] .side-nav a.active {
  background: transparent;
  color: inherit;
}

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


/* Dashboard greeting + parent body connection ----------------------------- */
.parent-connection-panel .panel-header {
  margin-bottom: 16px;
}

.parent-connection-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e7edf5;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
}

.parent-connection-logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(246,139,31,0.26);
  box-shadow: 0 14px 26px rgba(246,139,31,0.10);
  color: #4B4B4B;
  font-weight: 950;
}

.parent-connection-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.parent-connection-card h4 {
  margin: 2px 0 4px;
  overflow: hidden;
  color: #142033;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-connection-card p:not(.eyebrow) {
  margin: 0;
  color: #68758a;
  line-height: 1.45;
}

.parent-connection-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f4f7fb;
  color: #4d5b70;
  line-height: 1.45;
}

.parent-connection-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #f58220;
}

.parent-connection-panel.has-parent {
  background:
    radial-gradient(circle at 94% 0%, rgba(246,139,31,0.14), transparent 24%),
    #fff;
}

/* Personal profile page polish -------------------------------------------- */
body[data-page="profile"] .profile-page-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

body[data-page="profile"] .profile-form-panel,
body[data-page="profile"] .profile-photo-panel {
  border-top: 4px solid #f58220;
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(15,31,51,0.08);
}

body[data-page="profile"] .profile-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin-top: 18px;
}

body[data-page="profile"] .profile-form .form-grid-full {
  grid-column: 1 / -1;
}

body[data-page="profile"] .profile-form label {
  display: block;
  margin: 0 0 8px;
  color: #344055;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body[data-page="profile"] .profile-form input {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8e0eb;
  border-radius: 16px;
  padding: 0 15px;
  background: #fff;
  color: #142033;
  font: inherit;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

body[data-page="profile"] .profile-form input::placeholder {
  color: #8b95a5;
}

body[data-page="profile"] .profile-form input[readonly] {
  background: #f6f8fb;
  color: #68758a;
}

body[data-page="profile"] .field-help {
  margin-top: 7px;
  max-width: 520px;
  color: #7b8798;
  font-size: 12px;
  line-height: 1.45;
}

body[data-page="profile"] .form-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e7edf5;
}

body[data-page="profile"] .form-message {
  margin: 0;
  color: #68758a;
  font-weight: 800;
}

body[data-page="profile"] .profile-photo-panel {
  padding: 26px;
  background:
    radial-gradient(circle at 50% 2%, rgba(246,139,31,0.12), transparent 35%),
    #fff;
}

body[data-page="profile"] .profile-photo-preview {
  width: 144px;
  height: 144px;
  border: 7px solid #fff;
  outline: 1px solid #e7edf5;
  box-shadow: 0 22px 46px rgba(75,75,75,0.18);
}

body[data-page="profile"] .profile-photo-panel .secondary-btn {
  margin-top: 4px;
}

body[data-page="profile"] .profile-photo-panel .text-btn {
  border: 0;
  background: transparent;
  color: #f58220;
  cursor: pointer;
  font-weight: 850;
}

body[data-page="profile"] .profile-topbar .topbar-actions {
  align-self: center;
}

@media (max-width: 1100px) {
  body[data-page="profile"] .profile-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body[data-page="profile"] .profile-form .form-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="profile"] .form-actions-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final profile form hardening -------------------------------------------- */
body[data-page="profile"] .profile-page-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 340px !important;
  gap: 24px !important;
  align-items: start !important;
}

body[data-page="profile"] .profile-form .form-grid,
body[data-page="profile"] #personalProfileForm .form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px 20px !important;
  margin-top: 18px !important;
}

body[data-page="profile"] .profile-form .form-grid > div,
body[data-page="profile"] #personalProfileForm .form-grid > div {
  min-width: 0 !important;
}

body[data-page="profile"] .profile-form label,
body[data-page="profile"] #personalProfileForm label {
  display: block !important;
  margin-bottom: 8px !important;
  color: #344055 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

body[data-page="profile"] .profile-form input,
body[data-page="profile"] #personalProfileForm input {
  appearance: none !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  min-height: 52px !important;
  border: 1px solid #d8e0eb !important;
  border-radius: 16px !important;
  padding: 0 15px !important;
  background: #fff !important;
  color: #142033 !important;
  font: inherit !important;
  font-size: 15px !important;
}

body[data-page="profile"] .profile-form input[readonly],
body[data-page="profile"] #personalProfileForm input[readonly] {
  background: #f6f8fb !important;
  color: #68758a !important;
}

body[data-page="profile"] .form-grid-full {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1100px) {
  body[data-page="profile"] .profile-page-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body[data-page="profile"] .profile-form .form-grid,
  body[data-page="profile"] #personalProfileForm .form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Grants page -------------------------------------------------------------- */
body[data-page="grants"] .side-nav a.active {
  background: rgba(75,75,75,0.92);
  color: #fff;
}

.grants-main .topbar,
.grants-topbar {
  margin-bottom: 24px;
}

.grants-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.grant-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  padding: 22px;
  border: 1px solid #e7edf5;
  border-top: 4px solid #f58220;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15,31,51,0.07);
}

.grant-status-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fff2e7;
  color: #f58220;
  flex: 0 0 auto;
}

.grant-status-card h2 {
  margin: 0;
  color: #142033;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.grant-status-card p {
  margin: 4px 0 0;
  color: #68758a;
  font-weight: 750;
}

.grants-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.grants-sidebar-panel,
.grants-table-panel {
  border-top: 4px solid #f58220;
}

.grants-sidebar-head {
  padding-bottom: 16px;
  border-bottom: 1px solid #e7edf5;
}

.grants-sidebar-head h3 {
  margin: 0;
}

.grant-stage-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
}

.grant-stage-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 12px;
  background: transparent;
  color: #344055;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}

.grant-stage-btn:hover,
.grant-stage-btn.active {
  border-color: rgba(246,139,31,0.24);
  background: #fff7ef;
  color: #142033;
}

.grant-stage-btn em {
  min-width: 30px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf2f7;
  color: #68758a;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.grant-stage-btn.active em {
  background: #f58220;
  color: #fff;
}

.grant-help-card {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ef 0%, #f7f9fc 100%);
  border: 1px solid rgba(246,139,31,0.18);
}

.grant-help-card svg {
  color: #f58220;
}

.grant-help-card h4 {
  margin: 10px 0 6px;
}

.grant-help-card p {
  margin: 0;
  color: #68758a;
  line-height: 1.45;
}

.grant-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}

.grant-toolbar .search-field {
  flex: 1;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid #d8e0eb;
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
}

.search-field svg {
  width: 19px;
  height: 19px;
  color: #68758a;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: #142033;
}

.grant-toolbar select,
.grant-form input,
.grant-form select,
.grant-form textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #d8e0eb;
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: #142033;
  font: inherit;
}

.grant-toolbar select {
  width: 220px;
  min-height: 48px;
}

.grant-table-wrap {
  overflow-x: auto;
}

.grants-table th,
.grants-table td {
  vertical-align: middle;
}

.grant-title-button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.grant-title-button strong {
  color: #142033;
  font-weight: 950;
}

.grant-title-button small {
  max-width: 360px;
  overflow: hidden;
  color: #68758a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-empty-row,
.table-error {
  padding: 30px !important;
  color: #68758a;
  text-align: center;
  font-weight: 850;
}

.grant-modal {
  width: min(920px, calc(100vw - 32px));
}

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

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

.grant-form label {
  display: block;
  margin: 0 0 8px;
  color: #344055;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.grant-form input,
.grant-form select {
  min-height: 50px;
}

.grant-form textarea {
  min-height: 92px;
  padding-top: 13px;
  resize: vertical;
}

.grant-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e7edf5;
}

.form-message[data-type="error"] {
  color: #c92a2a;
}

.form-message[data-type="success"] {
  color: #0b7a3b;
}

.provider-roadmap {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.provider-roadmap article {
  padding: 18px;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  background: #fff;
}

.provider-roadmap svg {
  color: #f58220;
}

.provider-roadmap h3 {
  margin: 10px 0 6px;
}

.provider-roadmap p {
  margin: 0;
  color: #68758a;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .grants-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grants-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grants-status-grid,
  .grant-form-grid {
    grid-template-columns: 1fr;
  }

  .grant-toolbar,
  .grant-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .grant-toolbar select {
    width: 100%;
  }
}

/* Laptop density pass -------------------------------------------------------
   Makes Clubwiser feel right at 100% browser zoom on common laptop screens.
   This tightens spacing without changing the brand palette or making body text tiny. */
@media (min-width: 981px) {
  body {
    font-size: 15px;
  }

  .sidebar {
    width: 240px !important;
    padding: 18px !important;
  }

  .sidebar-logo {
    width: 136px !important;
  }

  .sidebar-header {
    margin-bottom: 16px !important;
  }

  .account-switcher-shell {
    margin: 2px 0 14px !important;
  }

  .account-switcher-button {
    min-height: 66px !important;
    grid-template-columns: 40px minmax(0, 1fr) 16px !important;
    gap: 9px !important;
    padding: 9px !important;
    border-radius: 18px !important;
  }

  .account-org-logo {
    width: 40px !important;
    height: 40px !important;
  }

  .account-main-copy small {
    margin-bottom: 2px !important;
    font-size: 9px !important;
  }

  .account-main-copy strong {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  .account-main-copy em {
    font-size: 10.5px !important;
  }

  .account-popover {
    top: 76px !important;
    padding: 10px !important;
    border-radius: 20px !important;
  }

  .workspace-list {
    max-height: 188px !important;
  }

  .side-nav {
    gap: 3px !important;
  }

  .side-nav a {
    min-height: 39px !important;
    padding: 9px 11px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    gap: 10px !important;
  }

  .side-nav a svg,
  .side-nav a i {
    width: 18px !important;
    height: 18px !important;
  }

  .main {
    margin-left: 240px !important;
    padding: 22px !important;
    max-width: 1540px !important;
  }

  .topbar {
    margin-bottom: 22px !important;
    padding: 20px 22px !important;
    border-radius: 22px !important;
    min-height: auto !important;
  }

  .topbar::after {
    width: 150px !important;
    height: 150px !important;
    right: -32px !important;
    top: -48px !important;
    border-width: 28px !important;
  }

  .topbar h1 {
    font-size: clamp(28px, 2.15vw, 34px) !important;
    line-height: 1.04 !important;
  }

  .topbar p {
    margin-top: 6px !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  .topbar-actions {
    gap: 10px !important;
  }

  .primary-btn,
  .secondary-btn,
  .danger-btn,
  .tabs button,
  .club-tabs button,
  .meeting-tabs button {
    min-height: 40px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  .primary-btn.small,
  .secondary-btn.small,
  .danger-btn.small {
    min-height: 34px !important;
    padding: 8px 11px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  .stats-grid,
  .documents-stats-grid,
  .grants-status-grid,
  .admin-stats-grid {
    gap: 14px !important;
    margin-bottom: 18px !important;
  }

  .stat-card,
  .summary-card,
  .doc-stat-card,
  .grant-status-card,
  .admin-stat-card,
  .pro-card {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .stat-card span,
  .summary-card svg,
  .doc-stat-icon,
  .grant-status-card > span,
  .pro-card-icon {
    width: 38px !important;
    height: 38px !important;
    padding: 8px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
  }

  .stat-card h2,
  .summary-card h2,
  .doc-stat-card strong,
  .grant-status-card h2,
  .admin-stat-card strong,
  .pro-metric {
    font-size: 26px !important;
    line-height: 1 !important;
  }

  .stat-card p,
  .summary-card p,
  .doc-stat-card small,
  .grant-status-card p {
    font-size: 14px !important;
  }

  .dashboard-grid,
  .documents-layout,
  .grants-layout,
  .admin-workspace-grid,
  .profile-page-grid,
  .pro-grid {
    gap: 16px !important;
  }

  .panel,
  .documents-main,
  .documents-sidebar,
  .profile-form-panel,
  .profile-photo-panel,
  .admin-panel,
  .grant-main-panel {
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .panel-header {
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
  }

  .panel-header h3,
  .panel-header h4,
  .documents-main h2,
  .profile-form-panel h2,
  .profile-photo-panel h3,
  .admin-panel h2,
  .grant-main-panel h2 {
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  .list-row,
  .task-row,
  .pro-list-item,
  .document-row,
  .grant-row {
    padding: 12px !important;
    gap: 11px !important;
    border-radius: 14px !important;
  }

  table th,
  table td {
    padding: 11px 12px !important;
    font-size: 13.5px !important;
  }

  th {
    font-size: 11px !important;
  }

  .badge {
    padding: 5px 8px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }

  .tabs,
  .club-tabs,
  .meeting-tabs {
    padding: 4px !important;
    border-radius: 14px !important;
    gap: 4px !important;
  }

  input,
  select,
  textarea,
  .search-field,
  .search-box input,
  .document-form input,
  .document-form select,
  .document-form textarea,
  .grant-form input,
  .grant-form select,
  .grant-form textarea,
  .grant-toolbar select,
  body[data-page="profile"] .profile-form input,
  body[data-page="profile"] #personalProfileForm input,
  .admin-form input,
  .admin-form select,
  .admin-form textarea {
    min-height: 42px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
  }

  textarea,
  .document-form textarea,
  .grant-form textarea,
  .admin-form textarea {
    min-height: 82px !important;
    padding-top: 10px !important;
  }

  label,
  .grant-form label,
  .document-form label span,
  body[data-page="profile"] .profile-form label,
  body[data-page="profile"] #personalProfileForm label {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  .form-grid,
  .grant-form-grid,
  body[data-page="profile"] .profile-form .form-grid,
  body[data-page="profile"] #personalProfileForm .form-grid {
    gap: 14px !important;
  }

  .modal-card,
  .grant-modal,
  .document-detail-panel {
    border-radius: 20px !important;
  }

  .modal-card header,
  .modal-header {
    padding: 18px !important;
  }

  .modal-card form,
  .modal-body,
  .detail-panel-body {
    padding: 18px !important;
  }

  .profile-photo-preview {
    width: 114px !important;
    height: 114px !important;
    font-size: 30px !important;
  }

  .profile-photo-panel {
    align-content: start !important;
  }

  .documents-sidebar {
    min-width: 230px !important;
  }

  .document-category-button,
  .documents-sidebar button {
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  .grant-status-card {
    min-height: 94px !important;
    gap: 12px !important;
  }

  .grant-toolbar {
    gap: 10px !important;
    margin: 14px 0 !important;
  }

  .provider-roadmap,
  .admin-selected-body {
    padding: 18px !important;
  }
}

@media (min-width: 981px) and (max-width: 1440px) {
  body {
    font-size: 14.5px;
  }

  .sidebar {
    width: 226px !important;
    padding: 16px !important;
  }

  .sidebar-logo {
    width: 128px !important;
  }

  .main {
    margin-left: 226px !important;
    padding: 18px !important;
  }

  .account-switcher-button {
    min-height: 62px !important;
    grid-template-columns: 38px minmax(0, 1fr) 14px !important;
    padding: 8px !important;
  }

  .account-org-logo {
    width: 38px !important;
    height: 38px !important;
  }

  .side-nav a {
    min-height: 36px !important;
    padding: 8px 10px !important;
    font-size: 13.5px !important;
  }

  .topbar {
    padding: 18px 20px !important;
    margin-bottom: 18px !important;
  }

  .topbar h1 {
    font-size: clamp(26px, 2vw, 31px) !important;
  }

  .stats-grid,
  .documents-stats-grid,
  .grants-status-grid,
  .admin-stats-grid {
    gap: 12px !important;
  }

  .stat-card,
  .summary-card,
  .doc-stat-card,
  .grant-status-card,
  .admin-stat-card,
  .panel,
  .documents-main,
  .documents-sidebar,
  .profile-form-panel,
  .profile-photo-panel,
  .admin-panel,
  .grant-main-panel {
    padding: 16px !important;
  }

  .dashboard-grid,
  .documents-layout,
  .grants-layout,
  .admin-workspace-grid,
  .profile-page-grid {
    gap: 14px !important;
  }

  .stat-card h2,
  .summary-card h2,
  .doc-stat-card strong,
  .grant-status-card h2,
  .admin-stat-card strong {
    font-size: 24px !important;
  }

  table th,
  table td {
    padding: 10px !important;
  }

  .profile-page-grid {
    grid-template-columns: minmax(0, 1fr) 280px !important;
  }

  .profile-photo-preview {
    width: 104px !important;
    height: 104px !important;
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .sidebar {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .sidebar-header {
    margin-bottom: 12px !important;
  }

  .account-switcher-shell {
    margin-bottom: 10px !important;
  }

  .side-nav a {
    min-height: 34px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
}

/* Account dropdown simplification: settings/admin moved out of main nav ------ */
.account-popover {
  padding: 10px !important;
  border-radius: 18px !important;
}

.account-menu-section + .account-menu-section,
.account-menu-actions {
  margin-top: 9px !important;
  padding-top: 9px !important;
}

.account-menu-title {
  margin: 0 2px 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .07em !important;
}

.clean-workspace-list {
  gap: 5px !important;
  max-height: 210px !important;
}

.clean-workspace-list .workspace-option {
  grid-template-columns: 34px minmax(0, 1fr) 16px !important;
  min-height: 48px !important;
  padding: 7px !important;
  border-radius: 13px !important;
  gap: 9px !important;
}

.mini-org-logo {
  width: 34px !important;
  height: 34px !important;
  font-size: 11px !important;
}

.clean-workspace-list .workspace-option strong {
  font-size: 12px !important;
  font-weight: 760 !important;
  letter-spacing: -0.01em !important;
}

.clean-workspace-list .workspace-option small {
  margin-top: 1px !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
}

.account-user-card {
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 9px !important;
}

.account-user-avatar {
  width: 36px !important;
  height: 36px !important;
  font-size: 12px !important;
  font-weight: 760 !important;
}

.account-user-card small {
  font-size: 9.5px !important;
  font-weight: 760 !important;
  letter-spacing: .07em !important;
}

.account-user-card strong {
  font-size: 12.5px !important;
  font-weight: 760 !important;
}

.account-user-card em {
  font-size: 10.5px !important;
  font-weight: 500 !important;
}

.account-menu-actions {
  gap: 3px !important;
}

.account-menu-actions a,
.account-menu-actions button {
  min-height: 34px !important;
  padding: 7px 8px !important;
  border-radius: 11px !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

.account-menu-actions a i,
.account-menu-actions button i {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2 !important;
}

.account-menu-actions button#signOutButton {
  margin-top: 2px !important;
  color: #4B4B4B !important;
}

.side-nav a[href="club-management.html"],
.side-nav a[href="clubwiser-admin.html"] {
  display: none !important;
}

/* Clubwiser terminology + meeting management polish */
.row-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #64748b;
  cursor: pointer;
}
.row-icon-btn:hover {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.25);
  background: #fff5f5;
}
.meeting-row-actions,
.table-actions-col {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}
.inline-confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.22);
  font-size: 13px;
  color: #334155;
}
.inline-confirm button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: #475569;
  padding: 2px 3px;
}
.inline-confirm .text-danger,
.text-danger {
  color: #dc2626 !important;
}
.clickable-row [data-open-meeting] {
  cursor: pointer;
}
.modal-card.wide {
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-color: #cbd5e1 transparent;
}
.modal-card.wide .modal-actions {
  position: sticky;
  bottom: -1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), #fff 35%);
  padding-top: 14px;
  margin-bottom: 0;
}


/* Patch: smaller people modal and cleaner form density */
.person-modal-card { max-width: 640px !important; width: min(640px, calc(100vw - 48px)) !important; max-height: min(720px, calc(100vh - 48px)) !important; overflow: auto !important; padding: 28px !important; }
.person-modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; align-items: end; }
.person-modal-form label { margin: 0; }
.person-modal-form label:nth-of-type(1), .person-modal-form input#personName, .person-modal-form label:nth-of-type(2), .person-modal-form input#personEmail, .person-modal-form button, .person-modal-form #personMessage { grid-column: span 2; }
.person-modal-form input, .person-modal-form select { min-height: 48px; }
.person-modal-form button { width: auto; justify-self: end; min-width: 220px; }
@media (max-width: 780px) { .person-modal-form { grid-template-columns: 1fr; } .person-modal-form > * { grid-column: auto !important; } }

.segmented-toggle { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid #dce6f1; border-radius: 999px; background: #fff; }
.segmented-toggle button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 800; color: #66758a; cursor: pointer; }
.segmented-toggle button.active { background: #4b4b4b; color: #fff; }
.meeting-list-toolbar { display: flex; justify-content: flex-end; margin: -4px 0 18px; }

.editable-document-row { grid-template-columns: auto 1fr auto auto; align-items: center; }
.meeting-document-main { min-width: 0; }
.meeting-document-title-input { width: 100%; border: 1px solid transparent; background: transparent; padding: 7px 8px; border-radius: 10px; font-weight: 800; color: #162033; }
.meeting-document-title-input:focus { border-color: #d6e1ef; background: #fff; outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.export-settings-form { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #e7edf5; }
.export-settings-form input[type="color"] { min-height: 46px; padding: 6px; cursor: pointer; }
.compact-header { margin-bottom: 12px; }

/* Contacts/CRM starter */
.clean-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.clean-list li { display: flex; align-items: center; gap: 10px; color: #475569; }
.clean-list i { width: 18px; height: 18px; color: var(--orange, #f68b1f); }
.compact-modal { max-width: 720px; width: min(720px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); overflow: auto; }
.stacked-form { display: grid; gap: 14px; }
.check-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: #162033; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; }
.text-btn { border: 0; background: transparent; color: var(--orange, #f68b1f); font-weight: 800; cursor: pointer; }
.text-btn.danger { color: #d92d20; }

/* CRM polish */
.crm-panel { min-height: 520px; }
.crm-grid { display: grid; gap: 14px; }
.crm-card { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; border: 1px solid #dfe7f1; background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04); }
.crm-card-photo, .crm-photo-preview { width: 54px; height: 54px; border-radius: 999px; overflow: hidden; background: #fff3e4; border: 1px solid #ffd6a1; display: grid; place-items: center; color: #c75f00; font-weight: 900; }
.crm-card-photo img, .crm-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.crm-card-main { min-width: 0; }
.crm-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-card-top strong { font-size: 1.02rem; color: #162033; }
.crm-card-main small { display: block; color: #64748b; font-weight: 700; margin-top: 2px; }
.crm-contact-lines { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 9px; color: #475569; font-size: .9rem; }
.crm-contact-lines span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crm-contact-lines i { width: 15px; height: 15px; color: #f68b1f; }
.crm-card-actions { display: flex; gap: 8px; align-items: center; }
.crm-modal { max-width: 940px; width: min(940px, calc(100vw - 32px)); }
.crm-form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: start; }
.crm-photo-field { display: grid; justify-items: center; gap: 10px; padding: 14px; border: 1px solid #e1e9f4; border-radius: 22px; background: #f8fafc; }
.crm-photo-preview { width: 96px; height: 96px; font-size: 1.5rem; }
.crm-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.crm-fields-grid .span-2 { grid-column: 1 / -1; }
.agenda-template-field small { display: block; color: #64748b; font-size: .78rem; font-weight: 700; margin-top: 6px; }
@media (max-width: 860px) {
  .crm-card { grid-template-columns: 48px 1fr; }
  .crm-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .crm-form-grid { grid-template-columns: 1fr; }
  .crm-fields-grid { grid-template-columns: 1fr; }
}

/* CRM layout repair: fixed modal overlay, clean contact cards and usable form */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.38);
  overflow: auto;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e7edf5;
}
.modal-head h3 { margin: 2px 0 0; font-size: 24px; }
body[data-page="crm"] .crm-panel { min-height: 620px; }
body[data-page="crm"] .filters-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 190px;
  gap: 12px;
  align-items: center;
}
body[data-page="crm"] .filters-row select,
body[data-page="crm"] .search-box input,
body[data-page="crm"] .crm-form input,
body[data-page="crm"] .crm-form select,
body[data-page="crm"] .crm-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: #142033;
  font: inherit;
  box-shadow: none;
}
body[data-page="crm"] .search-box input { border: 0; padding-left: 0; min-height: 44px; }
body[data-page="crm"] .crm-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
body[data-page="crm"] .crm-card {
  align-items: start;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}
body[data-page="crm"] .crm-card-photo { width: 62px; height: 62px; font-size: 16px; }
body[data-page="crm"] .crm-contact-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
body[data-page="crm"] .crm-contact-lines span { overflow-wrap: anywhere; }
body[data-page="crm"] .empty-state { padding: 34px; }
body[data-page="crm"] .empty-state svg { width: 34px; height: 34px; margin-bottom: 12px; color: #f68b1f; }
body[data-page="crm"] .crm-modal {
  width: min(1040px, calc(100vw - 56px)) !important;
  max-width: 1040px !important;
  padding: 0 !important;
  border-radius: 26px;
}
body[data-page="crm"] .crm-modal .modal-head {
  margin: 0;
  padding: 24px 28px 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
body[data-page="crm"] .crm-form {
  padding: 24px 28px 28px;
  gap: 22px;
}
body[data-page="crm"] .crm-form-grid {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
}
body[data-page="crm"] .crm-photo-field {
  position: sticky;
  top: 0;
  align-self: start;
  border-radius: 18px;
}
body[data-page="crm"] .crm-photo-preview { width: 110px; height: 110px; }
body[data-page="crm"] .crm-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}
body[data-page="crm"] .crm-fields-grid .span-2 { grid-column: 1 / -1; }
body[data-page="crm"] .crm-form label.field {
  display: grid;
  gap: 7px;
  margin: 0 !important;
  min-width: 0;
}
body[data-page="crm"] .crm-form label.field span {
  display: block;
  color: #344055;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body[data-page="crm"] .crm-form textarea { min-height: 104px; resize: vertical; }
body[data-page="crm"] .check-row {
  padding: 14px 16px;
  border: 1px solid #e7edf5;
  border-radius: 15px;
  background: #fbfdff;
}
body[data-page="crm"] .form-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid #e7edf5;
}
body[data-page="crm"] #contactMessage { margin: 0; color: #64748b; font-weight: 800; }
@media (max-width: 980px) {
  body[data-page="crm"] .crm-grid { grid-template-columns: 1fr; }
  body[data-page="crm"] .crm-form-grid { grid-template-columns: 1fr; }
  body[data-page="crm"] .crm-photo-field { position: relative; }
}
@media (max-width: 720px) {
  .modal-backdrop { padding: 12px; align-items: flex-start; }
  .modal-card { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  body[data-page="crm"] .filters-row { grid-template-columns: 1fr; }
  body[data-page="crm"] .crm-card { grid-template-columns: 52px 1fr; }
  body[data-page="crm"] .crm-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  body[data-page="crm"] .crm-contact-lines,
  body[data-page="crm"] .crm-fields-grid { grid-template-columns: 1fr; }
  body[data-page="crm"] .crm-modal .modal-head,
  body[data-page="crm"] .crm-form { padding-left: 18px; padding-right: 18px; }
  body[data-page="crm"] .form-footer-actions { flex-direction: column; align-items: stretch; }
}



/* Partners module */
body[data-page="partners"] .partners-hero {
  align-items: stretch;
  padding: 30px 32px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 94% 24%, rgba(246,139,31,.16), transparent 22%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e6edf5;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .08);
}

body[data-page="partners"] .partners-hero h1 {
  font-size: 34px;
  letter-spacing: -0.04em;
  color: #111827;
}

body[data-page="partners"] .partners-hero-actions,
body[data-page="partners"] .form-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

body[data-page="partners"] .partner-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

body[data-page="partners"] .partner-stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4ebf4;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

body[data-page="partners"] .partner-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #f68b1f, rgba(246,139,31,0));
}

body[data-page="partners"] .partner-stat span {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  color: #111827;
  letter-spacing: -0.04em;
}

body[data-page="partners"] .partner-stat p {
  margin: 8px 0 0;
  color: #64748b;
  font-weight: 800;
}

body[data-page="partners"] .partners-command-panel {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 190px 190px;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid #e4ebf4;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}

body[data-page="partners"] .partners-command-panel select,
body[data-page="partners"] .partner-form input,
body[data-page="partners"] .partner-form select,
body[data-page="partners"] .partner-form textarea,
body[data-page="partners"] .proposal-builder input,
body[data-page="partners"] .proposal-builder select,
body[data-page="partners"] .proposal-builder textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  padding: 11px 13px;
  background: #fff;
  color: #142033;
  font: inherit;
  box-shadow: none;
}

body[data-page="partners"] .partners-command-panel .search-box {
  min-height: 46px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-page="partners"] .partners-command-panel .search-box input {
  border: 0;
  outline: 0;
  min-height: 44px;
  width: 100%;
  font: inherit;
}

body[data-page="partners"] .partners-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

body[data-page="partners"] .partners-register-panel {
  min-height: 620px;
}

body[data-page="partners"] .partners-register-panel .panel-header p {
  margin: 5px 0 0;
  color: #64748b;
}

body[data-page="partners"] .partners-list {
  display: grid;
  gap: 14px;
}

body[data-page="partners"] .partner-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid #e3ebf4;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}

body[data-page="partners"] .partner-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-weight: 950;
  letter-spacing: .02em;
}

body[data-page="partners"] .partner-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

body[data-page="partners"] .partner-title-row h3 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.02em;
}

body[data-page="partners"] .partner-title-row p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 800;
}

body[data-page="partners"] .partner-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef2f7;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-page="partners"] .partner-status.active { background: #dcfce7; color: #166534; }
body[data-page="partners"] .partner-status.prospect,
body[data-page="partners"] .partner-status.proposal { background: #e0f2fe; color: #075985; }
body[data-page="partners"] .partner-status.renewal { background: #ffedd5; color: #9a3412; }
body[data-page="partners"] .partner-status.expired { background: #fee2e2; color: #991b1b; }

body[data-page="partners"] .partner-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 14px;
}

body[data-page="partners"] .partner-meta-grid span {
  min-width: 0;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="partners"] .partner-meta-grid svg {
  width: 15px;
  height: 15px;
  color: #f68b1f;
  flex: 0 0 auto;
}

body[data-page="partners"] .partner-meta-grid .is-warning { color: #9a3412; }
body[data-page="partners"] .partner-meta-grid .is-danger { color: #991b1b; }

body[data-page="partners"] .deliverable-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

body[data-page="partners"] .deliverable-progress > div {
  height: 8px;
  border-radius: 999px;
  background: #e7edf5;
  overflow: hidden;
}

body[data-page="partners"] .deliverable-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f68b1f;
}

body[data-page="partners"] .deliverable-progress small {
  color: #64748b;
  font-weight: 850;
  white-space: nowrap;
}

body[data-page="partners"] .partners-side-stack {
  display: grid;
  gap: 18px;
}

body[data-page="partners"] .compact-partner-list {
  display: grid;
  gap: 10px;
}

body[data-page="partners"] .compact-partner-row {
  border: 1px solid #e6edf5;
  border-radius: 15px;
  padding: 12px;
  background: #fbfdff;
}

body[data-page="partners"] .compact-partner-row strong {
  display: block;
  color: #111827;
  margin-bottom: 4px;
}

body[data-page="partners"] .compact-partner-row span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

body[data-page="partners"] .partner-workflow li {
  align-items: flex-start;
}

body[data-page="partners"] .partner-modal {
  width: min(1040px, calc(100vw - 56px));
  max-width: 1040px;
  padding: 0;
  border-radius: 26px;
}

body[data-page="partners"] .partner-modal .modal-head,
body[data-page="partners"] .proposal-modal .modal-head {
  margin: 0;
  padding: 24px 28px 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

body[data-page="partners"] .partner-form,
body[data-page="partners"] .proposal-builder {
  padding: 24px 28px 28px;
}

body[data-page="partners"] .partner-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 16px;
}

body[data-page="partners"] .partner-form-grid .span-2 {
  grid-column: 1 / -1;
}

body[data-page="partners"] label.field {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
}

body[data-page="partners"] label.field span {
  color: #344055;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body[data-page="partners"] textarea {
  min-height: 106px;
  resize: vertical;
}

body[data-page="partners"] .partner-subsection {
  border: 1px solid #e6edf5;
  border-radius: 18px;
  padding: 16px;
  background: #fbfdff;
}

body[data-page="partners"] .subsection-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

body[data-page="partners"] .subsection-head h4 {
  margin: 0;
  color: #111827;
}

body[data-page="partners"] .subsection-head p {
  margin: 4px 0 0;
  color: #64748b;
}

body[data-page="partners"] .deliverables-editor {
  display: grid;
  gap: 10px;
}

body[data-page="partners"] .deliverable-editor-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 150px 150px minmax(180px, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

body[data-page="partners"] .deliverable-editor-row input,
body[data-page="partners"] .deliverable-editor-row select {
  min-height: 42px;
  border-radius: 12px;
}

body[data-page="partners"] .proposal-modal {
  width: min(860px, calc(100vw - 56px));
  max-width: 860px;
  padding: 0;
  border-radius: 26px;
}

body[data-page="partners"] .proposal-builder {
  display: grid;
  gap: 15px;
}

body[data-page="partners"] .proposal-preview {
  white-space: pre-wrap;
  border: 1px solid #e3ebf4;
  border-radius: 18px;
  background: #fbfdff;
  padding: 18px;
  color: #162033;
  font-size: 14px;
  line-height: 1.5;
}

body[data-page="partners"] .secondary-btn.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}

@media (max-width: 1180px) {
  body[data-page="partners"] .partners-layout {
    grid-template-columns: 1fr;
  }
  body[data-page="partners"] .partners-side-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body[data-page="partners"] .partner-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body[data-page="partners"] .partner-stats-grid,
  body[data-page="partners"] .partners-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="partners"] .partners-command-panel,
  body[data-page="partners"] .partner-form-grid,
  body[data-page="partners"] .deliverable-editor-row {
    grid-template-columns: 1fr;
  }
  body[data-page="partners"] .partner-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  body[data-page="partners"] .partner-card .secondary-btn {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 680px) {
  body[data-page="partners"] .partner-stats-grid,
  body[data-page="partners"] .partners-side-stack {
    grid-template-columns: 1fr;
  }
  body[data-page="partners"] .partners-hero {
    padding: 24px;
  }
  body[data-page="partners"] .partners-hero-actions {
    width: 100%;
  }
  body[data-page="partners"] .partners-hero-actions > button {
    flex: 1 1 100%;
  }
  body[data-page="partners"] .partner-title-row,
  body[data-page="partners"] .subsection-head,
  body[data-page="partners"] .form-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-page="partners"] .partner-meta-grid,
  body[data-page="partners"] .deliverable-progress {
    grid-template-columns: 1fr;
  }
  body[data-page="partners"] .partner-modal .modal-head,
  body[data-page="partners"] .proposal-modal .modal-head,
  body[data-page="partners"] .partner-form,
  body[data-page="partners"] .proposal-builder {
    padding-left: 18px;
    padding-right: 18px;
  }
}

.meetings-list-header {
  align-items: center;
  gap: 14px;
}

.compact-toggle {
  padding: 3px;
  gap: 2px;
}

.compact-toggle button {
  padding: 5px 10px;
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .meetings-list-header {
    align-items: flex-start;
  }
}

/* Sidebar modes + minimise ------------------------------------------------ */
.nav-collapse-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 11px;
  background: rgba(255,255,255,0.13);
  color: #fff;
  cursor: pointer;
}

.nav-collapse-btn svg {
  width: 18px;
  height: 18px;
}

.sidebar-mode-chip,
.admin-back-to-club {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 11px;
  margin: 0 0 10px;
  border-radius: 13px;
  color: #fff;
  font-weight: 850;
  font-size: 12px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
}

.sidebar-mode-chip.admin,
.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 28%),
    #30323a;
}

.admin-back-to-club {
  margin-bottom: 16px;
  background: rgba(246,139,31,0.28);
}

.sidebar.is-collapsed {
  width: 72px;
  padding: 16px 12px;
}

body.sidebar-collapsed .main {
  margin-left: 72px;
}

.sidebar.is-collapsed .sidebar-logo {
  width: 42px;
  max-width: 42px;
  content: url('../images/clubwisericon.webp');
  filter: none;
}

.sidebar.is-collapsed .account-main-copy,
.sidebar.is-collapsed .account-switch-icon,
.sidebar.is-collapsed .side-nav span,
.sidebar.is-collapsed .sidebar-mode-chip span,
.sidebar.is-collapsed .admin-back-to-club span {
  display: none;
}

.sidebar.is-collapsed .sidebar-header {
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.sidebar.is-collapsed .nav-collapse-btn {
  margin-top: 10px;
}

.sidebar.is-collapsed .account-switcher-button {
  grid-template-columns: 40px;
  justify-content: center;
  min-height: 48px;
  padding: 4px;
  border-radius: 16px;
}

.sidebar.is-collapsed .account-org-logo {
  width: 40px;
  height: 40px;
}

.sidebar.is-collapsed .account-switcher-shell {
  margin-bottom: 12px;
}

.sidebar.is-collapsed .side-nav a,
.sidebar.is-collapsed .sidebar-mode-chip,
.sidebar.is-collapsed .admin-back-to-club {
  justify-content: center;
  width: 48px;
  min-height: 48px;
  padding: 12px;
}

.sidebar.is-collapsed .side-nav a svg,
.sidebar.is-collapsed .sidebar-mode-chip svg,
.sidebar.is-collapsed .admin-back-to-club svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 950px) {
  body.sidebar-collapsed .main {
    margin-left: 0;
  }

  .sidebar.is-collapsed {
    width: 260px;
  }

  .sidebar.is-collapsed .sidebar-logo {
    width: 150px;
    max-width: 150px;
    content: url('../images/clubwiserlogo.webp');
  }

  .sidebar.is-collapsed .account-main-copy,
  .sidebar.is-collapsed .account-switch-icon,
  .sidebar.is-collapsed .side-nav span,
  .sidebar.is-collapsed .sidebar-mode-chip span,
  .sidebar.is-collapsed .admin-back-to-club span {
    display: initial;
  }
}

/* Meeting document tab additions ------------------------------------------ */
.meeting-documents-header {
  align-items: center;
}

.small-btn {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 13px;
}

.meeting-document-form {
  display: grid;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}

.meeting-document-form[hidden] {
  display: none !important;
}

.meeting-document-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 14px;
}

.meeting-document-upload {
  margin: 0;
}

.meeting-document-actions-row {
  justify-content: space-between;
}

#meetingDocumentMessage {
  margin: 0;
  color: var(--cw-muted);
  font-weight: 750;
}

@media (max-width: 760px) {
  .meeting-document-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Platform admin module controls ------------------------------------------ */
.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}

.admin-module-card {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0 !important;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  cursor: pointer;
}

.admin-module-card input {
  width: 18px !important;
  min-height: 18px !important;
  margin-top: 2px;
}

.admin-module-card strong,
.admin-module-card small {
  display: block;
}

.admin-module-card small {
  margin-top: 3px;
  color: var(--cw-muted);
  line-height: 1.35;
  font-weight: 650;
}

@media (max-width: 1180px) {
  .admin-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-module-grid {
    grid-template-columns: 1fr;
  }
}

/* Final sidebar collapse fix -------------------------------------------------
   Must live after the laptop density rules so the collapsed state actually
   shrinks the fixed sidebar and gives the page the released width. */
:root {
  --cw-sidebar-expanded: 226px;
  --cw-sidebar-collapsed: 92px;
}

@media (min-width: 951px) {
  .sidebar {
    width: var(--cw-sidebar-expanded) !important;
  }

  .main {
    margin-left: var(--cw-sidebar-expanded) !important;
    width: calc(100vw - var(--cw-sidebar-expanded)) !important;
  }

  body.sidebar-collapsed .sidebar,
  .sidebar.is-collapsed {
    width: var(--cw-sidebar-collapsed) !important;
    min-width: var(--cw-sidebar-collapsed) !important;
    max-width: var(--cw-sidebar-collapsed) !important;
    padding: 18px 14px !important;
  }

  body.sidebar-collapsed .main {
    margin-left: var(--cw-sidebar-collapsed) !important;
    width: calc(100vw - var(--cw-sidebar-collapsed)) !important;
    max-width: none !important;
  }

  .sidebar.is-collapsed .sidebar-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }

  .sidebar.is-collapsed .sidebar-logo {
    width: 44px !important;
    max-width: 44px !important;
    content: url('../images/clubwisericon.webp') !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn {
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
  }

  .sidebar.is-collapsed .account-switcher-shell {
    width: 100% !important;
    margin: 0 0 14px !important;
  }

  .sidebar.is-collapsed .account-switcher-button {
    width: 100% !important;
    min-height: 58px !important;
    grid-template-columns: 44px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 6px !important;
    border-radius: 18px !important;
  }

  .sidebar.is-collapsed .account-org-logo {
    width: 44px !important;
    height: 44px !important;
  }

  .sidebar.is-collapsed .account-main-copy,
  .sidebar.is-collapsed .account-switch-icon,
  .sidebar.is-collapsed .side-nav span,
  .sidebar.is-collapsed .sidebar-mode-chip span,
  .sidebar.is-collapsed .admin-back-to-club span {
    display: none !important;
  }

  .sidebar.is-collapsed .side-nav {
    align-items: center !important;
    padding-right: 0 !important;
  }

  .sidebar.is-collapsed .side-nav a,
  .sidebar.is-collapsed .sidebar-mode-chip,
  .sidebar.is-collapsed .admin-back-to-club {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    min-height: 52px !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }

  .sidebar.is-collapsed .side-nav a svg,
  .sidebar.is-collapsed .sidebar-mode-chip svg,
  .sidebar.is-collapsed .admin-back-to-club svg {
    width: 23px !important;
    height: 23px !important;
    margin: 0 !important;
  }
}

/* Sidebar collapse refinement: desktop-only narrow rail -------------------- */
@media (min-width: 951px) {
  :root {
    --cw-sidebar-collapsed: 76px;
  }

  body.sidebar-collapsed .sidebar,
  .sidebar.is-collapsed {
    width: var(--cw-sidebar-collapsed) !important;
    min-width: var(--cw-sidebar-collapsed) !important;
    max-width: var(--cw-sidebar-collapsed) !important;
    padding: 18px 10px !important;
  }

  body.sidebar-collapsed .main {
    margin-left: var(--cw-sidebar-collapsed) !important;
    width: calc(100vw - var(--cw-sidebar-collapsed)) !important;
    max-width: none !important;
  }

  .sidebar.is-collapsed .sidebar-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }

  .sidebar.is-collapsed .sidebar-logo {
    width: 34px !important;
    max-width: 34px !important;
    height: auto !important;
    content: url('../images/clubwisericon.webp') !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin: 0 !important;
    border-radius: 10px !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .sidebar.is-collapsed .account-switcher-shell {
    width: 100% !important;
    margin: 0 0 12px !important;
  }

  .sidebar.is-collapsed .account-switcher-button {
    width: 54px !important;
    min-height: 54px !important;
    grid-template-columns: 34px !important;
    justify-content: center !important;
    justify-items: center !important;
    padding: 0 !important;
    border-radius: 17px !important;
  }

  .sidebar.is-collapsed .account-org-logo {
    width: 34px !important;
    height: 34px !important;
    border-width: 1px !important;
  }

  .sidebar.is-collapsed .side-nav {
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
  }

  .sidebar.is-collapsed .side-nav a,
  .sidebar.is-collapsed .sidebar-mode-chip,
  .sidebar.is-collapsed .admin-back-to-club {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .sidebar.is-collapsed .side-nav a svg,
  .sidebar.is-collapsed .sidebar-mode-chip svg,
  .sidebar.is-collapsed .admin-back-to-club svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }

  .sidebar.is-collapsed .account-popover {
    display: none !important;
  }
}

@media (max-width: 950px) {
  .nav-collapse-btn {
    display: none !important;
  }

  body.sidebar-collapsed .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar.is-collapsed {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }
}

/* Platform admin organisation chart --------------------------------------- */
.admin-chart-card {
  margin: 0 0 18px;
}

.org-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.org-chart-toolbar p {
  margin: 0;
  color: var(--cw-muted);
  font-weight: 750;
}

.admin-org-chart {
  display: grid;
  gap: 14px;
}

.org-chart-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.org-chart-parent,
.org-chart-child {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 11px;
  border: 1px solid #e5edf6;
  border-radius: 18px;
  background: #fff;
  color: var(--cw-ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 28px rgba(15,31,51,0.05);
}

.org-chart-parent {
  border-color: rgba(246,139,31,0.28);
  background: linear-gradient(135deg, #fff7ed, #fff);
}

.org-chart-parent:hover,
.org-chart-child:hover,
.org-chart-parent.selected,
.org-chart-child.selected {
  border-color: rgba(246,139,31,0.52);
  box-shadow: 0 18px 34px rgba(246,139,31,0.12);
}

.org-chart-copy {
  min-width: 0;
}

.org-chart-copy strong,
.org-chart-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-chart-copy strong {
  font-weight: 950;
}

.org-chart-copy small {
  margin-top: 3px;
  color: var(--cw-muted);
  font-size: 12px;
  font-weight: 750;
}

.org-chart-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px dashed #d9e3ef;
  border-radius: 20px;
  background: rgba(255,255,255,0.68);
}

.org-chart-empty {
  display: grid;
  place-items: center;
  min-height: 66px;
  border: 1px dashed #d9e3ef;
  border-radius: 18px;
  color: var(--cw-muted);
  font-weight: 800;
}

.org-chart-badge {
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .org-chart-row {
    grid-template-columns: 1fr;
  }
}

/* Sidebar collapse alignment fix: keep brand icon and toggle side-by-side ---- */
@media (min-width: 951px) {
  :root {
    --cw-sidebar-collapsed: 96px;
  }

  body.sidebar-collapsed .sidebar,
  .sidebar.is-collapsed {
    width: var(--cw-sidebar-collapsed) !important;
    min-width: var(--cw-sidebar-collapsed) !important;
    max-width: var(--cw-sidebar-collapsed) !important;
    padding: 18px 9px !important;
  }

  body.sidebar-collapsed .main {
    margin-left: var(--cw-sidebar-collapsed) !important;
    width: calc(100vw - var(--cw-sidebar-collapsed)) !important;
  }

  .sidebar.is-collapsed .sidebar-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
  }

  .sidebar.is-collapsed .sidebar-logo {
    width: 30px !important;
    max-width: 30px !important;
    content: url('../images/clubwisericon.webp') !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin: 0 !important;
    border-radius: 10px !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  .sidebar.is-collapsed .account-switcher-shell {
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  .sidebar.is-collapsed .account-switcher-button {
    width: 52px !important;
    min-height: 52px !important;
    grid-template-columns: 32px !important;
    justify-content: center !important;
    justify-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }

  .sidebar.is-collapsed .account-org-logo {
    width: 32px !important;
    height: 32px !important;
  }

  .sidebar.is-collapsed .side-nav {
    align-items: center !important;
    gap: 5px !important;
  }

  .sidebar.is-collapsed .side-nav a {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 13px !important;
  }

  .sidebar.is-collapsed .side-nav a svg {
    width: 17px !important;
    height: 17px !important;
  }
}

/* Latest sidebar + admin workspace refinements ----------------------------- */
@media (min-width: 951px) {
  :root {
    --cw-sidebar-collapsed: 96px;
  }

  .sidebar.is-collapsed .sidebar-header {
    min-height: 36px !important;
    margin-bottom: 16px !important;
  }

  .sidebar.is-collapsed .sidebar-logo {
    width: 30px !important;
    max-width: 30px !important;
  }

  .sidebar.is-collapsed .nav-collapse-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .sidebar.is-collapsed .account-switcher-button {
    width: 58px !important;
    min-height: 58px !important;
    grid-template-columns: 38px !important;
    border-radius: 18px !important;
  }

  .sidebar.is-collapsed .account-org-logo {
    width: 38px !important;
    height: 38px !important;
  }

  .sidebar.is-collapsed .side-nav {
    gap: 7px !important;
  }

  .sidebar.is-collapsed .side-nav a {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    border-radius: 15px !important;
  }

  .sidebar.is-collapsed .side-nav a svg {
    width: 22px !important;
    height: 22px !important;
  }
}

.admin-hub-card {
  margin-bottom: 14px;
}

.admin-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.admin-section-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #fff;
  color: var(--cw-muted);
  font-weight: 900;
  cursor: pointer;
}

.admin-section-tab:hover,
.admin-section-tab.active {
  border-color: rgba(246,139,31,0.45);
  background: rgba(246,139,31,0.10);
  color: var(--cw-orange-dark);
}

.admin-section-tab svg {
  width: 17px;
  height: 17px;
}

.admin-tab-panel[hidden],
.admin-create-card[hidden],
.admin-list-card[hidden] {
  display: none !important;
}

.admin-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-feature-grid article,
.admin-template-list article {
  padding: 16px;
  border: 1px solid #e3ebf4;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f8fbff);
}

.admin-feature-grid article svg {
  width: 24px;
  height: 24px;
  color: var(--cw-orange);
  margin-bottom: 10px;
}

.admin-feature-grid strong,
.admin-feature-grid small,
.admin-template-list strong,
.admin-template-list span {
  display: block;
}

.admin-feature-grid strong,
.admin-template-list strong {
  color: var(--cw-ink);
  font-weight: 950;
}

.admin-feature-grid small,
.admin-template-list span {
  margin-top: 5px;
  color: var(--cw-muted);
  font-weight: 700;
  line-height: 1.4;
}

.admin-template-list {
  display: grid;
  gap: 12px;
}

.admin-template-list article {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-platform-panel {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .admin-feature-grid,
  .admin-template-list article {
    grid-template-columns: 1fr;
  }
}

/* Platform admin page routing ------------------------------------------------ */
body[data-page="clubwiser-admin"] .admin-page[hidden] {
  display: none !important;
}

body[data-page="clubwiser-admin"] .admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

body[data-page="clubwiser-admin"] .admin-overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 210px;
}

body[data-page="clubwiser-admin"] .admin-overview-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

body[data-page="clubwiser-admin"] .admin-crm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

body[data-page="clubwiser-admin"][data-admin-page="clubs"] .admin-hub-card,
body[data-page="clubwiser-admin"][data-admin-page="clubs"] .admin-chart-card,
body[data-page="clubwiser-admin"][data-admin-page="clubs"] .admin-workspace-grid,
body[data-page="clubwiser-admin"][data-admin-page="clubs"] .admin-detail-panel {
  display: block;
}

body[data-page="clubwiser-admin"][data-admin-page="clubs"] .admin-workspace-grid {
  display: grid;
}

body[data-page="clubwiser-admin"] .admin-hub-card .panel-subcopy {
  max-width: 820px;
}

@media (max-width: 1100px) {
  body[data-page="clubwiser-admin"] .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Clubwiser Workboard / task management */
.workboard-page .topbar.workboard-hero {
  overflow: hidden;
}

.workboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.workboard-shell {
  display: grid;
  gap: 1.15rem;
}

.workboard-header-row,
.workboard-intro-row,
.task-title-row,
.task-meta-row,
.task-card-main,
.task-card-actions,
.kanban-column-header,
.kanban-card-top,
.workboard-email-strip,
.project-list-header {
  display: flex;
  align-items: center;
}

.workboard-header-row,
.workboard-intro-row,
.workboard-email-strip,
.project-list-header {
  justify-content: space-between;
  gap: 1rem;
}

.workboard-header-row h2,
.project-detail-panel h3 {
  margin: 0;
}

.workboard-view-toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
}

.workboard-view-toggle button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  border-radius: 999px;
  padding: .55rem .85rem;
  cursor: pointer;
}

.workboard-view-toggle button.active {
  color: var(--ink);
  background: rgba(255, 137, 18, .12);
  border-color: rgba(255, 137, 18, .35);
}

.workboard-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 190px;
  gap: .75rem;
  align-items: center;
}

.compact-search {
  margin: 0;
}

.workboard-toolbar select,
.task-card-actions select,
.task-form-grid select,
.task-form-grid input,
.task-form-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: .85rem 1rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.workboard-email-strip {
  padding: 1rem;
  border-radius: 22px;
  border: 1px dashed rgba(255, 137, 18, .45);
  background: rgba(255, 137, 18, .07);
}

.workboard-email-strip strong {
  display: block;
  font-size: 1.1rem;
}

.workboard-email-strip small {
  display: block;
  color: var(--muted);
  margin-top: .25rem;
}

.task-view-mount {
  min-height: 240px;
}

.workboard-task-list {
  display: grid;
  gap: .75rem;
}

.task-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .04);
}

.task-card.is-done {
  opacity: .72;
}

.task-card-main {
  gap: .85rem;
  min-width: 0;
}

.task-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 137, 18, .10);
  color: var(--orange);
  flex: 0 0 auto;
}

.admin-sidebar .task-icon,
.source-email {
  background: rgba(63, 69, 81, .08);
}

.task-copy {
  min-width: 0;
}

.task-title-row {
  gap: .55rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.link-button.task-title {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.02rem;
  text-align: left;
  cursor: pointer;
}

.task-copy p {
  margin: .25rem 0 .55rem;
  color: var(--muted);
}

.task-meta-row {
  gap: .7rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .86rem;
}

.task-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.task-meta-row svg {
  width: 15px;
  height: 15px;
}

.task-card-actions {
  align-items: flex-end;
  justify-content: center;
  flex-direction: column;
  gap: .5rem;
  min-width: 150px;
}

.small-btn {
  padding: .6rem .8rem;
  border-radius: 14px;
  font-size: .86rem;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: .8rem;
  overflow-x: auto;
  padding-bottom: .35rem;
}

.kanban-column {
  min-width: 210px;
  background: rgba(239, 244, 249, .8);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: .75rem;
}

.kanban-column-header {
  justify-content: space-between;
  padding: .25rem .25rem .75rem;
}

.kanban-column-header span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .5rem;
  color: var(--muted);
  font-weight: 800;
}

.kanban-column-body {
  display: grid;
  gap: .65rem;
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: .85rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}

.kanban-card-top {
  justify-content: space-between;
  gap: .5rem;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: .55rem;
}

.kanban-card strong {
  display: block;
  margin-bottom: .3rem;
}

.kanban-card p,
.kanban-card small {
  color: var(--muted);
  margin: 0;
}

.kanban-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .7rem;
}

.kanban-quick-actions button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: .3rem .5rem;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.kanban-empty {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  min-height: 86px;
  display: grid;
  place-items: center;
}

.project-board-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
}

.project-list-panel,
.project-detail-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  padding: 1rem;
}

.project-list-panel {
  display: grid;
  align-content: start;
  gap: .55rem;
}

.project-list-header small {
  color: var(--muted);
}

.project-filter {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 16px;
  padding: .75rem;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.project-filter span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-filter strong {
  color: var(--muted);
}

.project-filter.active {
  background: rgba(255, 137, 18, .10);
  border-color: rgba(255, 137, 18, .3);
}

.project-milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: .85rem 0;
}

.mini-metric {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: .85rem;
  display: grid;
  gap: .2rem;
}

.mini-metric svg {
  color: var(--orange);
}

.mini-metric strong {
  font-size: 1.45rem;
}

.mini-metric small {
  color: var(--muted);
}

.empty-workboard {
  border: 1px dashed var(--border);
  background: linear-gradient(180deg, #fff, rgba(248, 250, 252, .75));
  border-radius: 24px;
  min-height: 260px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .5rem;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.empty-workboard svg {
  width: 44px;
  height: 44px;
  color: var(--orange);
}

.empty-workboard h3 {
  color: var(--ink);
  margin: .2rem 0 0;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-top: .7rem;
}

.task-modal .large-modal {
  max-width: 980px;
}

.task-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.task-form-grid .form-field {
  display: grid;
  gap: .35rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .78rem;
}

.task-form-grid .form-field input,
.task-form-grid .form-field select,
.task-form-grid .form-field textarea {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--ink);
}

.full-span {
  grid-column: 1 / -1;
}

.modal-actions.full-span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.text-danger {
  margin-right: auto;
  border: 0;
  background: transparent;
  color: #b42318;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
}

.form-message {
  color: #b42318;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .workboard-stats,
  .workboard-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workboard-toolbar .compact-search {
    grid-column: 1 / -1;
  }

  .project-board-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .workboard-stats,
  .workboard-toolbar,
  .project-milestone-grid,
  .task-form-grid {
    grid-template-columns: 1fr;
  }

  .workboard-header-row,
  .workboard-intro-row,
  .workboard-email-strip,
  .task-card {
    align-items: stretch;
    flex-direction: column;
  }

  .workboard-view-toggle {
    justify-content: flex-start;
  }

  .task-card-actions {
    min-width: 0;
    align-items: stretch;
  }
}

/* Document library refinements */
.documents-sidebar .folder-heading { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(15, 23, 42, 0.08); }
.doc-folder-list { display: grid; gap: .45rem; margin-bottom: 1rem; }
.doc-folder-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .7rem; border: 1px solid rgba(148,163,184,.35); background: #fff; border-radius: 16px; padding: .72rem .82rem; font-weight: 800; color: var(--ink, #132033); cursor: pointer; }
.doc-folder-btn span:first-child { min-width: 0; display: flex; align-items: center; gap: .6rem; }
.doc-folder-btn span:first-child svg { width: 1rem; height: 1rem; color: var(--orange, #ff8414); flex: 0 0 auto; }
.doc-folder-btn.active { border-color: rgba(255,132,20,.45); background: rgba(255,132,20,.08); box-shadow: inset 4px 0 0 var(--orange, #ff8414); }
.doc-folder-meta { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted, #65728a); font-size: .8rem; }
.doc-folder-meta svg { width: .8rem; height: .8rem; }
.doc-folder-meta strong { background: #eef2f7; border-radius: 999px; padding: .12rem .45rem; }
.inline-title-edit { display: block; }
.inline-title-input { width: min(420px, 100%); border: 1px solid rgba(255,132,20,.4); border-radius: 10px; padding: .35rem .5rem; font: inherit; font-weight: 800; color: var(--ink, #132033); }
.document-preview-card { overflow: hidden; }
.document-preview-frame { width: 100%; height: 58vh; border: 1px solid rgba(148,163,184,.35); border-radius: 16px; background: #fff; }
.document-preview-image { display: block; width: 100%; max-height: 58vh; object-fit: contain; border: 1px solid rgba(148,163,184,.35); border-radius: 16px; background: #fff; }
.preview-fallback { border: 1px dashed rgba(148,163,184,.5); border-radius: 18px; padding: 1.2rem; display: grid; gap: .75rem; justify-items: start; background: #f8fafc; }
.compact-form { max-width: 520px; }

/* Workboard/task modal refinements */
.task-modal.open { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.task-modal .large-modal { width: min(1040px, calc(100vw - 2rem)); max-height: min(88vh, 920px); overflow: auto; border-radius: 30px; }
.task-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.task-form-grid .form-field { display: grid; gap: .45rem; min-width: 0; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; color: var(--ink, #132033); }
.task-form-grid .form-field input,
.task-form-grid .form-field select,
.task-form-grid .form-field textarea { width: 100%; border: 1px solid rgba(148,163,184,.4); border-radius: 14px; padding: .85rem .9rem; font: inherit; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink, #132033); background: #fff; }
.task-form-grid .full-span { grid-column: 1 / -1; }
.task-form-grid .half-span { grid-column: span 2; }
.task-form-section-title { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; margin-top: .35rem; padding-top: .85rem; border-top: 1px solid rgba(148,163,184,.25); font-size: .82rem; font-weight: 950; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #65728a); }
.personal-task-layout { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(0, 1.5fr); gap: 1rem; }
.personal-section-list { display: grid; gap: .55rem; align-content: start; }
.personal-section-btn { border: 1px solid rgba(148,163,184,.35); border-radius: 16px; background: #fff; padding: .8rem; display: flex; justify-content: space-between; align-items: center; font-weight: 900; cursor: pointer; text-align: left; }
.personal-section-btn.active { border-color: rgba(255,132,20,.45); background: rgba(255,132,20,.08); }
.core-list-table { width: 100%; border-collapse: collapse; }
.core-list-table th, .core-list-table td { border-bottom: 1px solid rgba(148,163,184,.22); padding: .8rem .65rem; text-align: left; vertical-align: top; }
.core-list-table th { color: var(--muted, #65728a); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.kanban-column-body { min-height: 190px; }
.kanban-card { cursor: grab; }
.kanban-card.dragging { opacity: .5; }
.kanban-column.drag-over { outline: 2px dashed rgba(255,132,20,.55); outline-offset: -6px; }
@media (max-width: 900px) {
  .task-form-grid { grid-template-columns: 1fr; }
  .task-form-grid .half-span { grid-column: 1 / -1; }
  .personal-task-layout { grid-template-columns: 1fr; }
  .task-modal.open { padding: .75rem; }
}
.custom-board-list { display: grid; gap: 1rem; margin-top: 1rem; }
.custom-board-list + .custom-board-list { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(148,163,184,.25); }
.kanban-section-label { font-size: .82rem; font-weight: 950; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #65728a); margin: .4rem 0 -.35rem; }

/* Simple orange homepage login -------------------------------------------- */
.login-page.simple-login-page {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.26), transparent 18rem),
    radial-gradient(circle at 84% 88%, rgba(255,255,255,0.18), transparent 22rem),
    linear-gradient(135deg, #ff9a22 0%, #f68b1f 42%, #ee770f 100%);
}

.simple-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.simple-login-card {
  width: min(100%, 380px);
  display: grid;
  justify-items: center;
  gap: 26px;
}

.simple-login-logo {
  width: min(72vw, 260px);
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(70, 37, 8, 0.22));
}

.simple-login-form {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 26px;
  background: rgba(255,255,255,0.16);
  box-shadow: 0 24px 70px rgba(107, 55, 8, 0.20);
  backdrop-filter: blur(14px);
}

.simple-login-form input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 16px;
  padding: 0 17px;
  font: inherit;
  color: #111827;
  background: rgba(255,255,255,0.92);
  outline: none;
  box-shadow: 0 10px 24px rgba(107, 55, 8, 0.10);
}

.simple-login-form input::placeholder {
  color: #8a8f99;
}

.simple-login-form input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.26), 0 10px 24px rgba(107, 55, 8, 0.12);
}

.simple-login-submit {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  color: #f68b1f;
  background: #fff;
  box-shadow: 0 18px 36px rgba(107, 55, 8, 0.18);
}

.simple-login-submit:hover {
  transform: translateY(-1px);
}

.simple-login-submit:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.simple-login-message {
  min-height: 22px;
  margin: -8px 0 0;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 1px 14px rgba(107, 55, 8, 0.28);
}

@media (max-width: 560px) {
  .simple-login-card {
    width: 100%;
    gap: 22px;
  }

  .simple-login-logo {
    width: min(76vw, 230px);
  }

  .simple-login-form {
    border-radius: 22px;
  }
}

/* Requested document/workboard polish -------------------------------------- */
.documents-layout {
  align-items: stretch;
}

.documents-layout > .panel,
.documents-sidebar,
.documents-main {
  min-height: 520px;
}

.documents-sidebar {
  top: 20px;
  align-self: start;
}

.documents-main {
  display: flex;
  flex-direction: column;
}

.documents-table-wrap {
  flex: 1 1 auto;
}

.documents-sidebar-heading:first-child {
  margin-bottom: .75rem;
}

.document-focus-card {
  display: none;
}

.doc-folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(148,163,184,.35);
  background: #fff;
  border-radius: 16px;
  padding: .18rem;
}

.doc-folder-row.active {
  border-color: rgba(255,132,20,.45);
  background: rgba(255,132,20,.08);
  box-shadow: inset 4px 0 0 var(--orange, #ff8414);
}

.doc-folder-row .doc-folder-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: .62rem .66rem;
}

.doc-folder-row .doc-folder-btn.active,
.doc-folder-row .doc-folder-btn:hover {
  background: transparent;
  box-shadow: none;
}

.folder-inline-actions {
  display: inline-flex;
  gap: .25rem;
  padding-right: .25rem;
}

.row-action-btn.small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.row-action-btn.small svg {
  width: 14px;
  height: 14px;
}

.document-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-width: 360px;
}

.document-title-row .document-title-button {
  flex: 1 1 auto;
  min-width: 0;
}

.document-title-copy {
  min-width: 0;
}

.document-title-copy strong,
.document-title-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.document-title-actions {
  flex: 0 0 auto;
}

.documents-table .document-title-cell {
  min-width: 430px;
}

/* Make the Tasks popup a real centred overlay instead of an in-page block. */
.task-modal {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 1.5rem !important;
  background: rgba(15, 23, 42, 0.42) !important;
  box-shadow: none !important;
  z-index: 2000 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: auto !important;
}

.task-modal.open {
  display: flex !important;
}

.task-modal .large-modal {
  width: min(1040px, calc(100vw - 3rem)) !important;
  max-height: calc(100vh - 3rem) !important;
  margin: auto !important;
  overflow: auto !important;
  background: #fff !important;
  border-radius: 28px !important;
  padding: 1.4rem !important;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28) !important;
}

.task-modal .modal-header {
  position: sticky;
  top: -1.4rem;
  z-index: 2;
  background: #fff;
  padding: .3rem 0 1rem;
  border-bottom: 1px solid rgba(148,163,184,.24);
}

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

  .documents-layout > .panel,
  .documents-sidebar,
  .documents-main {
    min-height: auto;
  }

  .task-modal {
    padding: .75rem !important;
  }

  .task-modal .large-modal {
    width: calc(100vw - 1.5rem) !important;
    max-height: calc(100vh - 1.5rem) !important;
    border-radius: 22px !important;
  }
}

/* Document library simplification: folders only, compact file list, no side-scroll */
.documents-layout {
  align-items: start !important;
}

.documents-sidebar,
.documents-main {
  align-self: start !important;
  min-height: 0 !important;
}

.documents-sidebar .folder-heading {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  margin-bottom: 14px !important;
}

.doc-category-list[hidden] {
  display: none !important;
}

.doc-folder-list {
  gap: 3px !important;
}

.doc-folder-row {
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.doc-folder-row.active {
  background: #f4f7fb !important;
  box-shadow: none !important;
}

.doc-folder-row .doc-folder-btn {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.doc-folder-row.active .doc-folder-btn {
  color: #142033 !important;
}

.doc-folder-row .doc-folder-btn span:first-child {
  min-width: 0 !important;
  overflow: hidden !important;
}

.doc-folder-row .doc-folder-btn span:first-child:not(.doc-folder-meta) {
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.doc-folder-meta {
  flex: 0 0 auto !important;
}

.folder-inline-actions {
  gap: 3px !important;
  padding-right: 4px !important;
}

.folder-inline-actions .row-action-btn.small {
  width: 30px !important;
  height: 30px !important;
}

.documents-table-wrap {
  overflow-x: hidden !important;
}

.documents-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.documents-table th,
.documents-table td {
  vertical-align: middle !important;
}

.documents-table th:first-child,
.documents-table td:first-child {
  width: auto !important;
}

.document-actions-heading,
.document-actions-cell {
  width: 68px !important;
  text-align: right !important;
}

.documents-table .document-title-cell {
  width: auto !important;
  min-width: 0 !important;
}

.document-title-row,
.document-title-row.compact-document-row {
  min-width: 0 !important;
  width: 100% !important;
}

.document-title-row .document-title-button {
  min-width: 0 !important;
  max-width: calc(100% - 170px) !important;
}

.document-title-copy {
  min-width: 0 !important;
  overflow: hidden !important;
}

.document-title-copy strong,
.document-title-copy small {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.document-title-actions {
  flex: 0 0 auto !important;
}

.document-title-actions .row-action-btn {
  width: 34px !important;
  height: 34px !important;
}

.documents-table th:nth-child(n+3),
.documents-table td:nth-child(n+3) {
  display: none !important;
}

@media (max-width: 900px) {
  .document-title-row .document-title-button {
    max-width: calc(100% - 92px) !important;
  }

  .document-title-actions .row-action-btn[title="Open in new tab"] {
    display: none !important;
  }
}

/* Global overflow guard: stop accidental page-wide sideways scroll from wide cards/tables/modals */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

.main {
  max-width: calc(100vw - var(--sidebar-width, 260px));
  overflow-x: clip;
}

body.sidebar-collapsed .main {
  max-width: calc(100vw - var(--sidebar-collapsed-width, 92px));
}

.topbar,
.panel,
.documents-main,
.documents-sidebar,
.table-wrap,
.documents-table-wrap {
  max-width: 100%;
}

/* Documents: simple folder list + single-column file rows */
body[data-page="documents"] .topbar-actions #openTemplateDrawer,
body[data-page="documents"] #templateDrawer {
  display: none !important;
}

body[data-page="documents"] .documents-layout {
  align-items: start !important;
  gap: 18px !important;
}

body[data-page="documents"] .documents-sidebar,
body[data-page="documents"] .documents-main {
  margin-top: 0 !important;
}

.folder-name-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  padding: 4px 6px;
  font: inherit;
  font-weight: 800;
  color: #142033;
  background: #fff;
}

.doc-folder-name-wrap {
  min-width: 0;
  flex: 1 1 auto;
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.folder-name-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="documents"] .documents-table thead tr,
body[data-page="documents"] .documents-table tbody tr {
  display: block;
  width: 100%;
}

body[data-page="documents"] .documents-table th,
body[data-page="documents"] .documents-table td {
  display: block;
  width: 100% !important;
}

body[data-page="documents"] .documents-table th {
  padding-right: 18px !important;
}

body[data-page="documents"] .document-actions-heading,
body[data-page="documents"] .document-actions-cell {
  display: none !important;
}

body[data-page="documents"] .compact-document-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-page="documents"] .document-title-row .document-title-button {
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-page="documents"] .document-title-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

body[data-page="documents"] .document-title-actions .row-action-btn {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
}

@media (max-width: 1100px) {
  body[data-page="documents"] .documents-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* Correct width calculations to the sidebar variables already used by the app. */
.main {
  max-width: calc(100vw - var(--cw-sidebar-width, 260px)) !important;
}
body.sidebar-collapsed .main {
  max-width: calc(100vw - var(--cw-sidebar-collapsed, 92px)) !important;
}
@media (max-width: 900px) {
  .main,
  body.sidebar-collapsed .main {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
}

/* Documents: inline custom-folder editing with icon selector */
body[data-page="documents"] .folder-edit-inline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 2px 4px 0;
}

body[data-page="documents"] .folder-edit-inline[hidden],
body[data-page="documents"] .doc-folder-btn[hidden],
body[data-page="documents"] .folder-inline-actions[hidden] {
  display: none !important;
}

body[data-page="documents"] .folder-icon-input {
  min-width: 0;
  height: 32px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  background: #fff;
  color: #142033;
  font: inherit;
  font-weight: 800;
  font-size: .78rem;
  padding: 0 6px;
}

body[data-page="documents"] .folder-name-input {
  height: 32px;
}

/* Documents: folder icon picker */
body[data-page="documents"] .folder-icon-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

body[data-page="documents"] .folder-icon-trigger {
  height: 34px;
  min-width: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d8e0eb;
  border-radius: 12px;
  background: #fff;
  color: var(--orange, #ff8414);
  cursor: pointer;
}

body[data-page="documents"] .folder-icon-trigger svg:first-child {
  width: 18px;
  height: 18px;
}

body[data-page="documents"] .folder-icon-trigger svg:last-child {
  width: 13px;
  height: 13px;
  color: #65728a;
}

body[data-page="documents"] .folder-icon-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  max-height: 240px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
}

body[data-page="documents"] .folder-icon-menu[hidden] {
  display: none !important;
}

body[data-page="documents"] .folder-icon-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 7px 8px;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  color: #142033;
  text-align: left;
  cursor: pointer;
}

body[data-page="documents"] .folder-icon-option:hover,
body[data-page="documents"] .folder-icon-option.selected {
  background: rgba(255,132,20,.1);
  color: #c45f00;
}

body[data-page="documents"] .folder-icon-option svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--orange, #ff8414);
}

body[data-page="documents"] .folder-icon-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="documents"] .folder-icon-picker-host .folder-icon-trigger {
  height: 46px;
  min-width: 78px;
  justify-content: space-between;
  padding: 0 12px;
}

body[data-page="documents"] .folder-icon-picker-host .folder-icon-menu {
  width: 280px;
}

body[data-page="documents"] .folder-edit-inline {
  grid-template-columns: 62px minmax(0, 1fr) 32px !important;
}


/* Documents fixes: prevent clipped custom-folder icon menus and keep upload affordance visible. */
body[data-page="documents"] .documents-layout,
body[data-page="documents"] .documents-sidebar,
body[data-page="documents"] .documents-main,
body[data-page="documents"] .doc-folder-list,
body[data-page="documents"] .doc-folder-row,
body[data-page="documents"] .folder-edit-inline,
body[data-page="documents"] .folder-icon-picker {
  overflow: visible !important;
}

body[data-page="documents"] .documents-sidebar {
  z-index: 20;
}

body[data-page="documents"] .documents-main {
  min-height: 532px !important;
}

body[data-page="documents"] .doc-folder-row:has(.folder-edit-inline:not([hidden])),
body[data-page="documents"] .folder-edit-inline:not([hidden]) {
  position: relative;
  z-index: 50;
}

body[data-page="documents"] .folder-icon-menu {
  z-index: 9999 !important;
}

body[data-page="documents"] .documents-table-wrap {
  flex: 0 0 auto !important;
}

body[data-page="documents"] .documents-upload-card {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px dashed #d8e0eb;
  border-radius: 18px;
  padding: 16px 18px;
  background: #fbfdff;
}

body[data-page="documents"] .documents-upload-card[hidden] {
  display: none !important;
}

body[data-page="documents"] .documents-upload-card strong,
body[data-page="documents"] .documents-upload-card span {
  display: block;
}

body[data-page="documents"] .documents-upload-card span {
  color: #65728a;
  margin-top: 3px;
}

@media (max-width: 760px) {
  body[data-page="documents"] .documents-upload-card {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Documents folder list refinements: full-width names, a single edit mode, aligned panels, icon-only picker. */
body[data-page="documents"] .documents-sidebar {
  position: relative !important;
  top: auto !important;
  align-self: start !important;
}

body[data-page="documents"] .documents-layout {
  align-items: start !important;
}

body[data-page="documents"] .documents-sidebar,
body[data-page="documents"] .documents-main {
  margin-top: 0 !important;
}

body[data-page="documents"] .documents-sidebar-heading.folder-heading {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

body[data-page="documents"] .folder-edit-mode-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: .78rem;
  font-weight: 850;
  padding: 0 10px;
  cursor: pointer;
}

body[data-page="documents"] .folder-edit-mode-btn svg {
  width: 14px;
  height: 14px;
  color: var(--orange, #ff8414);
}

body[data-page="documents"] .folder-edit-mode-btn.active {
  background: rgba(255,132,20,.1);
  border-color: rgba(255,132,20,.35);
  color: #c45f00;
}

body[data-page="documents"] .doc-folder-row {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-page="documents"] .doc-folder-row.folder-editing {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

body[data-page="documents"] .doc-folder-row .doc-folder-btn {
  grid-column: 1;
}

body[data-page="documents"] .doc-folder-row:not(.folder-editing) .folder-inline-actions {
  display: none !important;
}

body[data-page="documents"] .doc-folder-row:not(.folder-editing) .doc-folder-btn {
  padding-right: 10px !important;
}

body[data-page="documents"] .doc-folder-row:not(.folder-editing) .folder-name-label {
  max-width: none !important;
}

body[data-page="documents"] .folder-inline-actions {
  grid-column: 2;
}

body[data-page="documents"] .folder-edit-inline {
  grid-column: 1 / -1 !important;
}

body[data-page="documents"] .folder-icon-menu {
  width: 178px !important;
  grid-template-columns: repeat(4, 36px) !important;
  justify-content: center;
  gap: 6px !important;
  padding: 10px !important;
}

body[data-page="documents"] .folder-icon-option {
  width: 36px;
  height: 36px;
  display: inline-grid !important;
  place-items: center;
  padding: 0 !important;
}

body[data-page="documents"] .folder-icon-option svg {
  width: 18px !important;
  height: 18px !important;
}

body[data-page="documents"] .folder-icon-option span:not(.sr-only) {
  display: none !important;
}

body[data-page="documents"] .folder-icon-picker-host .folder-icon-menu {
  width: 178px !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Documents polish round 3: tighter folder modal, icon-only edit, cleaner details drawer. */
body[data-page="documents"] .folder-edit-mode-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  justify-content: center !important;
  border-radius: 12px !important;
}

body[data-page="documents"] .folder-edit-mode-btn span:not(.sr-only) {
  display: none !important;
}

body[data-page="documents"] #folderModal {
  width: min(560px, calc(100vw - 28px)) !important;
  padding: 0 !important;
}

body[data-page="documents"] #folderModal .compact-form {
  max-width: none !important;
  padding: 28px 32px 26px !important;
}

body[data-page="documents"] #folderModal .modal-header {
  padding: 0 0 18px !important;
  border-bottom: 0 !important;
  margin-bottom: 6px !important;
}

body[data-page="documents"] #folderModal .modal-header h2 {
  font-size: 1.65rem !important;
}

body[data-page="documents"] #folderModal label {
  margin-bottom: 12px !important;
}

body[data-page="documents"] #folderModal label span {
  display: block;
  margin-bottom: 6px;
  font-size: .78rem;
  font-weight: 850;
  color: #344054;
}

body[data-page="documents"] #folderModal .folder-icon-picker-host .folder-icon-trigger {
  width: 66px !important;
  min-width: 66px !important;
  height: 46px !important;
}

body[data-page="documents"] #folderModal .folder-modal-help {
  margin: 4px 0 18px !important;
  font-size: .9rem !important;
  line-height: 1.35 !important;
}

body[data-page="documents"] #folderModal .modal-actions {
  margin-top: 6px !important;
  justify-content: flex-end !important;
}

body[data-page="documents"] .document-detail-panel {
  width: min(560px, 94vw) !important;
}

body[data-page="documents"] .detail-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

body[data-page="documents"] .detail-card-title-row h3 {
  margin: 0 !important;
}

body[data-page="documents"] .detail-notes-input {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  padding: 12px;
  font: inherit;
  line-height: 1.5;
  color: #142033;
  background: #fff;
}

body[data-page="documents"] .notes-editor-card {
  margin-bottom: 0 !important;
}

body[data-page="documents"] .secondary-btn.mini,
body[data-page="documents"] .primary-btn.mini {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: .82rem !important;
}

body[data-page="documents"] .primary-btn.danger {
  background: #b42318 !important;
  color: #fff !important;
}

body[data-page="documents"] .row-action-btn.danger {
  color: #b42318 !important;
  border-color: #ffd8d3 !important;
  background: #fff !important;
}

body[data-page="documents"] .document-trash-btn {
  width: 46px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

body[data-page="documents"] .document-delete-confirm {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ffd8d3;
  border-radius: 14px;
  background: #fff7f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="documents"] .document-delete-confirm[hidden] {
  display: none !important;
}

body[data-page="documents"] .document-delete-confirm span {
  font-weight: 800;
  color: #7a271a;
}

/* Documents detail drawer polish: compact title editing and one-line action row. */
body[data-page="documents"] .document-title-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
}

body[data-page="documents"] .document-title-input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 850;
  color: #142033;
  background: #f8fafc;
}

body[data-page="documents"] .document-title-input:focus {
  outline: none;
  border-color: #d7e2ef;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 132, 20, .12);
}

body[data-page="documents"] .detail-title-message {
  min-height: 18px;
  margin: 0 0 6px !important;
  font-size: .82rem;
}

body[data-page="documents"] .detail-actions {
  align-items: center;
}

body[data-page="documents"] .detail-actions .primary-btn,
body[data-page="documents"] .detail-actions .secondary-btn {
  white-space: nowrap;
}

@media (min-width: 560px) {
  body[data-page="documents"] .detail-actions {
    flex-wrap: nowrap;
  }

  body[data-page="documents"] .document-trash-btn {
    margin-left: auto;
    flex: 0 0 auto;
  }
}

/* Tasks reset: first-pass organisation action register */
.simple-tasks-page .workboard-hero { margin-bottom: 30px; }
.simple-tasks-page .org-task-shell { padding: 24px; }
.task-page-head,
.org-task-intro,
.org-task-card,
.org-task-meta,
.org-task-actions,
.source-summary { display: flex; align-items: center; }
.task-page-head { justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.task-page-head h2 { margin: 4px 0 0; }
.task-scope-toggle { flex: 0 0 auto; }
.task-scope-toggle button { min-width: 150px; justify-content: center; }
.org-task-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 190px; gap: 14px; margin-bottom: 18px; }
.org-task-intro { justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 22px; background: #f8fafc; margin-bottom: 16px; }
.org-task-intro h3 { margin: 4px 0 6px; }
.org-task-intro p { margin: 0; color: var(--muted); max-width: 760px; }
.org-task-list { display: grid; gap: 12px; }
.org-task-card { align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 14px 34px rgba(20, 31, 50, .06); }
.org-task-card.is-done { opacity: .72; }
.org-task-source-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--orange); background: #fff4eb; flex: 0 0 auto; }
.org-task-source-icon svg { width: 24px; height: 24px; }
.org-task-main { min-width: 0; flex: 1; }
.org-task-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.org-task-title-row .task-title { font-size: 1.02rem; font-weight: 900; color: var(--ink); text-align: left; }
.org-task-main p { margin: 0 0 10px; color: var(--muted); line-height: 1.45; }
.org-task-meta { align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; color: var(--muted); font-weight: 700; font-size: .9rem; }
.org-task-meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.org-task-meta svg { width: 16px; height: 16px; color: var(--slate); }
.org-task-actions { gap: 10px; margin-left: auto; }
.org-task-actions select { min-width: 138px; }
.task-edit-card { max-width: 760px; }
.simple-task-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.simple-task-form .full-span { grid-column: 1 / -1; }
.source-summary { justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; color: var(--muted); }
.source-summary strong { color: var(--ink); }
.danger-icon-btn { color: #dc2626; border-color: #fecaca; }
.danger-icon-btn.confirming { color: #fff; background: #dc2626; border-color: #dc2626; }
.personal-task-coming-soon { text-align: center; padding: 52px 24px; border: 1px dashed var(--line); border-radius: 26px; background: #f8fafc; }
.personal-task-coming-soon > svg { width: 50px; height: 50px; color: var(--orange); margin-bottom: 12px; }
.personal-task-coming-soon h3 { margin: 0 0 8px; }
.personal-task-coming-soon p { max-width: 680px; margin: 0 auto 20px; color: var(--muted); line-height: 1.5; }
.personal-task-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 760px; margin: 0 auto; }
.personal-task-preview-grid span { padding: 14px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-weight: 800; color: var(--slate); }
.simple-empty-tasks { margin-top: 0; }

@media (max-width: 900px) {
  .task-page-head,
  .org-task-card { flex-direction: column; align-items: stretch; }
  .task-scope-toggle,
  .org-task-actions { width: 100%; }
  .task-scope-toggle button,
  .org-task-actions > * { flex: 1; }
  .org-task-toolbar { grid-template-columns: 1fr; }
  .simple-task-form,
  .personal-task-preview-grid { grid-template-columns: 1fr; }
}


/* Meeting minutes finalise workflow */
.minutes-toolbar { flex-wrap: wrap; }
.minutes-workflow-message { margin: 0 0 14px; color: var(--muted); font-weight: 800; }
.minutes-workflow-message.is-success { color: #047857; }
.minutes-workflow-message.is-error { color: #b91c1c; }


/* Documents folder heading actions */
body[data-page="documents"] .folder-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body[data-page="documents"] .folder-heading-actions .folder-edit-mode-btn {
  width: 34px;
  padding: 0;
  justify-content: center;
}

/* Action items cleanup */
.simple-tasks-page .workboard-hero p { max-width: 760px; }
.org-task-toolbar { grid-template-columns: minmax(340px, 1fr) minmax(180px, 240px) minmax(180px, 260px); align-items: center; }
.org-task-toolbar .compact-search { min-height: 56px; }
.org-task-toolbar select { min-height: 56px; }
.org-task-source-icon { color: var(--orange); }

@media (max-width: 900px) {
  .org-task-toolbar { grid-template-columns: 1fr; }
}

/* Personal task workspace */
.task-scope-toggle button { min-width: 132px; }
.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
  margin-bottom: 16px;
}
.workspace-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}
.task-workspace-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.task-workspace-column {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
  padding: 12px;
}
.task-workspace-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--ink);
}
.task-workspace-column-head span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e9eef5;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--muted);
}
.task-workspace-cards {
  display: grid;
  gap: 10px;
}
.workspace-task-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(20, 31, 50, .05);
}
.workspace-task-card .task-title {
  font-weight: 900;
  text-align: left;
  color: var(--ink);
}
.workspace-task-card p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: .9rem;
}
.workspace-task-meta {
  display: grid;
  gap: 8px;
}
.workspace-task-meta span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}
.workspace-task-meta select {
  width: 100%;
  min-height: 40px;
}
@media (max-width: 900px) {
  .workspace-toolbar { align-items: stretch; flex-direction: column; }
  .task-workspace-board { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
}

/* Tasks: action-items/my-tasks/workspace refinement */
.task-scope-toggle button { min-width: 118px; }
@media (max-width: 1120px) {
  .task-page-head { align-items: flex-start; flex-direction: column; }
  .task-scope-toggle { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .task-scope-toggle button { flex: 0 0 auto; }
}
.workspace-builder-toolbar { margin-bottom: 12px; }
.workspace-add-action-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, .9fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.workspace-add-action-row select { min-height: 52px; }
.custom-workspace-board {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
  overflow: visible;
}
.workspace-agenda-list {
  min-width: 300px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8fafc;
  padding: 14px;
  box-shadow: 0 18px 38px rgba(20,31,50,.06);
}
.workspace-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.workspace-list-head strong { display: block; font-size: 1rem; color: var(--ink); }
.workspace-list-head span { color: var(--muted); font-size: .85rem; font-weight: 800; }
.workspace-section-stack { display: grid; gap: 12px; }
.workspace-section-block {
  border-radius: 18px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.workspace-section-head { padding: 12px 14px; }
.workspace-section-head h4 { margin: 0; }
.workspace-section-head p { margin: 2px 0 0; color: var(--muted); font-weight: 800; }
.workspace-card-list { display: grid; gap: 10px; padding: 12px; }
.workspace-card-list .section-empty { margin: 0; }
.workspace-empty-start { margin-top: 0; }
.workspace-task-meta .link-button { justify-self: start; color: #b91c1c; font-size: .84rem; font-weight: 900; }
@media (max-width: 900px) {
  .workspace-add-action-row { grid-template-columns: 1fr; }
  .custom-workspace-board { grid-template-columns: 1fr; }
}

/* Tasks workspace inline creation + placement polish */
.workspace-inline-create {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(20,31,50,.06);
}
.workspace-inline-create.compact {
  grid-template-columns: auto minmax(160px, 1fr) auto auto;
  margin-bottom: 12px;
  box-shadow: none;
}
.workspace-inline-create i { color: var(--orange); }
.workspace-inline-create input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
}
.workspace-placement-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}
.workspace-placement-fields[hidden] { display: none !important; }
@media (max-width: 760px) {
  .workspace-inline-create,
  .workspace-inline-create.compact,
  .workspace-placement-fields { grid-template-columns: 1fr; }
}

/* Workspace task board: agenda-style polish, plus actions and drag/drop */
.simple-tasks-page .task-title,
.simple-tasks-page .org-task-title-row .task-title,
.simple-tasks-page .workspace-task-card .task-title {
  letter-spacing: -0.02em;
  line-height: 1.18;
  text-decoration: none;
}

.simple-tasks-page .org-task-card {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(20,31,50,.045);
}

.simple-tasks-page .org-task-main p,
.simple-tasks-page .workspace-task-card p {
  font-size: .94rem;
  line-height: 1.42;
}

.workspace-add-action-row {
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, .7fr) minmax(180px, .7fr) auto;
}

.workspace-picker-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.workspace-picker-actions .icon-only {
  width: 52px;
  min-height: 52px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.workspace-list-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.workspace-list-title { min-width: 0; }
.workspace-list-title strong,
.workspace-section-head h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list-actions,
.workspace-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row-icon-btn.danger-icon { color: #dc2626; border-color: #fecaca; background: #fff; }
.row-icon-btn.danger-icon.confirming,
.row-icon-btn.confirming {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.workspace-list-body { display: grid; gap: 12px; }
.workspace-list-drop {
  display: grid;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px dashed #d9e2ef;
  border-radius: 18px;
  background: rgba(255,255,255,.75);
}

.workspace-list-drop.is-drag-over,
.workspace-card-list.is-drag-over,
.workspace-section-block.is-drag-over {
  border-color: var(--orange);
  background: #fff7ed;
}

.compact-empty {
  min-height: 38px;
  display: grid;
  place-items: center;
}

.workspace-section-head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.workspace-section-head .section-title-row { min-width: 0; }
.workspace-section-head .section-title-row > div { min-width: 0; }

.drag-handle { cursor: grab; color: var(--muted); }
.drag-handle:active { cursor: grabbing; }

.workspace-task-card {
  border-radius: 16px;
  padding: 11px 12px;
}

.workspace-task-card.is-dragging,
.workspace-section-block.is-dragging {
  opacity: .55;
}

.workspace-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.workspace-card-top .task-title {
  padding-top: 4px;
}

.workspace-task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.workspace-task-meta .mini-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--slate);
  font-size: .76rem;
}

.workspace-section-block.is-collapsed .workspace-card-list,
.workspace-agenda-list.is-collapsed .workspace-list-body { display: none; }

@media (max-width: 900px) {
  .workspace-add-action-row { grid-template-columns: 1fr; }
  .workspace-picker-actions { justify-content: stretch; }
  .workspace-picker-actions > * { flex: 1; }
  .workspace-list-head { grid-template-columns: auto minmax(0, 1fr); }
  .workspace-list-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Tasks workspace visual polish: closer to agenda builder */
.simple-tasks-page .custom-workspace-board {
  gap: 18px;
}

.simple-tasks-page .workspace-agenda-list {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  padding: 18px;
  box-shadow: none;
}

.simple-tasks-page .workspace-list-head {
  margin-bottom: 16px;
  gap: 12px;
}

.simple-tasks-page .workspace-list-title strong {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: #142033;
}

.simple-tasks-page .workspace-list-title span {
  font-size: .82rem;
  font-weight: 800;
  color: #64748b;
}

.simple-tasks-page .workspace-list-drop {
  background: rgba(255,255,255,.72);
  border: 1px dashed #d9e2ef;
  border-radius: 18px;
  box-shadow: none;
}

.simple-tasks-page .workspace-section-stack {
  gap: 14px;
}

.simple-tasks-page .workspace-section-block.agenda-section {
  display: block;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0;
  margin: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.simple-tasks-page .workspace-section-head.agenda-section-head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  width: 100%;
  background: #4b4b4b;
  color: #ffffff;
}

.simple-tasks-page .workspace-section-head .row-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}

.simple-tasks-page .workspace-section-head .row-icon-btn:hover {
  background: rgba(255,255,255,.16);
}

.simple-tasks-page .workspace-section-head .danger-icon {
  color: #fecaca;
  border-color: rgba(254,202,202,.45);
}

.simple-tasks-page .workspace-section-head .section-title-row h4,
.simple-tasks-page .workspace-section-head h4 {
  margin: 0;
  color: #ffffff;
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.simple-tasks-page .workspace-section-head .section-title-row p,
.simple-tasks-page .workspace-section-head p {
  margin: 2px 0 0;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  font-weight: 800;
}

.simple-tasks-page .workspace-card-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
}

.simple-tasks-page .workspace-task-card {
  border: 1px solid #e5ebf3;
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
  box-shadow: none;
}

.simple-tasks-page .workspace-card-top {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.simple-tasks-page .workspace-card-top .row-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.simple-tasks-page .workspace-card-top .task-title,
.simple-tasks-page .workspace-task-card .task-title {
  padding-top: 3px;
  color: #142033;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-transform: none;
}

.simple-tasks-page .workspace-task-card p {
  margin: 8px 0 0 40px;
  color: #334155;
  font-size: .86rem;
  line-height: 1.35;
  font-weight: 600;
}

.simple-tasks-page .workspace-task-meta {
  margin: 9px 0 0 40px;
  gap: 6px;
}

.simple-tasks-page .workspace-task-meta span,
.simple-tasks-page .workspace-task-meta .mini-badge {
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 7px;
}

.simple-tasks-page .workspace-section-block.is-collapsed {
  padding-bottom: 0;
}

.simple-tasks-page .workspace-section-block.is-collapsed .workspace-section-head {
  margin-bottom: 0;
}

.simple-tasks-page .workspace-list-drop.is-drag-over,
.simple-tasks-page .workspace-card-list.is-drag-over,
.simple-tasks-page .workspace-section-block.is-drag-over {
  border-color: #f68b1f;
  background: #fff7ed;
}

@media (max-width: 900px) {
  .simple-tasks-page .workspace-section-head.agenda-section-head {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .simple-tasks-page .workspace-section-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* Tasks visual alignment with the meeting agenda */
.simple-tasks-page .org-task-shell {
  padding: 18px;
  border-top: 2px solid var(--orange);
  border-radius: 20px;
}
.simple-tasks-page .task-page-head {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e8edf3;
}
.simple-tasks-page .task-page-head h2 {
  font-size: 1.35rem;
  letter-spacing: -.025em;
}
.simple-tasks-page .task-scope-toggle {
  padding: 3px;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: #fff;
}
.simple-tasks-page .task-scope-toggle button {
  min-width: 112px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 11px;
  font-size: .82rem;
  font-weight: 800;
}
.simple-tasks-page .org-task-toolbar {
  grid-template-columns: minmax(280px, 1fr) 210px 230px;
  gap: 12px;
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #edf1f5;
}
.simple-tasks-page .org-task-toolbar .compact-search,
.simple-tasks-page .org-task-toolbar select {
  min-height: 44px;
  border-radius: 12px;
}
.simple-tasks-page .org-task-list { gap: 10px; }
.simple-tasks-page .org-task-card {
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: none;
}
.simple-tasks-page .org-task-source-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.simple-tasks-page .org-task-source-icon svg { width: 20px; height: 20px; }
.simple-tasks-page .org-task-title-row .task-title {
  font-size: .98rem;
  font-weight: 800;
}
.simple-tasks-page .org-task-main p { margin-bottom: 8px; }
.simple-tasks-page .org-task-meta { font-size: .84rem; font-weight: 700; }
.simple-tasks-page .org-task-actions select,
.simple-tasks-page .org-task-actions .secondary-btn { min-height: 40px; border-radius: 12px; }

.simple-tasks-page .workspace-toolbar {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 14px;
  background: #f8fafc;
}
.simple-tasks-page .workspace-toolbar strong { font-size: .94rem; }
.simple-tasks-page .workspace-toolbar p { font-size: .88rem; }
.simple-tasks-page .workspace-add-action-row {
  padding: 12px;
  gap: 10px;
  border-radius: 16px;
  margin-bottom: 14px;
  background: #f8fafc;
}
.simple-tasks-page .workspace-add-action-row select,
.simple-tasks-page .workspace-picker-actions .primary-btn,
.simple-tasks-page .workspace-picker-actions .icon-only { min-height: 44px; height: 44px; border-radius: 12px; }

.simple-tasks-page .custom-workspace-board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 2px 2px 14px;
}
.simple-tasks-page .workspace-agenda-list {
  flex: 0 0 330px;
  min-width: 330px;
  padding: 0;
  border-radius: 20px;
  background: #f8fafc;
  box-shadow: none;
  overflow: hidden;
}
.simple-tasks-page .workspace-list-head {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.simple-tasks-page .workspace-list-title strong { font-size: .96rem; font-weight: 800; }
.simple-tasks-page .workspace-list-title span { font-size: .78rem; font-weight: 700; }
.simple-tasks-page .workspace-list-actions,
.simple-tasks-page .workspace-section-actions { display: inline-flex; gap: 7px; }
.simple-tasks-page .row-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.simple-tasks-page .workspace-list-drag { border-color: transparent; background: transparent; }
.simple-tasks-page .workspace-list-body { padding: 12px; }
.simple-tasks-page .workspace-list-drop { display: grid; gap: 10px; margin-bottom: 12px; }
.simple-tasks-page .workspace-section-stack { gap: 12px; }
.simple-tasks-page .workspace-section-block {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}
.simple-tasks-page .workspace-section-head {
  display: grid;
  grid-template-columns: auto auto minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px;
  margin: 0;
  background: #4b4b4b;
  color: #fff;
}
.simple-tasks-page .workspace-section-head h4 { color: #fff; font-size: .92rem; font-weight: 800; }
.simple-tasks-page .workspace-section-head p { color: #d8dee7; font-size: .76rem; font-weight: 700; }
.simple-tasks-page .workspace-section-head .row-icon-btn {
  width: 34px;
  height: 34px;
  color: #fff;
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
}
.simple-tasks-page .workspace-section-head .row-icon-btn:hover { background: rgba(255,255,255,.16); }
.simple-tasks-page .workspace-section-head .danger-icon { color: #fff; }
.simple-tasks-page .workspace-card-list { padding: 10px; gap: 10px; }
.simple-tasks-page .workspace-task-card {
  padding: 11px;
  border-radius: 14px;
  box-shadow: none;
}
.simple-tasks-page .workspace-card-top {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: start;
}
.simple-tasks-page .workspace-task-card .task-title {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.28;
}
.simple-tasks-page .workspace-task-card p { margin: 7px 0 9px; font-size: .82rem; }
.simple-tasks-page .workspace-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.simple-tasks-page .workspace-task-meta span { font-size: .75rem; }
.simple-tasks-page .section-empty {
  padding: 14px;
  border-radius: 12px;
  font-size: .82rem;
}
.simple-tasks-page .workspace-list-end-drop {
  flex: 0 0 42px;
  min-height: 160px;
  border: 1px dashed transparent;
  border-radius: 16px;
}
.simple-tasks-page .workspace-agenda-list.is-dragging { opacity: .45; }
.simple-tasks-page [data-list-drop].is-drag-over { outline: 2px solid var(--orange); outline-offset: 3px; }

@media (max-width: 900px) {
  .simple-tasks-page .org-task-toolbar { grid-template-columns: 1fr; }
  .simple-tasks-page .custom-workspace-board { overflow-x: auto; }
  .simple-tasks-page .workspace-agenda-list { flex-basis: 290px; min-width: 290px; }
}

/* Workspace board sizing and controls — match the meeting agenda */
.simple-tasks-page .custom-workspace-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
  overflow: visible;
  padding: 2px 2px 14px;
}
.simple-tasks-page .workspace-agenda-list {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
  border-radius: 16px;
}
.simple-tasks-page .workspace-list-head {
  grid-template-columns: 18px 32px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 12px;
}
.simple-tasks-page .workspace-list-actions,
.simple-tasks-page .workspace-section-actions {
  gap: 6px;
}
.simple-tasks-page .row-icon-btn,
.simple-tasks-page .workspace-list-head .row-icon-btn,
.simple-tasks-page .workspace-section-head .row-icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
}
.simple-tasks-page .row-icon-btn svg,
.simple-tasks-page .workspace-list-head .row-icon-btn svg,
.simple-tasks-page .workspace-section-head .row-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.simple-tasks-page .workspace-list-drag,
.simple-tasks-page .workspace-section-drag,
.simple-tasks-page .workspace-card-drag {
  width: 18px !important;
  min-width: 18px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #94a3b8 !important;
}
.simple-tasks-page .workspace-list-drag svg,
.simple-tasks-page .workspace-section-drag svg,
.simple-tasks-page .workspace-card-drag svg,
.simple-tasks-page .drag-handle svg {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2 !important;
}
.simple-tasks-page .workspace-list-title strong {
  font-size: .9rem;
  line-height: 1.2;
}
.simple-tasks-page .workspace-list-title span {
  font-size: .72rem;
  line-height: 1.25;
}
.simple-tasks-page .workspace-list-body { padding: 10px; }
.simple-tasks-page .workspace-list-drop {
  min-height: 54px;
  padding: 9px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.simple-tasks-page .section-empty {
  min-height: 38px;
  padding: 10px;
  font-size: .78rem;
}

/* Sections use the same restrained visual language as agenda sections */
.simple-tasks-page .workspace-section-block.agenda-section {
  border-radius: 14px;
  border-color: #dfe7f1;
  overflow: hidden;
}
.simple-tasks-page .workspace-section-head.agenda-section-head,
.simple-tasks-page .workspace-section-head {
  grid-template-columns: 18px 32px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 10px 11px;
  background: #f6f8fb;
  color: #142033;
  border-bottom: 1px solid #e2e8f0;
}
.simple-tasks-page .workspace-section-head .section-title-row h4,
.simple-tasks-page .workspace-section-head h4 {
  color: #142033;
  font-size: .86rem;
  font-weight: 800;
}
.simple-tasks-page .workspace-section-head .section-title-row p,
.simple-tasks-page .workspace-section-head p {
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
}
.simple-tasks-page .workspace-section-head .row-icon-btn {
  color: #142033;
  border-color: #d8e1ec;
  background: #fff;
}
.simple-tasks-page .workspace-section-head .row-icon-btn:hover {
  background: #f8fafc;
}
.simple-tasks-page .workspace-section-head .danger-icon {
  color: #dc2626;
  border-color: #fecaca;
  background: #fffafa;
}
.simple-tasks-page .workspace-card-list { padding: 9px; }
.simple-tasks-page .workspace-list-end-drop { display: none; }

@media (max-width: 1280px) {
  .simple-tasks-page .custom-workspace-board {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}
@media (max-width: 720px) {
  .simple-tasks-page .custom-workspace-board {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .simple-tasks-page .workspace-agenda-list { min-width: 0; }
}

/* Workspace follow-up fixes: keep section creation inside narrow lists and make list drag handles reliable */
.simple-tasks-page .workspace-inline-create.compact {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 10px;
  border-radius: 14px;
  overflow: hidden;
}
.simple-tasks-page .workspace-inline-create.compact > i {
  width: 18px;
  height: 18px;
  align-self: center;
  justify-self: center;
}
.simple-tasks-page .workspace-inline-create.compact input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: .82rem;
}
.simple-tasks-page .workspace-inline-create.compact .secondary-btn,
.simple-tasks-page .workspace-inline-create.compact .primary-btn {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: .78rem;
  white-space: nowrap;
}
.simple-tasks-page .workspace-inline-create.compact .secondary-btn {
  grid-column: 1 / 2;
  width: 100%;
}
.simple-tasks-page .workspace-inline-create.compact .primary-btn {
  grid-column: 2 / 3;
  width: 100%;
}
.simple-tasks-page .workspace-list-drag[draggable="true"],
.simple-tasks-page .workspace-section-drag[draggable="true"] {
  cursor: grab;
  -webkit-user-drag: element;
  user-select: none;
  touch-action: none;
}
.simple-tasks-page .workspace-list-drag[draggable="true"]:active,
.simple-tasks-page .workspace-section-drag[draggable="true"]:active {
  cursor: grabbing;
}
.simple-tasks-page .workspace-agenda-list.is-dragging {
  opacity: .45;
  transform: scale(.985);
}
.simple-tasks-page .workspace-agenda-list[data-list-drop].is-drag-over {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Workspace stacked columns and priority indicators */
.simple-tasks-page .custom-workspace-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.simple-tasks-page .workspace-list-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 90px;
}
.simple-tasks-page .workspace-list-column .workspace-agenda-list { width: 100%; min-width: 0; }
.simple-tasks-page .workspace-column-drop { min-height: 18px; border-radius: 10px; }
.simple-tasks-page .workspace-list-column:has(.workspace-agenda-list.is-dragging) .workspace-column-drop,
.simple-tasks-page .workspace-list-column:hover .workspace-column-drop { min-height: 28px; }
@media (max-width: 1250px) {
  .simple-tasks-page .custom-workspace-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .simple-tasks-page .custom-workspace-board { grid-template-columns: 1fr; }
}

.org-task-card,
.workspace-task-card { position: relative; overflow: hidden; }
.org-task-card::before,
.workspace-task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: #f59e0b;
}
.org-task-card.priority-high::before,
.workspace-task-card.priority-high::before { background: #ef4444; }
.org-task-card.priority-medium::before,
.workspace-task-card.priority-medium::before { background: #f59e0b; }
.org-task-card.priority-low::before,
.workspace-task-card.priority-low::before { background: #22a06b; }
.priority-badge.priority-high { color: #b42318; background: #fff1f0; border-color: #ffc9c5; }
.priority-badge.priority-medium { color: #a15c00; background: #fff7e8; border-color: #ffdca8; }
.priority-badge.priority-low { color: #137a4b; background: #ecfdf3; border-color: #b7ebcd; }
.action-draft .action-priority-field select { min-width: 110px; }

/* Workspace section emphasis: Clubwiser charcoal headers */
.simple-tasks-page .workspace-section-head.agenda-section-head,
.simple-tasks-page .workspace-section-head {
  background: #4b4b4b;
  color: #ffffff;
  border-bottom-color: #4b4b4b;
}
.simple-tasks-page .workspace-section-head .section-title-row h4,
.simple-tasks-page .workspace-section-head h4 {
  color: #ffffff;
}
.simple-tasks-page .workspace-section-head .section-title-row p,
.simple-tasks-page .workspace-section-head p {
  color: #d8dee7;
}
.simple-tasks-page .workspace-section-head .workspace-section-drag {
  color: #d8dee7 !important;
}
.simple-tasks-page .workspace-section-head .row-icon-btn {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
}
.simple-tasks-page .workspace-section-head .row-icon-btn:hover {
  background: rgba(255, 255, 255, .16);
}
.simple-tasks-page .workspace-section-head .danger-icon {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
}


/* Workspace list header readability and drag-only vertical stacking */
.simple-tasks-page .workspace-list-head {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr);
  grid-template-areas:
    "drag toggle title"
    ". actions actions";
  align-items: center;
  row-gap: 9px;
  column-gap: 7px;
}
.simple-tasks-page .workspace-list-drag { grid-area: drag; }
.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list] { grid-area: toggle; }
.simple-tasks-page .workspace-list-title {
  grid-area: title;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.simple-tasks-page .workspace-list-title strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .95rem;
  line-height: 1.2;
}
.simple-tasks-page .workspace-list-title span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .73rem;
  line-height: 1.25;
}
.simple-tasks-page .workspace-list-actions {
  grid-area: actions;
  width: 100%;
  justify-content: flex-end;
  min-width: 0;
}
.simple-tasks-page .workspace-list-column {
  position: relative;
}
.simple-tasks-page .workspace-column-drop {
  min-height: 24px;
  border: 1px dashed transparent;
  transition: min-height .14s ease, border-color .14s ease, background .14s ease;
}
.simple-tasks-page .workspace-list-column:hover .workspace-column-drop,
.simple-tasks-page .workspace-list-column:has(.workspace-agenda-list.is-dragging) .workspace-column-drop {
  min-height: 34px;
  border-color: #d8e1ec;
  background: #f8fafc;
}
@media (min-width: 1260px) {
  .simple-tasks-page .workspace-list-head {
    padding: 11px 10px;
  }
}

/* Workspace compact hierarchy — smaller titles and quieter vertical list controls */
.simple-tasks-page .workspace-list-head {
  grid-template-columns: 14px 30px minmax(0, 1fr) 28px;
  grid-template-areas: "drag toggle title actions";
  align-items: start;
  column-gap: 7px;
  row-gap: 0;
  padding: 10px 9px;
}
.simple-tasks-page .workspace-list-title {
  align-self: start;
  padding-top: 1px;
}
.simple-tasks-page .workspace-list-title strong {
  font-size: .82rem;
  line-height: 1.18;
  font-weight: 800;
}
.simple-tasks-page .workspace-list-title span {
  font-size: .67rem;
  line-height: 1.2;
  font-weight: 700;
  margin-top: 2px;
}
.simple-tasks-page .workspace-list-actions {
  grid-area: actions;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}
.simple-tasks-page .workspace-list-head .row-icon-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 9px;
}
.simple-tasks-page .workspace-list-head .row-icon-btn svg {
  width: 14px;
  height: 14px;
}
.simple-tasks-page .workspace-list-drag {
  width: 14px !important;
  min-width: 14px !important;
  height: 26px !important;
  min-height: 26px !important;
}
.simple-tasks-page .workspace-list-drag svg {
  width: 12px !important;
  height: 12px !important;
}
.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list] {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
}
.simple-tasks-page .workspace-task-card .task-title {
  font-size: .82rem;
  line-height: 1.22;
  font-weight: 800;
}
.simple-tasks-page .workspace-task-card p {
  font-size: .76rem;
  line-height: 1.35;
  margin: 6px 0 8px;
}
.simple-tasks-page .workspace-task-meta span,
.simple-tasks-page .workspace-task-meta .mini-badge {
  font-size: .69rem;
}
.simple-tasks-page .workspace-card-top {
  gap: 7px;
}
.simple-tasks-page .workspace-card-drag {
  width: 16px !important;
  min-width: 16px !important;
}

@media (max-width: 1180px) {
  .simple-tasks-page .workspace-list-title strong { font-size: .79rem; }
  .simple-tasks-page .workspace-list-title span { font-size: .64rem; }
}


/* Final workspace header/icon balance fix ---------------------------------- */
.simple-tasks-page .workspace-agenda-list {
  display: flex;
  flex-direction: column;
}

.simple-tasks-page .workspace-list-head {
  display: grid;
  grid-template-columns: 12px 30px minmax(0, 1fr) 28px;
  align-items: start;
  column-gap: 8px;
  row-gap: 0;
  padding: 10px 10px;
}

.simple-tasks-page .workspace-list-drag {
  align-self: center;
  width: 12px !important;
  min-width: 12px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
}

.simple-tasks-page .workspace-list-drag svg {
  width: 11px !important;
  height: 11px !important;
}

.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list] {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 10px !important;
}

.simple-tasks-page .workspace-list-title {
  min-width: 0;
  overflow: hidden;
  padding-top: 1px;
}

.simple-tasks-page .workspace-list-title strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  font-size: .8rem !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  margin: 0;
}

.simple-tasks-page .workspace-list-title span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .68rem !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #64748b;
}

.simple-tasks-page .workspace-list-actions {
  width: 28px !important;
  min-width: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: flex-start;
  gap: 5px !important;
}

.simple-tasks-page .workspace-list-actions .row-icon-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 9px !important;
}

.simple-tasks-page .workspace-list-actions .row-icon-btn svg {
  width: 13px !important;
  height: 13px !important;
}

.simple-tasks-page .workspace-list-body {
  padding-top: 0;
}

.simple-tasks-page .workspace-section-head.agenda-section-head,
.simple-tasks-page .workspace-section-head {
  display: grid;
  grid-template-columns: 12px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  background: #4b4b4b !important;
  color: #fff !important;
  border-bottom: 1px solid #4b4b4b !important;
}

.simple-tasks-page .workspace-section-head .workspace-section-drag {
  align-self: center;
  width: 12px !important;
  min-width: 12px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255,255,255,.72) !important;
}

.simple-tasks-page .workspace-section-head .workspace-section-drag svg {
  width: 11px !important;
  height: 11px !important;
}

.simple-tasks-page .workspace-section-head .section-title-row {
  min-width: 0;
  overflow: hidden;
}

.simple-tasks-page .workspace-section-head .section-title-row > div {
  min-width: 0;
  overflow: hidden;
}

.simple-tasks-page .workspace-section-head .section-title-row h4,
.simple-tasks-page .workspace-section-head h4 {
  margin: 0 !important;
  color: #fff !important;
  font-size: .8rem !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-tasks-page .workspace-section-head .section-title-row p,
.simple-tasks-page .workspace-section-head p {
  margin: 3px 0 0 !important;
  color: rgba(255,255,255,.78) !important;
  font-size: .68rem !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-tasks-page .workspace-section-actions {
  display: flex !important;
  align-items: center;
  gap: 5px !important;
  justify-content: flex-end;
}

.simple-tasks-page .workspace-section-head .row-icon-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 9px !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
}

.simple-tasks-page .workspace-section-head .row-icon-btn svg {
  width: 13px !important;
  height: 13px !important;
}

.simple-tasks-page .workspace-section-head .row-icon-btn:hover {
  background: rgba(255,255,255,.16) !important;
}

.simple-tasks-page .workspace-section-head .danger-icon {
  color: #fff !important;
}

.simple-tasks-page .workspace-task-card .task-title {
  font-size: .78rem !important;
  line-height: 1.18 !important;
}

.simple-tasks-page .workspace-task-card p {
  font-size: .74rem !important;
  line-height: 1.32 !important;
}

@media (max-width: 1320px) {
  .simple-tasks-page .workspace-list-title strong,
  .simple-tasks-page .workspace-section-head .section-title-row h4,
  .simple-tasks-page .workspace-section-head h4 {
    font-size: .78rem !important;
  }
}


/* Workspace list/section menu redesign ------------------------------------- */
.simple-tasks-page .workspace-agenda-list,
.simple-tasks-page .workspace-section-block {
  overflow: visible;
}

.simple-tasks-page .workspace-list-head,
.simple-tasks-page .workspace-section-head {
  position: relative;
}

.simple-tasks-page .workspace-list-head {
  background: #4b4b4b !important;
  color: #fff !important;
  border-bottom: 1px solid #4b4b4b !important;
  border-radius: 18px 18px 0 0;
  grid-template-columns: 14px 30px minmax(0, 1fr) 30px !important;
  padding: 10px 11px !important;
}

.simple-tasks-page .workspace-list-head .workspace-list-drag {
  color: rgba(255,255,255,.72) !important;
}

.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list] {
  color: #fff !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
}

.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list]:hover {
  background: rgba(255,255,255,.16) !important;
}

.simple-tasks-page .workspace-list-title strong {
  color: #fff !important;
  font-size: .85rem !important;
}

.simple-tasks-page .workspace-list-title span {
  color: rgba(255,255,255,.76) !important;
  font-size: .69rem !important;
}

.simple-tasks-page .workspace-list-actions {
  display: none !important;
}

.simple-tasks-page .workspace-section-head.agenda-section-head,
.simple-tasks-page .workspace-section-head {
  background: #606060 !important;
  color: #fff !important;
  border-bottom: 1px solid #606060 !important;
  grid-template-columns: 14px 28px minmax(0, 1fr) 30px !important;
  padding: 9px 10px !important;
}

.simple-tasks-page .workspace-section-head .workspace-section-drag {
  color: rgba(255,255,255,.72) !important;
}

.simple-tasks-page .workspace-section-head .row-icon-btn:not(.workspace-menu-trigger):not(.workspace-section-drag) {
  color: #fff !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
}

.simple-tasks-page .workspace-section-head .row-icon-btn:not(.workspace-menu-trigger):not(.workspace-section-drag):hover {
  background: rgba(255,255,255,.16) !important;
}

.simple-tasks-page .workspace-head-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.simple-tasks-page .workspace-menu-trigger {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 10px !important;
}

.simple-tasks-page .workspace-list-head .workspace-menu-trigger,
.simple-tasks-page .workspace-section-head .workspace-menu-trigger {
  color: #fff !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.08) !important;
}

.simple-tasks-page .workspace-list-head .workspace-menu-trigger:hover,
.simple-tasks-page .workspace-section-head .workspace-menu-trigger:hover,
.simple-tasks-page .workspace-head-menu.is-open .workspace-menu-trigger {
  background: rgba(255,255,255,.16) !important;
}

.simple-tasks-page .workspace-menu-trigger svg {
  width: 14px !important;
  height: 14px !important;
}

.simple-tasks-page .workspace-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #d8e1ec;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  z-index: 60;
  display: grid;
  gap: 4px;
}

.simple-tasks-page .workspace-menu-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #d8e1ec;
  border-top: 1px solid #d8e1ec;
  transform: rotate(45deg);
}

.simple-tasks-page .workspace-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #142033;
  font-size: .84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.simple-tasks-page .workspace-menu-item:hover {
  background: #f6f8fb;
}

.simple-tasks-page .workspace-menu-item svg {
  width: 15px;
  height: 15px;
  color: #64748b;
  flex: 0 0 auto;
}

.simple-tasks-page .workspace-menu-item.danger {
  color: #b42318;
}

.simple-tasks-page .workspace-menu-item.danger svg {
  color: #ef4444;
}

.simple-tasks-page .workspace-list-body,
.simple-tasks-page .workspace-card-list,
.simple-tasks-page .workspace-list-drop {
  position: relative;
  z-index: 1;
}


/* Workspace popover menu polish ------------------------------------------- */
.simple-tasks-page .workspace-head-menu {
  z-index: 80;
}

.simple-tasks-page .workspace-menu-trigger {
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.simple-tasks-page .workspace-menu-trigger:hover {
  transform: translateY(-1px);
}

.simple-tasks-page .workspace-head-menu.is-open .workspace-menu-trigger {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 18px rgba(15,23,42,.14);
}

.simple-tasks-page .workspace-menu-popover {
  top: calc(100% + 10px) !important;
  right: -2px !important;
  min-width: 176px !important;
  padding: 6px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(216,225,236,.95) !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, .16), 0 4px 14px rgba(15, 23, 42, .08) !important;
  animation: workspaceMenuIn .16s ease;
}

.simple-tasks-page .workspace-menu-popover::before {
  display: none !important;
}

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

.simple-tasks-page .workspace-menu-item {
  padding: 10px 11px !important;
  border-radius: 12px !important;
  font-size: .83rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}

.simple-tasks-page .workspace-menu-item:hover {
  background: #f8fafc !important;
  transform: translateX(1px);
}

.simple-tasks-page .workspace-menu-item svg {
  width: 16px !important;
  height: 16px !important;
  color: #64748b !important;
}

.simple-tasks-page .workspace-menu-item.danger {
  color: #c62828 !important;
}

.simple-tasks-page .workspace-menu-item.danger:hover {
  background: #fff5f5 !important;
}

.simple-tasks-page .workspace-menu-item.danger svg {
  color: #ef4444 !important;
}

.simple-tasks-page [data-workspace-list].is-drag-over,
.simple-tasks-page [data-workspace-drop].is-drag-over,
.simple-tasks-page [data-section-drop].is-drag-over {
  outline: 2px dashed #f59e0b;
  outline-offset: 3px;
}

/* Tasks polish: meeting-style tabs and cleaner workspace cards ------------ */
.simple-tasks-page .task-scope-toggle {
  display: inline-flex;
  width: auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}
.simple-tasks-page .task-scope-toggle button {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  background: transparent;
  color: #66758a;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}
.simple-tasks-page .task-scope-toggle button:hover {
  background: #f5f7fa;
  color: #26354a;
}
.simple-tasks-page .task-scope-toggle button.active {
  background: #4b4b4b;
  color: #fff;
  box-shadow: 0 5px 13px rgba(36, 43, 54, .16);
}

.simple-tasks-page .workspace-task-card {
  position: relative;
  overflow: hidden;
  padding: 15px 13px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(23, 35, 55, .055);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.simple-tasks-page .workspace-task-card:hover {
  border-color: #cdd7e4;
  box-shadow: 0 9px 22px rgba(23, 35, 55, .09);
  transform: translateY(-1px);
}
.simple-tasks-page .workspace-task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: #f59e0b;
}
.simple-tasks-page .workspace-task-card.priority-high::before { background: #ef4444; }
.simple-tasks-page .workspace-task-card.priority-medium::before { background: #f59e0b; }
.simple-tasks-page .workspace-task-card.priority-low::before { background: #22a06b; }
.simple-tasks-page .workspace-card-top {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  gap: 7px;
  align-items: start;
}
.simple-tasks-page .workspace-card-top .row-icon-btn {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  border-radius: 8px !important;
}
.simple-tasks-page .workspace-card-top .row-icon-btn svg {
  width: 13px !important;
  height: 13px !important;
}
.simple-tasks-page .workspace-card-drag {
  width: 22px !important;
  min-width: 22px !important;
  color: #64748b !important;
  border-color: transparent !important;
  background: transparent !important;
}
.simple-tasks-page .workspace-card-remove {
  color: #dc2626 !important;
  border-color: #fecaca !important;
  background: #fff !important;
}
.simple-tasks-page .workspace-card-remove:hover {
  background: #fff5f5 !important;
  border-color: #fca5a5 !important;
}
.simple-tasks-page .workspace-task-card .task-title {
  padding: 2px 0 0;
  text-align: left;
  color: #182338;
  font-size: .84rem !important;
  font-weight: 800;
  line-height: 1.23 !important;
}
.simple-tasks-page .workspace-task-card p {
  margin: 9px 0 10px 29px !important;
  color: #536176;
  font-size: .74rem !important;
  line-height: 1.38 !important;
}
.simple-tasks-page .workspace-task-meta {
  margin-left: 29px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.simple-tasks-page .workspace-task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6b778b;
  font-size: .69rem !important;
  font-weight: 700;
}
.simple-tasks-page .workspace-task-meta svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 760px) {
  .simple-tasks-page .task-page-head { align-items: stretch; }
  .simple-tasks-page .task-scope-toggle { width: 100%; }
  .simple-tasks-page .task-scope-toggle button { flex: 1; padding-inline: 10px; }
}

/* Tasks: restore the saved view before first paint so refreshes do not flash Action items. */
html[data-task-scope="organisation"] [data-scope-title]:not([data-scope-title="organisation"]),
html[data-task-scope="personal"] [data-scope-title]:not([data-scope-title="personal"]),
html[data-task-scope="workspace"] [data-scope-title]:not([data-scope-title="workspace"]),
html[data-task-scope="organisation"] [data-scope-loading]:not([data-scope-loading="organisation"]),
html[data-task-scope="personal"] [data-scope-loading]:not([data-scope-loading="personal"]),
html[data-task-scope="workspace"] [data-scope-loading]:not([data-scope-loading="workspace"]) {
  display: none;
}

html[data-task-scope="workspace"] #organisationTaskTools {
  display: none !important;
}

html[data-task-scope="organisation"] [data-task-scope="organisation"],
html[data-task-scope="personal"] [data-task-scope="personal"],
html[data-task-scope="workspace"] [data-task-scope="workspace"] {
  background: #505050;
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}

.task-initial-loading {
  min-height: 110px;
  display: grid;
  place-items: center;
}

/* Workspace compact controls and information popover */
.simple-tasks-page .workspace-builder-toolbar { display: none !important; }
.simple-tasks-page .workspace-add-action-row {
  grid-template-columns: auto minmax(240px, 1.6fr) minmax(170px, .9fr) minmax(160px, .85fr) auto;
  align-items: center;
  gap: 10px;
}
.simple-tasks-page .workspace-row-leading-actions,
.simple-tasks-page .workspace-compact-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.simple-tasks-page .workspace-compact-actions { margin-bottom: 12px; }
.simple-tasks-page .workspace-row-leading-actions .small-btn,
.simple-tasks-page .workspace-compact-actions .small-btn {
  min-height: 44px;
  white-space: nowrap;
}
.simple-tasks-page .workspace-info-wrap { position: relative; }
.simple-tasks-page .workspace-info-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid #dbe3ed;
  border-radius: 50%;
  background: #fff;
  color: #536176;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.simple-tasks-page .workspace-info-button:hover { background: #f5f7fa; color: #182338; }
.simple-tasks-page .workspace-info-button svg { width: 18px; height: 18px; }
.simple-tasks-page .workspace-info-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  width: min(330px, 80vw);
  padding: 14px 15px;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(23,35,55,.16);
  color: #536176;
}
.simple-tasks-page .workspace-info-popover strong { display: block; margin-bottom: 5px; color: #182338; }
.simple-tasks-page .workspace-info-popover p { margin: 0; font-size: .84rem; line-height: 1.45; }
.simple-tasks-page .workspace-place-button { min-height: 52px; white-space: nowrap; }
.simple-tasks-page .workspace-task-card { cursor: pointer; }
.simple-tasks-page .workspace-task-card button { cursor: pointer; }
@media (max-width: 1180px) {
  .simple-tasks-page .workspace-add-action-row { grid-template-columns: 1fr 1fr; }
  .simple-tasks-page .workspace-row-leading-actions { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .simple-tasks-page .workspace-add-action-row { grid-template-columns: 1fr; }
  .simple-tasks-page .workspace-row-leading-actions { flex-wrap: wrap; }
}

/* Workspace control reliability and compact placement confirmation */
.simple-tasks-page .workspace-add-action-row { overflow: visible; }
.simple-tasks-page .workspace-info-popover[hidden] { display: none !important; }
.simple-tasks-page .workspace-info-popover:not([hidden]) { display: block !important; }
.simple-tasks-page .workspace-info-wrap { z-index: 80; }
.simple-tasks-page .workspace-place-button {
  width: 52px;
  min-width: 52px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
}
.simple-tasks-page .workspace-place-button svg { width: 20px; height: 20px; }
@media (max-width: 1180px) {
  .simple-tasks-page .workspace-place-button { justify-self: start; }
}


/* Workspace compact menu and inline editor controls ----------------------- */
.simple-tasks-page .workspace-menu-popover {
  min-width: 158px !important;
  padding: 5px !important;
  border-radius: 13px !important;
}
.simple-tasks-page .workspace-menu-item {
  gap: 8px !important;
  min-height: 36px;
  padding: 7px 9px !important;
  border-radius: 9px !important;
  font-size: .76rem !important;
  line-height: 1.15 !important;
  font-weight: 750 !important;
}
.simple-tasks-page .workspace-menu-item svg {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2 !important;
}
.simple-tasks-page .workspace-inline-create,
.simple-tasks-page .workspace-inline-create.compact {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  overflow: visible;
}
.simple-tasks-page .workspace-inline-create input,
.simple-tasks-page .workspace-inline-create.compact input {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d8e1ec;
  border-radius: 9px;
  background: #fff;
  color: #142033;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  box-shadow: none;
}
.simple-tasks-page .workspace-inline-create input::placeholder,
.simple-tasks-page .workspace-inline-create.compact input::placeholder {
  color: #8a97a8;
  font-size: .75rem;
  font-weight: 500;
  opacity: 1;
}
.simple-tasks-page .workspace-inline-create input:focus,
.simple-tasks-page .workspace-inline-create.compact input:focus {
  border-color: #f59e0b;
  outline: 3px solid rgba(245,158,11,.12);
}
.simple-tasks-page .workspace-inline-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.simple-tasks-page .workspace-inline-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.simple-tasks-page .workspace-inline-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.simple-tasks-page .workspace-inline-icon.cancel {
  border: 1px solid #d8e1ec;
  background: #fff;
  color: #64748b;
}
.simple-tasks-page .workspace-inline-icon.cancel:hover {
  background: #f8fafc;
  color: #142033;
}
.simple-tasks-page .workspace-inline-icon.confirm {
  border: 1px solid #4b4b4b;
  background: #4b4b4b;
  color: #fff;
}
.simple-tasks-page .workspace-inline-icon.confirm:hover {
  background: #353535;
  border-color: #353535;
  transform: translateY(-1px);
}

/* Keep inline section creation clear of list option popovers. */
.simple-tasks-page .workspace-inline-create[data-kind="section"] {
  position: relative;
  z-index: 4;
  margin: 10px 12px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}
.simple-tasks-page .workspace-head-menu:not(.is-open) .workspace-menu-popover {
  display: none !important;
}


/* Final workspace section interaction fixes ------------------------------- */
.simple-tasks-page .workspace-section-head .workspace-section-drag,
.simple-tasks-page .workspace-section-head .workspace-section-drag:hover,
.simple-tasks-page .workspace-section-head .workspace-section-drag:focus,
.simple-tasks-page .workspace-section-head .workspace-section-drag:focus-visible,
.simple-tasks-page .workspace-section-head .workspace-section-drag:active {
  width: 12px !important;
  min-width: 12px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}


/* Refine inline section title editor -------------------------------------- */
.simple-tasks-page .workspace-inline-create[data-kind="section"] {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  margin: 10px 12px 12px;
  padding: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-self: stretch;
  justify-self: stretch;
}
.simple-tasks-page .workspace-inline-create[data-kind="section"] > svg,
.simple-tasks-page .workspace-inline-create[data-kind="section"] > i {
  display: none !important;
}
.simple-tasks-page .workspace-inline-create[data-kind="section"] input {
  width: 100%;
  min-width: 0;
}
.simple-tasks-page .workspace-inline-create[data-kind="section"] .workspace-inline-actions {
  gap: 4px;
}
.simple-tasks-page .workspace-inline-create[data-kind="section"] .workspace-inline-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
}
.simple-tasks-page .workspace-inline-create[data-kind="section"] .workspace-inline-icon svg {
  width: 13px;
  height: 13px;
}


/* Final list creator and safe list deletion fixes ------------------------ */
.simple-tasks-page .workspace-inline-create[data-kind="list"] {
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  margin: 10px 12px 14px;
  padding: 10px 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.simple-tasks-page .workspace-inline-create[data-kind="list"] input {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  font-size: .9rem;
}
.simple-tasks-page .workspace-inline-create[data-kind="list"] .workspace-inline-actions {
  flex: 0 0 auto;
}
.simple-tasks-page .workspace-menu-item.is-blocked {
  color: #b45309 !important;
  background: #fff7ed !important;
}
@media (max-width: 720px) {
  .simple-tasks-page .workspace-inline-create[data-kind="list"] {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    margin: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Tasks: compact page heading without the separate hero ------------------ */
.simple-tasks-page {
  padding-top: 22px;
}

.simple-tasks-page .org-task-shell {
  margin-top: 0;
}

.simple-tasks-page .task-page-head {
  align-items: flex-start;
  gap: 24px;
}

.simple-tasks-page .task-page-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.simple-tasks-page .task-page-head h1 {
  margin: 3px 0 5px;
  color: #182338;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.simple-tasks-page .task-view-description {
  margin: 0;
  max-width: 760px;
  color: #68768b;
  font-size: .88rem;
  line-height: 1.45;
}

.simple-tasks-page .task-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.simple-tasks-page .compact-task-add {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 13px;
  white-space: nowrap;
  font-size: .82rem;
}

.simple-tasks-page .compact-task-add svg {
  width: 16px;
  height: 16px;
}

html[data-task-scope="organisation"] [data-scope-description]:not([data-scope-description="organisation"]),
html[data-task-scope="personal"] [data-scope-description]:not([data-scope-description="personal"]),
html[data-task-scope="workspace"] [data-scope-description]:not([data-scope-description="workspace"]) {
  display: none;
}

/* Workspace already has its own Add task control. */
html[data-task-scope="workspace"] .compact-task-add {
  display: none;
}

@media (max-width: 980px) {
  .simple-tasks-page .task-page-head {
    flex-direction: column;
    gap: 14px;
  }

  .simple-tasks-page .task-page-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  .simple-tasks-page {
    padding-top: 14px;
  }

  .simple-tasks-page .task-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-tasks-page .compact-task-add {
    justify-content: center;
  }
}


/* Tasks: two-view workflow and completed archive ------------------------- */
.simple-tasks-page .task-page-secondary-actions { display:flex; align-items:center; gap:10px; }
.simple-tasks-page .task-completion-toggle { padding:3px; border:1px solid #dbe3ed; border-radius:999px; background:#f7f9fc; }
.simple-tasks-page .task-completion-toggle button { min-width:auto; padding:8px 13px; border-radius:999px; color:#66748a; font-size:.78rem; font-weight:800; }
.simple-tasks-page .task-completion-toggle button.active { background:#525252; color:#fff; box-shadow:0 5px 14px rgba(24,35,56,.16); }
.simple-tasks-page .workspace-card-complete { color:#16845b; border-color:#bce8d5; background:#f4fcf8; }
.simple-tasks-page .workspace-card-complete:hover { background:#e5f8ee; }
.simple-tasks-page .completed-card-section { padding:6px 0 0; }
.simple-tasks-page .completed-card-section-head { display:flex; align-items:end; justify-content:space-between; margin:0 0 14px; }
.simple-tasks-page .completed-card-section-head h3 { margin:0; color:#182338; font-size:1rem; }
.simple-tasks-page .completed-card-section-head p { margin:3px 0 0; color:#7a8799; font-size:.8rem; }
.simple-tasks-page .completed-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.simple-tasks-page .completed-task-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:start; padding:15px; border:1px solid #dfe6ef; border-radius:16px; background:#f8fafc; cursor:pointer; }
.simple-tasks-page .completed-task-check { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:#dff4e9; color:#15835c; }
.simple-tasks-page .completed-task-check svg { width:15px; height:15px; }
.simple-tasks-page .completed-task-copy h4 { margin:1px 0 4px; color:#435065; font-size:.9rem; text-decoration:line-through; text-decoration-thickness:1px; }
.simple-tasks-page .completed-task-copy p { margin:0 0 5px; color:#728095; font-size:.74rem; font-weight:800; }
.simple-tasks-page .completed-task-copy span { color:#8995a6; font-size:.76rem; line-height:1.35; }
.simple-tasks-page .completed-restore-btn { color:#53657c; }
@media (max-width:980px){.simple-tasks-page .task-page-secondary-actions{width:100%;justify-content:space-between}.simple-tasks-page .completed-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:680px){.simple-tasks-page .task-page-secondary-actions{align-items:stretch;flex-direction:column}.simple-tasks-page .task-completion-toggle{width:100%;display:flex}.simple-tasks-page .task-completion-toggle button{flex:1}.simple-tasks-page .completed-card-grid{grid-template-columns:1fr;}}

/* Unified compact segmented controls: Tasks + Meetings ------------------- */
.segmented-toggle.compact-toggle,
.simple-tasks-page .task-scope-toggle,
.simple-tasks-page .task-completion-toggle {
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 2px;
  padding: 2px;
  border: 1px solid #dbe3ed;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.segmented-toggle.compact-toggle button,
.simple-tasks-page .task-scope-toggle button,
.simple-tasks-page .task-completion-toggle button {
  min-width: 0;
  min-height: 30px;
  padding: 6px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #657389;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.segmented-toggle.compact-toggle button:hover,
.simple-tasks-page .task-scope-toggle button:hover,
.simple-tasks-page .task-completion-toggle button:hover {
  background: #f4f6f9;
  color: #26354a;
}

.segmented-toggle.compact-toggle button.active,
.simple-tasks-page .task-scope-toggle button.active,
.simple-tasks-page .task-completion-toggle button.active {
  background: #505050;
  color: #fff;
  box-shadow: 0 3px 8px rgba(24, 35, 56, .13);
}

/* Keep the task controls visually light and aligned with the page title. */
.simple-tasks-page .task-page-actions {
  gap: 8px;
}

.simple-tasks-page .task-page-secondary-actions {
  gap: 8px;
}

@media (max-width: 680px) {
  .simple-tasks-page .task-scope-toggle,
  .simple-tasks-page .task-completion-toggle {
    width: 100%;
  }

  .simple-tasks-page .task-scope-toggle button,
  .simple-tasks-page .task-completion-toggle button {
    flex: 1 1 0;
    padding-inline: 8px;
  }
}

/* Refined Trello-inspired workspace cards and task controls */
.simple-tasks-page .workspace-task-card {
  padding: 0;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .07), 0 5px 14px rgba(15, 23, 42, .035);
  overflow: hidden;
}
.simple-tasks-page .workspace-task-card::before { height: 4px; }
.simple-tasks-page .workspace-task-card.priority-none::before { display: none; }
.simple-tasks-page .workspace-card-top {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 14px 12px 8px;
}
.simple-tasks-page .workspace-card-top .workspace-card-drag {
  width: 22px; height: 28px; padding: 0; border: 0; background: transparent; color: #8793a5;
}
.simple-tasks-page .workspace-card-actions { display: flex; gap: 5px; align-items: center; }
.simple-tasks-page .workspace-card-actions .row-icon-btn {
  width: 29px; height: 29px; min-width: 29px; border-radius: 8px; padding: 0;
}
.simple-tasks-page .workspace-card-actions .workspace-card-complete { color: #08775d; border-color: #b7eadc; background: #f1fbf7; }
.simple-tasks-page .workspace-card-actions .workspace-card-remove { color: #d92d20; border-color: #ffd0cc; background: #fffafa; }
.simple-tasks-page .workspace-task-card .task-title {
  text-align: left; font-size: .92rem; line-height: 1.26; font-weight: 750; letter-spacing: -.01em; padding: 3px 0; width: 100%;
}
.simple-tasks-page .workspace-card-context {
  margin: 0; padding: 0 12px 10px 42px; color: #627087; font-size: .78rem; line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.simple-tasks-page .workspace-task-meta {
  margin: 0 12px 12px 42px; padding-top: 9px; border-top: 1px solid #edf0f4; display: flex; justify-content: space-between; gap: 8px;
}
.workspace-priority-label { font-size: .68rem; font-weight: 700; color: #68758a; text-transform: uppercase; letter-spacing: .04em; }
.workspace-card-subtasks { margin: 1px 12px 10px 42px; }
.workspace-card-progress { display:flex; gap:8px; align-items:center; margin-bottom:7px; }
.workspace-card-progress > span { display:flex; gap:4px; align-items:center; font-size:.7rem; font-weight:700; color:#66758b; white-space:nowrap; }
.workspace-card-progress > span svg { width:13px; height:13px; }
.workspace-card-progress > div { flex:1; height:4px; background:#e8edf2; border-radius:99px; overflow:hidden; }
.workspace-card-progress > div b { display:block; height:100%; background:#22a06b; border-radius:inherit; }
.workspace-card-subtask-list { display:grid; gap:3px; }
.workspace-card-subtask { border:0; background:transparent; padding:3px 0; display:flex; align-items:flex-start; gap:6px; text-align:left; color:#46546a; font-size:.73rem; line-height:1.3; }
.workspace-card-subtask svg { width:14px; height:14px; flex:0 0 auto; margin-top:1px; color:#718096; }
.workspace-card-subtask.is-complete span { text-decoration:line-through; color:#8d98a8; }
.workspace-card-subtask.is-complete svg { color:#15936f; }
.workspace-more-subtasks { font-size:.68rem; color:#7b8798; padding-left:20px; }

/* Optional list background colours */
.workspace-agenda-list.list-colour-slate .workspace-list-body { background:#eef1f4; }
.workspace-agenda-list.list-colour-blue .workspace-list-body { background:#eef6ff; }
.workspace-agenda-list.list-colour-green .workspace-list-body { background:#eefaf5; }
.workspace-agenda-list.list-colour-yellow .workspace-list-body { background:#fff9e8; }
.workspace-agenda-list.list-colour-rose .workspace-list-body { background:#fff1f3; }
.workspace-list-colours { display:flex; gap:7px; padding:8px 10px 10px; border-top:1px solid #edf0f4; border-bottom:1px solid #edf0f4; }
.list-colour-dot { width:20px; height:20px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px #ccd4df; cursor:pointer; }
.list-colour-dot.active { box-shadow:0 0 0 2px #253247; }
.list-colour-dot.colour-default { background:#fff; }
.list-colour-dot.colour-slate { background:#d8dde4; }
.list-colour-dot.colour-blue { background:#cde5ff; }
.list-colour-dot.colour-green { background:#ccefe1; }
.list-colour-dot.colour-yellow { background:#ffe9a8; }
.list-colour-dot.colour-rose { background:#ffd3da; }

/* Subtask editor */
.task-subtasks-field { border:1px solid #e0e6ed; border-radius:12px; padding:12px; background:#f9fafc; }
.task-subtasks-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:9px; }
.task-subtasks-heading > div { display:grid; gap:2px; }
.task-subtasks-heading strong { font-size:.86rem; }
.task-subtasks-heading span { font-size:.73rem; color:#718096; }
.task-subtask-editor { display:grid; gap:7px; }
.task-subtask-row { display:grid; grid-template-columns:22px minmax(0,1fr) 30px; gap:7px; align-items:center; }
.task-subtask-title { min-width:0; height:36px !important; padding:7px 9px !important; font-size:.8rem !important; background:#fff !important; }
.task-subtask-row .row-icon-btn { width:30px; height:30px; min-width:30px; }
.task-subtask-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  cursor: pointer;
}
.task-subtask-check input {
  position: absolute !important;
  inset: 0 !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.task-subtask-check span { display:block; width:18px; height:18px; border:1.5px solid #aab5c3; border-radius:5px; background:#fff; pointer-events:none; }
.task-subtask-check input:checked + span { background:#15936f; border-color:#15936f; box-shadow:inset 0 0 0 4px #fff; }


/* Workspace card width and tool alignment refinement --------------------- */
.simple-tasks-page .workspace-list-drop,
.simple-tasks-page .workspace-card-list {
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.simple-tasks-page .workspace-list-drop {
  padding-top: 2px !important;
  padding-bottom: 8px !important;
}

.simple-tasks-page .workspace-card-list {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.simple-tasks-page .workspace-list-drop > .section-empty,
.simple-tasks-page .workspace-card-list > .section-empty {
  margin-inline: 0 !important;
}

.simple-tasks-page .workspace-section-block.agenda-section {
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.simple-tasks-page .workspace-card-top {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  gap: 9px !important;
  align-items: start !important;
}

.simple-tasks-page .workspace-card-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  align-content: start;
}

.simple-tasks-page .workspace-card-tools .row-icon-btn,
.simple-tasks-page .workspace-card-tools .workspace-card-drag,
.simple-tasks-page .workspace-card-tools .workspace-card-complete,
.simple-tasks-page .workspace-card-tools .workspace-card-remove {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border-radius: 8px !important;
}

.simple-tasks-page .workspace-card-tools .workspace-card-drag {
  border: 1px solid transparent !important;
  background: transparent !important;
}

.simple-tasks-page .workspace-card-tools svg {
  width: 14px !important;
  height: 14px !important;
}

.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  margin-left: 51px !important;
}

.simple-tasks-page .workspace-card-context {
  padding-left: 0 !important;
}

.simple-tasks-page .workspace-task-meta {
  justify-content: flex-start !important;
}

.simple-tasks-page .workspace-priority-label {
  display: none !important;
}

.simple-tasks-page [data-workspace-drop].is-drag-over,
.simple-tasks-page [data-section-drop].is-drag-over {
  outline: 2px dashed #f59e0b !important;
  outline-offset: 2px !important;
  background: rgba(255, 247, 237, .7) !important;
  border-radius: 10px !important;
}


/* Stack Sans Text + quieter workspace card controls ---------------------- */
.simple-tasks-page .workspace-task-card {
  position: relative;
}

.simple-tasks-page .workspace-card-top {
  display: block !important;
  min-height: 0 !important;
  padding: 14px 12px 5px 52px !important;
}

.simple-tasks-page .workspace-card-tools {
  position: absolute !important;
  top: 14px;
  left: 12px;
  z-index: 2;
  display: grid !important;
  grid-template-columns: 28px !important;
  gap: 2px !important;
  width: 28px;
}

.simple-tasks-page .workspace-card-tools .row-icon-btn,
.simple-tasks-page .workspace-card-tools .workspace-card-drag,
.simple-tasks-page .workspace-card-tools .workspace-card-complete,
.simple-tasks-page .workspace-card-tools .workspace-card-remove,
.simple-tasks-page .workspace-card-actions .row-icon-btn,
.simple-tasks-page .workspace-card-actions .workspace-card-complete,
.simple-tasks-page .workspace-card-actions .workspace-card-remove {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #7b8798 !important;
}

.simple-tasks-page .workspace-card-tools .row-icon-btn:hover,
.simple-tasks-page .workspace-card-tools .workspace-card-drag:hover,
.simple-tasks-page .workspace-card-tools .workspace-card-complete:hover,
.simple-tasks-page .workspace-card-tools .workspace-card-remove:hover,
.simple-tasks-page .workspace-card-actions .row-icon-btn:hover {
  border: 0 !important;
  background: #f1f4f7 !important;
  color: #354154 !important;
}

.simple-tasks-page .workspace-card-tools .row-icon-btn:focus-visible,
.simple-tasks-page .workspace-card-tools .workspace-card-drag:focus-visible,
.simple-tasks-page .workspace-card-tools .workspace-card-complete:focus-visible,
.simple-tasks-page .workspace-card-tools .workspace-card-remove:focus-visible {
  outline: 2px solid #9aa7b8 !important;
  outline-offset: 1px;
}

.simple-tasks-page .workspace-card-tools svg,
.simple-tasks-page .workspace-card-actions svg {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2 !important;
}

.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  margin-left: 52px !important;
}

.simple-tasks-page .workspace-card-context {
  padding-top: 0 !important;
}

.simple-tasks-page .workspace-task-card .task-title {
  margin: 0 !important;
  padding: 0 !important;
}

/* July 2026 task polish: Stack Sans sizing, card spacing and compact editor */
html, body, button, input, select, textarea {
  font-family: 'Stack Sans Text', Arial, sans-serif;
}
body { font-weight: 400; }
h1, h2, h3, h4, h5, h6 { font-weight: 650; letter-spacing: -.02em; }
.sidebar a, .sidebar button, .nav-link { font-weight: 560; }
.eyebrow { font-weight: 650; letter-spacing: .06em; }
.primary-btn, .secondary-btn, .segmented-toggle button { font-weight: 600; }

/* Keep card copy clear of the vertical tool rail. */
.simple-tasks-page .workspace-card-top {
  padding-left: 66px !important;
  padding-right: 14px !important;
}
.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  margin-left: 66px !important;
  margin-right: 14px !important;
}
.simple-tasks-page .workspace-task-card .task-title {
  width: 100%;
  text-align: left;
  font-size: .91rem !important;
  line-height: 1.23 !important;
  font-weight: 610 !important;
  letter-spacing: -.012em;
}
.simple-tasks-page .workspace-card-context {
  font-size: .78rem !important;
  line-height: 1.42 !important;
  font-weight: 430 !important;
}
.simple-tasks-page .workspace-task-meta,
.simple-tasks-page .workspace-card-progress,
.simple-tasks-page .workspace-card-subtask {
  font-size: .74rem !important;
  font-weight: 450 !important;
}

/* Professional, compact task modal. */
.task-modal {
  padding: 20px !important;
  align-items: center !important;
}
.task-modal .task-edit-card {
  width: min(820px, calc(100vw - 40px)) !important;
  max-width: 820px !important;
  max-height: min(86vh, 760px) !important;
  border-radius: 18px !important;
  overflow-y: auto !important;
  box-shadow: 0 24px 70px rgba(20, 31, 50, .22) !important;
}
.task-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 20px 24px 16px !important;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e5eaf0;
  backdrop-filter: blur(8px);
}
.task-modal .modal-header h2 {
  margin-top: 3px !important;
  font-size: 1.45rem !important;
  line-height: 1.15 !important;
  font-weight: 650 !important;
}
.task-modal .modal-header .eyebrow {
  font-size: .72rem !important;
}
.task-modal .modal-header .icon-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
}
.task-modal .simple-task-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 13px 16px !important;
  padding: 20px 24px 24px !important;
}
.task-modal .form-field {
  gap: 6px !important;
  font-size: .76rem !important;
  font-weight: 560 !important;
  color: #415069 !important;
}
.task-modal input,
.task-modal select,
.task-modal textarea {
  width: 100% !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd7e2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: .88rem !important;
  line-height: 1.35 !important;
  font-weight: 430 !important;
}
.task-modal textarea {
  min-height: 88px !important;
  resize: vertical;
}
.task-modal input:focus,
.task-modal select:focus,
.task-modal textarea:focus {
  border-color: #67758a !important;
  outline: 3px solid rgba(103,117,138,.12) !important;
}
.task-modal .task-subtasks-field,
.task-modal .workspace-placement-fields,
.task-modal .source-summary {
  border: 1px solid #e1e7ee !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  padding: 14px !important;
}
.task-modal .task-subtasks-heading {
  margin-bottom: 10px !important;
}
.task-modal .task-subtasks-heading strong {
  font-size: .9rem !important;
  font-weight: 620 !important;
}
.task-modal .task-subtasks-heading span {
  font-size: .74rem !important;
}
.task-modal #addSubtaskBtn {
  min-height: 36px !important;
  padding: 7px 11px !important;
  font-size: .78rem !important;
}
.task-modal .task-subtask-row {
  grid-template-columns: 20px minmax(0,1fr) 28px !important;
  gap: 8px !important;
}
.task-modal .task-subtask-title {
  height: 38px !important;
  min-height: 38px !important;
  font-size: .8rem !important;
}
.task-modal [data-remove-subtask-row] {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border: 0 !important;
  background: transparent !important;
  color: #718096 !important;
}
.task-modal [data-remove-subtask-row]:hover {
  background: #eef2f6 !important;
  color: #c53030 !important;
}
.task-modal .workspace-placement-fields {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px !important;
}
.task-modal .modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  margin: 2px -24px -24px !important;
  padding: 14px 24px !important;
  border-top: 1px solid #e5eaf0;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -8px 20px rgba(20,31,50,.04);
}
.task-modal .modal-actions .primary-btn {
  min-height: 40px !important;
  padding: 9px 16px !important;
  font-size: .82rem !important;
}
@media (max-width: 680px) {
  .task-modal { padding: 8px !important; }
  .task-modal .task-edit-card { width: calc(100vw - 16px) !important; max-height: 94vh !important; }
  .task-modal .simple-task-form { grid-template-columns: 1fr !important; padding: 16px !important; }
  .task-modal .workspace-placement-fields { grid-template-columns: 1fr !important; }
  .task-modal .modal-actions { margin: 2px -16px -16px !important; padding: 12px 16px !important; }
}

/* Projects inside Tasks */
html[data-task-scope="projects"] [data-scope-title]:not([data-scope-title="projects"]),
html[data-task-scope="projects"] [data-scope-description]:not([data-scope-description="projects"]),
html[data-task-scope="projects"] [data-scope-loading]:not([data-scope-loading="projects"]) { display: none !important; }
html[data-task-scope="projects"] #organisationTaskTools { display: none !important; }
html[data-task-scope="projects"] [data-task-scope="projects"] { background: var(--charcoal, #505050); color: #fff; box-shadow: 0 3px 10px rgba(20, 28, 42, .12); }
.simple-tasks-page .task-scope-toggle button { min-width: 104px; }

.projects-view-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:4px 0 18px; }
.projects-view-head h2 { margin:0 0 4px; font-size:1.15rem; font-weight:650; color:#172238; }
.projects-view-head p { margin:0; color:#65738a; font-size:.9rem; }
.project-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.project-card { border:1px solid #dce3ec; background:#fff; border-radius:16px; padding:18px; box-shadow:0 7px 22px rgba(26,36,54,.06); cursor:pointer; transition:.18s ease; }
.project-card:hover { transform:translateY(-1px); box-shadow:0 10px 26px rgba(26,36,54,.1); border-color:#cbd5e1; }
.project-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.project-card h3 { margin:5px 0 0; font-size:1.05rem; line-height:1.25; font-weight:650; color:#172238; }
.project-status { display:inline-flex; padding:4px 8px; border-radius:999px; background:#f0f3f7; color:#5e6b80; font-size:.72rem; font-weight:650; }
.project-card > p { min-height:42px; margin:12px 0 15px; color:#5f6d82; font-size:.87rem; line-height:1.45; }
.project-progress { display:grid; grid-template-columns:1fr auto; gap:7px 12px; align-items:center; font-size:.78rem; color:#66748a; }
.project-progress > div { grid-column:1 / -1; height:6px; border-radius:99px; background:#edf1f5; overflow:hidden; }
.project-progress > div i { display:block; height:100%; background:#ff922b; border-radius:inherit; }
.project-card-meta { display:grid; grid-template-columns:1fr 1fr; gap:10px; border-top:1px solid #edf1f5; margin-top:15px; padding-top:13px; }
.project-card-meta span, .project-people-summary { display:flex; align-items:center; gap:6px; color:#65738a; font-size:.78rem; min-width:0; }
.project-card-meta svg, .project-people-summary svg { width:15px; height:15px; flex:0 0 auto; }
.project-people-summary { margin-top:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.project-edit-card { width:min(760px, calc(100vw - 32px)); max-height:min(88vh, 760px); overflow:auto; }
.project-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 16px; }
.project-form .full-span { grid-column:1 / -1; }
.project-people-field { grid-column:1 / -1; border:1px solid #dde4ed; border-radius:14px; padding:14px; margin:0; }
.project-people-field legend { font-weight:650; padding:0 6px; color:#172238; }
.project-people-field > p { margin:0 0 10px; color:#6a778c; font-size:.82rem; }
.project-people-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:220px; overflow:auto; }
.project-person-option { display:flex; align-items:center; gap:9px; border:1px solid #e2e7ee; border-radius:10px; padding:9px 10px; cursor:pointer; background:#fff; }
.project-person-option input { width:16px; height:16px; flex:0 0 auto; }
.project-person-option span { display:flex; flex-direction:column; min-width:0; }
.project-person-option strong { font-size:.84rem; font-weight:600; color:#1c2940; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-person-option small { font-size:.73rem; color:#718096; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.action-draft { grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(130px,.8fr) minmax(130px,.8fr) minmax(160px,1fr) auto; }

@media (max-width: 1050px) { .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) {
  .project-grid, .project-people-grid, .project-form { grid-template-columns:1fr; }
  .project-form .full-span { grid-column:1; }
  .projects-view-head { align-items:flex-start; flex-direction:column; }
  .project-card-meta { grid-template-columns:1fr; }
}

/* Projects modal: fixed, centred overlay with no in-page spill or stuck panel. */
body.project-modal-open { overflow: hidden !important; }
.project-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2600 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(15, 23, 42, .46) !important;
  box-shadow: none !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: auto !important;
  backdrop-filter: blur(5px);
}
.project-modal.open { display: flex !important; }
.project-modal .project-edit-card {
  position: relative !important;
  width: min(720px, calc(100vw - 36px)) !important;
  max-width: 720px !important;
  max-height: min(88vh, 760px) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: auto !important;
  background: #fff !important;
  border: 1px solid #e1e7ee !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 85px rgba(15, 23, 42, .28) !important;
}
.project-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 !important;
  padding: 18px 22px 15px !important;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e5eaf0;
  backdrop-filter: blur(8px);
}
.project-modal .modal-header h2 { font-size: 1.35rem !important; line-height: 1.15; font-weight: 650 !important; }
.project-modal .modal-header .eyebrow { margin-bottom: 3px; font-size: .7rem !important; }
.project-modal .modal-header .icon-btn { width: 36px !important; height: 36px !important; min-width: 36px !important; }
.project-modal .project-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 13px 15px !important;
  padding: 18px 22px 22px !important;
}
.project-modal .form-field { gap: 6px !important; font-size: .76rem !important; font-weight: 560 !important; color: #415069 !important; }
.project-modal input,
.project-modal select,
.project-modal textarea {
  width: 100% !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd7e2 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: .88rem !important;
  font-weight: 430 !important;
}
.project-modal textarea { min-height: 86px !important; resize: vertical; }
.project-modal .project-people-field { padding: 12px !important; border-radius: 12px !important; background: #f8fafc !important; }
.project-modal .project-people-grid { max-height: 180px !important; }
.project-modal .modal-actions {
  position: sticky;
  bottom: -22px;
  z-index: 3;
  margin: 2px -22px -22px !important;
  padding: 12px 22px !important;
  border-top: 1px solid #e5eaf0;
  background: rgba(255,255,255,.98);
}
@media (max-width: 680px) {
  .project-modal { padding: 8px !important; }
  .project-modal .project-edit-card { width: calc(100vw - 16px) !important; max-height: 94vh !important; }
  .project-modal .project-form { grid-template-columns: 1fr !important; padding: 16px !important; }
  .project-modal .project-form .full-span { grid-column: 1 !important; }
  .project-modal .project-people-grid { grid-template-columns: 1fr !important; }
  .project-modal .modal-actions { margin: 2px -16px -16px !important; padding: 12px 16px !important; }
}

/* Partners agreement servicing workspace */
body[data-page="partners"] .partner-tabs,
body[data-page="partners"] .partner-modal-tabs { display:flex; gap:4px; padding:5px; border:1px solid #e1e7ef; background:#fff; border-radius:14px; width:max-content; max-width:100%; overflow:auto; margin:0 0 16px; }
body[data-page="partners"] .partner-tabs button,
body[data-page="partners"] .partner-modal-tabs button { border:0; background:transparent; color:#5b6678; font:inherit; font-size:13px; font-weight:850; white-space:nowrap; border-radius:10px; padding:9px 13px; cursor:pointer; }
body[data-page="partners"] .partner-tabs button.active,
body[data-page="partners"] .partner-modal-tabs button.active { background:#17202d; color:#fff; }
body[data-page="partners"] .partner-view,
body[data-page="partners"] .partner-tab-panel { display:none; }
body[data-page="partners"] .partner-view.active,
body[data-page="partners"] .partner-tab-panel.active { display:block; }
body[data-page="partners"] .partner-modal { width:min(1180px,calc(100vw - 34px)); max-width:1180px; max-height:92vh; overflow:hidden; }
body[data-page="partners"] .partner-form { max-height:calc(92vh - 90px); overflow:auto; padding-top:16px; }
body[data-page="partners"] .partner-modal-tabs { position:sticky; top:-16px; z-index:3; width:100%; border-radius:0; border-width:0 0 1px; margin-bottom:20px; padding:8px 0 12px; background:#fff; }
body[data-page="partners"] .contacts-editor,
body[data-page="partners"] .deliverables-editor,
body[data-page="partners"] .payments-editor { display:grid; gap:9px; }
body[data-page="partners"] .editor-row { display:grid; gap:8px; align-items:center; padding:10px; background:#fff; border:1px solid #e4eaf1; border-radius:13px; }
body[data-page="partners"] .contact-editor-row { grid-template-columns:1.1fr .9fr 1.25fr .8fr .75fr auto 40px; }
body[data-page="partners"] .deliverable-editor-row { grid-template-columns:minmax(180px,1.5fr) 130px 105px 72px 105px 135px 145px minmax(150px,1fr) 155px 40px; overflow-x:auto; }
body[data-page="partners"] .payment-editor-row { grid-template-columns:140px minmax(200px,1.5fr) 110px 135px 125px minmax(160px,1fr) 40px; }
body[data-page="partners"] .editor-row input,
body[data-page="partners"] .editor-row select { min-height:40px; border:1px solid #dce4ed; border-radius:10px; padding:8px 10px; min-width:0; width:100%; font:inherit; font-size:13px; background:#fff; }
body[data-page="partners"] .editor-row input[type="file"] { padding:7px; font-size:11px; }
body[data-page="partners"] .mini-check { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:800; color:#4b5563; white-space:nowrap; }
body[data-page="partners"] .mini-check input { width:16px; min-height:16px; }
body[data-page="partners"] label.field small { color:#687386; font-size:12px; }
body[data-page="partners"] label.field small a { color:#c8660c; font-weight:800; }
body[data-page="partners"] .partner-data-table { width:100%; overflow-x:auto; }
body[data-page="partners"] .data-row { display:grid; grid-template-columns:1fr 1.65fr .7fr .85fr .8fr .9fr .85fr; gap:12px; align-items:center; min-width:980px; padding:13px 10px; border-bottom:1px solid #e7ebf0; color:#445065; font-size:13px; }
body[data-page="partners"] .data-row.payment-row { grid-template-columns:1fr .9fr 1.6fr .75fr .8fr .85fr; min-width:850px; }
body[data-page="partners"] .data-row.renewal-row { grid-template-columns:1.1fr .8fr .9fr .9fr 1fr .75fr; min-width:850px; }
body[data-page="partners"] .data-row.data-head { color:#7a8494; font-size:11px; font-weight:950; letter-spacing:.04em; text-transform:uppercase; background:#f8fafc; border-radius:10px; }
body[data-page="partners"] .data-row span { min-width:0; }
body[data-page="partners"] .data-row small { display:block; margin-top:3px; color:#8a94a4; }
body[data-page="partners"] .data-row a { color:#bf5c08; font-weight:850; }
body[data-page="partners"] button.partner-status { border:0; cursor:pointer; }
body[data-page="partners"] .partner-status.complete,
body[data-page="partners"] .partner-status.received { background:#dcfce7;color:#166534; }
body[data-page="partners"] .partner-status.at-risk,
body[data-page="partners"] .partner-status.overdue { background:#fee2e2;color:#991b1b; }
body[data-page="partners"] .partner-status.awaiting-approval,
body[data-page="partners"] .partner-status.in-progress,
body[data-page="partners"] .partner-status.invoiced { background:#fff1d6;color:#92400e; }
body[data-page="partners"] .partner-status.not-started,
body[data-page="partners"] .partner-status.scheduled { background:#edf2f7;color:#475569; }
@media(max-width:1050px){
  body[data-page="partners"] .contact-editor-row,
  body[data-page="partners"] .payment-editor-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-page="partners"] .contact-editor-row .icon-btn,
  body[data-page="partners"] .payment-editor-row .icon-btn { justify-self:end; }
}
@media(max-width:680px){
  body[data-page="partners"] .partner-tabs { width:100%; }
  body[data-page="partners"] .partner-modal { width:100vw; max-height:100vh; border-radius:0; }
  body[data-page="partners"] .partner-form { max-height:calc(100vh - 78px); }
  body[data-page="partners"] .contact-editor-row,
  body[data-page="partners"] .payment-editor-row { grid-template-columns:1fr; }
}

/* Partners financials and full-width register */
body[data-page="partners"] .partners-register-panel { width: 100%; }
body[data-page="partners"] .financial-years-editor { display: grid; gap: 10px; }
body[data-page="partners"] .financial-year-head,
body[data-page="partners"] .financial-year-row {
  display: grid;
  grid-template-columns: 110px 150px 150px minmax(240px, 1fr) 40px;
  gap: 8px;
  align-items: center;
}
body[data-page="partners"] .financial-year-head {
  padding: 0 2px 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body[data-page="partners"] .financial-year-row input { min-height: 42px; border-radius: 12px; }
body[data-page="partners"] .financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
body[data-page="partners"] .financial-year-summary {
  border: 1px solid #e3ebf4;
  border-radius: 16px;
  padding: 15px;
  background: #fbfdff;
}
body[data-page="partners"] .financial-year-summary > span,
body[data-page="partners"] .financial-year-summary > strong,
body[data-page="partners"] .financial-year-summary > small { display: block; }
body[data-page="partners"] .financial-year-summary > span { color:#64748b; font-size:12px; font-weight:900; }
body[data-page="partners"] .financial-year-summary > strong { margin-top:5px; color:#111827; font-size:22px; }
body[data-page="partners"] .financial-year-summary > small { margin-top:5px; color:#64748b; font-weight:750; }
body[data-page="partners"] .financial-row { grid-template-columns: 1.15fr .55fr .8fr .8fr .85fr 1.5fr; }
@media (max-width: 900px) {
  body[data-page="partners"] .financial-year-head { display:none; }
  body[data-page="partners"] .financial-year-row { grid-template-columns: 1fr; padding:12px; border:1px solid #e3ebf4; border-radius:14px; background:#fff; }
}

/* Clubwiser branded module headers --------------------------------------
   Use the Clubwiser shield as the shared decorative watermark instead of
   the previous generic circular/orb treatment. */
.topbar {
  background:
    linear-gradient(135deg, #ffffff 0%, #fbfdff 72%, rgba(246, 139, 31, 0.055) 100%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: clamp(150px, 15vw, 220px);
  aspect-ratio: 1;
  height: auto;
  border: 0;
  border-radius: 0;
  background: url("../images/clubwisericon-watermark.webp") center / contain no-repeat;
  opacity: 0.14;
  transform: translateY(-50%) rotate(-4deg);
  pointer-events: none;
  z-index: 0;
}

/* Keep page-specific header variants consistent with the shared branding. */
body[data-page="partners"] .partners-hero {
  background:
    linear-gradient(135deg, #ffffff 0%, #f8fafc 72%, rgba(246, 139, 31, 0.065) 100%);
}

@media (max-width: 760px) {
  .topbar::after {
    right: -26px;
    width: 155px;
    opacity: 0.10;
  }
}

/* Reliable Clubwiser header watermark fix ---------------------------------
   The icon is part of the header background itself, so it cannot be hidden
   behind another pseudo-element or stacking context. */
.topbar,
body[data-page="partners"] .partners-hero {
  background-image:
    url("../images/clubwiser-header-watermark.webp"),
    linear-gradient(135deg, #ffffff 0%, #fbfdff 72%, rgba(246, 139, 31, 0.055) 100%) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: calc(100% - 24px) center, center !important;
  background-size: clamp(150px, 15vw, 220px) auto, cover !important;
}

.topbar::after,
body[data-page="partners"] .partners-hero::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 760px) {
  .topbar,
  body[data-page="partners"] .partners-hero {
    background-position: calc(100% + 28px) center, center !important;
    background-size: 155px auto, cover !important;
  }
}

/* July 2026: quiet branded header shading, without decorative icon -------- */
.topbar,
body[data-page="partners"] .partners-hero {
  background-image:
    radial-gradient(circle at 92% 12%, rgba(246, 139, 31, 0.10), transparent 29%),
    linear-gradient(135deg, #ffffff 0%, #fbfdff 70%, #fff8f1 100%) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: cover !important;
}

.topbar::after,
body[data-page="partners"] .partners-hero::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Tasks: never show the temporary loading labels during initial hydration. */
.simple-tasks-page #tasksLoading[hidden],
.simple-tasks-page #tasksLoading:empty {
  display: none !important;
}

/* Keep workspace card titles and supporting copy on one clean left edge,
   immediately to the right of the compact icon rail. */
.simple-tasks-page .workspace-card-top {
  padding: 14px 14px 4px 52px !important;
}
.simple-tasks-page .workspace-task-card .task-title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  margin-left: 52px !important;
  margin-right: 14px !important;
  padding-left: 0 !important;
  text-align: left !important;
}

/* Action item cards use the same compact alignment beside their source icon. */
.simple-tasks-page .org-task-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
}
.simple-tasks-page .org-task-main,
.simple-tasks-page .org-task-title-row,
.simple-tasks-page .org-task-main p,
.simple-tasks-page .org-task-meta {
  text-align: left;
}
.simple-tasks-page .org-task-title-row .task-title {
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Task cards: a fixed icon rail with all copy aligned safely to its right. */
.simple-tasks-page .workspace-task-card {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 0 12px !important;
  padding: 18px 16px 14px 14px !important;
}
.simple-tasks-page .workspace-card-tools {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  width: 42px !important;
  margin: 0 !important;
}
.simple-tasks-page .workspace-card-content {
  grid-column: 2 !important;
  min-width: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-card-top { display: contents !important; }
.simple-tasks-page .workspace-task-card .task-title,
.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-task-card .task-title { padding: 0 !important; }
.simple-tasks-page .workspace-card-context { margin-top: 8px !important; }

.task-attachments-field {
  border-top: 1px solid #e5eaf1;
  padding-top: 18px;
}
.task-file-picker { cursor: pointer; }
.task-attachment-scope {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.4;
}
.task-attachment-scope svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.task-attachment-list { display: grid; gap: 7px; }
.task-attachment-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 8px 7px 11px;
  border: 1px solid #e5eaf1;
  border-radius: 10px;
  background: #fff;
}
.task-attachment-row > svg { width: 17px; height: 17px; color: #64748b; }
.task-attachment-row a,
.task-attachment-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f2937; font-weight: 700; text-decoration: none; }
.task-attachment-row > span:last-of-type,
.task-attachment-row em { color: #7c8799; font-size: .76rem; font-style: normal; font-weight: 600; }
.task-attachment-row.is-pending { background: #fffaf4; border-color: #fed7aa; }
.task-attachment-empty { color: #8a94a6; font-size: .84rem; padding: 6px 2px; }

/* Context-aware task sharing and virtual document filing */
#taskVisibilityHelp { display:block; margin-top:6px; color:var(--muted, #68758a); font-size:.78rem; line-height:1.35; }
.doc-virtual-folders { display:grid; gap:3px; margin:2px 8px 8px 30px; }
.doc-virtual-folder { width:100%; border:0; background:transparent; display:grid; grid-template-columns:16px minmax(0,1fr) auto; gap:7px; align-items:center; padding:7px 8px; border-radius:8px; color:#667085; text-align:left; cursor:pointer; font:inherit; font-size:.78rem; }
.doc-virtual-folder:hover, .doc-virtual-folder.active { background:#f1f4f8; color:#182337; }
.doc-virtual-folder svg { width:14px; height:14px; }
.doc-virtual-folder span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.doc-virtual-folder strong { font-size:.72rem; }
.document-library-path { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:10px 0; color:#667085; font-size:.78rem; }
.document-library-path svg { width:14px; height:14px; }
.document-library-path span { background:#f4f6f8; border:1px solid #e5e9ef; border-radius:6px; padding:3px 6px; }

/* Contextual file subfolders */
.doc-virtual-folders { display: grid; gap: 4px; margin: 4px 0 10px 22px; }
.doc-virtual-folder { width: calc(100% - (var(--context-depth, 0) * 10px)); margin-left: calc(var(--context-depth, 0) * 10px); display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; color: var(--muted, #667085); text-align: left; cursor: pointer; }
.doc-virtual-folder:hover, .doc-virtual-folder.active { background: #f3f6fa; color: #172033; }
.doc-virtual-folder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-virtual-folder strong { font-size: 12px; font-weight: 700; }
.doc-virtual-folder svg { width: 15px; height: 15px; }

/* Project task review */
.project-card.expanded { grid-column: 1 / -1; }
.project-card-head { align-items:stretch; }
.project-card-main { flex:1; min-width:0; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:0; border:0; background:transparent; text-align:left; color:inherit; cursor:pointer; }
.project-card-main > span { min-width:0; }
.project-card-main > svg { width:20px; height:20px; margin-top:6px; flex:0 0 auto; color:#69778c; }
.project-task-panel { margin-top:16px; padding-top:15px; border-top:1px solid #e8edf3; }
.project-task-panel-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; color:#243149; }
.project-task-panel-head span { color:#718096; font-size:.8rem; }
.project-task-row { width:100%; display:grid; grid-template-columns:24px minmax(0,1fr) auto 18px; align-items:center; gap:10px; padding:11px 8px; border:0; border-top:1px solid #edf1f5; background:transparent; text-align:left; color:#18243a; cursor:pointer; }
.project-task-row:hover { background:#f8fafc; }
.project-task-row > svg { width:17px; height:17px; color:#8793a5; }
.project-task-status svg { width:17px; height:17px; color:#7a8799; }
.project-task-status.done svg { color:#249e69; }
.project-task-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.project-task-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.88rem; }
.project-task-copy small { color:#708096; font-size:.76rem; }
.project-task-pill { padding:4px 8px; border-radius:999px; background:#f1f4f7; color:#526176; font-size:.72rem; white-space:nowrap; }
.project-task-empty { display:flex; align-items:center; justify-content:center; gap:8px; min-height:72px; color:#718096; font-size:.84rem; border-top:1px solid #edf1f5; }
.project-task-empty svg { width:18px; height:18px; }
@media (max-width: 680px) {
  .project-task-row { grid-template-columns:22px minmax(0,1fr) 16px; }
  .project-task-pill { display:none; }
}


/* July 2026 task-card alignment refinement.
   Keep the action controls as a compact rail and align every line of copy
   to the same edge immediately beside it. */
.simple-tasks-page .workspace-task-card {
  grid-template-columns: 30px minmax(0, 1fr) !important;
  column-gap: 8px !important;
  padding-left: 12px !important;
}
.simple-tasks-page .workspace-card-tools {
  width: 30px !important;
  gap: 2px !important;
  align-items: center !important;
}
.simple-tasks-page .workspace-card-tools .row-icon-btn,
.simple-tasks-page .workspace-card-tools .workspace-card-drag,
.simple-tasks-page .workspace-card-tools .workspace-card-complete,
.simple-tasks-page .workspace-card-tools .workspace-card-remove {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
}
.simple-tasks-page .workspace-card-content,
.simple-tasks-page .workspace-card-content > *,
.simple-tasks-page .workspace-task-card .task-title,
.simple-tasks-page .workspace-card-context,
.simple-tasks-page .workspace-card-subtasks,
.simple-tasks-page .workspace-task-meta {
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-card-context {
  display: block !important;
  margin-top: 7px !important;
  margin-bottom: 8px !important;
}
.simple-tasks-page .workspace-card-subtasks {
  margin-top: 4px !important;
  margin-bottom: 8px !important;
}

/* July 2026: final workspace card typography and copy alignment.
   All card copy shares the exact same left edge inside workspace-card-content. */
.simple-tasks-page .workspace-task-card .workspace-card-content {
  min-width: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content > .task-title,
.simple-tasks-page .workspace-task-card .workspace-card-content > .workspace-card-context,
.simple-tasks-page .workspace-task-card .workspace-card-content > .workspace-card-subtasks,
.simple-tasks-page .workspace-task-card .workspace-card-content > .workspace-task-meta {
  box-sizing: border-box !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left !important;
  text-indent: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content > .task-title {
  display: block !important;
  font-size: .84rem !important;
  line-height: 1.25 !important;
  font-weight: 620 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content > .workspace-card-context {
  display: -webkit-box !important;
  margin-top: 7px !important;
  margin-bottom: 9px !important;
  font-size: .76rem !important;
  line-height: 1.4 !important;
}

/* July 2026: compact workspace task-card footer.
   Card copy now uses the full width; actions, attachment count and a short
   numeric due date sit together in a low-profile footer. */
.simple-tasks-page .workspace-task-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 18px 14px 11px !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content {
  width: 100% !important;
  min-width: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content > .task-title {
  font-size: .82rem !important;
  line-height: 1.28 !important;
}
.simple-tasks-page .workspace-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid #edf1f5 !important;
}
.simple-tasks-page .workspace-card-tools {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  width: auto !important;
}
.simple-tasks-page .workspace-card-tools .row-icon-btn,
.simple-tasks-page .workspace-card-tools .workspace-card-drag,
.simple-tasks-page .workspace-card-tools .workspace-card-complete,
.simple-tasks-page .workspace-card-tools .workspace-card-remove {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
}
.simple-tasks-page .workspace-task-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  width: auto !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
}
.simple-tasks-page .workspace-task-meta > span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 2px 5px !important;
  color: #718096 !important;
  font-size: .72rem !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.simple-tasks-page .workspace-task-meta svg {
  width: 14px !important;
  height: 14px !important;
}
.simple-tasks-page .workspace-task-meta .workspace-due-date {
  padding-inline: 6px !important;
  border: 1px solid #e1e7ee !important;
  border-radius: 6px !important;
  background: #f7f9fb !important;
  color: #59677b !important;
}
.simple-tasks-page .workspace-task-meta .workspace-due-date.is-overdue {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b42318 !important;
}


/* July 2026: cleaner compact workspace cards.
   Remove the dividing rule, keep titles on the true left edge, keep the footer
   close to the final line of copy, and show only subtask completion progress. */
.simple-tasks-page .workspace-task-card .workspace-card-content > .task-title {
  display: block !important;
  width: 100% !important;
  justify-self: stretch !important;
  align-self: start !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}
.simple-tasks-page .workspace-card-footer {
  justify-content: flex-start !important;
  gap: 5px !important;
  margin-top: 8px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}
.simple-tasks-page .workspace-card-tools {
  flex: 0 0 auto !important;
}
.simple-tasks-page .workspace-task-meta {
  justify-content: flex-start !important;
  margin-left: 2px !important;
}
.simple-tasks-page .workspace-card-subtasks {
  margin: 8px 0 0 !important;
}
.simple-tasks-page .workspace-card-subtask-list,
.simple-tasks-page .workspace-card-subtask,
.simple-tasks-page .workspace-more-subtasks {
  display: none !important;
}

/* July 2026: definitive workspace card layout correction.
   Overrides older card-grid rules that could centre/shove short titles right
   and could stretch the footer away from the final line of content. */
.simple-tasks-page .workspace-task-card {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  align-content: start !important;
  justify-content: start !important;
  padding: 18px 20px 12px !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-content > .task-title {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-self: auto !important;
  align-self: auto !important;
  text-align: left !important;
  font-size: .82rem !important;
  line-height: 1.28 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-context {
  width: 100% !important;
  margin: 7px 0 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-subtasks {
  width: 100% !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-footer {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 26px !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
  gap: 5px !important;
  border: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-tools {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: auto !important;
  margin: 0 !important;
  gap: 2px !important;
}
.simple-tasks-page .workspace-task-card .workspace-task-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  margin: 0 0 0 2px !important;
  padding: 0 !important;
  gap: 6px !important;
}


/* July 2026: compact workspace controls and distraction-free board view. */
.simple-tasks-page .task-page-head {
  padding-bottom: 10px !important;
  margin-bottom: 10px !important;
}
.simple-tasks-page .task-page-heading .eyebrow { margin-bottom: 2px; }
.simple-tasks-page .task-page-heading h1 { margin-bottom: 3px; }
.simple-tasks-page .task-view-description { margin: 0; }
.workspace-view-actions { display: none; align-items: center; gap: 7px; }
html[data-task-scope="workspace"] .workspace-view-actions { display: flex; }
.workspace-view-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 10px;
  border: 1px solid #d9e1eb; border-radius: 11px; background: #fff; color: #536177;
  font: inherit; font-size: .78rem; font-weight: 800; text-decoration: none; cursor: pointer;
}
.workspace-view-button:hover { background: #f7f9fb; color: #182338; }
.workspace-view-button svg { width: 16px; height: 16px; }
.simple-tasks-page .workspace-compact-toolbar {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 58px; padding: 8px 10px; margin-bottom: 14px; border: 1px solid #edf1f5;
  border-radius: 15px; background: #f8fafc;
}
.simple-tasks-page .workspace-row-leading-actions { display: flex; align-items: center; gap: 8px; }
.simple-tasks-page .workspace-compact-toolbar .secondary-btn { min-height: 40px; padding: 8px 13px; border-radius: 11px; }
.simple-tasks-page .workspace-info-button { width: 40px; height: 40px; }
.workspace-existing-wrap { position: relative; margin-left: auto; }
.workspace-existing-toggle { min-height: 40px; border-radius: 11px; padding: 8px 13px; gap: 8px; }
.workspace-existing-toggle svg { width: 17px; height: 17px; }
.workspace-existing-chevron { margin-left: 3px; opacity: .8; }
.workspace-picker-popover {
  position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; width: min(520px, calc(100vw - 48px));
  padding: 16px; border: 1px solid #dfe6ee; border-radius: 16px; background: #fff;
  box-shadow: 0 18px 45px rgba(20, 31, 48, .18);
}
.workspace-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.workspace-picker-head > div { display: grid; gap: 2px; }
.workspace-picker-head strong { color: #182338; font-size: .96rem; }
.workspace-picker-head span { color: #6a778b; font-size: .78rem; }
.workspace-picker-field { display: grid; gap: 5px; min-width: 0; }
.workspace-picker-field > span { color: #536177; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.workspace-picker-field select { width: 100%; min-height: 44px; border-radius: 11px; }
.workspace-picker-destination { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.workspace-picker-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f5; }
.workspace-picker-footer .primary-btn, .workspace-picker-footer .secondary-btn { min-height: 38px; }

body.workspace-focus-mode { overflow: hidden; background: #fff; }
body.workspace-focus-mode #appShell { display: none !important; }
body.workspace-focus-mode .main.simple-tasks-page {
  position: fixed; inset: 0; z-index: 1000; width: 100vw; max-width: none; margin: 0 !important;
  padding: 10px !important; overflow: auto; background: #fff;
}
body.workspace-focus-mode .simple-tasks-page .org-task-shell { min-height: calc(100vh - 20px); padding: 12px; border-radius: 14px; }
body.workspace-focus-mode .simple-tasks-page .task-page-heading .eyebrow,
body.workspace-focus-mode .simple-tasks-page .task-view-description { display: none; }
body.workspace-focus-mode .simple-tasks-page .task-page-head { padding-bottom: 8px !important; margin-bottom: 8px !important; }
body.workspace-focus-mode .simple-tasks-page .task-page-heading h1 { font-size: 1.25rem; }
body.workspace-focus-mode .simple-tasks-page .custom-workspace-board { overflow-x: visible; }

@media (max-width: 900px) {
  .simple-tasks-page .workspace-compact-toolbar { align-items: stretch; flex-direction: column; }
  .workspace-existing-wrap { width: 100%; margin-left: 0; }
  .workspace-existing-toggle { width: 100%; justify-content: center; }
  .workspace-picker-popover { position: fixed; top: 50%; right: auto; left: 50%; transform: translate(-50%, -50%); }
  .workspace-picker-destination { grid-template-columns: 1fr; }
  .workspace-view-button span { display: none; }
}


/* July 2026: stable workspace picker and compact view controls. */
.simple-tasks-page .task-page-actions { align-items: flex-start; }
.simple-tasks-page .task-page-secondary-actions { align-items: flex-start; }
.task-status-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 210px;
}
.workspace-view-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-height: 30px;
  visibility: hidden;
  pointer-events: none;
}
html[data-task-scope="workspace"] .workspace-view-actions {
  visibility: visible;
  pointer-events: auto;
}
.workspace-view-button {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  justify-content: center;
  border-radius: 9px;
}
.workspace-view-button svg { width: 15px; height: 15px; }

/* Do not rebuild/flicker the open picker while live task/workspace listeners refresh. */
.workspace-picker-popover { contain: layout paint; }
.workspace-picker-field select { background-color: #fff; }

body.workspace-focus-mode {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
}
body.workspace-focus-mode .main.simple-tasks-page {
  inset: 0;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.workspace-focus-mode .simple-tasks-page .org-task-shell {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
body.workspace-focus-mode .simple-tasks-page .custom-workspace-board {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overscroll-behavior-x: contain;
}

@media (max-width: 900px) {
  .task-status-stack { min-width: 0; }
  .workspace-view-actions { min-height: 30px; }
}


/* July 2026: workspace toolbar action order and compact view icons. */
.simple-tasks-page .task-status-stack { min-width: 0; }
.simple-tasks-page .task-page-head .workspace-view-actions { display: none !important; }
.simple-tasks-page .workspace-row-leading-actions { flex-wrap: wrap; }
.simple-tasks-page .workspace-row-leading-actions .workspace-existing-wrap { margin-left: 0; }
.simple-tasks-page .workspace-row-leading-actions .workspace-existing-toggle {
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 11px;
  background: #fff;
  color: #3f4b60;
  border: 1px solid #d9e1eb;
  box-shadow: none;
}
.simple-tasks-page .workspace-row-leading-actions .workspace-existing-toggle:hover {
  background: #f7f9fb;
  color: #182338;
}
.simple-tasks-page .workspace-toolbar-view-actions {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  min-height: 0;
  margin-left: auto;
  gap: 6px;
}
.simple-tasks-page .workspace-toolbar-view-actions .workspace-view-button {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 11px;
  background: #fff;
}
.simple-tasks-page .workspace-toolbar-view-actions .workspace-view-button svg { width: 17px; height: 17px; }
@media (max-width: 900px) {
  .simple-tasks-page .workspace-compact-toolbar { flex-direction: row; align-items: center; }
  .simple-tasks-page .workspace-row-leading-actions { flex: 1 1 auto; }
  .simple-tasks-page .workspace-row-leading-actions .workspace-existing-wrap { width: auto; }
  .simple-tasks-page .workspace-row-leading-actions .workspace-existing-toggle { width: auto; }
  .simple-tasks-page .workspace-toolbar-view-actions { flex: 0 0 auto; }
}


/* July 2026: left-anchored workspace picker and quiet status labels. */
.simple-tasks-page .workspace-row-leading-actions .workspace-picker-popover {
  left: 0;
  right: auto;
  max-width: min(520px, calc(100vw - 190px));
}
.simple-tasks-page .workspace-task-meta { flex-wrap: wrap; }
.simple-tasks-page .workspace-status-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #f5f7fa;
  color: #5d6a7e;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.simple-tasks-page .workspace-status-label.status-in-progress {
  background: #fff7e8;
  border-color: #f4dfb8;
  color: #8a5b12;
}
.simple-tasks-page .workspace-status-label.status-blocked {
  background: #fff0f0;
  border-color: #f1cccc;
  color: #a53f3f;
}
@media (max-width: 900px) {
  .simple-tasks-page .workspace-row-leading-actions .workspace-picker-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(520px, calc(100vw - 28px));
    max-width: none;
    transform: translate(-50%, -50%);
  }
}


/* July 2026: icon-only task status and list-wide ordering. */
.simple-tasks-page .workspace-status-label { display: none !important; }
.simple-tasks-page .workspace-status-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #f5f7fa;
  color: #64748b;
}
.simple-tasks-page .workspace-status-icon svg { width: 15px; height: 15px; }
.simple-tasks-page .workspace-status-icon.status-in-progress {
  background: #fff7e8;
  border-color: #f4dfb8;
  color: #9a650f;
}
.simple-tasks-page .workspace-status-icon.status-waiting {
  background: #eef4ff;
  border-color: #cfddf5;
  color: #46658f;
}
.simple-tasks-page .workspace-status-icon.status-blocked {
  background: #fff0f0;
  border-color: #f1cccc;
  color: #a53f3f;
}
.simple-tasks-page .workspace-menu-order {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid #e6ebf1;
  border-bottom: 1px solid #e6ebf1;
}
.simple-tasks-page .workspace-menu-order > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f6d81;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.simple-tasks-page .workspace-menu-order > span svg { width: 15px; height: 15px; }
.simple-tasks-page .workspace-menu-order select {
  width: 100%;
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #d8e0e9;
  border-radius: 9px;
  background-color: #fff;
  color: #243044;
  font-size: .8rem;
  font-weight: 700;
}

/* Completed workspace archive filters ------------------------------------ */
.simple-tasks-page .completed-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(2, minmax(125px, .72fr)) repeat(4, minmax(145px, .9fr)) auto;
  gap: 9px;
  align-items: end;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f7f9fc;
}
.simple-tasks-page .completed-filter-bar label { display:grid; gap:5px; min-width:0; }
.simple-tasks-page .completed-filter-bar label > span { color:#68768a; font-size:.67rem; font-weight:800; text-transform:uppercase; letter-spacing:.045em; }
.simple-tasks-page .completed-filter-bar input,
.simple-tasks-page .completed-filter-bar select {
  width:100%; min-width:0; height:39px; padding:0 11px; border:1px solid #d5dde8; border-radius:10px; background:#fff; color:#26354a; font:inherit; font-size:.78rem; font-weight:700;
}
.simple-tasks-page .completed-filter-search { position:relative; align-self:end; }
.simple-tasks-page .completed-filter-search svg { position:absolute; left:11px; bottom:11px; width:16px; height:16px; color:#748197; pointer-events:none; }
.simple-tasks-page .completed-filter-search input { padding-left:35px; }
.simple-tasks-page .completed-clear-filters { height:39px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0 12px; border:1px solid #d5dde8; border-radius:10px; background:#fff; color:#59687d; font-size:.76rem; font-weight:800; white-space:nowrap; }
.simple-tasks-page .completed-clear-filters svg { width:15px; height:15px; }
.simple-tasks-page .completed-task-copy small { display:flex; align-items:center; gap:5px; margin-top:8px; color:#7b8798; font-size:.69rem; font-weight:700; }
.simple-tasks-page .completed-task-copy small svg { width:13px; height:13px; }
.simple-tasks-page .completed-filter-empty { display:grid; justify-items:center; gap:7px; padding:48px 20px; border:1px dashed #d8e0ea; border-radius:16px; color:#718096; text-align:center; }
.simple-tasks-page .completed-filter-empty svg { width:28px; height:28px; }
.simple-tasks-page .completed-filter-empty h3 { margin:0; color:#334155; font-size:.95rem; }
.simple-tasks-page .completed-filter-empty p { margin:0; font-size:.78rem; }
@media (max-width:1400px){.simple-tasks-page .completed-filter-bar{grid-template-columns:minmax(210px,1.4fr) repeat(3,minmax(135px,1fr));}.simple-tasks-page .completed-clear-filters{justify-self:start;}}
@media (max-width:850px){.simple-tasks-page .completed-filter-bar{grid-template-columns:repeat(2,minmax(0,1fr));}.simple-tasks-page .completed-filter-search{grid-column:1/-1;}}
@media (max-width:560px){.simple-tasks-page .completed-filter-bar{grid-template-columns:1fr;}.simple-tasks-page .completed-filter-search{grid-column:auto;}}

/* July 2026: compact completed filters, quieter headers and one-line card footer. */
.simple-tasks-page .completed-filter-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 7px !important;
  width: 100% !important;
  margin: 0 0 14px !important;
  padding: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
  border-radius: 12px !important;
}
.simple-tasks-page .completed-filter-control {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
}
.simple-tasks-page .completed-filter-control > svg {
  position: absolute !important;
  z-index: 2 !important;
  left: 10px !important;
  top: 50% !important;
  width: 15px !important;
  height: 15px !important;
  transform: translateY(-50%) !important;
  color: #748197 !important;
  pointer-events: none !important;
}
.simple-tasks-page .completed-filter-control input,
.simple-tasks-page .completed-filter-control select {
  height: 36px !important;
  min-width: 0 !important;
  padding: 0 30px 0 31px !important;
  border-radius: 9px !important;
  font-size: .75rem !important;
  line-height: 1 !important;
}
.simple-tasks-page .completed-filter-search { flex: 1 1 210px !important; min-width: 170px !important; max-width: 310px !important; }
.simple-tasks-page .completed-filter-search input { width: 100% !important; }
.simple-tasks-page .completed-filter-date input { width: 142px !important; }
.simple-tasks-page .completed-filter-control select { width: 142px !important; }
.simple-tasks-page .completed-filter-order select { width: 128px !important; }
.simple-tasks-page .completed-clear-filters {
  flex: 0 0 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 9px !important;
}
.simple-tasks-page .completed-clear-filters svg { width: 16px !important; height: 16px !important; }
.simple-tasks-page .completed-filter-bar .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* List headings remain charcoal; section headings are one step lighter. */
.simple-tasks-page .workspace-list-head { background: #4b4b4b !important; }
.simple-tasks-page .workspace-section-head,
.simple-tasks-page .workspace-section-head.agenda-section-head { background: #606060 !important; }

/* Header controls should read as icons, not boxed buttons. */
.simple-tasks-page .workspace-list-head .workspace-menu-trigger,
.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list],
.simple-tasks-page .workspace-section-head .workspace-menu-trigger,
.simple-tasks-page .workspace-section-head > [data-toggle-workspace-section] {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.simple-tasks-page .workspace-list-head .workspace-menu-trigger:hover,
.simple-tasks-page .workspace-list-head > [data-toggle-workspace-list]:hover,
.simple-tasks-page .workspace-section-head .workspace-menu-trigger:hover,
.simple-tasks-page .workspace-section-head > [data-toggle-workspace-section]:hover {
  background: rgba(255,255,255,.08) !important;
  border-radius: 6px !important;
}

/* Keep every card action and metadata item on one line. */
.simple-tasks-page .workspace-task-card .workspace-card-footer {
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  gap: 4px !important;
  min-width: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-tools {
  flex: 0 0 auto !important;
  gap: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-tools .row-icon-btn,
.simple-tasks-page .workspace-task-card .workspace-card-tools .workspace-card-drag,
.simple-tasks-page .workspace-task-card .workspace-card-tools .workspace-card-complete,
.simple-tasks-page .workspace-task-card .workspace-card-tools .workspace-card-remove {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-card-tools svg { width: 14px !important; height: 14px !important; }
.simple-tasks-page .workspace-task-card .workspace-task-meta {
  flex: 0 1 auto !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  margin-left: auto !important;
  min-width: 0 !important;
}
.simple-tasks-page .workspace-task-card .workspace-task-meta > span {
  flex: 0 0 auto !important;
  min-height: 22px !important;
  padding: 1px 4px !important;
  gap: 3px !important;
  font-size: .68rem !important;
}
.simple-tasks-page .workspace-task-card .workspace-status-icon {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  justify-content: center !important;
}
.simple-tasks-page .workspace-task-card .workspace-status-icon svg,
.simple-tasks-page .workspace-task-card .workspace-task-meta svg { width: 13px !important; height: 13px !important; }

/* Completed filters stay interactive while live task snapshots arrive. */
.simple-tasks-page .completed-filter-bar { isolation: isolate; }

/* Section collapse control is intentionally bare; list/section menus remain clickable without boxed chrome. */
.simple-tasks-page .workspace-section-head [data-toggle-workspace-section] {
  width: 24px !important;
  min-width: 24px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.simple-tasks-page .workspace-section-head [data-toggle-workspace-section]:hover,
.simple-tasks-page .workspace-section-head [data-toggle-workspace-section]:focus-visible {
  background: rgba(255,255,255,.10) !important;
}


/* Access, invitation and two-factor authentication */
.login-link-btn { border: 0; background: transparent; color: #58677f; font: inherit; font-weight: 700; cursor: pointer; padding: 8px; }
.login-help { color: #65738a; line-height: 1.5; font-size: .92rem; }
.access-card h1 { margin: 8px 0; color: #17233a; }
.security-panel { max-width: 760px; margin: 20px 0; }
.mfa-qr { width: 244px; min-height: 244px; display: grid; place-items: center; border: 1px solid #d9e0ea; border-radius: 16px; background: white; margin: 16px 0; }
.mfa-confirm-row { display: flex; gap: 10px; align-items: center; max-width: 420px; }
.mfa-confirm-row input { max-width: 180px; letter-spacing: .25em; font-size: 1.25rem; text-align: center; }

/* Clubwiser-hosted Firebase email action screen */
.auth-action-card {
  min-height: 0;
}
.auth-action-copy {
  text-align: center;
  color: #fff;
}
.auth-action-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.1;
}
.auth-action-copy p {
  margin: 0 0 18px;
  color: rgba(255,255,255,.82);
  line-height: 1.45;
}
.auth-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}


/* Clubwiser auth paint guard: protected screens remain invisible until Firebase access resolves. */
/* Fast application boot: never blank the complete Clubwiser shell while Firebase verifies access. */
html.auth-pending,
html.app-booting { background: #f5f6f8; }
html.auth-pending body,
html.app-booting body { visibility: visible !important; }

/* Organisation and user identity must never be painted from an unverified
   access snapshot. Keep their space reserved until context hydration finishes. */
body:not(.clubwiser-ready):not(.clubwiser-cache-aligned) .account-switcher-shell,
body:not(.clubwiser-ready):not(.clubwiser-cache-aligned) .account-user-row {
  visibility: hidden !important;
}
html.auth-pending main,
html.app-booting main { opacity: 1; }
html.auth-pending main::after,
html.app-booting main::after {
  content: "";
  position: fixed;
  top: 0;
  left: var(--sidebar-width, 260px);
  right: 0;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, transparent, var(--accent, #ef7d21), transparent);
  background-size: 220% 100%;
  animation: clubwiserBootBar 1.05s linear infinite;
}
@keyframes clubwiserBootBar { from { background-position: 100% 0; } to { background-position: -100% 0; } }
html.clubwiser-auth-ready main,
body.clubwiser-ready main { opacity: 1; }
body.is-navigating main { opacity: 1; pointer-events: none; }
body.is-navigating::after {
  content: "";
  position: fixed;
  inset: 0 0 auto var(--sidebar-width, 260px);
  height: 3px;
  z-index: 10000;
  background: var(--accent, #ef7d21);
  transform-origin: left;
  animation: clubwiserNavProgress .55s ease-out forwards;
}
@keyframes clubwiserNavProgress { from { transform: scaleX(.08); opacity: .65; } to { transform: scaleX(.88); opacity: 1; } }
@media (max-width: 950px) {
  html.auth-pending main::after,
  html.app-booting main::after,
  body.is-navigating::after { left: 0; }
}


/* Task scheduler and estimates */
.task-waiting-fields{display:grid;grid-template-columns:1fr 180px;gap:14px;padding:14px;border:1px solid var(--line,#dfe3e8);background:#f8f9fa;border-radius:10px}.task-waiting-fields:not(.is-active){opacity:.72}.task-subtask-row{grid-template-columns:26px minmax(180px,1fr) 86px 132px 34px 34px!important;align-items:center}.task-subtask-estimate,.task-subtask-schedule{height:34px;border:1px solid var(--line,#dfe3e8);border-radius:7px;background:#fff;padding:0 8px;font:inherit;font-size:12px}.task-subtask-wait.is-active{background:#fff3d6;color:#9a6200}.subtask-waiting-editor{grid-column:2/-1;display:grid;grid-template-columns:1fr 150px 1.4fr;gap:8px;padding:10px;background:#f7f8f9;border:1px solid var(--line,#dfe3e8);border-radius:8px}.subtask-waiting-editor[hidden]{display:none}.subtask-waiting-editor input{min-width:0;height:34px;border:1px solid var(--line,#dfe3e8);border-radius:7px;padding:0 10px}.workspace-scheduler-toggle{margin-left:2px}.task-scheduler-card{width:min(820px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 40px));overflow:auto}.task-scheduler-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:4px 0 16px}.task-scheduler-controls #schedulerDate{height:38px;border:1px solid var(--line,#dfe3e8);border-radius:8px;padding:0 10px}.scheduler-time-filter{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:13px;color:var(--muted,#667085)}.scheduler-time-filter select{height:38px;border:1px solid var(--line,#dfe3e8);border-radius:8px;background:#fff;padding:0 34px 0 10px}.task-scheduler-summary{display:flex;align-items:center;gap:20px;padding:13px 16px;background:#f6f7f8;border:1px solid var(--line,#dfe3e8);border-radius:10px;margin-bottom:14px}.task-scheduler-summary div{display:flex;align-items:baseline;gap:6px}.task-scheduler-summary strong{font-size:18px}.task-scheduler-summary span,.task-scheduler-summary p{font-size:12px;color:var(--muted,#667085)}.task-scheduler-summary p{margin-left:auto}.task-scheduler-list{display:grid;gap:8px}.scheduler-item{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line,#dfe3e8);border-radius:10px;background:#fff}.scheduler-item.is-scheduled{border-color:#bdc7bf;background:#f7faf7}.scheduler-check{width:30px;height:30px;border-radius:8px;border:1px solid #cfd5db;background:#fff;display:grid;place-items:center}.scheduler-item.is-scheduled .scheduler-check{background:#26342d;color:#fff;border-color:#26342d}.scheduler-check svg{width:16px}.scheduler-item-main{min-width:0}.scheduler-item-main strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduler-kind{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#78808a;font-weight:700}.scheduler-item-main small{display:block;color:#737b84;margin-top:2px}.scheduler-item-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:7px}.scheduler-item-meta span{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#68717b}.scheduler-item-meta svg{width:13px;height:13px}.scheduler-item-meta .is-waiting{color:#8a5a08}.scheduler-empty{padding:36px;text-align:center;display:grid;justify-items:center;gap:7px;color:#737b84}.scheduler-empty svg{width:30px;height:30px}.scheduler-empty strong{color:#26313b}@media(max-width:760px){.task-waiting-fields,.subtask-waiting-editor{grid-template-columns:1fr}.task-subtask-row{grid-template-columns:26px minmax(130px,1fr) 78px 34px 34px!important}.task-subtask-schedule{grid-column:2/-1}.scheduler-time-filter{margin-left:0;width:100%}.scheduler-item{grid-template-columns:34px 1fr}.scheduler-open-task{grid-column:2}.task-scheduler-summary{gap:10px;flex-wrap:wrap}.task-scheduler-summary p{width:100%;margin:0}} 


/* July 2026 task modal tabs, compact subtask tools and centred day planner */
.task-scheduler-modal.open{
  position:fixed!important;inset:0!important;width:auto!important;max-width:none!important;height:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;padding:22px!important;
  background:rgba(20,31,50,.44)!important;z-index:10040!important;border-radius:0!important;box-shadow:none!important;
}
.task-scheduler-modal:not(.open){display:none!important}
.task-scheduler-modal .task-scheduler-card{position:relative!important;margin:0!important;width:min(860px,calc(100vw - 44px))!important;max-height:calc(100vh - 44px)!important;overflow:auto!important;background:#fff!important;border-radius:18px!important;box-shadow:0 28px 85px rgba(15,31,51,.28)!important;padding:22px!important}
.task-scheduler-modal .modal-header{position:sticky;top:-22px;z-index:4;margin:-22px -22px 18px!important;padding:20px 22px 16px!important;background:rgba(255,255,255,.98);border-bottom:1px solid #e5eaf0}

.task-modal .task-edit-card{overflow:hidden!important;display:flex;flex-direction:column}
.task-modal .task-tabbed-form{display:flex!important;flex-direction:column!important;gap:0!important;padding:0!important;min-height:0;overflow:hidden}
.task-modal-tabs{display:flex;gap:4px;padding:0 24px;border-bottom:1px solid #e3e8ef;background:#fff;flex:0 0 auto}
.task-modal-tabs button{appearance:none;border:0;background:transparent;color:#69768a;display:inline-flex;align-items:center;gap:7px;padding:12px 14px 11px;font:inherit;font-size:.82rem;font-weight:600;border-bottom:2px solid transparent;cursor:pointer}
.task-modal-tabs button svg{width:16px;height:16px}
.task-modal-tabs button.active{color:#1f2c3e;border-bottom-color:#ff8a1f}
.task-modal-tabs em{font-style:normal;display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#eef1f5;color:#657188;font-size:.68rem}
.task-modal-tabs button.active em{background:#fff0e2;color:#c9650c}
.task-tab-panel{display:none;min-height:0;overflow:auto;padding:20px 24px 22px}
.task-tab-panel.active{display:block}
.task-tab-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.task-tab-grid .full-span{grid-column:1/-1}
.task-modal .task-subtasks-field,.task-modal .task-attachments-field{border:0!important;background:transparent!important;padding:0!important}
.task-modal .modal-actions{position:relative!important;bottom:auto!important;margin:0!important;padding:14px 24px!important;flex:0 0 auto}
.task-waiting-fields{grid-template-columns:1fr 180px!important;padding:14px!important}
.task-waiting-heading{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin-bottom:1px;color:#5d6879}
.task-waiting-heading>i{width:18px;height:18px;color:#b56b12}
.task-waiting-heading strong{display:block;font-size:.82rem;color:#303d50}.task-waiting-heading span{font-size:.72rem;color:#7a8595}

.task-modal .task-subtask-editor{display:grid;gap:8px}
.task-modal .task-subtask-row{display:grid!important;grid-template-columns:22px minmax(180px,1fr) auto!important;align-items:center!important;gap:9px!important;padding:8px 9px!important;border:1px solid #e1e7ee;border-radius:11px;background:#f8fafc}
.task-modal .task-subtask-title{border-color:transparent!important;background:transparent!important;padding-left:8px!important}
.task-modal .task-subtask-title:focus{background:#fff!important;border-color:#c9d3df!important}
.subtask-inline-tools{display:flex;align-items:center;gap:5px;white-space:nowrap}
.subtask-tool{height:34px;display:inline-flex;align-items:center;gap:4px;border:1px solid #d8dfe8;border-radius:8px;background:#fff;color:#68758a;padding:0 6px}
.subtask-tool>svg{width:14px;height:14px;flex:0 0 auto}
.task-modal .subtask-tool select,.task-modal .subtask-tool input{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;min-height:30px!important;height:30px!important;padding:0 2px!important;font-size:.73rem!important;width:auto!important}
.task-modal .subtask-tool select{max-width:62px}.task-modal .subtask-date-tool input{width:118px!important}
.task-modal .subtask-inline-tools .row-icon-btn{width:34px!important;height:34px!important;min-width:34px!important;border:1px solid #d8dfe8!important;border-radius:8px!important;background:#fff!important}
.task-modal .subtask-inline-tools .task-subtask-wait.is-active{background:#fff4df!important;border-color:#e9c178!important;color:#9a6200!important}
.task-modal .subtask-waiting-editor{grid-column:2/-1!important;display:grid;grid-template-columns:1fr 150px 1.35fr;gap:9px;padding:11px 12px;margin-top:1px;background:#fff8ec;border:1px solid #eed7ac;border-radius:9px}
.task-modal .subtask-waiting-editor[hidden]{display:none!important}.task-modal .subtask-waiting-editor label{display:grid;gap:4px}.task-modal .subtask-waiting-editor span{font-size:.67rem;font-weight:600;color:#876226}
.task-modal .subtask-waiting-editor input{height:34px!important;min-height:34px!important;padding:7px 9px!important;font-size:.77rem!important}

@media(max-width:760px){
 .task-scheduler-modal.open{padding:8px!important}.task-scheduler-modal .task-scheduler-card{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;padding:16px!important}.task-scheduler-modal .modal-header{top:-16px;margin:-16px -16px 15px!important;padding:16px!important}
 .task-modal-tabs{padding:0 12px}.task-modal-tabs button{padding:11px 9px;font-size:.76rem}.task-tab-panel{padding:16px}.task-tab-grid{grid-template-columns:1fr}.task-tab-grid .full-span{grid-column:1}
 .task-modal .task-subtask-row{grid-template-columns:22px minmax(0,1fr)!important}.subtask-inline-tools{grid-column:2;flex-wrap:wrap}.task-modal .subtask-waiting-editor{grid-column:2!important;grid-template-columns:1fr}.task-modal .subtask-date-tool input{width:112px!important}
 .task-modal .modal-actions{padding:12px 16px!important}
}

/* July 2026 task modal refinement: fixed planner close, persistent status bar and larger content area */
.task-scheduler-modal .modal-header .icon-btn{
  position:relative!important;z-index:12!important;pointer-events:auto!important;cursor:pointer!important;
}
.task-scheduler-modal .scheduler-item{grid-template-columns:36px minmax(0,1fr)!important}
.task-scheduler-modal .scheduler-item-main{padding-right:4px}

.task-modal .task-edit-card{
  width:min(980px,calc(100vw - 36px))!important;
  max-width:980px!important;
  height:min(88vh,820px)!important;
  max-height:min(88vh,820px)!important;
}
.task-modal .modal-header{
  position:relative!important;
  flex:0 0 auto!important;
  padding:16px 24px 13px!important;
}
.task-modal .modal-header h2{font-size:1.3rem!important}
.task-modal .task-tabbed-form{flex:1 1 auto!important;min-height:0!important}
.task-modal-quickbar{
  display:flex;align-items:center;gap:10px;padding:10px 24px;
  border-bottom:1px solid #e3e8ef;background:#f8fafc;flex:0 0 auto;
}
.task-modal-quickbar label{display:flex;align-items:center;gap:7px;margin:0;color:#5f6d80;font-size:.72rem;font-weight:650}
.task-modal-quickbar select{
  width:auto!important;min-width:128px!important;min-height:34px!important;height:34px!important;
  padding:5px 30px 5px 9px!important;border-radius:8px!important;font-size:.78rem!important;background:#fff!important;
}
.task-modal-tabs{padding:0 24px!important;flex:0 0 auto!important}
.task-modal-tabs button{padding:10px 13px 9px!important}
.task-modal-content{flex:1 1 auto;min-height:0;overflow:hidden;background:#fff}
.task-modal-content .task-tab-panel{
  height:100%;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;
  padding:16px 24px 18px!important;
}
.task-modal-content .task-tab-panel.active{display:block!important}
.task-modal .task-tab-grid{gap:10px 14px!important}
.task-modal textarea{min-height:72px!important}
.task-modal .task-waiting-fields{padding:11px!important;gap:10px!important}
.task-modal .modal-actions{padding:11px 24px!important;min-height:62px!important}
.task-placement-intro{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #e1e7ee;border-radius:10px;background:#f8fafc;color:#5d6879}
.task-placement-intro>i{width:18px;height:18px;color:#ff8a1f}
.task-placement-intro strong{display:block;font-size:.83rem;color:#303d50}
.task-placement-intro span{display:block;margin-top:2px;font-size:.73rem;color:#7a8595}

@media(max-width:760px){
  .task-modal .task-edit-card{height:calc(100vh - 16px)!important;max-height:calc(100vh - 16px)!important}
  .task-modal .modal-header{padding:13px 16px 11px!important}
  .task-modal-quickbar{padding:8px 16px;flex-wrap:wrap}
  .task-modal-quickbar label{flex:1 1 145px}
  .task-modal-quickbar select{width:100%!important;min-width:0!important}
  .task-modal-tabs{padding:0 8px!important;overflow-x:auto}
  .task-modal-tabs button{padding:10px 8px 9px!important;white-space:nowrap}
  .task-modal-content .task-tab-panel{padding:14px 16px 16px!important}
}

/* July 2026 task modal density and activity timeline */
.task-modal .task-edit-card{
  width:min(1040px,calc(100vw - 24px))!important;
  max-width:1040px!important;
  height:min(94vh,900px)!important;
  max-height:min(94vh,900px)!important;
  border-radius:16px!important;
}
.task-modal .task-modal-header{
  display:grid!important;
  grid-template-columns:minmax(190px,1fr) auto 42px!important;
  align-items:center!important;
  gap:14px!important;
  padding:10px 18px 9px!important;
  min-height:68px!important;
}
.task-modal .task-modal-heading .eyebrow{margin-bottom:1px!important;font-size:.67rem!important}
.task-modal .task-modal-heading h2{font-size:1.18rem!important;line-height:1.15!important;margin:0!important}
.task-modal .task-modal-quickbar{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;
  padding:0!important;border:0!important;background:transparent!important;
}
.task-modal .task-modal-quickbar label{display:flex!important;align-items:center!important;gap:5px!important;margin:0!important;font-size:.66rem!important}
.task-modal .task-modal-quickbar label span{color:#68758a;font-weight:650}
.task-modal .task-modal-quickbar select{
  min-width:112px!important;width:auto!important;height:32px!important;min-height:32px!important;
  padding:4px 27px 4px 8px!important;border-radius:7px!important;font-size:.75rem!important;
}
.task-modal .task-modal-tabs{padding:0 18px!important;min-height:42px!important}
.task-modal .task-modal-tabs button{padding:9px 11px 8px!important;font-size:.78rem!important}
.task-modal .task-modal-content .task-tab-panel{padding:12px 18px 14px!important}
.task-modal .task-tab-grid{gap:8px 12px!important}
.task-modal .form-field{gap:4px!important}
.task-modal .form-field input,.task-modal .form-field select{min-height:38px!important;height:38px!important;padding-top:7px!important;padding-bottom:7px!important}
.task-modal .form-field textarea{min-height:94px!important;padding:9px 11px!important}
.task-modal .task-waiting-fields{padding:9px 11px!important;gap:8px 10px!important}
.task-modal .task-waiting-heading{margin:0!important}
.task-modal .modal-actions{padding:8px 18px!important;min-height:54px!important}
.task-modal .modal-actions .primary-btn{min-height:38px!important;padding:8px 15px!important}
.task-modal .task-subtasks-heading{margin-bottom:8px!important}
.task-modal .task-placement-intro{padding:9px 11px!important}

.task-activity-layout{display:grid;gap:14px;max-width:860px}
.task-comment-composer{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start;padding-bottom:13px;border-bottom:1px solid #e5eaf0}
.task-activity-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eef2f6;color:#425066;font-size:.72rem;font-weight:750;flex:0 0 auto}
.task-comment-input-wrap{border:1px solid #d9e0e8;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 8px rgba(24,39,60,.04)}
.task-comment-input-wrap textarea{width:100%;min-height:64px!important;border:0!important;border-radius:0!important;resize:vertical;padding:10px 11px!important;box-shadow:none!important}
.task-comment-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 8px 7px 11px;border-top:1px solid #edf0f4;background:#fafbfd}
.task-comment-actions span{font-size:.68rem;color:#7a8595}
.task-comment-actions .primary-btn{min-height:32px!important;padding:6px 10px!important}
.task-activity-list{display:grid;gap:12px}
.task-activity-item{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start}
.task-activity-body{min-width:0;padding:1px 0 11px;border-bottom:1px solid #edf0f4}
.task-activity-meta{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.task-activity-meta strong{font-size:.79rem;color:#263448}
.task-activity-meta span{font-size:.67rem;color:#8a94a3}
.task-activity-body p{margin:4px 0 0;font-size:.79rem;line-height:1.45;color:#4d5a6d;white-space:pre-wrap}
.task-activity-item.is-comment .task-activity-body p{display:inline-block;padding:8px 10px;border-radius:9px;background:#f3f6f9;color:#29384c}
.task-activity-empty{display:grid;justify-items:center;text-align:center;gap:5px;padding:36px 18px;color:#7b8796}
.task-activity-empty svg{width:25px;height:25px}.task-activity-empty strong{font-size:.84rem;color:#3b485a}.task-activity-empty span{font-size:.74rem}

@media(max-width:760px){
  .task-modal .task-edit-card{width:calc(100vw - 8px)!important;height:calc(100vh - 8px)!important;max-height:calc(100vh - 8px)!important}
  .task-modal .task-modal-header{grid-template-columns:minmax(120px,1fr) 38px!important;padding:9px 12px 8px!important;gap:8px!important}
  .task-modal .task-modal-quickbar{grid-column:1/-1;grid-row:2;justify-content:stretch!important}
  .task-modal .task-modal-quickbar label{flex:1 1 0}
  .task-modal .task-modal-quickbar select{width:100%!important;min-width:0!important}
  .task-modal .task-modal-header>.icon-btn{grid-column:2;grid-row:1}
  .task-modal .task-modal-tabs{padding:0 6px!important}
  .task-modal .task-modal-content .task-tab-panel{padding:10px 12px 12px!important}
  .task-comment-composer{grid-template-columns:28px minmax(0,1fr)}
  .task-activity-avatar{width:28px;height:28px;font-size:.64rem}
  .task-comment-actions span{display:none}
}


/* Google Calendar day-planner integration */
.task-calendar-connect{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;border-top:1px solid var(--line,#dfe5ec);border-bottom:1px solid var(--line,#dfe5ec);background:#fff}.task-calendar-connect-copy{display:flex;align-items:center;gap:11px;min-width:0}.task-calendar-connect-copy>svg{width:21px;height:21px;color:#ff7a00;flex:none}.task-calendar-connect-copy div{display:grid;gap:2px}.task-calendar-connect-copy strong{font-size:14px}.task-calendar-connect-copy span{font-size:12px;color:#65758b}.task-calendar-connect-actions{display:flex;align-items:center;gap:8px;flex:none}.task-calendar-connect-actions select{max-width:220px;height:38px}.task-calendar-day{padding:12px 16px;background:#f7f9fb;border-bottom:1px solid var(--line,#dfe5ec)}.calendar-day-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:12px;color:#65758b}.calendar-day-heading strong{font-size:13px;color:#1e293b}.calendar-event-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.calendar-event{min-width:180px;max-width:250px;padding:9px 11px;border:1px solid #d9e1ea;background:#fff;border-radius:8px;display:grid;gap:2px}.calendar-event.is-clubwiser{border-left:3px solid #ff7a00}.calendar-event span,.calendar-event small{font-size:11px;color:#6b788b}.calendar-event strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-day-loading,.calendar-day-empty{display:flex;align-items:center;gap:10px;min-height:48px;color:#65758b;font-size:12px}.calendar-day-loading svg{animation:cw-spin 1s linear infinite}.calendar-day-empty div{display:grid}.scheduler-calendar-time{display:flex;align-items:center;gap:8px;margin-top:9px}.scheduler-calendar-time label{display:flex;align-items:center;gap:5px;border:1px solid #d9e1ea;border-radius:7px;padding:0 8px;height:34px;background:#fff}.scheduler-calendar-time label svg{width:14px;height:14px;color:#6b788b}.scheduler-calendar-time input{border:0;padding:0;width:78px;height:30px;background:transparent}.scheduler-calendar-time .small-btn{height:34px;padding:0 10px}.scheduler-calendar-time .small-btn svg{width:15px;height:15px}@keyframes cw-spin{to{transform:rotate(360deg)}}@media(max-width:760px){.task-calendar-connect{align-items:flex-start;flex-direction:column}.task-calendar-connect-actions{width:100%;flex-wrap:wrap}.task-calendar-connect-actions select{max-width:none;flex:1}.scheduler-calendar-time{flex-wrap:wrap}}

/* July 2026 split calendar day planner */
.task-scheduler-modal .task-scheduler-card{
  width:min(1320px,calc(100vw - 30px))!important;
  height:min(900px,calc(100vh - 30px))!important;
  max-height:calc(100vh - 30px)!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.task-scheduler-modal .modal-header{
  position:relative!important;top:auto!important;margin:0!important;padding:14px 18px 12px!important;flex:0 0 auto;
}
.task-scheduler-modal .task-scheduler-controls{padding:10px 18px!important;border-bottom:1px solid #e5eaf0;margin:0!important;flex:0 0 auto;background:#fff}
.task-calendar-connect{padding:9px 18px!important;flex:0 0 auto}
.task-calendar-connect-copy span{max-width:510px}
.task-calendar-connect-actions{position:relative;flex-wrap:wrap;justify-content:flex-end}
.calendar-write-select{display:flex;align-items:center;gap:7px;font-size:11px;color:#65758b;font-weight:650}
.calendar-write-select select{height:34px!important;max-width:190px!important;border:1px solid #d9e1ea;border-radius:7px;background:#fff;padding:0 28px 0 9px;font:inherit;font-size:12px}
.calendar-picker{position:relative}
.calendar-picker #toggleCalendarPicker{gap:6px}
.calendar-picker #toggleCalendarPicker svg:last-child{width:13px;height:13px}
.calendar-picker-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:30;width:280px;max-height:310px;overflow:auto;padding:7px;background:#fff;border:1px solid #dce3eb;border-radius:10px;box-shadow:0 18px 45px rgba(22,36,55,.18)}
.calendar-picker-menu[hidden]{display:none!important}
.calendar-picker-menu label{display:flex;align-items:center;gap:9px;padding:8px;border-radius:7px;cursor:pointer;font-size:12px;color:#334155}
.calendar-picker-menu label:hover{background:#f5f7fa}
.calendar-picker-menu input{width:15px;height:15px;accent-color:#ff7a00}
.calendar-picker-menu span{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calendar-picker-menu em{font-style:normal;font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#8a94a3}
.task-planner-split{display:grid;grid-template-columns:minmax(360px,42%) minmax(480px,58%);min-height:0;flex:1 1 auto;overflow:hidden}
.task-planner-task-pane,.task-planner-calendar-pane{display:flex;flex-direction:column;min-height:0;overflow:hidden;background:#fff}
.task-planner-task-pane{border-right:1px solid #e2e7ed}
.task-planner-pane-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:53px;padding:10px 14px;border-bottom:1px solid #e6ebf0;background:#fafbfd;flex:0 0 auto}
.task-planner-pane-heading>div{display:grid;gap:2px}
.task-planner-pane-heading strong{font-size:13px;color:#273548}
.task-planner-pane-heading span{font-size:11px;color:#748094}
.task-scheduler-summary{margin:0!important;padding:8px 14px!important;border:0!important;border-bottom:1px solid #e6ebf0!important;border-radius:0!important;min-height:44px;flex:0 0 auto}
.task-scheduler-list{padding:10px 12px 18px;overflow-y:auto;min-height:0;align-content:start}
.scheduler-item{grid-template-columns:32px minmax(0,1fr) 22px!important;padding:9px 10px!important;gap:8px!important;border-radius:9px!important;cursor:grab}
.scheduler-item:active{cursor:grabbing}
.scheduler-item.is-dragging{opacity:.45}
.scheduler-drag-handle{display:grid;place-items:center;color:#a0a9b6}
.scheduler-drag-handle svg{width:16px;height:16px}
.scheduler-calendar-time{margin-top:7px!important}
.scheduler-calendar-time .small-btn span{display:inline}
.task-planner-calendar-pane .task-calendar-day{display:block!important;flex:1 1 auto;min-height:0;overflow:auto;padding:0 10px 20px 0!important;background:#fff!important;border:0!important}
.calendar-day-loading,.calendar-day-empty{min-height:240px;justify-content:center}
.planner-all-day{display:grid;grid-template-columns:66px minmax(0,1fr);gap:8px;padding:8px 10px;border-bottom:1px solid #e5eaf0;background:#fafbfd;position:sticky;top:0;z-index:8}
.planner-all-day>span{font-size:10px;color:#8590a0;text-align:right;padding-top:6px}
.planner-all-day>div{display:flex;gap:6px;flex-wrap:wrap}
.planner-all-day article{display:flex;align-items:center;gap:7px;padding:5px 8px;border:1px solid #dce4ec;border-left:3px solid #8d99a8;border-radius:6px;background:#fff;min-width:150px}
.planner-all-day strong{font-size:11px}.planner-all-day small{font-size:9px;color:#7b8797}
.planner-timeline{position:relative;height:1024px;min-width:470px;margin-left:0;background:#fff}
.planner-time-slot{position:absolute;left:0;right:0;height:3.125%;border-top:1px solid #edf0f4;display:grid;grid-template-columns:66px minmax(0,1fr);z-index:1}
.planner-time-slot.is-hour{border-top-color:#dfe5eb}
.planner-time-slot>span{font-size:10px;color:#7d8898;text-align:right;padding:0 9px;transform:translateY(-7px);background:#fff}
.planner-time-slot>button{border:0;background:transparent;cursor:crosshair;position:relative}
.planner-time-slot>button:hover,.planner-time-slot.is-drag-over>button{background:rgba(255,122,0,.08);outline:2px dashed rgba(255,122,0,.45);outline-offset:-2px}
.planner-time-slot.is-drag-over>button:after{content:'Drop to schedule';position:absolute;left:12px;top:7px;font-size:10px;font-weight:700;color:#bc5d08}
.planner-events-layer{position:absolute;left:74px;right:8px;top:0;bottom:0;pointer-events:none;z-index:3}
.planner-calendar-event{position:absolute;left:0;right:0;min-height:28px;padding:5px 8px;border:1px solid #cfd9e5;border-left:4px solid #77869a;border-radius:6px;background:#eef3f8;overflow:hidden;display:grid;align-content:start;gap:1px;box-shadow:0 1px 2px rgba(26,41,61,.06)}
.planner-calendar-event.is-clubwiser{border-left-color:#ff7a00;background:#fff3e8}
.planner-calendar-event span{font-size:9px;color:#65758b}.planner-calendar-event strong{font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.planner-calendar-event small{font-size:9px;color:#7a8595;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:900px){
  .task-scheduler-modal .task-scheduler-card{width:calc(100vw - 12px)!important;height:calc(100vh - 12px)!important;max-height:calc(100vh - 12px)!important}
  .task-planner-split{grid-template-columns:1fr;grid-template-rows:minmax(270px,42%) minmax(360px,58%)}
  .task-planner-task-pane{border-right:0;border-bottom:1px solid #e2e7ed}
  .task-calendar-connect{align-items:flex-start!important}.task-calendar-connect-actions{width:100%;justify-content:flex-start!important}
  .calendar-write-select{flex:1 1 220px}.calendar-write-select select{max-width:none!important;flex:1}
}

/* Compact calendar planner toolbar */
.task-scheduler-modal .task-scheduler-controls{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:9px 18px!important;
  flex-wrap:wrap!important;
}
.planner-calendar-controls{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}
.planner-control-button,
.planner-control-select{
  min-height:38px;
  border:1px solid #d5dde7;
  border-radius:999px;
  background:#fff;
  color:#344054;
  font:inherit;
  font-size:12px;
  font-weight:700;
}
.planner-control-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 13px;cursor:pointer}
.planner-control-button:hover{background:#f6f8fa;border-color:#bfc9d6}
.planner-control-button svg{width:15px;height:15px}
.planner-control-select{display:flex;align-items:center;gap:7px;padding:0 5px 0 12px}
.planner-control-select>span{white-space:nowrap;color:#667085;font-size:11px}
.planner-control-select select{height:32px;max-width:175px;border:0!important;background:transparent!important;padding:0 28px 0 4px!important;font-weight:700;color:#243041;outline:0}
.planner-disconnect{width:38px;padding:0}
.planner-disconnect span{display:none}
.planner-calendar-status{display:none}
.task-scheduler-modal .calendar-picker #toggleCalendarPicker{border-radius:999px!important;min-height:38px!important;padding:0 13px!important;background:#fff!important;color:#344054!important;border:1px solid #d5dde7!important}
.task-scheduler-modal .scheduler-time-filter{margin-left:auto}
.task-scheduler-modal .scheduler-time-filter select{border-radius:999px!important}
.task-scheduler-modal #schedulerDate{border-radius:999px!important}
@media(max-width:1100px){
  .task-scheduler-modal .scheduler-time-filter{margin-left:0}
  .planner-control-select select{max-width:140px}
}
@media(max-width:760px){
  .planner-calendar-controls{width:100%;order:3}
  .planner-control-select{flex:1}
  .planner-control-select select{max-width:none;min-width:0;width:100%}
}


/* Planner reliability and all-day overview */
.task-planner-calendar-pane .task-planner-pane-heading{padding-right:14px!important}
.planner-day-overview{border-bottom:1px solid #e4e8ed;background:#fafbfc;padding:9px 12px 10px;position:sticky;top:0;z-index:8}
.planner-day-overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}
.planner-day-overview-heading strong{font-size:12px;color:#253143}.planner-day-overview-heading span{font-size:10px;color:#758196}
.planner-agenda-list{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.planner-agenda-item{flex:0 0 auto;max-width:245px;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:7px;row-gap:1px;align-items:center;border:1px solid #dbe2ea;border-left:3px solid #77869a;border-radius:7px;background:#fff;padding:6px 8px}
.planner-agenda-item.is-clubwiser{border-left-color:#ff7a00;background:#fff8f1}
.planner-agenda-item>span{grid-row:1/3;font-size:10px;font-weight:700;color:#5f6f82}.planner-agenda-item strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.planner-agenda-item small{font-size:9px;color:#7a8595;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.planner-agenda-empty{font-size:11px;color:#7b8696;padding:4px 0}
.scheduler-drag-handle{cursor:grab;touch-action:none;display:grid;place-items:center;width:24px;height:36px;border-radius:7px;color:#8190a3}
.scheduler-drag-handle:hover{background:#f0f3f6;color:#314158}.scheduler-drag-handle:active{cursor:grabbing}
.planner-pointer-ghost{position:fixed;z-index:999999;pointer-events:none;opacity:.92;box-shadow:0 16px 40px rgba(22,32,48,.24);transform:rotate(1deg);background:#fff;border:1px solid #ff9b40;border-radius:9px;padding:10px 12px;max-height:90px;overflow:hidden}
.planner-pointer-ghost .scheduler-calendar-time,.planner-pointer-ghost .scheduler-check,.planner-pointer-ghost .scheduler-drag-handle{display:none!important}
.planner-time-slot>button{z-index:2}
@media(max-width:900px){.planner-agenda-item{max-width:200px}}


/* Schedule planner refinement */
.task-scheduler-modal .modal-header{padding:16px 22px 12px!important}
.task-scheduler-modal .task-scheduler-controls{padding:10px 22px!important;gap:10px!important}
.planner-date-control{height:40px;display:inline-flex;align-items:center;gap:8px;border:1px solid #d8e0e8;border-radius:999px;padding:0 13px;background:#fff}
.planner-date-control svg{width:16px;height:16px}.planner-date-control input{border:0;outline:0;background:transparent;font:inherit;font-weight:650;color:#253246}
.task-scheduler-summary{display:none!important}
.task-planner-task-pane .task-planner-pane-heading{padding-top:12px!important}
.scheduler-item{position:relative;grid-template-columns:32px minmax(0,1fr) 22px!important;padding:10px 10px 10px 14px!important;overflow:hidden}
.scheduler-priority-line{position:absolute;left:0;top:0;bottom:0;width:4px;background:#aab3be}
.scheduler-item.priority-urgent .scheduler-priority-line,.scheduler-item.priority-high .scheduler-priority-line{background:#dc3c3c}
.scheduler-item.priority-medium .scheduler-priority-line,.scheduler-item.priority-normal .scheduler-priority-line{background:#f59e0b}
.scheduler-item.priority-low .scheduler-priority-line{background:#24a36a}
.scheduler-calendar-time{display:none!important}
.planner-calendar-event{cursor:default;z-index:3;padding:5px 9px!important}
.planner-calendar-event.is-clubwiser{cursor:grab;touch-action:none}
.planner-calendar-event.is-clubwiser:active{cursor:grabbing}.planner-calendar-event.is-dragging{opacity:.45}
.planner-calendar-event strong{display:block!important;color:#182437!important;font-weight:750!important;font-size:12px!important;line-height:1.2!important;min-height:14px}
.planner-calendar-event span{display:block!important;font-size:10px!important}.planner-calendar-event small{display:block!important}

/* July 2026 schedule planner visual correction */
.task-scheduler-modal .task-scheduler-card{
  overflow:hidden!important;
}
.task-scheduler-modal .task-scheduler-controls{
  min-height:66px!important;
  padding:10px 18px!important;
  gap:10px!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
}
.task-scheduler-modal .planner-date-control,
.task-scheduler-modal .planner-control-button,
.task-scheduler-modal .planner-control-select,
.task-scheduler-modal .calendar-picker #toggleCalendarPicker,
.task-scheduler-modal .scheduler-time-filter select{
  height:42px!important;
  min-height:42px!important;
  box-sizing:border-box!important;
  border:1px solid #d5dde7!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.task-scheduler-modal .planner-date-control{
  width:220px!important;
  padding:0 12px!important;
}
.task-scheduler-modal .planner-date-control>svg{display:none!important}
.task-scheduler-modal .planner-date-control input{
  width:100%!important;
  height:40px!important;
  padding:0 2px!important;
  font-size:14px!important;
  font-weight:700!important;
}
.task-scheduler-modal .planner-calendar-controls{
  gap:8px!important;
  flex-wrap:nowrap!important;
}
.task-scheduler-modal .calendar-picker #toggleCalendarPicker{
  min-width:176px!important;
  padding:0 14px!important;
}
.task-scheduler-modal .planner-control-select{
  min-width:330px!important;
  padding:0 7px 0 14px!important;
}
.task-scheduler-modal .planner-control-select>span{
  font-size:12px!important;
}
.task-scheduler-modal .planner-control-select select{
  height:38px!important;
  min-height:38px!important;
  max-width:none!important;
  flex:1 1 auto!important;
  font-size:13px!important;
}
.task-scheduler-modal .planner-disconnect{
  width:42px!important;
  min-width:42px!important;
  padding:0!important;
}
.task-scheduler-modal .scheduler-time-filter{
  height:42px!important;
  gap:8px!important;
  margin-left:auto!important;
  white-space:nowrap!important;
}
.task-scheduler-modal .scheduler-time-filter select{
  min-width:220px!important;
  padding:0 38px 0 14px!important;
  font-size:13px!important;
  font-weight:650!important;
}
.task-scheduler-modal .task-scheduler-list{
  display:flex!important;
  flex-direction:column!important;
  gap:9px!important;
  align-items:stretch!important;
  padding:12px 14px 20px!important;
  overflow-y:auto!important;
  min-height:0!important;
}
.task-scheduler-modal .scheduler-item{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) 26px!important;
  grid-auto-rows:auto!important;
  align-items:center!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:92px!important;
  height:auto!important;
  padding:13px 12px 13px 15px!important;
  gap:10px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  border-radius:10px!important;
}
.task-scheduler-modal .scheduler-item-main{
  display:block!important;
  min-width:0!important;
  overflow:visible!important;
  align-self:center!important;
  padding:0!important;
}
.task-scheduler-modal .scheduler-kind{
  display:block!important;
  margin-bottom:3px!important;
  font-size:9px!important;
  line-height:1.2!important;
}
.task-scheduler-modal .scheduler-item-main strong{
  display:block!important;
  min-height:18px!important;
  font-size:14px!important;
  line-height:1.3!important;
  color:#1e2b3d!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.task-scheduler-modal .scheduler-item-main small{
  display:block!important;
  margin-top:3px!important;
  font-size:10px!important;
  line-height:1.25!important;
}
.task-scheduler-modal .scheduler-item-meta{
  display:flex!important;
  margin-top:7px!important;
  min-height:16px!important;
  gap:10px!important;
}
.task-scheduler-modal .scheduler-check{
  align-self:center!important;
  width:32px!important;
  height:32px!important;
  flex:none!important;
}
.task-scheduler-modal .scheduler-drag-handle{
  align-self:center!important;
  width:26px!important;
  height:40px!important;
}
@media(max-width:1180px){
  .task-scheduler-modal .task-scheduler-controls{align-items:stretch!important}
  .task-scheduler-modal .planner-calendar-controls{flex-wrap:wrap!important}
  .task-scheduler-modal .scheduler-time-filter{margin-left:0!important}
  .task-scheduler-modal .planner-control-select{min-width:280px!important}
}
@media(max-width:760px){
  .task-scheduler-modal .planner-date-control,
  .task-scheduler-modal .calendar-picker,
  .task-scheduler-modal .calendar-picker #toggleCalendarPicker,
  .task-scheduler-modal .planner-control-select,
  .task-scheduler-modal .scheduler-time-filter,
  .task-scheduler-modal .scheduler-time-filter select{width:100%!important;min-width:0!important}
  .task-scheduler-modal .planner-calendar-controls{width:100%!important}
  .task-scheduler-modal .scheduler-item{min-height:88px!important}
}

/* Calendar task events must remain interactive above the time-slot hit area. */
.planner-events-layer{pointer-events:none}
.planner-calendar-event.is-clubwiser{pointer-events:auto;user-select:none;-webkit-user-drag:element}
.planner-calendar-event.is-clubwiser:hover{box-shadow:0 4px 12px rgba(24,36,55,.14)}

/* Schedule planner drag-only refinement */
.task-scheduler-modal .scheduler-item{
  grid-template-columns:minmax(0,1fr) 26px!important;
  min-height:82px!important;
  padding-left:16px!important;
}
.task-scheduler-modal .scheduler-check{display:none!important}
.task-scheduler-modal .scheduler-drag-handle{
  cursor:grab;touch-action:none;align-self:stretch;display:grid;place-items:center;
}
.task-scheduler-modal .scheduler-drag-handle:active,
.task-scheduler-modal .planner-calendar-event.is-clubwiser:active{cursor:grabbing}
.task-scheduler-modal .planner-calendar-event.is-clubwiser{
  cursor:grab;touch-action:none;user-select:none;
}
.task-planner-task-pane{transition:background-color .15s ease,box-shadow .15s ease}
.task-planner-task-pane.is-drop-target{
  background:#fff8f0!important;
  box-shadow:inset 0 0 0 2px #ff8a1f;
}
.task-planner-task-pane.is-drop-target .task-planner-pane-heading::after{
  content:"Drop here to remove from calendar";
  display:block;margin-top:5px;color:#d96800;font-size:12px;font-weight:700;
}
.scheduler-scheduled-label{color:#2d6a4f!important;font-weight:700}
.workspace-compact-toolbar button[disabled]{opacity:.48;cursor:not-allowed}

/* Tasks calendar mode and current-focus panel */
.task-page-mode-toggle button{display:inline-flex;align-items:center;gap:6px}.task-page-mode-toggle svg{width:14px;height:14px}
.task-now-panel{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:11px 13px;border:1px solid #dfe5eb;border-left:4px solid #ff7a00;background:#fff;border-radius:8px;box-shadow:0 1px 2px rgba(22,32,48,.04)}
.task-now-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f1f4f7;color:#566477;flex:0 0 auto}.task-now-icon.is-live{background:#fff0e2;color:#dc6500}.task-now-icon svg{width:16px;height:16px}
.task-now-copy{display:grid;gap:1px;min-width:0;flex:1}.task-now-copy>span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#cf6205}.task-now-copy strong{font-size:14px;color:#1d2939;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-now-copy small{font-size:11px;color:#738095}.task-now-actions{display:flex;gap:7px;align-items:center}
.task-calendar-mode-host{min-height:640px}.task-calendar-mode-host .task-scheduler-card.is-embedded{position:relative;width:100%;max-width:none;height:calc(100vh - 245px);min-height:650px;margin:0;border:1px solid #dfe5eb;border-radius:9px;box-shadow:none;overflow:hidden;background:#fff}
.task-calendar-mode-host .task-scheduler-card.is-embedded>.modal-header{display:none}.task-calendar-mode-host .task-scheduler-card.is-embedded .task-planner-split{height:auto}
.planner-calendar-event{padding-right:34px!important}.planner-event-complete{position:absolute;right:6px;top:6px;width:24px;height:24px;border:0;background:rgba(255,255,255,.82);border-radius:50%;display:grid;place-items:center;color:#66758a;cursor:pointer;z-index:5}.planner-event-complete:hover{background:#fff;color:#16794b}.planner-event-complete svg{width:16px;height:16px}.planner-calendar-event.is-completed{background:#edf8f1!important;border-left-color:#22945b!important;opacity:.78}.planner-calendar-event.is-completed strong{text-decoration:line-through;color:#667085!important}
.planner-time-slot{height:1.5625%}.planner-timeline{height:1280px}
@media(max-width:900px){.task-now-panel{align-items:flex-start}.task-now-actions{flex-direction:column}.task-calendar-mode-host .task-scheduler-card.is-embedded{height:auto;min-height:900px}}

/* July 2026: two-step focus queue and simplified task header */
.task-status-stack{min-width:0}
.task-now-panel{display:grid;grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);align-items:stretch;gap:14px;padding:12px 14px}
.task-focus-slot{display:flex;align-items:center;gap:11px;min-width:0}
.task-focus-slot.is-empty{opacity:.78}
.task-focus-divider{width:1px;background:#e3e8ee}
.task-focus-slot .task-now-actions{margin-left:auto;flex:0 0 auto}
body.workspace-focus-mode .task-now-panel{position:sticky;top:0;z-index:25;background:#fff;box-shadow:0 5px 14px rgba(22,32,48,.06)}
@media(max-width:900px){.task-now-panel{grid-template-columns:1fr}.task-focus-divider{width:100%;height:1px}.task-focus-slot .task-now-actions{flex-direction:row}}
@media(max-width:620px){.task-focus-slot{align-items:flex-start;flex-wrap:wrap}.task-focus-slot .task-now-actions{width:100%;margin-left:45px}}

/* July 2026 workspace-first focus corrections */
html.workspace-focus-mode, html.workspace-focus-mode body { overflow: hidden !important; background: #fff; }
html.workspace-focus-mode #appShell { display: none !important; }
html.workspace-focus-mode .main.simple-tasks-page {
  position: fixed !important; inset: 0 !important; z-index: 1000 !important;
  width: 100vw !important; max-width: none !important; margin: 0 !important;
  padding: 10px !important; overflow: auto !important; background: #fff !important;
}
html.workspace-focus-mode .simple-tasks-page .org-task-shell {
  width: 100% !important; max-width: none !important; min-height: calc(100vh - 20px) !important;
  box-sizing: border-box; padding: 12px !important;
}
html:not([data-task-scope="workspace"]) .task-now-panel { display: none !important; }
html[data-task-scope="workspace"] .task-now-panel[hidden] { display: none !important; }


/* Build 19 application foundation: stable, immediate module rendering */
.main { contain: layout style; }
.main > * { animation: none !important; }
.panel, .dashboard-card, .meeting-card, .task-card, .workspace-card { transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease; }
[hidden] { display: none !important; }
.module-loading-reserve { min-height: 120px; contain: layout paint; }
.dashboard-grid > *, .page-grid > * { content-visibility: auto; contain-intrinsic-size: 280px; }
html.app-booting main::after, html.auth-pending main::after { display: none !important; }
html.app-booting main, html.auth-pending main { opacity: 1 !important; }

/* Organisation theme layer. The application canvas remains white. */
.main { background: #ffffff; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, color-mix(in srgb, white 8%, transparent) 0%, transparent 28%), var(--brand-primary) !important; color: var(--brand-sidebar-text); }
.sidebar .side-nav a,
.sidebar .account-switcher-button,
.sidebar .account-main-copy small,
.sidebar .account-main-copy strong,
.sidebar .account-main-copy em,
.sidebar .nav-collapse-btn { color: var(--brand-sidebar-text); }
.primary-btn { background: var(--brand-secondary); }
.main { color: var(--brand-text); }
.eyebrow, .text-btn, .panel-header a { color: var(--brand-primary); }
.badge.orange, .status-pill.orange { background: color-mix(in srgb, var(--brand-primary), white 86%); color: var(--brand-primary); }

/* Text-first organisation selector: avoids slow remote logo paint. */
.sidebar .account-switcher-button {
  grid-template-columns: minmax(0, 1fr) 18px !important;
  gap: 8px !important;
  min-height: 48px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transform: none !important;
}
.sidebar .account-switcher-button:hover,
.sidebar .account-switcher-button[aria-expanded="true"] { transform: none; }
.sidebar .account-main-copy strong {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}
.account-switcher-collapsed-mark { display: none; }
.clean-workspace-list .workspace-option {
  grid-template-columns: minmax(0, 1fr) 18px !important;
  min-height: 46px !important;
  padding: 7px 9px !important;
  gap: 8px !important;
  border-radius: 9px !important;
}
.clean-workspace-list .workspace-option.active { border-left: 3px solid var(--brand-secondary, #f58220); }
.sidebar.is-collapsed .account-switcher-button {
  grid-template-columns: 1fr !important;
  min-height: 48px !important;
  padding: 5px !important;
  border-radius: 12px !important;
}
.sidebar.is-collapsed .account-switcher-collapsed-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: auto;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px;
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -.02em;
}

/* Module interaction: light glass over the organisation colour, never grey. */
.sidebar .side-nav a:not(.active):hover {
  background: linear-gradient(135deg, rgba(255,255,255,.17), rgba(28,34,42,.10)) !important;
  border-color: rgba(255,255,255,.30) !important;
  color: var(--brand-sidebar-text, #fff) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 6px 16px rgba(28,34,42,.09) !important;
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
}
.sidebar .side-nav a.active {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(28,34,42,.16)) !important;
  border: 1px solid rgba(255,255,255,.38) !important;
  color: var(--brand-sidebar-text, #fff) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    inset 0 -1px 0 rgba(28,34,42,.08),
    0 8px 20px rgba(28,34,42,.12) !important;
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
}
.sidebar .side-nav a.active:hover {
  background: linear-gradient(135deg, rgba(255,255,255,.27), rgba(28,34,42,.18)) !important;
  border-color: rgba(255,255,255,.48) !important;
}
/* Page changes remain immediate without the animated strip at the viewport top. */
html.auth-pending main::after,
html.app-booting main::after,
body.is-navigating::after { display: none !important; content: none !important; }

/* A consistent organisation-colour strip anchors the first module container. */
.main > .topbar,
.simple-tasks-page > .org-task-shell { position: relative; overflow: hidden; }
.main > .topbar::before,
.simple-tasks-page > .org-task-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, var(--brand-primary, #f68b1f), var(--brand-secondary, #343a40));
  pointer-events: none;
}

/* Lucide icons inside buttons always follow the button's text state. */
button > svg,
button > span > svg { color: currentColor !important; stroke: currentColor; }

/* Active pills use the club palette even where older module rules are more specific. */
.segmented-toggle > button.active,
.segmented-toggle > button[aria-selected="true"],
.simple-tasks-page .task-scope-toggle > button.active,
.simple-tasks-page .task-completion-toggle > button.active,
.simple-tasks-page .task-page-mode-toggle > button.active {
  background: var(--brand-secondary, #343a40) !important;
  border-color: var(--brand-secondary, #343a40) !important;
  color: var(--brand-sidebar-text, #fff) !important;
}

/* Workspace focus queue follows the active organisation palette. */
.task-now-panel { border-left-color: var(--brand-primary, #f68b1f); }
.task-focus-slot.is-current .task-now-icon {
  background: color-mix(in srgb, var(--brand-primary, #f68b1f) 13%, white);
  color: var(--brand-primary, #f68b1f);
}
.task-focus-slot.is-next .task-now-icon {
  background: color-mix(in srgb, var(--brand-secondary, #343a40) 11%, white);
  color: var(--brand-secondary, #343a40);
}
.task-focus-slot.is-current .task-now-copy > span { color: var(--brand-primary, #f68b1f); }
.task-focus-slot.is-next .task-now-copy > span { color: var(--brand-secondary, #343a40); }
@media (prefers-reduced-motion: no-preference) {
  .sidebar, .account-popover, .modal-card { transition-duration: .14s !important; }
}

/* Mobile application baseline ------------------------------------------------
 * Domain sheets can refine their own layouts, but no Clubwiser page may make
 * the viewport wider than the device or present a desktop-sized modal.
 */
html, body { max-width: 100%; overflow-x: clip; }
.main, .main > *, .panel, .topbar, .page-grid, .dashboard-grid { min-width: 0; max-width: 100%; }
img, video, canvas, svg { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
.table-wrap, [class*="table-wrap"] { max-width: 100%; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.tabs, .cw-tabs, .meeting-tabs, .club-tabs, [role="tablist"] { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.tabs button, .cw-tabs button, .meeting-tabs button, .club-tabs button, [role="tab"] { flex: 0 0 auto; white-space: nowrap; }
.modal-backdrop, [class*="modal-backdrop"] { padding: clamp(8px, 2vw, 24px); }
.modal-card, [class*="modal-card"] { max-width: min(100%, 1180px); max-height: calc(100dvh - 16px); }

@media (max-width: 700px) {
  .main { width: 100%; padding: 68px 12px 22px !important; }
  .mobile-menu-btn { top: 12px; left: 12px; min-width: 44px; min-height: 44px; }
  .topbar { gap: 12px; margin-bottom: 16px; }
  .topbar h1 { font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.08; overflow-wrap: anywhere; }
  .topbar p { font-size: .92rem; line-height: 1.45; }
  .topbar-actions, .panel-header { max-width: 100%; flex-wrap: wrap; }
  .topbar-actions { width: 100%; }
  .topbar-actions > a, .topbar-actions > button { flex: 1 1 145px; }
  .panel, .stat-card { padding: 15px; border-radius: 14px; }
  .panel-header { align-items: flex-start; gap: 9px; margin-bottom: 13px; }
  .page-grid, .dashboard-grid, .stats-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .primary-btn, .secondary-btn { min-height: 44px; }
  .modal-backdrop, [class*="modal-backdrop"] { align-items: stretch; padding: 6px !important; }
  .modal-card, [class*="modal-card"] {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - 12px) !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .modal-actions, .form-action-row, .modal-action-row { position: sticky; bottom: -16px; z-index: 5; margin: 12px -16px -16px !important; padding: 12px 16px !important; background: rgba(255,255,255,.97); border-top: 1px solid #e2e8f0; }
  .modal-actions > *, .form-action-row > *, .modal-action-row > * { flex: 1 1 130px; }
  table { min-width: 640px; }
}
