/* Friday.com — CampaignLab brand styling */
:root {
  --pink: #FF0099;
  --pink-dark: #B30069;
  --pink-soft: #FFD9EC;
  --pink-tint: #FFF0F8;
  --blue: #2A1FCC;
  --blue-dark: #1A1280;
  --blue-soft: #DDDAFF;
  --blue-tint: #F8F4FF;
  --ink: #1c1b2e;
  --ink-soft: #5a5872;
  --line: #e9e7f2;
  --bg: #f6f5fb;
  --card: #ffffff;
  --grey-stripe: #f5f5f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(26,18,128,.08), 0 8px 24px rgba(26,18,128,.06);
  --shadow-lg: 0 12px 40px rgba(26,18,128,.18);
  --sidebar-w: 248px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: #d7d4e8; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 80% -10%, #ffe3f4 0%, transparent 60%),
              radial-gradient(1000px 600px at -10% 110%, #e4e0ff 0%, transparent 55%),
              var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 36px 32px; animation: pop .35s ease;
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-logo .mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--blue)); color: #fff; font-weight: 800; font-size: 24px;
}
.login-logo h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.login-sub { color: var(--ink-soft); margin: 4px 0 26px; font-size: 13px; }
.login-card label { display: block; font-weight: 600; font-size: 12px; margin: 14px 0 6px; color: var(--ink-soft); }
.login-card input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px;
}
.login-card input:focus { outline: none; border-color: var(--pink); }
.btn-primary {
  width: 100%; margin-top: 22px; padding: 12px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, var(--pink), var(--blue)); transition: filter .15s, transform .1s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: translateY(1px); }
.mode-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 4px 9px;
  border-radius: 20px; margin-top: 18px;
}
.mode-tag.local { background: #fff3d6; color: #8a5a00; }
.mode-tag.cloud { background: #d9f7e6; color: #0a7a43; }
.login-people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.login-person {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px 7px 7px; border: 1.5px solid var(--line);
  border-radius: 30px; background: #fff; transition: border-color .15s, background .15s; font-weight: 600; font-size: 12.5px;
}
.login-person:hover { border-color: var(--pink); background: var(--pink-tint); }
.login-err { color: #d12f54; font-size: 12.5px; margin-top: 12px; min-height: 16px; }

/* ---------- App shell ---------- */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: linear-gradient(180deg, #fff, var(--blue-tint));
  border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; }
.sb-brand .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--blue)); color: #fff; font-weight: 800; font-size: 18px;
}
.sb-brand b { font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.sb-scroll { overflow-y: auto; flex: 1; padding: 4px 10px 16px; }
.sb-section { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .6px; padding: 14px 10px 6px; }
.sb-link {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-weight: 600;
  color: var(--ink); width: 100%; text-align: left; font-size: 13.5px; transition: background .12s;
}
.sb-link:hover { background: var(--blue-soft); }
.sb-link.active { background: linear-gradient(135deg, var(--pink), var(--blue)); color: #fff; }
.sb-link .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sb-link .ico { width: 17px; text-align: center; flex-shrink: 0; }
.sb-link .count { margin-left: auto; font-size: 11px; opacity: .7; font-weight: 700; }
.sb-user {
  border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.sb-user .who { line-height: 1.2; }
.sb-user .who b { font-size: 13px; }
.sb-user .who span { font-size: 11px; color: var(--ink-soft); }
.sb-user .logout { margin-left: auto; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.sb-user .logout:hover { color: var(--pink); }
.live-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; }
.live-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.live-badge.live { color: #0a7a43; }
.live-badge.live .live-dot { animation: pulse 1.8s ease-in-out infinite; }
.live-badge.connecting { color: #8a5a00; }
.live-badge.error { color: #c1162f; }
.live-badge.local { color: #8a5a00; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: #fff; flex-shrink: 0;
}
.topbar .title { font-size: 19px; font-weight: 800; letter-spacing: -.4px; display: flex; align-items: center; gap: 10px; }
.topbar .title .swatch { width: 12px; height: 22px; border-radius: 4px; }
.title-edit { font-size: 19px; font-weight: 800; letter-spacing: -.4px; border: 1.5px solid transparent; border-radius: 8px; padding: 3px 8px; background: transparent; max-width: 380px; color: var(--ink); }
.title-edit:hover { border-color: var(--line); }
.title-edit:focus { outline: none; border-color: var(--pink); background: #fff; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 9px; padding: 7px 11px; width: 230px;
}
.search input { border: none; background: none; width: 100%; outline: none; }
.tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.tab {
  padding: 11px 14px; font-weight: 600; color: var(--ink-soft); border-bottom: 2.5px solid transparent;
  font-size: 13.5px; display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--pink); border-bottom-color: var(--pink); }
.view { flex: 1; overflow: auto; padding: 20px 22px 60px; }

.btn {
  padding: 8px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; background: var(--bg);
  border: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 6px; transition: all .12s;
}
.btn:hover { border-color: var(--pink); color: var(--pink); }
.btn.solid { background: linear-gradient(135deg, var(--pink), var(--blue)); color: #fff; border: none; }
.btn.solid:hover { filter: brightness(1.06); color: #fff; }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 20px;
  color: #fff; font-weight: 700; font-size: 11.5px; white-space: nowrap; line-height: 1.3;
}
.pill.editable { cursor: pointer; }
.pill.editable:hover { filter: brightness(1.07); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 700; font-size: 11px; flex-shrink: 0; border: 2px solid #fff;
}
.avatars { display: flex; }
.avatars .avatar:not(:first-child) { margin-left: -7px; }
.avatar.empty { background: #e4e2ef; color: var(--ink-soft); border-style: dashed; border-color: #cdcadf; }

/* ---------- Board table ---------- */
.group { margin-bottom: 22px; }
.group-head {
  display: flex; align-items: center; gap: 9px; padding: 7px 4px; font-weight: 800; font-size: 14.5px;
  cursor: pointer; user-select: none;
}
.group-head .caret { transition: transform .15s; font-size: 11px; color: var(--ink-soft); }
.group-head.collapsed .caret { transform: rotate(-90deg); }
.group-head .gcount { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.group-head .caret { cursor: pointer; }
.group-title-edit { font-size: 14.5px; font-weight: 800; border: 1.5px solid transparent; border-radius: 7px; padding: 2px 7px; background: transparent; max-width: 320px; }
.group-title-edit:hover { border-color: var(--line); }
.group-title-edit:focus { outline: none; border-color: var(--pink); background: #fff; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft);
  font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--blue-tint); white-space: nowrap;
}
.tbl td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--pink-tint); }
.tbl .group-bar { width: 5px; padding: 0; }
.tbl .cell-name { font-weight: 600; min-width: 240px; }
.tbl .cell-name input { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; background: transparent; font-weight: 600; }
.tbl .cell-name input:hover { border-color: var(--line); }
.tbl .cell-name input:focus { outline: none; border-color: var(--pink); background: #fff; }
.cell-date input { border: 1px solid transparent; border-radius: 6px; padding: 5px 6px; background: transparent; width: 130px; }
.cell-date input:hover { border-color: var(--line); }
.cell-date input:focus { outline: none; border-color: var(--pink); }
.cell-notes input { border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; background: transparent; width: 100%; min-width: 160px; color: var(--ink-soft); }
.cell-notes input:hover { border-color: var(--line); }
.cell-notes input:focus { outline: none; border-color: var(--pink); color: var(--ink); }
.expander { cursor: pointer; color: var(--ink-soft); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.expander:hover { color: var(--pink); }
.row-add td { padding: 0; }
.row-add button { width: 100%; text-align: left; padding: 9px 22px; color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.row-add button:hover { color: var(--pink); background: var(--pink-tint); }
.subitems { background: var(--grey-stripe); }
.subitems .stbl { width: 100%; border-collapse: collapse; margin: 0 0 0 28px; }
.subitems .stbl td { padding: 6px 10px; border-bottom: 1px solid #eceaf4; }
.subitems .stitle { font-size: 11px; font-weight: 700; color: var(--ink-soft); padding: 8px 10px 2px 28px; text-transform: uppercase; letter-spacing: .5px; }
.row-del { color: #cfccdd; font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.row-del:hover { color: #fff; background: #e2445c; }
.open-link { opacity: 0; color: var(--ink-soft); font-size: 14px; padding: 2px 5px; border-radius: 6px; transition: opacity .12s; }
.cell-name:hover .open-link { opacity: 1; }
.open-link:hover { color: var(--pink); background: var(--pink-tint); }
.expander { color: var(--ink-soft); font-size: 11px; min-width: 14px; cursor: pointer; flex-shrink: 0; font-weight: 700; }
.expander.empty-sub { opacity: .35; }
.expander:hover { color: var(--pink); opacity: 1; }
.add-sub { opacity: 0; font-size: 11px; font-weight: 700; color: var(--ink-soft); padding: 2px 6px; border-radius: 6px; transition: opacity .12s; flex-shrink: 0; }
.cell-name:hover .add-sub { opacity: 1; }
.add-sub:hover { color: var(--pink); background: var(--pink-tint); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 14px; align-items: flex-start; min-height: 100%; padding-bottom: 20px; }
.kcol { width: 270px; flex-shrink: 0; background: var(--bg); border-radius: var(--radius); padding: 10px; }
.kcol-head { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 6px 10px; }
.kcol-head .kc-count { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.kcol-head .bar { height: 4px; border-radius: 4px; flex: 1; }
.kcard {
  background: #fff; border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow); margin-bottom: 9px;
  cursor: grab; border-left: 4px solid var(--line);
}
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .kc-name { font-weight: 600; margin-bottom: 8px; line-height: 1.35; }
.kcard .kc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kcard .kc-client { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.kcol.drop-hint { outline: 2px dashed var(--pink); outline-offset: -2px; }

/* ---------- Timeline / Gantt ---------- */
.gantt { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.gantt-inner { position: relative; }
.gantt-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); min-height: 40px; }
.gantt-row.header { position: sticky; top: 0; z-index: 5; background: var(--blue-tint); font-weight: 700; }
.gantt-label {
  width: 240px; flex-shrink: 0; padding: 9px 12px; border-right: 1px solid var(--line); position: sticky; left: 0;
  background: #fff; z-index: 2; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px;
}
.gantt-row.header .gantt-label { background: var(--blue-tint); }
.gantt-row.group-row .gantt-label { font-weight: 800; background: var(--pink-tint); }
.gantt-row.group-row { background: var(--pink-tint); }
.gantt-track { position: relative; display: flex; flex: 1; }
.gantt-cell { width: 34px; flex-shrink: 0; border-right: 1px solid #f0eef8; }
.gantt-cell.month-start { border-right-color: #d9d5ee; }
.gantt-cell.today { background: #fff7d6; }
.gantt-cell.weekend { background: #faf9fd; }
.gantt-monthlbl { font-size: 11px; font-weight: 700; color: var(--ink-soft); padding: 6px; white-space: nowrap; }
.gantt-bar {
  position: absolute; top: 7px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, var(--pink), var(--blue));
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; padding: 0 8px; cursor: grab;
  box-shadow: 0 2px 6px rgba(26,18,128,.25); user-select: none; overflow: hidden; white-space: nowrap;
}
.gantt-bar:active { cursor: grabbing; }
.gantt-bar .handle { position: absolute; top: 0; width: 9px; height: 100%; cursor: ew-resize; }
.gantt-bar .handle.l { left: 0; } .gantt-bar .handle.r { right: 0; }
.gantt-bar.crit { box-shadow: 0 0 0 2px #ffd23f, 0 2px 6px rgba(26,18,128,.25); }
.gantt-dep { position: absolute; pointer-events: none; z-index: 1; }
.gantt-hint { padding: 10px 16px; color: var(--ink-soft); font-size: 12.5px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; }
.gantt-hint b { color: var(--ink); }
.gantt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gantt-row.board-row .gantt-label { font-weight: 800; font-size: 14px; background: var(--blue-tint); }
.gantt-row.board-row { background: var(--blue-tint); }
.dens-wrap { padding: 4px 8px; }
.dens-row { display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.dens-row:last-child { border-bottom: none; }
.dens-row.axis { border-bottom: 1px solid var(--line); align-items: flex-end; }
.dens-label { width: 200px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; align-self: center; }
.dens-track { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 64px; padding: 6px 8px; }
.dens-bar2 { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .15s; }
.dens-bar2.mstart { box-shadow: inset 1px 0 0 rgba(26,18,128,.18); }
.dens-axis-cell { flex: 1; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); text-align: left; white-space: nowrap; padding: 4px 0; min-width: 0; }
.dens-axis-cell.m { border-left: 1px solid var(--line); padding-left: 3px; }
.gantt-label { gap: 7px; }
.gantt-link-btn { margin-left: auto; font-size: 11px; padding: 2px 5px; border-radius: 6px; opacity: .55; flex-shrink: 0; }
.gantt-link-btn:hover { opacity: 1; background: var(--pink-tint); }

/* ---------- Calendar ---------- */
.cal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-head .mname { font-size: 17px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: 9px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; background: var(--blue-tint); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; position: relative; }
.cal-cell.dim { background: #fafafd; }
.cal-cell .dnum { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.cal-cell.today .dnum { background: var(--pink); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-ev { font-size: 11px; padding: 3px 6px; border-radius: 6px; margin-top: 4px; color: #fff; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-note { padding: 9px 16px; font-size: 12.5px; color: var(--ink-soft); background: var(--blue-tint); border-bottom: 1px solid var(--line); }
.cal-check { width: 16px; height: 16px; accent-color: var(--pink); cursor: pointer; }
.cal-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; cursor: pointer; }
.cal-toggle input { width: 16px; height: 16px; accent-color: var(--pink); }

/* ---------- My Tasks ---------- */
.mt-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.mt-h { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin: 22px 0 10px; font-weight: 800; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi .label { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.kpi .num { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-top: 4px; }
.kpi .num.pink { color: var(--pink); } .kpi .num.blue { color: var(--blue); }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); margin-bottom: 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-row .bl { width: 120px; font-size: 12.5px; font-weight: 600; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { flex: 1; height: 18px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-row .bf { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--pink), var(--blue)); }
.bar-row .bv { width: 28px; text-align: right; font-weight: 700; font-size: 12.5px; }
.attn-tag { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.attn-tag.overdue { background: #fdeaee; color: #c1162f; }
.attn-tag.urgent { background: #f5e1e1; color: #8B0000; }

/* ---------- Health / diagnostics ---------- */
.health-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); }
.health-banner.ok { background: #e8faf0; } .health-banner.warn { background: #fff6e0; } .health-banner.bad { background: #fdeaee; }
.health-banner .hb-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.health-banner.ok .hb-dot { background: #00c875; box-shadow: 0 0 0 4px rgba(0,200,117,.18); }
.health-banner.warn .hb-dot { background: #fdab3d; box-shadow: 0 0 0 4px rgba(253,171,61,.18); }
.health-banner.bad .hb-dot { background: #e2445c; box-shadow: 0 0 0 4px rgba(226,68,92,.18); }
.finding { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.finding:last-child { border-bottom: none; }
.f-tag { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; flex-shrink: 0; }
.f-tag.error { background: #fdeaee; color: #c1162f; } .f-tag.warn { background: #fff6e0; color: #8a5a00; }
.f-auto { margin-left: auto; font-size: 11px; font-weight: 700; color: #0a7a43; flex-shrink: 0; }
.f-manual { margin-left: auto; font-size: 11px; color: var(--ink-soft); flex-shrink: 0; }

/* ---------- Enhancement portal ---------- */
.enh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.enh-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; border-left: 4px solid var(--line); }
.enh-card.submitted { border-left-color: #fdab3d; } .enh-card.approved { border-left-color: #00c875; }
.enh-card.declined { border-left-color: #e2445c; } .enh-card.shipped { border-left-color: #2A1FCC; }
.enh-card .e-title { font-weight: 700; font-size: 15px; }
.enh-card .e-meta { font-size: 11.5px; color: var(--ink-soft); margin: 3px 0 8px; }
.enh-card .e-detail { font-size: 13px; line-height: 1.5; color: #3a3850; }
.enh-card .e-actions { display: flex; gap: 8px; margin-top: 12px; }
.enh-status { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 8px; border-radius: 20px; }
.enh-status.submitted { background: #fff6e0; color: #8a5a00; } .enh-status.approved { background: #e8faf0; color: #0a7a43; }
.enh-status.declined { background: #fdeaee; color: #c1162f; } .enh-status.shipped { background: var(--blue-soft); color: var(--blue-dark); }
.enh-note { background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin-top: 8px; }
.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--pink); }
.workload th, .workload td { text-align: left; }
.wl-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 9px; padding: 3px; flex-shrink: 0; }
.seg-btn { padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.seg-btn.on { background: #fff; color: var(--pink); box-shadow: var(--shadow); }
.portal-intro { margin-bottom: 18px; }
.portal-intro h2 { font-size: 20px; font-weight: 800; }
.portal-intro p { max-width: 640px; margin: 6px 0 14px; }
.cloud-note { background: var(--blue-tint); border: 1px solid var(--blue-soft); border-radius: var(--radius); padding: 12px 16px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; line-height: 1.5; }
.ta-name { border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; font-weight: 600; min-width: 120px; }
.ta-name:hover { border-color: var(--line); } .ta-name:focus { outline: none; border-color: var(--pink); }

/* ---------- Modal / dropdown ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(26,18,128,.28); display: grid; place-items: center; z-index: 100; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 22px; animation: pop .2s; }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.menu {
  position: absolute; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 200;
  min-width: 180px; max-height: 300px; overflow: auto; border: 1px solid var(--line);
}
.menu-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; width: 100%; text-align: left; font-weight: 600; font-size: 13px; }
.menu-item:hover { background: var(--pink-tint); }
.menu-item .check { margin-left: auto; color: var(--pink); }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); z-index: 300; animation: pop .2s;
}
.empty-state { text-align: center; color: var(--ink-soft); padding: 60px 20px; }
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- Drawer ---------- */
.drawer {
  width: 100%; max-width: 520px; height: 100%; background: #fff; box-shadow: -8px 0 40px rgba(26,18,128,.18);
  overflow-y: auto; padding: 0 0 40px; animation: slidein .22s ease;
}
@keyframes slidein { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; padding: 16px 20px 6px; position: sticky; top: 0; background: #fff; z-index: 2; }
.dh-crumb { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-soft); font-size: 13px; }
.dh-crumb .swatch { width: 11px; height: 18px; border-radius: 4px; }
.drawer-x { margin-left: auto; font-size: 24px; color: var(--ink-soft); width: 32px; height: 32px; border-radius: 8px; line-height: 1; }
.drawer-x:hover { background: var(--bg); color: var(--pink); }
.drawer-title { font-size: 21px; font-weight: 800; border: 1px solid transparent; border-radius: 8px; padding: 6px 20px; margin: 0 0 8px; width: calc(100% - 40px); }
.drawer-title:hover { border-color: var(--line); }
.drawer-title:focus { outline: none; border-color: var(--pink); }
.drawer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; padding: 8px 20px; }
.df { display: flex; align-items: center; gap: 10px; padding: 7px 0; min-height: 38px; }
.df.full { display: block; padding: 8px 20px; }
.df-l { width: 90px; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.drawer-date { border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.drawer-notes { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px; margin-top: 6px; resize: vertical; }
.drawer-notes:focus, .drawer-date:focus { outline: none; border-color: var(--pink); }
.drawer-section { padding: 14px 20px; border-top: 1px solid var(--line); margin-top: 8px; }
.drawer-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); margin-bottom: 12px; }
.ds-head { display: flex; align-items: center; justify-content: space-between; }
.ds-head h4 { margin-bottom: 0; }
.sub-list { margin-top: 10px; }
.sub-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sub-name { flex: 1; border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; font-weight: 600; }
.sub-name:hover { border-color: var(--line); } .sub-name:focus { outline: none; border-color: var(--pink); }
.sub-date { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; width: 120px; }
.comment-compose { margin-bottom: 14px; }
.comment-input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; resize: vertical; }
.comment-input:focus { outline: none; border-color: var(--pink); }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.c-head { display: flex; align-items: baseline; gap: 8px; }
.c-time { font-size: 11px; color: var(--ink-soft); font-weight: 500; }
.c-body { margin-top: 2px; line-height: 1.45; white-space: pre-wrap; }
.activity-list { display: flex; flex-direction: column; gap: 9px; }
.act-row { display: flex; gap: 9px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.act-row b { color: var(--ink); }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); margin-top: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }

@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 50; height: 100%; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .panels { grid-template-columns: 1fr; }
}
