/* ============================================================
   CLASH WARDEN DASHBOARD — COMPLETE STYLESHEET (Wave 2)
   Left sidebar (always visible on desktop, collapsible),
   full-width content, clean + colourful + animated.
   Replace css/style.css entirely with this file.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy: #0033A0;
  --navy-dark: #001a5c;
  --red: #E4002B;
  --purple: #7c3aed;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --green: #0b6b2e;
  --green-bright: #10b981;
  --orange: #f97316;
  --yellow: #eab308;

  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --grey-border: #e5e7eb;
  --grey-bg: #f2f5fb;

  --gradient-main: linear-gradient(120deg, #0033A0, #7c3aed, #ec4899);
  --gradient-nav: linear-gradient(180deg, #4c1d95, #6d28d9 55%, #0033A0);

  --shadow-soft: 0 2px 10px rgba(20, 30, 80, 0.08);
  --shadow-hover: 0 14px 34px rgba(20, 30, 80, 0.20);
  --radius: 14px;

  --side-w: 232px;         /* sidebar width expanded */
  --side-w-collapsed: 66px; /* sidebar width collapsed (icons only) */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text-dark);
  background: var(--grey-bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(124,58,237,0.06), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(6,182,212,0.06), transparent 45%);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.cw-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w);
  background: var(--gradient-nav);
  color: #fff; z-index: 200;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 20px rgba(76,29,149,0.25);
  transition: width .2s ease, transform .25s ease;
}
.cw-side-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 14px; gap: 8px;
}
.cw-side-brand { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.cw-side-logo {
  min-width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
}
.cw-side-brandtext { display: flex; flex-direction: column; line-height: 1.15; font-weight: 800; font-size: 15px; white-space: nowrap; }
.cw-side-brandtext small { font-weight: 500; font-size: 11px; opacity: .75; }
.cw-side-collapse {
  background: rgba(255,255,255,0.14); border: none; color: #fff; cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cw-side-collapse:hover { background: rgba(255,255,255,0.3); }

.cw-side-links { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.cw-side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; color: #fff; opacity: .82;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background .15s, opacity .15s, transform .12s;
}
.cw-side-link:hover { opacity: 1; background: rgba(255,255,255,0.14); transform: translateX(2px); }
.cw-side-link.active { opacity: 1; background: #fff; color: var(--purple); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.cw-side-ic { min-width: 24px; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Polished animated SVG icons ---- */
.cw-ic { width: 21px; height: 21px; display: block; transition: transform .25s ease, filter .25s ease; }
.cw-side-link:hover .cw-ic { transform: scale(1.14); filter: drop-shadow(0 2px 5px rgba(0,0,0,0.25)); }
.cw-side-link.active .cw-ic { color: var(--purple); }

/* subtle idle draw so the sidebar feels alive on load */
.cw-side-link .cw-ic { animation: cwIcoIn .4s ease both; }

/* Each active page gets its own signature micro-animation */
.cw-side-link.cw-ic-home.active   .cw-ic { animation: cwBob 2.4s ease-in-out infinite; }
.cw-side-link.cw-ic-overview.active .cw-ic { animation: cwPulse 2.2s ease-in-out infinite; }
.cw-side-link.cw-ic-summary.active .cw-ic { animation: cwGrow 2.2s ease-in-out infinite; transform-origin: bottom; }
.cw-side-link.cw-ic-trends.active .cw-ic { animation: cwRise 2.4s ease-in-out infinite; }
.cw-side-link.cw-ic-models.active .cw-ic { animation: cwBob 2.6s ease-in-out infinite; }
.cw-side-link.cw-ic-team.active   .cw-ic { animation: cwPulse 2.4s ease-in-out infinite; }
.cw-side-link.cw-ic-activity.active .cw-ic { animation: cwBeat 1.6s ease-in-out infinite; }
.cw-side-link.cw-ic-ask.active    .cw-ic { animation: cwWiggle 2.4s ease-in-out infinite; }
.cw-side-link.cw-ic-help.active   .cw-ic { animation: cwPulse 2.6s ease-in-out infinite; }

/* hover flourishes per-icon (even when not active) */
.cw-side-link.cw-ic-activity:hover .cw-ic { animation: cwBeat 1s ease-in-out infinite; }
.cw-side-link.cw-ic-ask:hover .cw-ic { animation: cwWiggle 1.2s ease-in-out infinite; }
.cw-side-link.cw-ic-trends:hover .cw-ic { animation: cwRise 1.2s ease-in-out infinite; }

/* logout icon slides on hover */
.cw-side-logout:hover .cw-ic { transform: translateX(3px); }
.cw-side-collapse .cw-ic { width: 18px; height: 18px; }

@keyframes cwIcoIn { from { opacity: 0; transform: scale(.6) rotate(-8deg);} to { opacity: 1; transform: none;} }
@keyframes cwBob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-3px);} }
@keyframes cwPulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.12);} }
@keyframes cwGrow { 0%,100% { transform: scaleY(1);} 50% { transform: scaleY(1.15);} }
@keyframes cwRise { 0%,100% { transform: translate(0,0);} 50% { transform: translate(1px,-3px);} }
@keyframes cwBeat { 0%,100% { transform: scale(1);} 15% { transform: scale(1.2);} 30% { transform: scale(1);} 45% { transform: scale(1.14);} }
@keyframes cwWiggle { 0%,100% { transform: rotate(0);} 25% { transform: rotate(-10deg);} 75% { transform: rotate(10deg);} }

.cw-side-bottom { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.15); display: flex; flex-direction: column; gap: 6px; }
.cw-side-office { display: flex; align-items: center; gap: 12px; padding: 8px 12px; font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; }
.cw-side-office .cw-side-lbl { overflow: hidden; text-overflow: ellipsis; }
.cw-side-logout {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: rgba(255,255,255,0.14); border: none; color: #fff; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; text-align: left;
  transition: background .15s;
}
.cw-side-logout:hover { background: var(--red); }

/* Collapsed (desktop icons-only) */
.cw-side-collapsed .cw-sidebar { width: var(--side-w-collapsed); }
.cw-side-collapsed .cw-side-lbl,
.cw-side-collapsed .cw-side-brandtext { display: none; }
.cw-side-collapsed .cw-side-collapse { transform: rotate(180deg); }
.cw-side-collapsed .cw-side-top { justify-content: center; }
.cw-side-collapsed .cw-side-link,
.cw-side-collapsed .cw-side-office,
.cw-side-collapsed .cw-side-logout { justify-content: center; gap: 0; }

/* Content shift so nothing hides behind the fixed sidebar */
.cw-has-sidebar .cw-container { margin-left: var(--side-w); transition: margin-left .2s ease; }
.cw-side-collapsed .cw-container { margin-left: var(--side-w-collapsed); }

/* Mobile top bar + backdrop (hidden on desktop) */
.cw-mobile-top { display: none; }
.cw-side-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 190;
}

/* ---------- Container (full width) ---------- */
.cw-container {
  width: auto; max-width: none;
  padding: 26px 34px 90px;
}

/* ---------- Page headings ---------- */
.cw-page-title {
  font-size: 26px; font-weight: 800; margin: 6px 0 4px;
  background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cw-page-subtitle { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.cw-section-heading { font-size: 17px; font-weight: 700; color: var(--navy); margin: 22px 0 12px; position: relative; padding-left: 12px; }
.cw-section-heading::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 3px; background: var(--gradient-main); }

/* ---------- Hero (Home) ---------- */
.cw-hero { position: relative; border-radius: 20px; padding: 38px 34px; margin-bottom: 26px; overflow: hidden; background: var(--gradient-main); background-size: 220% 220%; animation: cwGradientShift 14s ease infinite, cwPop .5s ease both; color: #fff; box-shadow: var(--shadow-hover); }
.cw-hero-glow { position: absolute; top: -60px; right: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 70%); animation: cwFloat 7s ease-in-out infinite; }
.cw-hero-title { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.cw-wave { display: inline-block; animation: cwWave 2s ease-in-out infinite; transform-origin: 70% 70%; }
.cw-hero-sub { font-size: 15px; opacity: .92; margin: 0 0 18px; }
.cw-hero-badges { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cw-version-badge { background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.4); padding: 8px 16px; border-radius: 22px; font-weight: 700; font-size: 14px; }
.cw-download-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--navy); padding: 10px 20px; border-radius: 24px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.25); transition: transform .18s, box-shadow .18s; }
.cw-download-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.cw-download-btn .cw-dl-icon { animation: cwBounce 1.8s ease-in-out infinite; }
.cw-download-btn.cw-disabled { opacity: .6; pointer-events: none; }
.cw-release-note { margin: 14px 0 0; font-size: 13px; opacity: .85; }

/* ---------- Card grid (Home) ---------- */
.cw-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cw-card { position: relative; background: #fff; border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow-soft); overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s; animation: cwPop .5s ease both; }
.cw-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--gradient-main); }
.cw-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.cw-card-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.cw-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.cw-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.cw-card.cw-c1::before { background: linear-gradient(90deg,#ef4444,#f97316); }
.cw-card.cw-c2::before { background: linear-gradient(90deg,#7c3aed,#ec4899); }
.cw-card.cw-c3::before { background: linear-gradient(90deg,#06b6d4,#10b981); }
.cw-card.cw-c4::before { background: linear-gradient(90deg,#eab308,#f97316); }
.cw-card.cw-c5::before { background: linear-gradient(90deg,#1e3a8a,#7c3aed); }
.cw-card.cw-c6::before { background: linear-gradient(90deg,#ec4899,#eab308); }
.cw-card.cw-c7::before { background: linear-gradient(90deg,#10b981,#06b6d4); }
.cw-card.cw-c8::before { background: linear-gradient(90deg,#f97316,#ef4444); }
.cw-card-grid .cw-card:nth-child(1){animation-delay:.02s;} .cw-card-grid .cw-card:nth-child(2){animation-delay:.06s;}
.cw-card-grid .cw-card:nth-child(3){animation-delay:.10s;} .cw-card-grid .cw-card:nth-child(4){animation-delay:.14s;}
.cw-card-grid .cw-card:nth-child(5){animation-delay:.18s;} .cw-card-grid .cw-card:nth-child(6){animation-delay:.22s;}
.cw-card-grid .cw-card:nth-child(7){animation-delay:.26s;} .cw-card-grid .cw-card:nth-child(8){animation-delay:.30s;}

/* ---------- Controls / range toggle ---------- */
.cw-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 18px; }
.cw-toggle-group { display: inline-flex; background: #fff; border-radius: 24px; padding: 4px; box-shadow: var(--shadow-soft); }
.cw-toggle-group button { border: none; background: none; cursor: pointer; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all .15s; }
.cw-toggle-group button:hover { color: var(--purple); }
.cw-toggle-group button.active { background: var(--gradient-main); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.4); }
.cw-mini-btn { border: 1px solid var(--grey-border); background: #fff; cursor: pointer; padding: 5px 14px; border-radius: 16px; font-size: 12px; font-weight: 600; color: var(--purple); transition: background .15s, transform .15s; }
.cw-mini-btn:hover { background: #faf5ff; transform: translateY(-1px); }

/* ---------- KPI cards ---------- */
.cw-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.cw-kpi { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-soft); border-left: 5px solid var(--navy); transition: transform .15s, box-shadow .15s; animation: cwPop .45s ease both; }
.cw-kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cw-kpi.open { border-left-color: var(--red); }
.cw-kpi.resolved { border-left-color: var(--green-bright); }
.cw-kpi.drawn { border-left-color: var(--cyan); }
.cw-kpi.deleted { border-left-color: var(--orange); }
.cw-kpi-value { font-size: 32px; font-weight: 800; line-height: 1; animation: cwCount .5s ease both; }
.cw-kpi.open .cw-kpi-value { color: var(--red); }
.cw-kpi.resolved .cw-kpi-value { color: var(--green); }
.cw-kpi.drawn .cw-kpi-value { color: var(--cyan); }
.cw-kpi.deleted .cw-kpi-value { color: var(--orange); }
.cw-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }

/* ---------- Charts ---------- */
.cw-chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-bottom: 22px; }
.cw-chart-box { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-soft); animation: cwPop .5s ease both; }
.cw-chart-heading { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--navy); }
.cw-chart-box canvas { max-height: 340px; }

/* ---------- Tables ---------- */
.cw-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow-x: auto; animation: cwPop .5s ease both; }
.cw-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.cw-table thead th { background: var(--navy); color: #fff; text-align: left; padding: 11px 14px; font-weight: 700; position: sticky; top: 0; white-space: nowrap; }
.cw-table thead th:first-child { border-top-left-radius: var(--radius); }
.cw-table thead th:last-child { border-top-right-radius: var(--radius); }
.cw-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--grey-border); }
.cw-table tbody tr { transition: background .12s; }
.cw-table tbody tr:hover { background: #f6f9ff; }
.cw-table tbody tr:nth-child(even) { background: #fafbfe; }
.cw-table tbody tr:nth-child(even):hover { background: #f0f5ff; }
.cw-clickable { color: var(--purple); font-weight: 700; cursor: pointer; }
.cw-clickable:hover { text-decoration: underline; }
.cw-loading-msg { text-align: center; color: var(--text-muted); padding: 18px; font-style: italic; }
.cw-datechip { display: inline-block; background: #eef2ff; color: var(--navy); font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 4px; }
.cw-filter-row th { background: #0a1f66; padding: 4px 8px; }
.cw-col-filter { border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; background: #fff; color: #333; }
.cw-daterange-bar { color: var(--text-muted); }
.cw-daterange-bar input[type="date"] { border: 1px solid var(--grey-border); border-radius: 6px; padding: 3px 6px; font-size: 12px; }

/* ---------- User header (user-detail) ---------- */
.cw-user-header { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-soft); margin-bottom: 18px; animation: cwPop .5s ease both; }
.cw-avatar { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; background: var(--gradient-main); box-shadow: 0 6px 16px rgba(124,58,237,0.4); }
.cw-user-header h2 { margin: 0; font-size: 22px; color: var(--navy); }
.cw-user-header p { margin: 3px 0 0; color: var(--text-muted); font-size: 13px; }

/* ---------- Grouped activity ---------- */
.cw-group-block { margin-bottom: 18px; }
.cw-group-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cw-count-badge { background: #eef2ff; color: var(--navy); font-size: 12px; padding: 1px 9px; border-radius: 12px; font-weight: 700; }

/* ---------- FAQ accordion ---------- */
.cw-faq { display: grid; gap: 10px; margin-bottom: 10px; }
.cw-faq-item { background: #fff; border: 1px solid var(--grey-border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-soft); animation: cwPop .4s ease both; }
.cw-faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 15px 46px 15px 18px; font-size: 14px; font-weight: 600; color: var(--text-dark); position: relative; }
.cw-faq-q::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--purple); transition: transform .2s; }
.cw-faq-item.open .cw-faq-q::after { content: "\2212"; transform: translateY(-50%) rotate(180deg); }
.cw-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.cw-faq-item.open .cw-faq-a { max-height: 340px; }
.cw-faq-a p { margin: 0; padding: 0 18px 16px; font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.cw-faq-q:hover { color: var(--purple); }

/* ---------- Forms / feedback ---------- */
.cw-feedback-card { background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow-soft); animation: cwPop .4s ease both; border-top: 4px solid transparent; border-image: var(--gradient-main) 1; }
.cw-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cw-field { margin-bottom: 16px; display: flex; flex-direction: column; }
.cw-field label { font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-dark); }
.cw-field input, .cw-field select, .cw-feedback-card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--grey-border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
.cw-field input:focus, .cw-field select:focus, .cw-feedback-card textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.cw-req { color: var(--red); }
.cw-form-msg { display: none; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.cw-form-msg.show { display: block; }
.cw-form-msg.ok { background: #dcfce7; color: #047857; }
.cw-form-msg.err { background: #fee2e2; color: var(--red); }
.cw-login-btn { background: var(--gradient-main); color: #fff; border: none; cursor: pointer; border-radius: 24px; font-weight: 700; font-size: 14px; padding: 12px 26px; transition: transform .15s, box-shadow .15s; }
.cw-login-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cw-login-btn:disabled { opacity: .6; cursor: default; transform: none; }

/* ---------- Login page ---------- */
.cw-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cw-login-card { background: #fff; border-radius: 20px; padding: 40px 34px; box-shadow: var(--shadow-hover); width: 100%; max-width: 380px; text-align: center; animation: cwPop .5s ease both; }
.cw-login-card h1 { font-size: 26px; margin: 0 0 6px; background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Animations ---------- */
@keyframes cwGradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cwPop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cwFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
@keyframes cwWave { 0%,60%,100% { transform: rotate(0);} 10% { transform: rotate(14deg);} 20% { transform: rotate(-8deg);} 30% { transform: rotate(14deg);} 40% { transform: rotate(-4deg);} 50% { transform: rotate(10deg);} }
@keyframes cwBounce { 0%,100% { transform: translateY(0);} 50% { transform: translateY(3px);} }
@keyframes cwCount { from { opacity: 0; transform: translateY(6px) scale(.9);} to { opacity: 1; transform: none;} }

/* ============================================================
   RESPONSIVE — sidebar becomes a slide-in overlay on mobile
   ============================================================ */
@media (max-width: 860px) {
  .cw-mobile-top {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 150;
    background: var(--gradient-nav); color: #fff; padding: 10px 16px;
    box-shadow: 0 3px 12px rgba(76,29,149,0.3);
  }
  .cw-burger { background: rgba(255,255,255,0.16); border: none; color: #fff; width: 38px; height: 38px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .cw-burger .cw-ic { width: 20px; height: 20px; }
  .cw-mobile-brand { font-weight: 800; font-size: 16px; }

  .cw-sidebar { transform: translateX(-100%); width: var(--side-w); }
  .cw-side-open .cw-sidebar { transform: translateX(0); }
  .cw-side-open .cw-side-backdrop { display: block; }

  /* content is full width on mobile; never shifted */
  .cw-has-sidebar .cw-container,
  .cw-side-collapsed .cw-container { margin-left: 0; }

  /* ignore desktop-collapsed state on mobile */
  .cw-side-collapsed .cw-sidebar { width: var(--side-w); }
  .cw-side-collapsed .cw-side-lbl,
  .cw-side-collapsed .cw-side-brandtext { display: flex; }

  .cw-container { padding: 18px 16px 80px; }
  .cw-form-grid { grid-template-columns: 1fr; }
  .cw-hero { padding: 28px 22px; }
  .cw-hero-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
34YAYU7Z
/* ============================================================
   APPEND to the bottom of css/style.css  (Wave 4)
   Number colours in tables, sort symbols, misc.
   ============================================================ */

/* Coloured numbers in tables (match the KPI colours) */
.cw-num-open  { color: #c00000; font-weight: 800; }   /* bold red */
.cw-num-res   { color: #0b6b2e; font-weight: 800; }   /* dark green */
.cw-num-drawn { color: #0e7490; font-weight: 800; }   /* deep cyan */
.cw-num-del   { color: #c2410c; font-weight: 800; }   /* burnt orange */
.cw-num-net-pos { color: #0b6b2e; font-weight: 800; }
.cw-num-net-neg { color: #c00000; font-weight: 800; }
.cw-num-net-zero { color: #444; font-weight: 800; }

/* Coloured activity type labels */
.cw-type-detected { color: #c00000; font-weight: 800; }
.cw-type-resolved { color: #0b6b2e; font-weight: 800; }
.cw-type-deleted  { color: #c2410c; font-weight: 800; }

/* Sort symbol on sortable headers */
th[data-cw-sortable] { cursor: pointer; user-select: none; }
th[data-cw-sortable]:hover { background: #0a2b8a; }
.cw-sort-ind { font-size: 11px; margin-left: 5px; opacity: .45; }
th[data-cw-dir="asc"] .cw-sort-ind,
th[data-cw-dir="desc"] .cw-sort-ind { opacity: 1; }

/* Gauge wrapper keeps the number centred nicely */
.cw-chart-box canvas.cw-gauge { max-height: 240px; }
/* ============================================================
   APPEND to the bottom of css/style.css  (LOGIN REDESIGN)
   Colourful split-screen sign-in + proper Administrator button.
   These override the old dull .cw-login-* rules.
   ============================================================ */

.cw-login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}

/* ---- Left brand panel (animated gradient) ---- */
.cw-login-brand {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0033A0, #4c1d95 45%, #c026d3);
  background-size: 240% 240%; animation: cwGradientShift 16s ease infinite;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 56px;
}
.cw-login-brand-glow {
  position: absolute; width: 340px; height: 340px; border-radius: 50%;
  right: -80px; top: -60px;
  background: radial-gradient(circle, rgba(255,255,255,0.28), transparent 70%);
  animation: cwFloat 8s ease-in-out infinite;
}
.cw-login-brand-glow::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  left: -260px; top: 380px;
  background: radial-gradient(circle, rgba(236,72,153,0.35), transparent 70%);
}
.cw-login-brand-inner { position: relative; z-index: 2; max-width: 420px; }
.cw-login-logo {
  width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25); margin-bottom: 22px; animation: cwPop .6s ease both;
}
.cw-login-brand h2 { font-size: 34px; font-weight: 800; margin: 0 0 12px; }
.cw-login-tag { font-size: 16px; line-height: 1.5; opacity: .92; margin: 0 0 26px; }
.cw-login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cw-login-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .95; }
.cw-login-points li span { color: #ffd6f2; font-size: 10px; }
.cw-login-brandfoot { position: relative; z-index: 2; margin-top: auto; padding-top: 30px; font-size: 13px; opacity: .8; }

/* ---- Right form panel ---- */
.cw-login-formside {
  display: flex; align-items: center; justify-content: center; padding: 40px 28px;
  background: #f7f8fc;
  background-image:
    radial-gradient(circle at 90% 10%, rgba(124,58,237,0.06), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(6,182,212,0.06), transparent 40%);
}
.cw-login-box {
  width: 100%; max-width: 400px; background: #fff; border-radius: 20px;
  padding: 38px 34px; box-shadow: 0 20px 50px rgba(20,30,80,0.15);
  animation: cwPop .5s ease both; border-top: 5px solid transparent; border-image: var(--gradient-main) 1;
}
.cw-login-box h1 {
  font-size: 26px; margin: 0 0 4px; color: var(--text-dark);
}
.cw-login-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 22px; }

.cw-login-box .cw-field { margin-bottom: 16px; display: flex; flex-direction: column; }
.cw-login-box label { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }
.cw-login-box select, .cw-login-box input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--grey-border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.cw-login-box select:focus, .cw-login-box input:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

/* Sign In button */
.cw-login-btn {
  width: 100%; margin-top: 6px; background: var(--gradient-main); background-size: 200% 200%;
  color: #fff; border: none; cursor: pointer; border-radius: 12px; font-weight: 800; font-size: 15px;
  padding: 14px 20px; transition: transform .15s, box-shadow .15s, background-position .4s;
  box-shadow: 0 8px 22px rgba(124,58,237,0.35);
}
.cw-login-btn:hover { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 14px 30px rgba(124,58,237,0.45); }
.cw-login-btn:active { transform: translateY(0); }
.cw-login-btn:disabled { opacity: .7; cursor: default; transform: none; }

/* Administrator toggle - now a proper pill button */
.cw-admin-toggle { margin-top: 16px; text-align: center; }
.cw-admin-toggle button {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--purple); border: 1.5px solid var(--purple);
  cursor: pointer; padding: 9px 18px; border-radius: 22px; font-size: 13px; font-weight: 700;
  transition: all .18s;
}
.cw-admin-toggle button:hover { background: var(--purple); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(124,58,237,0.35); }
.cw-admin-toggle .cw-admin-ic { font-size: 14px; }
/* when admin mode is active, flip to a filled "you are admin" look */
.cw-admin-active button { background: linear-gradient(120deg,#0033A0,#7c3aed); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(124,58,237,0.4); }

/* Error message */
.cw-error-msg { display: none; background: #fee2e2; color: var(--red); padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; font-weight: 600; }
.cw-error-msg.show { display: block; animation: cwPop .3s ease both; }

/* Responsive: stack on small screens, hide brand panel */
@media (max-width: 820px) {
  .cw-login-page { grid-template-columns: 1fr; }
  .cw-login-brand { display: none; }
  .cw-login-formside { min-height: 100vh; }
}
/* ============================================================
   APPEND to the bottom of css/style.css  (Wave 5)
   - Deleted numbers/labels get a NEW colour (fuchsia) so they no
     longer read as "red" and mix with Open clashes.
   - Open numbers are forced bold DARK RED on every table.
   Placed last so these win by cascade order.
   ============================================================ */

/* Deleted -> fuchsia (distinct from the dark-red Open colour) */
.cw-num-del      { color: #a21caf !important; font-weight: 800; }
.cw-type-deleted { color: #a21caf !important; font-weight: 800; }

/* Open -> bold dark red, everywhere (Models, Team, Model detail, etc.) */
.cw-num-open     { color: #c00000 !important; font-weight: 800; }
/* ============================================================
   APPEND to the bottom of css/style.css  (Version reporting)
   Version pills in the Team table + the legend.
   ============================================================ */
.cw-ver {
  display: inline-block; padding: 2px 9px; border-radius: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .2px; cursor: default;
}
.cw-ver-ok   { background: #dcfce7; color: #047857; }   /* on current version */
.cw-ver-old  { background: #fef3c7; color: #92400e; }   /* older version */
.cw-ver-none { background: #eef0f4; color: #9aa1ac; }   /* never reported */

.cw-version-legend {
  font-size: 12px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.cw-version-legend .cw-ver { margin-right: 2px; }
/* ============================================================
   APPEND to the bottom of css/style.css
   (1) Map-based login page
   (2) Tasteful animated background for dashboard pages
   ============================================================ */

/* ---------- (1) MAP LOGIN ---------- */
.cw-maplogin {
  position: fixed; inset: 0; overflow: hidden;
  background: linear-gradient(160deg, #eef2fb, #e7ecfa);
}
.cw-map { position: absolute; inset: 0; width: 100%; height: 100%; }
/* soft tint so the floating card reads clearly over the map */
.cw-map-tint {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 78% 50%, rgba(76,29,149,0.10), transparent 45%);
}

/* jsVectorMap zoom buttons - restyle to match */
.cw-map .jvm-zoom-btn {
  background: #ffffff; color: var(--purple); border-radius: 8px;
  box-shadow: 0 2px 8px rgba(20,30,80,0.18); width: 26px; height: 26px;
  border: 1px solid var(--grey-border); font-weight: 800;
}
.cw-map .jvm-zoom-btn:hover { background: #faf5ff; }

/* Floating glass sign-in card */
.cw-login-floaty {
  position: absolute; top: 50%; right: 6%; transform: translateY(-50%);
  z-index: 5; width: 100%; max-width: 400px;
  animation: cwPop .5s ease both;
}
.cw-login-glass {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 24px 60px rgba(20,30,80,0.22);
}
.cw-login-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cw-login-logo-sm {
  min-width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff; background: var(--gradient-main);
  box-shadow: 0 6px 16px rgba(124,58,237,0.4);
}
.cw-login-logo-row h1 { font-size: 20px; margin: 0; }
.cw-login-logo-row .cw-login-sub { margin: 2px 0 0; font-size: 12.5px; }

.cw-selected-office {
  display: none; background: #eef2ff; color: var(--navy); font-weight: 700;
  font-size: 13px; padding: 8px 12px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid #dbe3fb;
}
.cw-selected-office.show { display: block; animation: cwPop .3s ease both; }

/* Reuse existing field / button / admin styles from the base login CSS.
   Provide fallbacks in case those weren't present. */
.cw-login-glass .cw-field { margin-bottom: 14px; display: flex; flex-direction: column; }
.cw-login-glass label { font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--text-dark); }
.cw-login-glass select, .cw-login-glass input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--grey-border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.cw-login-glass select:focus, .cw-login-glass input:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

/* Mobile: map becomes a backdrop, card centers and fills */
@media (max-width: 820px) {
  .cw-login-floaty { right: auto; left: 50%; transform: translate(-50%, -50%); max-width: 90%; }
}

/* ---------- (2) TASTEFUL ANIMATED BACKGROUND (dashboard pages) ---------- */
/* Slow, low-opacity colour blobs that drift in the page background. They sit
   BEHIND the content; your cards/tables are solid white so text stays crisp.
   To turn this off, delete this block or remove the body::before rule. */
body.cw-has-sidebar::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 12% 18%, rgba(124,58,237,0.10), transparent 60%),
    radial-gradient(34vmax 34vmax at 88% 22%, rgba(6,182,212,0.10), transparent 60%),
    radial-gradient(30vmax 30vmax at 70% 88%, rgba(236,72,153,0.08), transparent 60%),
    radial-gradient(30vmax 30vmax at 20% 85%, rgba(0,51,160,0.08), transparent 60%);
  background-repeat: no-repeat;
  animation: cwBgDrift 26s ease-in-out infinite alternate;
}
@keyframes cwBgDrift {
  0%   { background-position: 0% 0%, 100% 0%, 70% 100%, 20% 100%; }
  50%  { background-position: 6% 8%, 92% 10%, 62% 88%, 28% 90%; }
  100% { background-position: 0% 0%, 100% 0%, 70% 100%, 20% 100%; }
}

/* Respect users who prefer less motion — disables all the above animations. */
@media (prefers-reduced-motion: reduce) {
  body.cw-has-sidebar::before { animation: none !important; }
  .cw-login-floaty { animation: none !important; }
}
 
