/* =====================================================================
   CIC HUB
   C.I.C. - Crownhill International College
   Brand: teal #0B4D4A / gold #D4A820 / cream #F5F1E8 / ink #1A2421
   Type:  Georgia (display) / Arial (body) / ui-monospace (data)
   ===================================================================== */

:root {
  --teal:        #0B4D4A;
  --teal-800:    #093C3A;
  --teal-600:    #0E6B66;
  --teal-400:    #12857E;
  --gold:        #D4A820;
  --gold-light:  #F2CE5C;
  --cream:       #F5F1E8;
  --cream-deep:  #EAE3D4;
  --ink:         #1A2421;
  --ink-soft:    #4A5A56;
  --ink-faint:   #7C8A86;
  --line:        #E0D9C8;
  --white:       #FFFFFF;
  --danger:      #C0392B;
  --ok:          #10826F;

  --m-media:     #E0447A;
  --m-growth:    #D4A820;
  --m-strategy:  #6C5CE7;
  --m-corporate: #0E9488;
  --m-ops:       #E07A34;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Layered elevation. Cards sit on the board like physical index cards. */
  --e1: 0 1px 2px rgba(26,36,33,.06), 0 2px 6px rgba(26,36,33,.05);
  --e2: 0 2px 4px rgba(26,36,33,.07), 0 6px 16px rgba(26,36,33,.08);
  --e3: 0 6px 12px rgba(26,36,33,.10), 0 18px 40px rgba(26,36,33,.14);
  --e4: 0 20px 50px rgba(9,60,58,.28), 0 60px 120px rgba(9,60,58,.20);

  --ease: cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

h1, h2, h3, h4, .display {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: normal;
  letter-spacing: .2px;
  margin: 0;
}

a { color: var(--teal-600); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =====================================================================
   TOP BAR
   ===================================================================== */

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 18px;
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-800) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 18px rgba(9,60,58,.30);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: Georgia, serif;
  font-size: 19px;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: .5px;
  white-space: nowrap;
}
.brand b { color: var(--gold); font-weight: normal; }

.top-sep { width: 1px; height: 26px; background: rgba(245,241,232,.16); }

.nav-toggle { display: none; border: 0; background: transparent; color: var(--cream); cursor: pointer; padding: 6px; border-radius: 8px; }
.nav-toggle:hover { background: rgba(245,241,232,.12); }

.top-nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a { white-space: nowrap; }
.top-nav a {
  padding: 7px 9px;
  border-radius: var(--r-sm);
  color: rgba(245,241,232,.78);
  text-decoration: none;
  font-size: 12.5px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.top-nav a:hover { background: rgba(245,241,232,.10); color: var(--cream); }
.top-nav a.on { background: rgba(212,168,32,.18); color: var(--gold-light); }

.nav-more { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.nav-more-btn { border: 0; background: transparent; color: rgba(245,241,232,.78); cursor: pointer;
  font-size: 12.5px; padding: 7px 9px; border-radius: var(--r-sm); white-space: nowrap; font-family: inherit; }
.nav-more-btn:hover { background: rgba(245,241,232,.10); color: var(--cream); }
.nav-more-menu { display: none; position: absolute; top: 40px; left: 0; min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.2);
  padding: 6px; z-index: 9600; }
.nav-more-menu.open { display: block; }
.nav-more-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 13.5px; }
.nav-more-menu a:hover { background: var(--cream); }
.nav-more-menu a.on { background: rgba(11,77,74,.10); color: var(--teal); font-weight: 600; }

.top-spacer { flex: 1; }

.search-wrap { position: relative; }
.search {
  width: clamp(130px, 16vw, 210px);
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid rgba(245,241,232,.18);
  border-radius: 999px;
  background: rgba(9,60,58,.5);
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  transition: width .2s var(--ease), background .2s var(--ease);
}
.search::placeholder { color: rgba(245,241,232,.45); }
.search:focus { width: 280px; background: rgba(9,60,58,.75); outline: none; border-color: var(--gold); }
.search-ico {
  position: absolute; left: 11px; top: 9px;
  width: 15px; height: 15px; opacity: .5; pointer-events: none;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .4px;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.22);
}
.avatar.sm { width: 24px; height: 24px; font-size: 9px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: rgba(245,241,232,.08);
  color: var(--cream);
  cursor: pointer;
  transition: background .16s var(--ease);
}
.icon-btn:hover { background: rgba(245,241,232,.18); }
.badge-dot {
  position: absolute; top: 4px; right: 4px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px;
  background: var(--m-media);
  color: #fff; font-size: 9px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--teal-800);
}

/* =====================================================================
   BOARD
   ===================================================================== */

.board-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px 10px;
  flex-wrap: wrap;
}
.board-head h1 { font-size: 22px; color: var(--ink); }
.board-sub { font-size: 12px; color: var(--ink-faint); }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--e1);
  transition: transform .12s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--e2); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 -1px 2px rgba(0,0,0,.28); }
.chip.on { color: var(--white); border-color: transparent; box-shadow: var(--e2); }

.board-scroll {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 6px 22px 28px;
  overflow-x: auto;
  min-height: calc(100vh - 130px);
  scrollbar-width: thin;
}

/* --- Lists ------------------------------------------------------- */

.list {
  flex: 0 0 300px;
  width: 300px;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.5);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(26,36,33,.05);
  backdrop-filter: blur(6px);
}

.list-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(224,217,200,.7);
}
.list-head h2 {
  font-size: 13.5px;
  font-family: Georgia, serif;
  color: var(--ink);
  letter-spacing: .2px;
}
.list-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: rgba(11,77,74,.09);
  color: var(--teal);
  font-size: 11px; font-weight: bold;
  display: inline-flex; align-items: center; justify-content: center;
}
.list-hours {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-faint);
  font-family: ui-monospace, Menlo, monospace;
}
.list.is-done .list-head { border-bottom-color: rgba(16,130,111,.3); }
.list.is-done h2 { color: var(--ok); }

.list-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 24px;
  scrollbar-width: thin;
}
.list-body.drag-over {
  background: rgba(212,168,32,.10);
  box-shadow: inset 0 0 0 2px rgba(212,168,32,.42);
  border-radius: var(--r);
}

.list-foot { padding: 8px 10px 10px; }
.add-card {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-faint);
  font: inherit; font-size: 12px;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.add-card:hover { border-color: var(--teal-400); color: var(--teal); background: rgba(11,77,74,.04); }

/* --- Cards -------------------------------------------------------- */

.card {
  position: relative;
  padding: 11px 12px 10px 15px;
  border-radius: var(--r);
  background: var(--white);
  border: 1px solid rgba(224,217,200,.9);
  box-shadow: var(--e1);
  cursor: grab;
  transition: transform .14s var(--ease), box-shadow .18s var(--ease);
  transform-style: preserve-3d;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--e3);
}
.card:active { cursor: grabbing; }

/* The category spine. One card, one colour, readable at a glance. */
.card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--r) 0 0 var(--r);
  background: linear-gradient(180deg, var(--c-light, var(--teal-400)) 0%, var(--c-base, var(--teal)) 100%);
}

.card.dragging {
  opacity: .92;
  transform: rotate(2.5deg) scale(1.03);
  box-shadow: var(--e4);
  cursor: grabbing;
}
.card-ghost {
  height: 62px;
  border: 2px dashed rgba(212,168,32,.7);
  border-radius: var(--r);
  background: rgba(212,168,32,.08);
}

.card-cat {
  display: inline-flex; align-items: center; gap: 5px;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--c-deep, var(--teal));
  font-weight: bold;
}
.card-cat i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-base);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3);
}

.card-title {
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--ink);
  word-break: break-word;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  background: var(--c-tint, rgba(11,77,74,.08));
  color: var(--c-deep, var(--teal));
  white-space: nowrap;
}

.card-foot {
  display: flex; align-items: center; gap: 9px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(224,217,200,.65);
}
.meta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px;
  color: var(--ink-faint);
}
.meta svg { width: 12px; height: 12px; opacity: .75; }
.meta.hot { color: var(--m-media); font-weight: bold; }
.meta.due-soon { color: var(--m-ops); font-weight: bold; }
.meta.done { color: var(--ok); }

.card-people { margin-left: auto; display: flex; }
.card-people .avatar { margin-left: -6px; border: 2px solid var(--white); }
.card-people .avatar:first-child { margin-left: 0; }

.mini-bar {
  height: 3px; width: 46px;
  border-radius: 999px;
  background: rgba(26,36,33,.10);
  overflow: hidden;
}
.mini-bar i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-400), var(--ok));
  transition: width .3s var(--ease);
}

/* =====================================================================
   CARD MODAL
   ===================================================================== */

.scrim {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(9,25,23,.52);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 34px 16px;
  overflow-y: auto;
  animation: fade .18s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 1020px;
  border-radius: var(--r-xl);
  background: var(--white);
  box-shadow: var(--e4);
  overflow: hidden;
  animation: rise .24s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.modal-head {
  position: relative;
  padding: 20px 56px 16px 24px;
  background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-base) 62%, var(--c-light) 100%);
  color: #fff;
}
.modal-head::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(120% 180% at 88% -30%, rgba(255,255,255,.30), transparent 58%);
  pointer-events: none;
}
.modal-eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px;
  letter-spacing: .7px;
  text-transform: uppercase;
  opacity: .88;
  margin-bottom: 7px;
}
.modal-ref {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,.22);
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0;
}
.modal-title {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
  color: #fff;
  border: 0;
  background: transparent;
  width: 100%;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: 5px;
  resize: none;
}
.modal-title:hover { background: rgba(255,255,255,.10); }
.modal-title:focus { background: rgba(0,0,0,.22); outline: none; }

.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,.22);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.modal-close:hover { background: rgba(0,0,0,.42); transform: rotate(90deg); }

.modal-body {
  display: grid;
  grid-template-columns: 1fr 292px;
  min-height: 440px;
}

.forum-col { padding: 20px 22px 26px; min-width: 0; }
.side-col {
  padding: 18px 18px 24px;
  background: linear-gradient(180deg, var(--cream) 0%, #EFEADC 100%);
  border-left: 1px solid var(--line);
}

/* =====================================================================
   THE FORUM  (the signature of this system)
   Every entry is a node on a continuous rail. The rail is the passage of
   time; the nodes are what the team actually did. Nothing is ever removed
   from it, so the shape of the rail is the shape of the work.
   ===================================================================== */

.forum-title {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 4px;
}
.forum-title h3 { font-size: 15px; color: var(--ink); }
.forum-title span { font-size: 11px; color: var(--ink-faint); }

.forum-lede {
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.feed { position: relative; padding-left: 34px; }

/* The rail itself. */
.feed::before {
  content: '';
  position: absolute;
  left: 13px; top: 6px; bottom: 30px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg,
    var(--c-light, var(--teal-400)) 0%,
    var(--c-base, var(--teal)) 40%,
    rgba(224,217,200,.9) 100%);
}

.fe { position: relative; padding-bottom: 20px; }

.fe-node {
  position: absolute;
  left: -28px; top: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--c-base, var(--teal));
  box-shadow: 0 0 0 3px var(--white), 0 1px 4px rgba(26,36,33,.25);
  z-index: 1;
}
.fe.is-system .fe-node {
  width: 8px; height: 8px; left: -26px; top: 6px;
  border-color: var(--line);
  background: var(--cream-deep);
  box-shadow: 0 0 0 3px var(--white);
}
.fe.has-hours .fe-node {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 6px rgba(212,168,32,.20);
}

/* The timestamp is the point of the whole feature, so it is never small print. */
.fe-when {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 5px;
}
.fe-who { font-size: 12.5px; font-weight: bold; color: var(--ink); }
.fe-role { font-size: 11px; color: var(--ink-faint); }
.fe-stamp {
  margin-left: auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
  cursor: default;
}
.fe-stamp b { color: var(--teal); font-weight: bold; }

.fe-card {
  padding: 11px 13px;
  border-radius: var(--r);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--e1);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
}
.fe-card a { word-break: break-all; }
.fe.is-system .fe-card {
  padding: 2px 0;
  border: 0; background: transparent; box-shadow: none;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.fe.is-system .fe-who { font-weight: normal; color: var(--ink-soft); font-size: 12px; }
.fe.is-redacted .fe-card { font-style: italic; color: var(--ink-faint); }

.fe-code {
  margin: 8px 0 2px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--ink);
  color: #DCEDEA;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
}
.fe-inline {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}

.fe-hours {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #4A3A02;
  font-size: 11px;
  font-weight: bold;
  box-shadow: var(--e1);
}

.fe-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.att {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s var(--ease), transform .15s var(--ease), background .15s var(--ease);
}
.att:hover { border-color: var(--teal-400); background: #fff; transform: translateX(2px); }
.att-ico {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--teal-400), var(--teal));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.att.is-link .att-ico { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #4A3A02; }
.att-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-meta { font-size: 10.5px; color: var(--ink-faint); }

.fe-tools { display: flex; gap: 10px; margin-top: 6px; }
.fe-tool {
  border: 0; background: transparent; padding: 0;
  font-size: 11px; color: var(--ink-faint);
  cursor: pointer; text-decoration: underline;
}
.fe-tool:hover { color: var(--teal); }

.feed-empty {
  padding: 24px 4px;
  color: var(--ink-faint);
  font-size: 13px;
}
.feed-empty b { color: var(--ink); font-family: Georgia, serif; font-weight: normal; }

/* --- Composer ------------------------------------------------------ */

.composer {
  position: relative;
  margin-top: 4px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--e2);
  overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.composer:focus-within { border-color: var(--c-base, var(--teal)); box-shadow: var(--e3); }

.composer textarea {
  display: block;
  width: 100%;
  min-height: 78px;
  max-height: 320px;
  padding: 13px 14px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  resize: none;
  color: var(--ink);
}
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: var(--ink-faint); }

.composer-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 9px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #FBF9F4, var(--cream));
  flex-wrap: wrap;
}

.hours-chips { display: flex; align-items: center; gap: 4px; }
.hours-chips span { font-size: 11px; color: var(--ink-faint); margin-right: 2px; }
.hchip {
  min-width: 38px; height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font: inherit; font-size: 11px; font-weight: bold;
  cursor: pointer;
  box-shadow: var(--e1);
  transition: transform .12s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.hchip:hover { transform: translateY(-1px); border-color: var(--gold); }
.hchip.on {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  color: #4A3A02;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.4);
}

.composer-spacer { flex: 1; }

.staged { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 8px; }
.staged:empty { display: none; }
.staged-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11,77,74,.07);
  border: 1px solid rgba(11,77,74,.14);
  font-size: 11px;
  color: var(--teal);
  max-width: 260px;
}
.staged-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staged-item button {
  border: 0; background: transparent; cursor: pointer;
  color: var(--ink-faint); font-size: 13px; line-height: 1; padding: 0;
}
.staged-item button:hover { color: var(--danger); }

/* =====================================================================
   BUTTONS
   ===================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--teal-400) 0%, var(--teal) 100%);
  color: #fff;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: var(--e3); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #4A3A02;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.05); box-shadow: var(--e3); }

.btn-ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink-soft);
  box-shadow: var(--e1);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--teal-400); color: var(--teal); }

.btn-quiet { background: transparent; color: var(--ink-faint); }
.btn-quiet:hover { color: var(--teal); background: rgba(11,77,74,.06); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: var(--e2); }

/* =====================================================================
   SIDEBAR
   ===================================================================== */

.side-block { margin-bottom: 18px; }
.side-label {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: bold;
}

.field {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  font: inherit; font-size: 13px;
  color: var(--ink);
  box-shadow: var(--e1);
}
.field:focus { outline: none; border-color: var(--teal-400); box-shadow: var(--e2); }
select.field { cursor: pointer; }
textarea.field { height: auto; min-height: 62px; padding: 8px 9px; resize: vertical; line-height: 1.5; }

.subtag-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.subtag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .14s var(--ease);
}
.subtag:hover { border-color: var(--c-base); }
.subtag.on {
  background: var(--c-base);
  border-color: var(--c-base);
  color: #fff;
  box-shadow: var(--e1);
}

.people-list { display: flex; flex-direction: column; gap: 5px; }
.person {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 12px;
}
.person .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .x {
  margin-left: auto; border: 0; background: transparent;
  color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px;
}
.person .x:hover { color: var(--danger); }

.check-group { margin-bottom: 14px; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.check-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.check-head h4 { font-size: 12px; font-family: Arial, sans-serif; font-weight: bold; color: var(--ink); }
.check-pct { margin-left: auto; font-size: 11px; color: var(--ink-faint); font-family: ui-monospace, monospace; }
.check-del-cl { border: 0; background: transparent; color: var(--ink-faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.check-del-cl:hover { color: #B54A32; }

.check-bar {
  height: 5px; border-radius: 999px;
  background: rgba(26,36,33,.10);
  overflow: hidden;
  margin-bottom: 9px;
}
.check-bar i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-400), var(--ok));
  box-shadow: 0 0 8px rgba(16,130,111,.5);
  transition: width .35s var(--ease);
}

.check-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px;
  font-size: 12.5px;
  line-height: 1.4;
  border-radius: 7px;
}
.check-item:hover { background: rgba(11,77,74,.05); }
.check-item > input[type="checkbox"] { margin: 0; width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; }
.check-item .check-text { flex: 1; word-break: break-word; }
.check-item.done .check-text { text-decoration: line-through; color: var(--ink-faint); }
.check-ed, .check-rm { border: 0; background: transparent; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; color: var(--ink-faint); opacity: 0; transition: opacity .12s ease; border-radius: 5px; }
.check-item:hover .check-ed, .check-item:hover .check-rm { opacity: 1; }
.check-ed:hover { color: var(--teal); background: rgba(11,77,74,.08); }
.check-rm:hover { color: #B54A32; background: rgba(181,74,50,.1); }
.check-edit-input { font-size: 12.5px; padding: 4px 8px; }
.check-add { margin-top: 6px; }
.check-add input { font-size: 12.5px; padding: 7px 10px; width: 100%; }
.check-add input::placeholder { color: var(--ink-faint); }

.stat-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.stat-row:last-child { border-bottom: 0; }
.stat-row b { font-family: ui-monospace, Menlo, monospace; color: var(--teal); font-size: 12.5px; }
.stat-row span { color: var(--ink-faint); }

.pace {
  margin-top: 8px;
  padding: 10px 11px;
  border-radius: var(--r);
  background: linear-gradient(135deg, rgba(11,77,74,.06), rgba(212,168,32,.09));
  border: 1px solid rgba(11,77,74,.12);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pace b { color: var(--teal); font-family: Georgia, serif; font-size: 13px; font-weight: normal; }

/* =====================================================================
   TIME PROMPT
   ===================================================================== */

.prompt {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 120;
  width: 320px;
  padding: 16px 18px 15px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  box-shadow: var(--e4);
  animation: slideup .26s var(--ease);
}
@keyframes slideup { from { opacity: 0; transform: translateY(16px); } }
.prompt h4 { font-family: Georgia, serif; font-size: 15px; margin-bottom: 3px; color: var(--ink); }
.prompt p { margin: 0 0 11px; font-size: 12px; color: var(--ink-faint); line-height: 1.45; }
.prompt .hours-chips { margin-bottom: 11px; flex-wrap: wrap; }
.prompt-actions { display: flex; gap: 7px; }

/* =====================================================================
   TOASTS
   ===================================================================== */

#toasts {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  box-shadow: var(--e3);
  animation: toastin .22s var(--ease);
  max-width: 90vw;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* =====================================================================
   ANALYTICS
   ===================================================================== */

.page { max-width: 1180px; margin: 0 auto; padding: 22px 22px 60px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 25px; margin-bottom: 3px; }
.page-head p { margin: 0; font-size: 13px; color: var(--ink-faint); }

.range-bar {
  display: flex; align-items: center; gap: 7px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}

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

.panel {
  padding: 18px 20px 20px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--e2);
}
.panel h2 { font-size: 16px; margin-bottom: 2px; }
.panel .hint { font-size: 11.5px; color: var(--ink-faint); margin: 0 0 14px; }

.donut-wrap { position: relative; display: flex; justify-content: center; padding: 6px 0 12px; }
.donut { transform: rotate(-90deg); overflow: visible; }
.donut circle { transition: stroke-width .18s var(--ease), opacity .18s var(--ease); cursor: pointer; }
.donut circle:hover { stroke-width: 34; }
.donut-centre {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.donut-centre b { font-family: Georgia, serif; font-size: 30px; color: var(--teal); font-weight: normal; }
.donut-centre span { font-size: 11px; color: var(--ink-faint); letter-spacing: .5px; text-transform: uppercase; }

.legend { display: flex; flex-direction: column; gap: 2px; }
.legend-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 6px;
  border-radius: 7px;
  transition: background .14s var(--ease);
}
.legend-row:hover { background: var(--cream); }
.legend-swatch {
  width: 11px; height: 11px; border-radius: 3px; flex: 0 0 11px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.28);
}
.legend-name { font-size: 12.5px; flex: 1; min-width: 0; }
.legend-hours { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--teal); font-weight: bold; }
.legend-pct { font-size: 11px; color: var(--ink-faint); width: 44px; text-align: right; }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 62px; align-items: center; gap: 11px; }
.bar-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track {
  height: 20px;
  border-radius: 5px;
  background: rgba(26,36,33,.06);
  overflow: hidden;
  display: flex;
}
.bar-seg {
  height: 100%;
  transition: width .5s var(--ease);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.22);
}
.bar-val { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--teal); text-align: right; }

.spark { width: 100%; height: 92px; display: block; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
  font-size: 10px; letter-spacing: .7px; text-transform: uppercase; color: var(--ink-faint);
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--cream); }
.tbl .num { font-family: ui-monospace, Menlo, monospace; text-align: right; color: var(--teal); }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; color: #fff;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.2);
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}
.empty b { display: block; font-family: Georgia, serif; font-size: 16px; color: var(--ink); margin-bottom: 5px; font-weight: normal; }

/* =====================================================================
   AUTH PAGES
   ===================================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 460px;
  background: var(--cream);
}
.auth-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(212,168,32,.28), transparent 55%),
    radial-gradient(90% 80% at 92% 88%, rgba(45,212,191,.22), transparent 58%),
    linear-gradient(150deg, var(--teal-800) 0%, var(--teal) 55%, #062E2C 100%);
  padding: 46px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art h2 {
  font-size: 34px; line-height: 1.28; color: var(--cream);
  max-width: 14ch;
}
.auth-art h2 em { font-style: normal; color: var(--gold); }
.auth-art p { font-size: 13.5px; line-height: 1.65; color: rgba(245,241,232,.68); max-width: 42ch; margin: 14px 0 0; }
.auth-mark { font-family: Georgia, serif; font-size: 20px; color: var(--cream); }
.auth-mark b { color: var(--gold); font-weight: normal; }
.auth-foot { font-size: 11px; color: rgba(245,241,232,.42); line-height: 1.6; }

/* A quiet echo of the forum rail, so the login page tells you what this is. */
.auth-rail { position: relative; padding-left: 26px; margin: 30px 0 0; }
.auth-rail::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(212,168,32,.08));
}
.auth-rail li {
  position: relative; list-style: none;
  padding: 0 0 14px;
  font-size: 12.5px; color: rgba(245,241,232,.72);
}
.auth-rail li::before {
  content: ''; position: absolute; left: -25px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,32,.18);
}
.auth-rail li b { color: var(--cream); font-weight: normal; font-family: ui-monospace, monospace; font-size: 11px; }

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
  background: var(--white);
  box-shadow: -20px 0 60px rgba(9,60,58,.10);
}
.auth-form { width: 100%; max-width: 330px; }
.auth-form h1 { font-size: 25px; margin-bottom: 5px; }
.auth-form > p { font-size: 13px; color: var(--ink-faint); margin: 0 0 22px; line-height: 1.5; }

.form-row { margin-bottom: 14px; }
.form-row label {
  display: block; margin-bottom: 5px;
  font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-faint); font-weight: bold;
}
.form-row .field { height: 40px; }
.form-hint { font-size: 11px; color: var(--ink-faint); margin-top: 5px; }

.otp-input {
  width: 100%; height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--cream);
  font-family: Georgia, serif;
  font-size: 30px;
  letter-spacing: 12px;
  text-align: center;
  text-indent: 12px;
  color: var(--teal);
  box-shadow: inset 0 2px 5px rgba(26,36,33,.06);
}
.otp-input:focus { outline: none; border-color: var(--gold); background: #fff; }

.notice {
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid;
}
.notice.err { background: #FCEFED; border-color: #F0C8C2; color: #8C2A1F; }
.notice.ok  { background: #EAF6F2; border-color: #BDE3D7; color: #0A5F4E; }
.notice.info { background: #F5F1E8; border-color: var(--line); color: var(--ink-soft); }

/* =====================================================================
   NOTIFICATIONS DROPDOWN
   ===================================================================== */

.pop {
  position: absolute;
  top: 46px; right: 12px;
  z-index: 80;
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--e4);
  animation: rise .18s var(--ease);
}
.pop-head {
  display: flex; align-items: center;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--white);
}
.pop-head h3 { font-size: 14px; }
.pop-head button { margin-left: auto; }
.pop-item {
  display: flex; gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .14s var(--ease);
}
.pop-item:hover { background: var(--cream); }
.pop-item p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.pop-item time { font-size: 11px; color: var(--ink-faint); }

/* =====================================================================
   ADMIN
   ===================================================================== */

.admin-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 16px; align-items: start; }

.role-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: bold;
}
.role-SUPER_ADMIN { background: rgba(11,77,74,.12); color: var(--teal); }
.role-MANAGER { background: rgba(212,168,32,.18); color: #7A5D02; }
.role-MEMBER { background: rgba(26,36,33,.07); color: var(--ink-soft); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1080px) {
  .grid-analytics, .grid-2 { grid-template-columns: minmax(0,1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .admin-grid { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 860px) {
  .modal-body { grid-template-columns: minmax(0,1fr); }
  .side-col { border-left: 0; border-top: 1px solid var(--line); }
  .search { width: 150px; }
  .search:focus { width: 190px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .top-sep { display: none; }
  .top-nav {
    display: none;
    position: fixed;
    top: 58px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--teal-800, #0a3d3a);
    padding: 6px 0;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    z-index: 70;
  }
  .top-nav.open { display: flex; }
  .top-nav a { padding: 13px 20px; font-size: 15px; border-radius: 0; }
  .top-spacer { flex: 1; }
}

@media (max-width: 620px) {
  .top { padding: 0 12px; gap: 9px; }
  .search-wrap { display: none; }
  .board-scroll { padding: 6px 12px 22px; }
  .list { flex: 0 0 84vw; width: 84vw; }
  .scrim { padding: 0; }
  .modal { max-width: 100%; border-radius: 0; min-height: 100vh; }
  .page { padding: 16px 12px 50px; }
  .bar-row { grid-template-columns: 96px 1fr 52px; }
  .prompt { left: 12px; right: 12px; width: auto; }
  .auth-panel { padding: 30px 22px; }
}

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

@media print {
  .top, .filters, .composer, .range-bar { display: none !important; }
  .panel { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* =====================================================================
   PHASE 2
   Beautiful colourful cards, board switcher, My Work, Workload, Boards,
   archive, description editor, cover picker. These rules come after the
   Phase 1 card block on purpose, so the new card design wins.
   ===================================================================== */

/* ---- The card, rebuilt -------------------------------------------- */

.card {
  position: relative;
  padding: 0;                     /* body owns its padding */
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFBF8 100%);
  border: 1px solid rgba(224,217,200,.8);
  border-left: 4px solid var(--cat, var(--teal));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    0 1px 1px rgba(26,36,33,.04),
    0 3px 6px rgba(26,36,33,.06),
    0 8px 16px rgba(26,36,33,.07);
  cursor: grab;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease);
}
.card + .card { margin-top: 10px; }
.card::before { content: none; }

.card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 2px 4px rgba(26,36,33,.06),
    0 12px 22px rgba(26,36,33,.11),
    0 20px 38px rgba(26,36,33,.12);
}
.card.dragging { box-shadow: 0 24px 48px rgba(26,36,33,.22); transform: rotate(1.5deg) scale(1.02); }

.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 15px; }
.card-cat-tag {
  font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px; color: var(--cat);
}
.card-cat-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.card-cover {
  position: relative;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  box-shadow: inset 0 -14px 22px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.28);
}
.card-cover-cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.32);
  opacity: .96;
}
.card-flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 17px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.card-flag svg { width: 9px; height: 9px; }
.card-flag.high { background: rgba(212,168,32,.16); color: #8A5A12; }
.card-flag.urgent {
  background: rgba(192,57,43,.13); color: #B02A1C;
  animation: flagpulse 2.6s var(--ease) infinite;
}
@keyframes flagpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
  50%      { box-shadow: 0 0 0 3px rgba(192,57,43,.14); }
}

.card-body { padding: 12px 14px 12px; }

.card.is-done { opacity: .85; }
.card.is-done .card-title { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: rgba(26,36,33,.25); }

/* Colourful label pills */
.card-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.label-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .2px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.22);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.label-pill.more { background: #9AA6A2 !important; }

.card-title { font-size: 13.5px; line-height: 1.42; color: var(--ink); font-weight: 600; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer badges */
.card-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid rgba(224,217,200,.7);
  flex-wrap: wrap;
}
.ring-meta { gap: 4px; }
.ring-meta.done span { color: var(--ok); font-weight: 700; }
.hours-meta { color: var(--teal-600); font-weight: 600; }

.due-pill {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(26,36,33,.07);
  color: var(--ink-soft);
}
.due-pill svg { width: 11px; height: 11px; opacity: .8; }
.due-pill.soon { background: rgba(224,122,52,.14); color: #A85718; }
.due-pill.over { background: rgba(192,57,43,.14); color: #A32217; }
.due-pill.done { background: rgba(16,130,111,.14); color: var(--ok); }

.card-people { margin-left: auto; }

/* ---- Board switcher ----------------------------------------------- */

.board-switch { position: relative; margin-left: 6px; }
.bs-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid rgba(245,241,232,.2);
  border-radius: 8px;
  background: rgba(9,60,58,.5);
  color: var(--cream);
  font: inherit; font-size: 13px;
  cursor: pointer;
  max-width: 220px;
  transition: background .16s var(--ease);
}
.bs-btn:hover { background: rgba(9,60,58,.8); }
.bs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, serif; }
.bs-btn svg { opacity: .7; flex: 0 0 auto; }

.bs-menu {
  position: absolute; top: 42px; left: 0; z-index: 80;
  min-width: 250px;
  padding: 6px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--e4);
  display: none;
  animation: rise .16s var(--ease);
}
.bs-menu.open { display: block; }
.bs-menu a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.bs-menu a:hover { background: var(--cream); }
.bs-menu a.on { background: rgba(11,77,74,.08); color: var(--teal); font-weight: 600; }
.bs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; box-shadow: inset 0 -1px 2px rgba(0,0,0,.3); }
.bs-manage {
  margin-top: 4px; border-top: 1px solid var(--line);
  color: var(--teal-600) !important; font-size: 12px !important;
}

/* nav badge */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; margin-left: 6px; padding: 0 4px;
  border-radius: 999px;
  background: rgba(212,168,32,.9); color: #3A2D02;
  font-size: 10px; font-weight: 700;
}
.nav-badge.hot { background: var(--m-media); color: #fff; }

/* ---- Description editor -------------------------------------------- */

.desc-block {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.desc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.desc-head .side-label { margin: 0; }
.desc-view { font-size: 13px; line-height: 1.6; color: var(--ink); }
.desc-empty { color: var(--ink-faint); font-style: italic; }
.desc-edit textarea { min-height: 80px; margin-bottom: 8px; }
.desc-actions { display: flex; gap: 7px; }

/* ---- Cover picker -------------------------------------------------- */

.cover-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cover-swatch {
  width: 30px; height: 26px; padding: 0;
  border: 2px solid transparent; border-radius: 7px;
  background: none; cursor: pointer;
  overflow: hidden;
  transition: transform .12s var(--ease);
  position: relative;
}
.cover-swatch span { display: block; width: 100%; height: 100%; border-radius: 4px; box-shadow: inset 0 -2px 4px rgba(0,0,0,.2); }
.cover-swatch:hover { transform: translateY(-1px); }
.cover-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--white), 0 2px 6px rgba(26,36,33,.25); }
.cover-swatch.cover-auto {
  width: auto; padding: 0 9px 0 4px;
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; font-size: 10.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
}
.cover-swatch.cover-auto span { width: 16px; height: 16px; border-radius: 50%; }
.cover-swatch.cover-auto.on { border-color: var(--ink); }

/* ---- My Work ------------------------------------------------------- */

.mw-section { margin-bottom: 26px; }
.mw-section-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; }
.mw-section-head h2 { font-size: 17px; }
.mw-count {
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: rgba(11,77,74,.1); color: var(--teal);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.mw-sub { font-size: 12px; color: var(--ink-faint); margin-left: 2px; }
.mw-overdue .mw-section-head h2 { color: var(--danger); }
.mw-overdue .mw-count { background: rgba(192,57,43,.12); color: var(--danger); }
.mw-soon .mw-section-head h2 { color: #A85718; }

.mw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}
.mw-card {
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--e1);
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease);
}
.mw-card:hover { transform: translateY(-3px); box-shadow: var(--e3); }
.mw-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mw-cover { height: 8px; }
.mw-body { padding: 12px 14px 13px; }
.mw-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mw-board { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--teal-600); }
.mw-ref { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--ink-faint); }
.mw-title { font-size: 14px; line-height: 1.4; color: var(--ink); margin-bottom: 9px; }
.mw-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.mw-label {
  padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 600; color: #fff;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.2);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mw-foot { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding-top: 9px; border-top: 1px solid var(--line); }
.mw-list { font-size: 11px; color: var(--ink-faint); }
.mw-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-soft); }
.mw-due { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: rgba(26,36,33,.07); color: var(--ink-soft); }
.mw-due.soon { background: rgba(224,122,52,.14); color: #A85718; }
.mw-due.over { background: rgba(192,57,43,.14); color: #A32217; }
.mw-due.done { background: rgba(16,130,111,.14); color: var(--ok); }

/* ---- Workload ------------------------------------------------------ */

.wl-row {
  display: grid;
  grid-template-columns: 190px 1fr 90px 72px;
  align-items: center; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.wl-row:last-child { border-bottom: 0; }
.wl-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wl-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.wl-job { font-size: 11px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-overdue { font-size: 10px; font-weight: 700; color: #fff; background: var(--danger); padding: 1px 6px; border-radius: 999px; }
.wl-track { height: 22px; border-radius: 6px; background: rgba(26,36,33,.06); overflow: hidden; display: flex; min-width: 4px; }
.wl-seg { height: 100%; box-shadow: inset 0 -2px 4px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.22); transition: width .4s var(--ease); }
.wl-num { font-size: 12px; color: var(--ink-soft); text-align: right; }
.wl-num b { font-family: ui-monospace, Menlo, monospace; color: var(--teal); font-size: 15px; }
.wl-week { text-align: right; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--teal-600); }
.wl-week span { display: block; font-family: Arial, sans-serif; font-size: 9.5px; color: var(--ink-faint); }
.wl-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wl-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-soft); }
.wl-key i { width: 11px; height: 11px; border-radius: 3px; box-shadow: inset 0 -1px 2px rgba(0,0,0,.28); }

/* ---- Boards management --------------------------------------------- */

.board-cards { display: flex; flex-direction: column; gap: 10px; }
.board-card {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.board-card.archived { opacity: .62; }
.bc-main { flex: 1; min-width: 0; }
.bc-name { font-family: Georgia, serif; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.bc-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-faint); background: rgba(26,36,33,.08); padding: 2px 7px; border-radius: 999px; }
.bc-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.bc-desc { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.bc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.mini-dialog {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(9,25,23,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.mini-dialog[hidden] { display: none; }   /* the flex rule above would otherwise defeat [hidden] */
.md-card {
  width: 100%; max-width: 380px;
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--e4);
}
.md-card h3 { font-size: 18px; margin-bottom: 14px; }

/* ---- Responsive ---------------------------------------------------- */

@media (max-width: 720px) {
  .wl-row { grid-template-columns: 130px 1fr 56px; }
  .wl-week { display: none; }
  .board-card { flex-direction: column; align-items: stretch; }
  .bc-actions { justify-content: flex-start; }
  .board-switch { display: none; }
}

/* =====================================================================
   PHASE 3 : Meetings
   ===================================================================== */

.nav-live {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--m-media); color: #fff;
  font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  animation: flagpulse 2s var(--ease) infinite;
}
.back-link { display: inline-block; margin-bottom: 14px; color: var(--teal-600); text-decoration: none; font-size: 13px; }
.back-link:hover { text-decoration: underline; }

.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: 11px; }
.btn-ghost-invert {
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4);
}
.btn-ghost-invert:hover { background: rgba(255,255,255,.24); }

.sec-lbl { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-600); margin: 4px 0 12px; }

/* Banner: the standing weekly team meeting */
.mtg-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 26px;
  border-radius: 18px;
  background: linear-gradient(120deg, #0B4D4A 0%, #0E6B66 60%, #12857E 100%);
  color: var(--cream);
  box-shadow: var(--e3);
  position: relative; overflow: hidden;
}
.mtg-banner::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(212,168,32,.28), transparent 70%);
}
.mtg-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.mtg-banner h2 { font-size: 24px; margin: 5px 0 6px; color: #fff; }
.mtg-banner-when { font-size: 13.5px; opacity: .9; }
.mtg-banner-r { position: relative; z-index: 1; }

/* Two-column upcoming / past */
.mtg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mtg-list { display: flex; flex-direction: column; gap: 8px; }

.mtg-row {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 15px;
  border-radius: 13px; background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--e1);
  text-decoration: none; color: var(--ink);
  transition: transform .14s var(--ease), box-shadow .18s var(--ease);
}
.mtg-row:hover { transform: translateX(2px); box-shadow: var(--e3); }
.mtg-row.state-live { border-color: rgba(224,68,122,.5); box-shadow: 0 0 0 1px rgba(224,68,122,.25), var(--e1); }
.mtg-list.past .mtg-row { opacity: .82; }
.mtg-daydot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 -1px 2px rgba(0,0,0,.3); }
.mtg-when { text-align: center; min-width: 46px; }
.mtg-when b { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 15px; color: var(--teal); }
.mtg-when span { font-size: 10px; color: var(--ink-faint); }
.mtg-main { flex: 1; min-width: 0; }
.mtg-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtg-recur { color: var(--teal-600); font-weight: 400; }
.mtg-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 1px; }
.mtg-join {
  padding: 7px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--m-media); box-shadow: 0 2px 8px rgba(224,68,122,.4);
}
.mtg-join.live { animation: flagpulse 2.2s var(--ease) infinite; }
.mtg-flag { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }

/* Meeting room */
.mtg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.mtg-head h1 { font-size: 25px; margin: 8px 0 6px; }
.mtg-head-meta { font-size: 13px; color: var(--ink-faint); }
.mtg-head-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.mtg-type {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #fff;
}
.type-team { background: #0E9488; } .type-group { background: #6C5CE7; }
.type-one_on_one { background: #D4A820; } .type-recur { background: #7C8A86; margin-left: 5px; }

.mtg-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.stage-panel {
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #12302E, #0B4D4A);
  min-height: 300px; display: flex; align-items: center; justify-content: center;
}
.join-cta { text-align: center; color: var(--cream); padding: 46px 30px; position: relative; }
.join-cta h2 { color: #fff; font-size: 21px; margin-bottom: 8px; }
.join-cta p { font-size: 13.5px; opacity: .82; margin-bottom: 18px; max-width: 380px; margin-left: auto; margin-right: auto; }
.join-cta.ended { color: var(--ink-soft); }
.join-cta.ended h2 { color: var(--ink); }
.join-pulse {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold), rgba(212,168,32,.2));
  animation: joinpulse 2s var(--ease) infinite;
}
@keyframes joinpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,168,32,.5); } 50% { box-shadow: 0 0 0 18px rgba(212,168,32,0); } }
.join-alt { display: block; margin-top: 14px; color: rgba(245,241,232,.75); font-size: 12.5px; }
.countdown { font-family: ui-monospace, Menlo, monospace; font-size: 30px; color: var(--gold); margin-bottom: 10px; }
.jitsi-frame { width: 100%; height: 560px; }
.jitsi-frame iframe { width: 100% !important; height: 100% !important; border: 0; }

.mtg-agenda { font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.mtg-minutes-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.mtg-minutes-head h3 { font-size: 17px; }
.mtg-minutes-head span { font-size: 12px; color: var(--ink-faint); }
.mtg-empty { font-size: 13px; color: var(--ink-faint); font-style: italic; line-height: 1.6; }
.mtg-notes { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.mtg-note { display: flex; gap: 10px; }
.mtg-note-body { flex: 1; min-width: 0; }
.mtg-note-head { display: flex; align-items: baseline; gap: 8px; }
.mtg-note-head b { font-size: 13px; }
.mtg-note-head time { font-size: 11px; color: var(--ink-faint); }
.mtg-note-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 2px; }
.note-composer { border-top: 1px solid var(--line); padding-top: 14px; }

.mtg-side .panel { position: sticky; top: 76px; }
.attend-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.attend-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.attend-name { flex: 1; min-width: 0; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.host-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--teal); background: rgba(11,77,74,.1); padding: 1px 6px; border-radius: 999px; }
.joined-at { font-size: 10.5px; color: var(--ink-faint); }
.attend-toggle {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
  border: 1.5px solid var(--line); background: var(--white); color: #fff;
  cursor: pointer; font-size: 13px; line-height: 1; transition: all .14s var(--ease);
}
.attend-toggle.on { background: var(--ok); border-color: var(--ok); }
.attend-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(26,36,33,.15); flex: 0 0 auto; }
.attend-dot.on { background: var(--ok); }

/* Dialog helpers shared by meetings */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.md-wide { max-width: 520px; }
.chk-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 12px; cursor: pointer; }
.invite-grid { display: flex; flex-wrap: wrap; gap: 7px; max-height: 150px; overflow-y: auto; padding: 2px; }
.invite-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white);
  font-size: 12px; cursor: pointer; user-select: none;
}
.invite-chip input { display: none; }
.invite-chip:has(input:checked) { background: rgba(11,77,74,.1); border-color: var(--teal); color: var(--teal); font-weight: 600; }

@media (max-width: 860px) {
  .mtg-cols { grid-template-columns: 1fr; }
  .mtg-grid { grid-template-columns: 1fr; }
  .mtg-side .panel { position: static; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Phase 3.1 - custom link + invite tweaks */
.link-btn { background: none; border: 0; color: var(--teal-600); font: inherit; font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.link-btn:hover { color: var(--teal); }
.invite-empty { font-size: 12.5px; color: var(--ink-faint); line-height: 1.55; padding: 10px 12px; background: var(--cream); border-radius: 10px; }
.invite-empty a { color: var(--teal-600); }

/* Phase 3.2 - language switch */
.lang-switch { display: inline-flex; align-items: center; border: 1.5px solid var(--gold); border-radius: 20px; overflow: hidden; margin-right: 6px; flex: 0 0 auto; }
.lang-switch a { padding: 6px 13px; font-size: 13px; font-weight: 800; letter-spacing: .4px; color: var(--cream); text-decoration: none; line-height: 1; transition: background .14s var(--ease), color .14s var(--ease); }
.lang-switch a:not(.on):hover { color: #fff; background: rgba(255,255,255,.12); }
.lang-switch a.on { background: var(--gold); color: #1A2421; }
@media (max-width: 720px){ .lang-switch { margin-right: 0; } }

/* Login language toggle */
.auth-lang { position: absolute; top: 18px; right: 18px; z-index: 3; }
.auth-panel { position: relative; }

/* Email settings page */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 560px){ .form-grid-2 { grid-template-columns: 1fr; } }
hr.rule { border: 0; border-top: 1px solid #E4DED0; margin: 20px 0; }
