/* ==========================================================================
   ASG2 Project Command Centre — ThirdEye Data for The Aligned Solutions Group
   ========================================================================== */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('../fonts/poppins-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --teal: #12554C; --teal-2: #0E4540; --green: #668F45; --emerald: #10B981; --lime: #A3E635;
  --amber: #F59E0B; --coral: #F2545B; --magenta: #D946EF; --violet: #8B5CF6; --asg: #1F4E79;
  --grad-brand: linear-gradient(120deg, #12554C 0%, #168A6E 38%, #668F45 72%, #A3C94A 100%);
  --grad-vivid: linear-gradient(120deg, #10B981, #A3E635 35%, #F59E0B 65%, #F2545B 85%, #D946EF);

  --bg: #F3F7F5; --bg-2: #E9F1ED;
  --surface: rgba(255, 255, 255, .84); --surface-solid: #FFFFFF; --surface-2: rgba(255, 255, 255, .55);
  --border: rgba(18, 85, 76, .12); --border-strong: rgba(18, 85, 76, .22);
  --text: #0F1F1C; --text-2: #3D524D; --muted: #52665F;
  --shadow-sm: 0 1px 2px rgba(10, 40, 35, .06), 0 1px 3px rgba(10, 40, 35, .06);
  --shadow: 0 8px 24px -8px rgba(10, 50, 44, .18), 0 2px 6px rgba(10, 50, 44, .06);
  --shadow-lg: 0 24px 60px -18px rgba(8, 45, 40, .35);
  --focus: 0 0 0 3px rgba(16, 185, 129, .45);
  --radius: 16px; --radius-sm: 10px; --radius-xs: 7px;

  /* status palette: [solid, tint bg, text on tint] */
  --ns: #64748B; --ns-bg: #E7ECF2; --ns-tx: #334155;
  --ip: #F59E0B; --ip-bg: #FFF1D6; --ip-tx: #8A4B00;
  --rv: #8B5CF6; --rv-bg: #EFE7FF; --rv-tx: #5B21B6;
  --done: #10B981; --done-bg: #D9F7EA; --done-tx: #065F46;
  --bl: #EF4444; --bl-bg: #FFE1E1; --bl-tx: #9F1239;
  --oh: #8E7AA3; --oh-bg: #EEE8F4; --oh-tx: #54406B;

  --crit: #BE123C; --high: #C2410C; --med: #946200; --low: #0F766E;
  --header-h: 64px; --nav-h: 52px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07130F; --bg-2: #0B1C18;
  --surface: rgba(18, 36, 32, .84); --surface-solid: #10221E; --surface-2: rgba(22, 44, 39, .6);
  --border: rgba(163, 230, 53, .10); --border-strong: rgba(163, 230, 53, .2);
  --text: #E8F3EF; --text-2: #B8CCC6; --muted: #8FA7A0;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .7);
  --ns-bg: rgba(100, 116, 139, .22); --ns-tx: #CBD5E1;
  --ip-bg: rgba(245, 158, 11, .18); --ip-tx: #FCD34D;
  --rv-bg: rgba(139, 92, 246, .2); --rv-tx: #C4B5FD;
  --done-bg: rgba(16, 185, 129, .18); --done-tx: #6EE7B7;
  --bl-bg: rgba(239, 68, 68, .2); --bl-tx: #FCA5A5;
  --oh-bg: rgba(142, 122, 163, .22); --oh-tx: #D8CCE6;
  --crit: #FB7185; --high: #FB923C; --med: #FACC15; --low: #5EEAD4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
[data-theme="dark"] a { color: #7EE2B8; }
img { max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--teal); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- animated backdrop ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; background:
  radial-gradient(1200px 600px at 10% -10%, rgba(18, 85, 76, .16), transparent 60%),
  radial-gradient(900px 500px at 110% 10%, rgba(102, 143, 69, .16), transparent 60%), var(--bg); }
[data-theme="dark"] .aurora { background:
  radial-gradient(1200px 600px at 10% -10%, rgba(18, 85, 76, .55), transparent 60%),
  radial-gradient(900px 500px at 110% 10%, rgba(102, 143, 69, .28), transparent 60%), var(--bg); }
.orb { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.orb.o1 { width: 42vmax; height: 42vmax; left: -12vmax; top: 30%; background: radial-gradient(circle, rgba(16, 185, 129, .5), transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.orb.o2 { width: 36vmax; height: 36vmax; right: -10vmax; top: -8vmax; background: radial-gradient(circle, rgba(163, 230, 53, .45), transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.orb.o3 { width: 30vmax; height: 30vmax; right: 18%; bottom: -14vmax; background: radial-gradient(circle, rgba(217, 70, 239, .28), transparent 65%); animation: drift3 38s ease-in-out infinite alternate; }
.orb.o4 { width: 22vmax; height: 22vmax; left: 38%; top: 12%; background: radial-gradient(circle, rgba(245, 158, 11, .28), transparent 65%); animation: drift1 44s ease-in-out infinite alternate-reverse; }
[data-theme="dark"] .orb { opacity: .45; }
@keyframes drift1 { to { transform: translate3d(14vmax, -8vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-16vmax, 12vmax, 0) scale(.9); } }
@keyframes drift3 { to { transform: translate3d(-10vmax, -14vmax, 0) scale(1.2); } }
.particles { position: absolute; inset: 0; }
.particles i { position: absolute; bottom: -20px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 12px rgba(163, 230, 53, .8); animation: rise linear infinite; opacity: 0; }
@keyframes rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateY(-110vh) scale(1.1); opacity: 0; } }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; color: #fff; }
.login .aurora { background: linear-gradient(135deg, #04201B 0%, #0B3A33 40%, #12554C 70%, #2D5A2A 100%); z-index: 0; }
.login .aurora::after { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent, rgba(163, 230, 53, .12), transparent 30%, rgba(217, 70, 239, .12), transparent 55%, rgba(245, 158, 11, .12), transparent 80%); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login .orb { opacity: .7; }
.login-card { position: relative; z-index: 2; width: min(460px, 100%); padding: 34px 32px 28px; border-radius: 26px;
  background: rgba(8, 30, 26, .55); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); animation: pop .7s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes pop { from { transform: translateY(18px) scale(.97); } to { transform: none; } }
.login-logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.logo-pill { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .4); }
.logo-pill img { display: block; height: 26px; width: auto; }
.logo-asg { display: block; height: 42px; width: auto; border-radius: 10px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .12); }
.logo-divider { width: 1px; height: 34px; background: linear-gradient(transparent, rgba(255, 255, 255, .5), transparent); }
.login h1 { font-size: clamp(24px, 5vw, 30px); font-weight: 800; text-align: center; letter-spacing: -.02em;
  background: linear-gradient(90deg, #fff, #D9F99D 40%, #6EE7B7 60%, #fff); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmerText 6s linear infinite; }
@keyframes shimmerText { to { background-position: 200% center; } }
.login .sub { text-align: center; color: rgba(255, 255, 255, .78); margin: 8px 0 24px; font-size: 13.5px; }
.login label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .85); margin: 14px 0 6px; }
.login .field { position: relative; }
.login input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; font-size: 15px; transition: border-color .2s, background .2s, box-shadow .2s; }
.login input::placeholder { color: rgba(255, 255, 255, .45); }
.login input:focus { outline: none; border-color: #A3E635; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 4px rgba(163, 230, 53, .2); }
.login .reveal { position: absolute; right: 6px; top: 6px; height: 36px; min-width: 44px; border: 0; background: transparent; color: rgba(255, 255, 255, .8); border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; }
.login .btn-primary { width: 100%; height: 50px; margin-top: 22px; font-size: 15.5px; }
.login .err { min-height: 22px; margin-top: 12px; color: #FECACA; font-size: 13px; text-align: center; }
.login .foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.login .foot b { color: rgba(255, 255, 255, .85); font-weight: 600; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; text-decoration: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--teal); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { position: relative; overflow: hidden; border: 0; color: #fff; background: var(--grad-brand); background-size: 160% 100%; box-shadow: 0 10px 24px -10px rgba(18, 85, 76, .7); }
.btn-primary:hover { background-position: 100% 0; border: 0; box-shadow: 0 14px 28px -10px rgba(18, 85, 76, .8); }
.btn-primary::after { content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-150%) skewX(-20deg); animation: sheen 4.2s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(350%) skewX(-20deg); } }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); box-shadow: none; }
.btn-danger { color: #fff; background: linear-gradient(120deg, #E11D48, #F2545B); border: 0; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.add-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 9px; border: 1px dashed var(--border-strong); background: transparent; color: var(--teal); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: all .2s; }
[data-theme="dark"] .add-btn { color: #86EFAC; }
.add-btn:hover { border-style: solid; background: rgba(16, 185, 129, .1); transform: translateY(-1px); }
.add-btn svg { width: 14px; height: 14px; }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--emerald); box-shadow: var(--focus); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F7570' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input[readonly], .textarea[readonly] { background: var(--surface-2); }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--emerald); height: 28px; }
.range-row .input { width: 84px; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: var(--surface); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.topbar { overflow: hidden; }
.topbar::after { content: ''; position: absolute; left: 0; bottom: 0; width: 200%; height: 2px; background: linear-gradient(90deg, #10B981, #A3E635, #F59E0B, #F2545B, #D946EF, #8B5CF6, #10B981); background-size: 50% 100%; background-repeat: repeat-x; animation: flowX 10s linear infinite; opacity: .85; will-change: transform; }
@keyframes flowX { to { transform: translateX(-50%); } }
@keyframes flow { to { background-position: 200% 0; } }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .logo-pill { padding: 5px 9px; border-radius: 10px; border: 1px solid var(--border); box-shadow: none; }
.brand .logo-pill img { height: 20px; }
.brand .logo-asg { height: 34px; border-radius: 8px; box-shadow: none; }
.brand .logo-divider { height: 28px; background: linear-gradient(transparent, var(--border-strong), transparent); }
.brand .for { font-size: 10.5px; color: var(--muted); line-height: 1.25; max-width: 150px; }
.brand .for b { color: var(--text-2); font-weight: 600; }
.proj-title { display: flex; flex-direction: column; min-width: 0; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--border); }
.proj-title h1 { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stamp .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.spacer { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.search-btn { min-width: 210px; justify-content: flex-start; color: var(--muted); font-weight: 500; }
.search-btn kbd { margin-left: auto; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); }
.role-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.role-badge.admin { background: linear-gradient(120deg, rgba(18, 85, 76, .14), rgba(102, 143, 69, .2)); color: var(--teal); border: 1px solid rgba(18, 85, 76, .25); }
.role-badge.user { background: rgba(139, 92, 246, .12); color: #6D28D9; border: 1px solid rgba(139, 92, 246, .3); }
[data-theme="dark"] .role-badge.admin { color: #86EFAC; }
[data-theme="dark"] .role-badge.user { color: #C4B5FD; }
.save-ind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 74px; }
.save-ind.saving { color: var(--amber); }
.save-ind.saved { color: var(--emerald); }
.save-ind.error { color: var(--coral); }
.save-ind .spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.nav { position: sticky; top: var(--header-h); z-index: 40; display: flex; align-items: center; gap: 4px; padding: 8px 18px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface-2); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: color .2s, background .2s; }
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 18px -10px rgba(18, 85, 76, .9); }
.nav .nav-right { margin-left: auto; display: flex; gap: 6px; }

main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 20px 18px 40px; }
.view { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.view-head h2 { font-size: 22px; font-weight: 700; }
.view-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lift { transition: transform .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; line-height: 1; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ns { background: var(--ns-bg); color: var(--ns-tx); } .st-ns .dot { background: var(--ns); }
.st-ip { background: var(--ip-bg); color: var(--ip-tx); } .st-ip .dot { background: var(--ip); animation: dotPulse 1.8s ease-in-out infinite; }
.st-rv { background: var(--rv-bg); color: var(--rv-tx); } .st-rv .dot { background: var(--rv); }
.st-done { background: var(--done-bg); color: var(--done-tx); } .st-done .dot { background: var(--done); }
.st-bl { background: var(--bl-bg); color: var(--bl-tx); animation: blockedPulse 2.2s ease-in-out infinite; } .st-bl .dot { background: var(--bl); }
.st-oh { background: var(--oh-bg); color: var(--oh-tx); } .st-oh .dot { background: var(--oh); }
@keyframes dotPulse { 50% { transform: scale(1.5); opacity: .6; } }
@keyframes blockedPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .0); } 50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); } }
.pr { background: transparent; border: 1px solid currentColor; font-weight: 700; }
.pr-Critical { color: var(--crit); } .pr-High { color: var(--high); } .pr-Medium { color: var(--med); } .pr-Low { color: var(--low); }
[data-theme="light"] .pr-Medium, :root:not([data-theme="dark"]) .pr-Medium { color: #946200; }
.chip.soft { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.chip.proposed { background: repeating-linear-gradient(135deg, rgba(139, 92, 246, .12) 0 6px, rgba(139, 92, 246, .04) 6px 12px); color: #6D28D9; border: 1px dashed rgba(139, 92, 246, .5); }
[data-theme="dark"] .chip.proposed { color: #C4B5FD; }
.rag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.rag::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.rag-Green { background: rgba(16, 185, 129, .14); color: #065F46; }
.rag-Amber { background: rgba(245, 158, 11, .16); color: #92400E; }
.rag-Red { background: rgba(239, 68, 68, .14); color: #B91C1C; }
[data-theme="dark"] .rag-Green { color: #6EE7B7; } [data-theme="dark"] .rag-Amber { color: #FCD34D; } [data-theme="dark"] .rag-Red { color: #FCA5A5; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface-solid); }
.code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ---------- progress ---------- */
.bar { position: relative; height: 8px; border-radius: 999px; background: rgba(100, 116, 139, .16); overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--grad-brand); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.bar > span { overflow: hidden; }
.epic-row .bar > span::after, .drawer .bar > span::after, .mp-epic .bar > span::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-120%); animation: shineX 2.8s ease-in-out infinite; }
@keyframes shineX { 0% { transform: translateX(-120%); } 70%, 100% { transform: translateX(320%); } }
@keyframes barShine { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.bar .plan-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .45; border-radius: 2px; }
.ring { --p: 0; --c: var(--emerald); width: 34px; height: 34px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .trk { stroke: rgba(100, 116, 139, .2); }
.ring .val { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; }

/* ---------- dashboard ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(125deg, #0B3A33 0%, #12554C 35%, #3F7A48 70%, #668F45 100%); box-shadow: var(--shadow-lg); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 85% 0%, rgba(163, 230, 53, .35), transparent 70%), radial-gradient(500px 240px at 0% 100%, rgba(217, 70, 239, .22), transparent 70%); }
.hero::after { content: ''; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 90px rgba(255, 255, 255, .025); animation: spin 60s linear infinite; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.hero h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, .82); max-width: 760px; }
.hero .rag { background: rgba(255, 255, 255, .95); }
.weekline { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 18px; }
.weekline div { position: relative; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; overflow: hidden; }
.weekline div span { position: relative; z-index: 1; }
.weekline div.past { background: rgba(255, 255, 255, .28); }
.weekline div.now { background: #fff; color: var(--teal); box-shadow: 0 0 0 3px rgba(163, 230, 53, .6), 0 10px 20px -8px rgba(0, 0, 0, .4); }
.weekline div.now::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; background: linear-gradient(90deg, transparent, rgba(163, 230, 53, .5), transparent); animation: shineX 2.6s ease-in-out infinite; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; padding: 16px; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, var(--teal)); }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, var(--k, var(--teal)), transparent 70%); opacity: .14; }
.kpi .lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .val { font-family: 'Poppins', sans-serif; font-size: 30px; font-weight: 800; margin-top: 4px; line-height: 1.1; color: var(--text); }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.kpi .ring { position: absolute; right: 14px; top: 14px; width: 50px; height: 50px; }
.kpi .ring b { font-size: 11px; }
.grid-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 170px; height: 170px; flex: none; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { transition: stroke-dasharray 1.2s cubic-bezier(.2, .8, .2, 1), stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; }
.donut .center span { font-size: 11px; color: var(--muted); font-weight: 600; }
.legend { display: grid; gap: 7px; flex: 1; min-width: 150px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart-svg .grid-l { stroke: var(--border); }
.chart-svg .bar-r { transition: height .9s cubic-bezier(.2, .8, .2, 1), y .9s cubic-bezier(.2, .8, .2, 1); }
.chart-svg .now-l { stroke: var(--magenta); stroke-dasharray: 4 4; }
.epic-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 64px 70px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.epic-row:last-child { border-bottom: 0; }
.epic-row .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.epic-row .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.pct { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.list { display: grid; gap: 2px; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; transition: background .2s; }
.li:hover { background: var(--surface-2); }
.li .meta { font-size: 12px; color: var(--muted); }
.li .main { flex: 1; min-width: 0; }
.li .title { font-weight: 600; }
.diamond { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; flex: none; margin-top: 5px; background: var(--violet); box-shadow: 0 0 10px rgba(139, 92, 246, .5); }
.diamond.Achieved { background: var(--emerald); box-shadow: 0 0 10px rgba(16, 185, 129, .5); }
.diamond.At.Risk, .diamond.AtRisk { background: var(--amber); }
.diamond.Missed { background: var(--coral); }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; padding: 10px; }
.filters .select, .filters .input { width: auto; min-width: 130px; min-height: 36px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.filters .input { min-width: 180px; }
.filters .count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.col { display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 250px); padding: 10px; border-radius: 18px; scroll-snap-align: start;
  background: var(--surface-2); border: 1px solid var(--border); transition: background .2s, box-shadow .2s; }
.col.drop-ok { background: color-mix(in srgb, var(--c) 12%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; border-bottom: 3px solid var(--c); margin-bottom: 10px; }
.col-head h3 { font-size: 13.5px; font-weight: 700; }
.col-head .n { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); }
.col-head .add-btn { margin-left: auto; min-height: 30px; }
.col-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 2px; min-height: 60px; }
.col-empty { margin: auto; text-align: center; font-size: 12.5px; color: var(--muted); padding: 20px 8px; }
.tcard { position: relative; padding: 11px 12px 10px 14px; border-radius: 13px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .8, .3, 1), box-shadow .2s, opacity .2s; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tcard::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ec, var(--teal)); }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tcard .row1 { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.tcard .ttl { font-weight: 600; font-size: 13.5px; line-height: 1.35; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .row2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard .row2 .ring { margin-left: auto; }
.tcard .story { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: -3px 0 7px; }
.tcard .blk { font-size: 11.5px; color: var(--bl-tx); background: var(--bl-bg); padding: 4px 8px; border-radius: 8px; margin-bottom: 7px; }
.tcard.dragging { opacity: .35; }
.drag-ghost { position: fixed; z-index: 999; pointer-events: none; width: 260px; transform: rotate(3deg) scale(1.03); box-shadow: var(--shadow-lg); opacity: .96; transition: none; }
.tcard .grip { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: grab; touch-action: none; }
.tcard .grip:hover { background: var(--surface-2); }
.tcard .grip svg { width: 16px; height: 16px; }
.tcard.readonly .grip { display: none; }
.tcard .overdue { color: var(--bl-tx); font-weight: 700; font-size: 11px; }

/* ---------- plan tree ---------- */
.tree-wrap { overflow: auto; border-radius: var(--radius); }
table.tree { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 1180px; }
.tree th { position: sticky; top: 0; z-index: 2; text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; background: var(--surface-solid); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.tree td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tree tr.r-epic td { background: color-mix(in srgb, var(--ec) 10%, var(--surface-solid)); font-weight: 700; border-top: 2px solid var(--ec); }
.tree tr.r-story td { background: color-mix(in srgb, var(--ec) 4%, var(--surface-solid)); font-weight: 600; }
.tree tr.r-task td { background: var(--surface-solid); }
.tree tr.r-task:hover td { background: color-mix(in srgb, var(--emerald) 5%, var(--surface-solid)); }
.tree tr.r-add td { background: var(--surface-solid); padding: 4px 8px 10px; }
.tree tr.selected td { background: color-mix(in srgb, var(--violet) 10%, var(--surface-solid)) !important; }
.tree .tcell { display: flex; align-items: center; gap: 6px; min-width: 260px; }
.tree .tcell .txt { flex: 1; min-width: 0; }
.tree .tcell .txt .nm { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.tree .tw { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--muted); flex: none; }
.tree .tw svg { width: 14px; height: 14px; transition: transform .25s; }
.tree .tw[aria-expanded="false"] svg { transform: rotate(-90deg); }
.tree .tw:hover { background: var(--surface-2); color: var(--text); }
.tree .ind-1 { padding-left: 22px; } .tree .ind-2 { padding-left: 50px; }
.tree .ed { cursor: text; border-radius: 6px; padding: 3px 5px; margin: -3px -5px; transition: background .15s, box-shadow .15s; display: inline-block; min-width: 24px; min-height: 22px; }
.tree .ed:hover { background: rgba(16, 185, 129, .08); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .35); }
.tree .ed.empty::before { content: '—'; color: var(--muted); }
.tree .inline { min-height: 30px; padding: 3px 7px; border-radius: 7px; font-size: 13px; }
.tree td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tree .wk { display: grid; grid-template-columns: repeat(8, 16px); gap: 2px; }
.tree .wk i { height: 12px; border-radius: 3px; background: rgba(100, 116, 139, .1); }
.tree .wk i.on { background: var(--wc); }
.tree .wk i.now { outline: 1.5px solid var(--magenta); outline-offset: 1px; }
.tree .row-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .2s; justify-content: flex-end; }
.tree tr:hover .row-actions, .tree tr:focus-within .row-actions { opacity: 1; }
.tree .pctcell { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.tree .pctcell .bar { flex: 1; height: 6px; }
.tree .remarks { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-weight: 400; }
.tree input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal); }
.bulkbar { position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px auto 0; width: max-content; max-width: 100%; padding: 10px 14px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, #0B3A33, #12554C); box-shadow: var(--shadow-lg); animation: pop .3s both; }
.bulkbar .select { min-height: 34px; width: auto; background-color: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.bulkbar .select option { color: #000; }

/* mobile plan cards */
.mplan { display: none; }
.mp-epic { margin-bottom: 14px; overflow: hidden; }
.mp-epic > header { display: flex; align-items: center; gap: 10px; padding: 14px; border-left: 5px solid var(--ec); }
.mp-story { border-top: 1px solid var(--border); }
.mp-story > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; background: var(--surface-2); }
.mp-task { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; border-top: 1px solid var(--border); }
.mp-task .ttl { font-weight: 600; }
.mp-task .meta { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; }

/* ---------- gantt ---------- */
.gantt { overflow: auto; border-radius: var(--radius); }
.g-grid { position: relative; display: grid; grid-template-columns: 300px 1fr; min-width: 1040px; }
.g-head { position: sticky; top: 0; z-index: 3; display: contents; }
.g-head > div { position: sticky; top: 0; z-index: 3; background: var(--surface-solid); border-bottom: 1px solid var(--border-strong); }
.g-weeks { display: grid; grid-template-columns: repeat(8, 1fr); }
.g-weeks div { padding: 8px 6px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--border); }
.g-weeks div small { display: block; font-weight: 500; font-size: 10.5px; }
.g-weeks div.cur { color: var(--teal); background: rgba(16, 185, 129, .08); }
[data-theme="dark"] .g-weeks div.cur { color: #86EFAC; }
.g-label { padding: 6px 10px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border); background: var(--surface-solid); position: sticky; left: 0; z-index: 2; min-height: 34px; }
.g-label .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-label.l-epic { font-weight: 700; } .g-label.l-story { font-weight: 600; padding-left: 26px; } .g-label.l-task { padding-left: 44px; color: var(--text-2); }
.g-lane { position: relative; border-bottom: 1px solid var(--border); min-height: 34px; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: calc(100% / 8) 100%; }
.g-bar { position: absolute; top: 8px; height: 18px; border-radius: 6px; min-width: 6px; cursor: pointer; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .3); transform-origin: left center; animation: growX .9s cubic-bezier(.2, .8, .2, 1) both; overflow: hidden; }
.g-bar { background: color-mix(in srgb, var(--bc, #12554C) 30%, var(--surface-solid)); border: 1px solid color-mix(in srgb, var(--bc, #12554C) 60%, transparent); }
.g-bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--bc, #12554C); }

.g-bar.epic { top: 10px; height: 14px; border-radius: 4px; }
.g-bar.story { top: 10px; height: 14px; }
.g-base { position: absolute; top: 28px; height: 3px; border-radius: 2px; background: var(--muted); opacity: .5; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #C026D3; z-index: 1; pointer-events: none; box-shadow: 0 0 12px rgba(217, 70, 239, .7); }
.g-today span { position: sticky; top: 42px; display: inline-block; transform: translateX(-50%); font-size: 10px; font-weight: 800; color: #fff; background: #A21CAF; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.g-ms { position: absolute; top: 5px; width: 24px; height: 24px; transform: translateX(-50%); cursor: pointer; z-index: 3; --mc: var(--violet); }
.g-ms::before { content: ''; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; background: var(--mc); box-shadow: 0 0 12px color-mix(in srgb, var(--mc) 60%, transparent); }
.g-ms.Achieved { --mc: var(--emerald); } .g-ms.Missed { --mc: var(--coral); } .g-ms.At { --mc: var(--amber); }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { width: 18px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- weekly ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-width: 94px; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; transition: all .2s; }
.tab b { display: block; font-size: 13px; }
.tab small { color: var(--muted); font-size: 11px; }
.tab[aria-selected="true"] { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(18, 85, 76, .9); }
.tab[aria-selected="true"] small { color: rgba(255, 255, 255, .85); }
.tab .mini { height: 4px; border-radius: 3px; background: rgba(100, 116, 139, .2); margin-top: 5px; overflow: hidden; }
.tab .mini span { display: block; height: 100%; background: var(--emerald); }
.week-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.week-sum .card { padding: 14px; }
.week-sum b { font-family: 'Poppins', sans-serif; font-size: 22px; display: block; }
.week-sum span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tlist { display: grid; gap: 8px; }
.trow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 140px 110px 90px 110px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--border); cursor: pointer; transition: transform .2s, box-shadow .2s; border-left: 4px solid var(--ec); }
.trow:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.trow .ttl { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .who { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.trow .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-h { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-weight: 700; font-size: 13.5px; }

/* ---------- owners ---------- */
.owners { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.owner-card { padding: 16px; }
.owner-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.owner-card header .avatar { width: 42px; height: 42px; font-size: 14px; }
.owner-card h3 { font-size: 15px; }
.owner-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; text-align: center; }
.owner-stats div { padding: 8px 4px; border-radius: 10px; background: var(--surface-2); }
.owner-stats b { display: block; font-family: 'Poppins', sans-serif; font-size: 18px; }
.owner-stats span { font-size: 11px; color: var(--muted); font-weight: 600; }
.stackbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(100, 116, 139, .15); }
.stackbar i { display: block; height: 100%; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- risks / milestones / audit ---------- */
.rtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.rtable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.rtable td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rtable tr.click { cursor: pointer; transition: background .2s; }
.rtable tr.click:hover td { background: var(--surface-2); }
.sev { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; letter-spacing: .03em; text-transform: uppercase; }
.sev-Critical { background: linear-gradient(120deg, #9F1239, #E11D48); } .sev-High { background: linear-gradient(120deg, #C2410C, #F97316); }
.sev-Medium { background: linear-gradient(120deg, #A16207, #EAB308); } .sev-Low { background: linear-gradient(120deg, #0F766E, #14B8A6); }
.risk-matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.risk-matrix .card { padding: 14px; }
.risk-matrix b { font-family: 'Poppins', sans-serif; font-size: 26px; display: block; }
.mtl { position: relative; padding-left: 28px; }
.mtl::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--teal), var(--green), var(--violet)); }
.mtl .mi { position: relative; margin-bottom: 14px; padding: 14px 16px; }
.mtl .mi::before { content: ''; position: absolute; left: -26px; top: 18px; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; background: var(--mc, var(--violet)); box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--mc, var(--violet)); }
.mtl .mi.past { opacity: .9; }
.mtl .mi .when { font-size: 12px; font-weight: 700; color: var(--muted); }
.audit-ch { font-size: 12px; color: var(--text-2); margin-top: 4px; display: grid; gap: 2px; }
.audit-ch code { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; background: var(--surface-2); padding: 0 5px; border-radius: 4px; }
.audit-ch del { color: var(--bl-tx); text-decoration-color: rgba(239, 68, 68, .5); }
.audit-ch ins { color: var(--done-tx); text-decoration: none; }

/* ---------- drawer / sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(4, 20, 17, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .2s both; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(560px, 100%); display: flex; flex-direction: column; background: var(--surface-solid); box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); animation: slideIn .35s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer header { position: relative; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.drawer header::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--dc, var(--grad-brand)); }
.drawer header .crumbs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.drawer header h2 { font-size: 18px; padding-right: 90px; }
.drawer .close { position: absolute; right: 12px; top: 14px; display: flex; gap: 4px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer .foot { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.drawer .section-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.comments { display: grid; gap: 10px; }
.cmt { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.cmt .h { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cmt p { margin: 0; white-space: pre-wrap; }
.variance { font-size: 12px; font-weight: 700; }
.variance.late { color: var(--bl-tx); } .variance.early { color: var(--done-tx); }
.modal { position: fixed; z-index: 95; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border-radius: 20px; background: var(--surface-solid); box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .3s both; }
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { color: var(--text-2); margin: 0 0 16px; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- command palette ---------- */
.palette { position: fixed; z-index: 96; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, calc(100% - 24px)); border-radius: 18px; background: var(--surface-solid); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; animation: pop .25s both; }
.palette input { width: 100%; height: 56px; border: 0; border-bottom: 1px solid var(--border); padding: 0 18px; font-size: 16px; background: transparent; }
.palette input:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette li[aria-selected="true"] { background: linear-gradient(120deg, rgba(18, 85, 76, .12), rgba(102, 143, 69, .12)); }
.palette li .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette .empty { padding: 20px; text-align: center; color: var(--muted); }
.palette .ph { padding: 8px 14px; font-size: 11.5px; color: var(--muted); display: flex; gap: 12px; border-top: 1px solid var(--border); }

/* ---------- menus, toasts, misc ---------- */
.menu { position: absolute; z-index: 70; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: pop .18s both; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; font-size: 13.5px; text-decoration: none; color: var(--text); }
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: var(--surface-2); }
.menu svg { width: 16px; height: 16px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
.menu .danger { color: var(--bl-tx); }
.toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #0E2B26; color: #fff; box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2) both; font-size: 13.5px; border-left: 4px solid var(--emerald); }
.toast.error { border-left-color: var(--coral); }
.toast.warn { border-left-color: var(--amber); }
.toast button { margin-left: auto; background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 8px; min-height: 30px; padding: 0 10px; cursor: pointer; font-weight: 600; }
@keyframes toastIn { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .ill { width: 90px; height: 90px; margin: 0 auto 14px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(16, 185, 129, .15), rgba(139, 92, 246, .15)); animation: float 5s ease-in-out infinite; }
.empty-state .ill svg { width: 40px; height: 40px; color: var(--teal); }
@keyframes float { 50% { transform: translateY(-8px); } }
.skel { border-radius: 12px; background: linear-gradient(90deg, rgba(100, 116, 139, .1) 25%, rgba(100, 116, 139, .2) 50%, rgba(100, 116, 139, .1) 75%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 130; }
.kbd-help { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(139, 92, 246, .1); border: 1px dashed rgba(139, 92, 246, .4); font-size: 13px; margin-bottom: 14px; color: var(--text-2); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.dropzone { display: grid; place-items: center; text-align: center; padding: 24px; border-radius: 14px; border: 2px dashed var(--border-strong); color: var(--muted); cursor: pointer; transition: all .2s; }
.dropzone:hover, .dropzone.over { border-color: var(--emerald); background: rgba(16, 185, 129, .06); color: var(--text); }
.import-report { font-size: 13px; max-height: 260px; overflow: auto; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.bottom-tabs { display: none; }
.sheet-list { display: grid; gap: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand .for { display: none; }
  .search-btn { min-width: 0; }
  .search-btn .lbl-t, .search-btn kbd { display: none; }
}
@media (max-width: 1080px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .trow { grid-template-columns: 80px minmax(0, 1fr) 110px 100px; }
  .trow .hide-md { display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand .logo-asg { height: 28px; }
  .brand .logo-pill img { height: 16px; }
  .proj-title { display: none; }
  .nav { display: none; }
  .hide-sm { display: none !important; }
  main { padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); }
  .bottom-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
  .bottom-tabs a, .bottom-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 12px; font-size: 10.5px; font-weight: 700; color: var(--muted); text-decoration: none; border: 0; background: transparent; cursor: pointer; }
  .bottom-tabs svg { width: 22px; height: 22px; }
  .bottom-tabs [aria-current="page"] { color: var(--teal); background: rgba(16, 185, 129, .12); }
  [data-theme="dark"] .bottom-tabs [aria-current="page"] { color: #86EFAC; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .val { font-size: 24px; }
  .kpi .ring { width: 40px; height: 40px; }
  .hero { padding: 18px; border-radius: 18px; }
  .weekline { gap: 4px; } .weekline div { height: 28px; font-size: 10.5px; }
  .epic-row { grid-template-columns: minmax(0, 1fr) 80px 50px; } .epic-row .rag-c { display: none; }
  .board { grid-auto-columns: 86%; gap: 10px; margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; }
  .col { max-height: calc(100vh - 250px); }
  .tree-wrap { display: none; }
  .mplan { display: block; }
  .drawer { top: auto; left: 0; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; border-left: 0; animation: sheetUp .35s cubic-bezier(.2, .9, .3, 1) both; }
  .drawer::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; border-radius: 3px; background: var(--border-strong); transform: translateX(-50%); z-index: 2; }
  @keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
  .form-grid { grid-template-columns: 1fr; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; }
  .trow .code, .trow .hide-md, .trow .hide-xs { display: none; }
  .week-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-matrix { grid-template-columns: repeat(2, 1fr); }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .rtable td { border: 0; padding: 3px 10px; }
  .filters .select, .filters .input { flex: 1 1 140px; min-width: 0; }
  .filters .count { width: 100%; margin: 0; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .view-head h2 { font-size: 19px; }
  .g-grid { grid-template-columns: 170px 1fr; min-width: 820px; }
  .settings-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
}
@media (max-width: 420px) {
  .brand .logo-divider { display: none; }
  .top-actions .btn-icon.hide-xs { display: none; }
  .kpi { padding: 12px; } .kpi .val { font-size: 22px; }
  .donut { width: 140px; height: 140px; }
}

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .orb, .particles { display: none; }
}
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
:root.reduce-motion .orb, :root.reduce-motion .particles { display: none; }
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f6f8f7; --surface-solid: #fff; --text: #000; --text-2: #222; --muted: #555; color-scheme: light; }
  .aurora, .nav, .bottom-tabs, .top-actions, .toasts, .filters, .view-actions, .add-btn, .row-actions, .bulkbar, .grip, .drawer, .scrim, .tr-add { display: none !important; }
  .topbar { position: static; box-shadow: none; }
  .topbar::after { display: none; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; backdrop-filter: none; border-color: #ccc; break-inside: avoid; }
  .hero { color: #000; background: #eef5f1 !important; box-shadow: none; }
  .hero::before, .hero::after { display: none; }
  .hero p { color: #333; }
  .board { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .col { max-height: none; }
  .tree-wrap, .gantt { overflow: visible; }
  table.tree { min-width: 0; font-size: 10px; }
  .tree th { position: static; }
  * { animation: none !important; transition: none !important; }
}
.filters > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
h3 > svg { width: 17px; height: 17px; color: var(--teal); }
.banner > svg { width: 18px; height: 18px; flex: none; color: var(--violet); }
.role-badge svg { width: 13px; height: 13px; }
.tree td { white-space: nowrap; }
.tree .tcell { min-width: 280px; }
.tree .tcell .txt .nm { max-width: 380px; }
.tree .ownercell { display: flex; align-items: center; gap: 6px; }
.tree .ownercell .role { font-size: 11.5px; color: var(--muted); }
.tree .ind-1 { padding-left: 14px; } .tree .ind-2 { padding-left: 36px; }
.filters .select { max-width: 240px; }
.board { grid-auto-columns: minmax(228px, 1fr); }
.g-grid { --lw: 300px; grid-template-columns: var(--lw) 1fr; }
.g-overlay { position: absolute; top: 0; bottom: 0; left: var(--lw); right: 0; pointer-events: none; z-index: 2; }
.g-today span { top: 6px; position: sticky; }
.tree .remarks { max-width: 170px; }
@media (max-width: 860px) { .g-grid { --lw: 170px; grid-template-columns: var(--lw) 1fr; } }
.kpi .ring + .lbl { padding-right: 56px; }
.brand { flex-shrink: 0; }
.brand .logo-pill img, .brand .logo-asg { flex: none; max-width: none; }
[data-theme="dark"] .g-bar, [data-theme="dark"] .epic-row .bar > span, [data-theme="dark"] .swatch { filter: brightness(1.45) saturate(1.1); }
@media (max-width: 860px) { .save-ind { min-width: 0; } .save-ind:empty { display: none; } .top-actions { gap: 2px; } }
@media (max-width: 860px) {
  .code, .chip, .tcard .story, .li .meta, .hint, .stamp, .tree .ownercell .role, .g-legend, .col-head .n, .tcard .overdue, .tab small, .brand .for, kbd, .sev, .owner-stats span, .week-sum span, .kpi .lbl, .legend div, .epic-row { font-size: 12px; }
}
.mp-story > header .tw { flex: none; border: 0; background: transparent; border-radius: 8px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.mp-story > header .tw svg { width: 16px; height: 16px; transition: transform .25s; }
.mp-story > header .tw[aria-expanded="false"] svg { transform: rotate(-90deg); }
.mp-story > header [data-mtw] { cursor: pointer; }

/* ============================================================
   Team Structure & Roster Styling
   ============================================================ */
.team-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 85, 76, .9) 0%, rgba(14, 69, 64, .95) 45%, rgba(102, 143, 69, .85) 100%);
  color: #fff;
  box-shadow: 0 16px 36px -12px rgba(18, 85, 76, .45);
  margin-bottom: 22px;
}
.team-hero h2 { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 6px; }
.team-hero p { margin: 0; opacity: .9; font-size: 14px; max-width: 780px; }
.team-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.team-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}
.team-stat-chip svg { width: 15px; height: 15px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 10px;
}
.team-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), box-shadow .25s, border-color .25s;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.team-card.featured {
  border-color: rgba(245, 158, 11, .5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .25), var(--shadow-sm);
  background: linear-gradient(180deg, rgba(245, 158, 11, .04) 0%, var(--surface) 25%);
}
[data-theme="dark"] .team-card.featured {
  border-color: rgba(245, 158, 11, .4);
  background: linear-gradient(180deg, rgba(245, 158, 11, .08) 0%, var(--surface) 30%);
}
.team-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.team-icon-box {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(18, 85, 76, .12);
  color: var(--teal);
  flex: none;
}
.team-icon-box svg { width: 22px; height: 22px; }
.team-badge-track {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
}
.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.team-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.team-member-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 13.5px;
}
.team-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-lead { background: rgba(18, 85, 76, .14); color: var(--teal); border: 1px solid rgba(18, 85, 76, .25); }
.tag-fte { background: rgba(16, 185, 129, .15); color: #065F46; border: 1px solid rgba(16, 185, 129, .3); }
.tag-shadow { background: rgba(139, 92, 246, .14); color: #6D28D9; border: 1px solid rgba(139, 92, 246, .3); }
.tag-core { background: rgba(31, 78, 121, .14); color: #1F4E79; border: 1px solid rgba(31, 78, 121, .25); }
.tag-kb { background: rgba(228, 87, 46, .14); color: #C2410C; border: 1px solid rgba(228, 87, 46, .25); }
[data-theme="dark"] .tag-lead { color: #86EFAC; }
[data-theme="dark"] .tag-fte { color: #6EE7B7; }
[data-theme="dark"] .tag-shadow { color: #C4B5FD; }
[data-theme="dark"] .tag-core { color: #93C5FD; }
[data-theme="dark"] .tag-kb { color: #FDBA74; }

.team-desc {
  font-size: 12.8px;
  color: var(--text-2);
  line-height: 1.45;
  margin: 0 0 14px;
  flex: 1;
}
.team-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
.team-skill-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.team-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.team-tasks-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.team-tasks-count b {
  color: var(--text);
}

/* Dashboard Team Preview */
.team-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.team-dash-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s;
}
.team-dash-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.team-dash-card.featured {
  border-color: rgba(245, 158, 11, .4);
  background: linear-gradient(180deg, rgba(245, 158, 11, .06) 0%, var(--surface-2) 40%);
}
.team-dash-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.team-dash-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.team-dash-icon svg { width: 16px; height: 16px; }
.team-dash-members {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  flex: 1;
}
.team-dash-member {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.team-dash-member .m-name { font-weight: 700; color: var(--text); }
.team-dash-member .m-tag { font-size: 10.5px; color: var(--muted); margin-left: auto; }
.team-dash-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.team-dash-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}
.team-dash-link:hover { text-decoration: underline; }

/* Owners Roster Banner */
.team-roster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.team-roster-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
}
.team-roster-pill .r-role { font-weight: 700; color: var(--text); }
.team-roster-pill .r-names { color: var(--muted); }

