/* TeamOps Radar App UI (v0.9.8.0) */
:root{
  --teamops-radius:16px;
  --teamops-radius-sm:14px;
  --teamops-gap:12px;
  --teamops-shadow: 0 10px 30px rgba(0,0,0,.08);
  --teamops-shadow-dark: 0 14px 40px rgba(0,0,0,.40);
}
.teamops-card{
  border-radius: var(--teamops-radius);
  border: 1px solid var(--teamops-border);
  background: var(--teamops-surface);
  padding: 16px;
}
.teamops-card--sub{
  border-radius: var(--teamops-radius-sm);
  border: 1px solid var(--teamops-border);
  background: var(--teamops-surface2);
  padding: 14px;
}
.teamops-kicker{ opacity:.7; font-weight:900; font-size:12px; }
.teamops-big{ font-weight:950; font-size:22px; margin-top:6px; line-height:1.1; }
.teamops-muted{ opacity:.72; font-size:13px; margin-top:6px; }
.teamops-note{ opacity:.65; font-size:12.5px; margin-top:12px; }

.teamops-insights-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--teamops-gap);
}
@media (max-width: 640px){
  .teamops-insights-grid{ grid-template-columns: 1fr; }
}

.teamops-streak-glow{ position:relative; overflow:hidden; }
body.teamops-theme-dark .teamops-streak-glow::before{
  content:''; position:absolute; inset:-40px;
  background: radial-gradient(circle at 30% 20%, rgba(0,255,179,.22), transparent 55%);
  pointer-events:none;
}
body.teamops-theme-light .teamops-streak-glow::before{
  content:''; position:absolute; inset:-40px;
  background: radial-gradient(circle at 30% 20%, rgba(0,180,120,.16), transparent 60%);
  pointer-events:none;
}

.teamops-badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--teamops-border);
  background: var(--teamops-surface2);
  font-weight:950; font-size:12px;
  margin-top:10px;
}
body.teamops-theme-dark .teamops-badge--guardian{
  box-shadow: 0 0 0 1px rgba(0,255,179,.15), 0 0 18px rgba(0,255,179,.18);
}
body.teamops-theme-light .teamops-badge--guardian{
  box-shadow: 0 0 0 1px rgba(0,180,120,.18), 0 0 14px rgba(0,180,120,.14);
}

.teamops-weeks{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.teamops-week{
  width:22px; height:12px; border-radius:999px;
  border:1px solid var(--teamops-border);
  background: rgba(255,255,255,.08);
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
  opacity:.55;
}
body.teamops-theme-light .teamops-week{ background: rgba(0,0,0,.03); }
.teamops-week.is-active{ opacity:1; background: rgba(0,255,179,.22); width:28px; }
body.teamops-theme-light .teamops-week.is-active{ background: rgba(0,180,120,.20); width:28px; }
.teamops-week:hover{ transform: translateY(-1px) scale(1.04); opacity:1; }

.teamops-impact{ margin-top:18px; }
.teamops-impact-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.teamops-impact-metrics{ display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; }
.teamops-metric{
  display:flex; flex-direction:column;
  padding:12px 14px; border-radius:14px;
  border:1px solid var(--teamops-border);
  background: var(--teamops-surface2);
  min-width: 150px;
}
.teamops-metric b{ font-size:18px; }
.teamops-impact-toggle{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px; border-radius:12px;
  border:1px solid var(--teamops-border);
  background: transparent;
  color: var(--teamops-fg);
  font-weight:950;
  cursor:pointer;
}
.teamops-impact-details{
  display:none;
  margin-top:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--teamops-border);
  background: rgba(255,255,255,.03);
}
body.teamops-theme-light .teamops-impact-details{ background: rgba(0,0,0,.02); }
.teamops-impact.is-open .teamops-impact-details{ display:block; }
.teamops-impact.is-open .teamops-impact-toggle .chev{ transform: rotate(180deg); }
.teamops-impact-toggle .chev{ transition: transform .18s ease; }

body.teamops-theme-light .teamops-card{ box-shadow: var(--teamops-shadow); }
body.teamops-theme-dark .teamops-card{ box-shadow: var(--teamops-shadow-dark); }

/* Tiny pills for impact interpretation */
.teamops-pill{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  margin-left:8px;
  border-radius:999px;
  border:1px solid var(--teamops-border);
  font-weight:950;
  font-size:11px;
  opacity:.9;
}
body.teamops-theme-dark .teamops-pill.is-good{ background: rgba(0,255,179,.14); }
body.teamops-theme-light .teamops-pill.is-good{ background: rgba(0,180,120,.12); }
body.teamops-theme-dark .teamops-pill.is-bad{ background: rgba(255,180,0,.10); }
body.teamops-theme-light .teamops-pill.is-bad{ background: rgba(255,140,0,.10); }

/* Mobile compact */
@media (max-width: 640px){
  .teamops-card{ padding:14px; }
  .teamops-card--sub{ padding:12px; }
  .teamops-impact-metrics{ gap:10px; }
  .teamops-metric{ min-width: 0; flex: 1 1 140px; padding:10px 12px; }
  .teamops-impact-toggle{ padding:9px 10px; }
}

/* WP Admin bar compatibility (so app header doesn't hide under it) */
body.admin-bar .teamops-header{
  top: 32px !important;
}
@media (max-width: 782px){
  body.admin-bar .teamops-header{
    top: 46px !important;
  }
}
body.admin-bar .teamops-content{
  padding-top: 12px;
}

/* Active nav state (matches router slugs) */
.teamops-header a.is-active,
.teamops-header a[aria-current="page"]{
  opacity: 1 !important;
  text-decoration: none;
}
.teamops-header a.is-active::after,
.teamops-header a[aria-current="page"]::after{
  content:'';
  display:block;
  height:2px;
  border-radius:999px;
  margin-top:6px;
  background: rgba(0,255,179,.55);
}
body.teamops-theme-light .teamops-header a.is-active::after,
body.teamops-theme-light .teamops-header a[aria-current="page"]::after{
  background: rgba(0,180,120,.45);
}

/* Make auth pages feel like app screens */
.teamops-auth-wrap{
  max-width: 520px;
  margin: 0 auto;
}


/* --- Admin bar offset via CSS variable (reliable) --- */
.teamops-header{
  top: var(--teamops-adminbar, 0px) !important;
}
body.admin-bar .teamops-app{
  /* avoid first-content jump when header sticks */
  scroll-margin-top: var(--teamops-adminbar, 32px);
}

/* --- Premium nav active pill --- */
.teamops-header a{
  position: relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}
.teamops-header a:hover{
  transform: translateY(-1px);
  opacity:1;
}
.teamops-header a.is-active,
.teamops-header a[aria-current="page"]{
  background: rgba(0,255,179,.12);
  border: 1px solid rgba(0,255,179,.18);
}
body.teamops-theme-light .teamops-header a.is-active,
body.teamops-theme-light .teamops-header a[aria-current="page"]{
  background: rgba(0,180,120,.10);
  border: 1px solid rgba(0,180,120,.18);
}
/* Remove underline active marker from v0.9.9.1 */
.teamops-header a.is-active::after,
.teamops-header a[aria-current="page"]::after{
  display:none !important;
}


/* Admin bar offset fallback (no JS needed) */
body.admin-bar{
  --teamops-adminbar: 32px;
}
@media (max-width: 782px){
  body.admin-bar{
    --teamops-adminbar: 46px;
  }
}
/* Push the whole app down so WP admin bar never overlaps */
body.admin-bar .teamops-app{
  padding-top: var(--teamops-adminbar, 32px);
}
/* Keep header at top of the app container */
body.admin-bar .teamops-app .teamops-header{
  top: 0 !important;
}

/* Buttons (auth) */
.teamops-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,255,179,.20);
  background: rgba(0,255,179,.14);
  color: var(--teamops-fg);
  font-weight: 950;
  text-decoration:none;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.teamops-btn:hover{ transform: translateY(-1px); opacity:1; }
.teamops-btn--ghost{
  background: transparent;
  border: 1px solid var(--teamops-border);
}
body.teamops-theme-light .teamops-btn{
  border-color: rgba(0,180,120,.22);
  background: rgba(0,180,120,.12);
}

/* ======================= Global App Design System (v0.9.11.0) ======================= */
.teamops-app{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.teamops-content{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 84px;
}
@media (min-width: 960px){
  .teamops-content{ padding: 22px 18px 96px; }
}
.teamops-shell{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

/* Typography */
.teamops-h1, .teamops-shell h1{
  font-size: 22px;
  font-weight: 950;
  margin: 0 0 6px 0;
}
@media (min-width: 960px){
  .teamops-h1, .teamops-shell h1{ font-size: 26px; }
}
.teamops-h2, .teamops-shell h2{
  font-size: 16px;
  font-weight: 950;
  margin: 0 0 6px 0;
  opacity: .9;
}
.teamops-shell p{ margin: 8px 0; opacity: .85; line-height: 1.45; }

/* Sections */
.teamops-section{
  border-radius: var(--teamops-radius);
  border: 1px solid var(--teamops-border);
  background: var(--teamops-surface);
  padding: 16px;
}
.teamops-section--tight{ padding: 14px; }

/* Forms */
.teamops-input, .teamops-shell input[type="text"], .teamops-shell input[type="email"], .teamops-shell input[type="password"], .teamops-shell select, .teamops-shell textarea{
  width: 100%;
  margin-top: 6px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--teamops-border);
  background: rgba(255,255,255,.03);
  color: var(--teamops-fg);
  outline: none;
}
body.teamops-theme-light .teamops-input,
body.teamops-theme-light .teamops-shell input[type="text"],
body.teamops-theme-light .teamops-shell input[type="email"],
body.teamops-theme-light .teamops-shell input[type="password"],
body.teamops-theme-light .teamops-shell select,
body.teamops-theme-light .teamops-shell textarea{
  background: rgba(0,0,0,.02);
}
.teamops-shell input:focus, .teamops-shell select:focus, .teamops-shell textarea:focus{
  border-color: rgba(0,255,179,.28);
  box-shadow: 0 0 0 4px rgba(0,255,179,.08);
}
body.teamops-theme-light .teamops-shell input:focus,
body.teamops-theme-light .teamops-shell select:focus,
body.teamops-theme-light .teamops-shell textarea:focus{
  border-color: rgba(0,180,120,.28);
  box-shadow: 0 0 0 4px rgba(0,180,120,.08);
}

/* Tables */
.teamops-shell table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--teamops-border);
  background: var(--teamops-surface2);
}
.teamops-shell th, .teamops-shell td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--teamops-border);
  font-size: 13px;
}
.teamops-shell th{ text-align:left; font-weight: 950; opacity: .85; }
.teamops-shell tr:last-child td{ border-bottom: none; }

/* Chips */
.teamops-chip{
  display:inline-flex; align-items:center;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid var(--teamops-border);
  background: rgba(255,255,255,.04);
  font-weight:950;
  font-size:12px;
  opacity:.9;
}

/* Page transition subtle */
.teamops-app{ animation: teamopsFadeIn .16s ease-out; }
@keyframes teamopsFadeIn{
  from{ opacity:0; transform: translateY(2px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Mobile bottom nav polish (if present) */
.teamops-bottom-nav{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: rgba(15,17,21,.72);
  border-top: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
}
body.teamops-theme-light .teamops-bottom-nav{
  background: rgba(245,247,250,.78);
  border-top: 1px solid rgba(0,0,0,.08);
}

/* ---------------- Dark default baseline (v0.9.11.1) ---------------- */
body.teamops-theme-dark{
  --teamops-bg: #0f1115;
  --teamops-surface: #171a21;
  --teamops-surface2: #1d212a;
  --teamops-border: rgba(255,255,255,.08);
  --teamops-fg: #e6e8ee;
}
body.teamops-theme-light{
  --teamops-bg: #f4f6f9;
  --teamops-surface: #ffffff;
  --teamops-surface2: #f1f3f6;
  --teamops-border: rgba(0,0,0,.08);
  --teamops-fg: #1a1d23;
}
body.teamops-theme-dark .teamops-app,
body.teamops-theme-light .teamops-app{
  background: var(--teamops-bg);
  color: var(--teamops-fg);
}

/* Theme toggle button styling (v0.9.11.2) */
.teamops-theme-toggle{
  color: var(--teamops-fg);
  border: 1px solid var(--teamops-border) !important;
  background: rgba(255,255,255,.04) !important;
  border-radius: 999px !important;
  padding: 7px 10px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}
body.teamops-theme-light .teamops-theme-toggle{
  background: rgba(0,0,0,.03) !important;
}

/* Header light contrast fix (v0.9.11.3) */
.teamops-header{
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--teamops-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.teamops-theme-light .teamops-header{
  background: rgba(255,255,255,.78);
}
.teamops-header a{ color: var(--teamops-fg); opacity: .78; }
.teamops-header a:hover{ opacity: 1; }
.teamops-theme-toggle{ color: var(--teamops-fg) !important; }

/* ---------------- Light/Dark override harden (v0.9.11.4) ---------------- */
html.teamops-theme-dark, body.teamops-theme-dark{
  --teamops-bg: #0f1115;
  --teamops-surface: #171a21;
  --teamops-surface2: #1d212a;
  --teamops-border: rgba(255,255,255,.08);
  --teamops-fg: #e6e8ee;
}
html.teamops-theme-light, body.teamops-theme-light{
  --teamops-bg: #f4f6f9;
  --teamops-surface: #ffffff;
  --teamops-surface2: #f1f3f6;
  --teamops-border: rgba(0,0,0,.10);
  --teamops-fg: #141821;
}

.teamops-app{ background: var(--teamops-bg) !important; color: var(--teamops-fg) !important; }
.teamops-shell, .teamops-content{ color: var(--teamops-fg) !important; }

.teamops-card,
.teamops-section,
.teamops-panel,
.teamops-card--sub{
  background: var(--teamops-surface) !important;
  border-color: var(--teamops-border) !important;
  color: var(--teamops-fg) !important;
}

.teamops-shell table{ background: var(--teamops-surface2) !important; border-color: var(--teamops-border) !important; }
.teamops-shell th, .teamops-shell td{ border-bottom-color: var(--teamops-border) !important; color: var(--teamops-fg) !important; }

.teamops-header{
  background: rgba(255,255,255,.04) !important;
  border-bottom: 1px solid var(--teamops-border) !important;
}
html.teamops-theme-light .teamops-header,
body.teamops-theme-light .teamops-header{
  background: rgba(255,255,255,.88) !important;
}
.teamops-header, .teamops-header *{ color: var(--teamops-fg) !important; }
.teamops-header a{ opacity: .78; }
.teamops-header a:hover{ opacity: 1; }

.teamops-theme-toggle{
  color: var(--teamops-fg) !important;
  border: 1px solid var(--teamops-border) !important;
  background: rgba(255,255,255,.06) !important;
  border-radius: 999px !important;
  padding: 7px 10px !important;
  font-weight: 950 !important;
}
html.teamops-theme-light .teamops-theme-toggle,
body.teamops-theme-light .teamops-theme-toggle{
  background: rgba(0,0,0,.04) !important;
}

/* Premium Menu System (v0.9.12.0) */
.teamops-header{position:sticky;top:0;z-index:9998;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;}
.teamops-brand{font-weight:950;letter-spacing:.2px;font-size:14px;opacity:.95;display:flex;align-items:center;gap:8px;}
.teamops-brand .teamops-dot{width:8px;height:8px;border-radius:999px;background:rgba(0,255,179,.85);box-shadow:0 0 0 4px rgba(0,255,179,.12);}html.teamops-theme-light .teamops-brand .teamops-dot,body.teamops-theme-light .teamops-brand .teamops-dot{background:rgba(0,180,120,.95);box-shadow:0 0 0 4px rgba(0,180,120,.14);} 
.teamops-header-right{display:flex;align-items:center;gap:10px;}
.teamops-topnav{display:none;align-items:center;gap:8px;}
.teamops-topnav a{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid transparent;text-decoration:none;font-weight:900;font-size:13px;opacity:.78;}
.teamops-topnav a:hover{opacity:1;background:rgba(255,255,255,.05);border-color:var(--teamops-border);} 
.teamops-topnav a.is-active{opacity:1;background:rgba(0,255,179,.10);border-color:rgba(0,255,179,.22);}html.teamops-theme-light .teamops-topnav a.is-active,body.teamops-theme-light .teamops-topnav a.is-active{background:rgba(0,180,120,.10);border-color:rgba(0,180,120,.22);} 
.teamops-topnav svg{width:16px;height:16px;opacity:.9;}
@media (min-width:860px){.teamops-topnav{display:flex;}.teamops-content{padding-bottom:28px;}.teamops-bottom-nav{display:none;}}
.teamops-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:9999;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(10,12,16,.70);border-top:1px solid var(--teamops-border);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);display:flex;justify-content:space-around;align-items:center;gap:6px;}html.teamops-theme-light .teamops-bottom-nav,body.teamops-theme-light .teamops-bottom-nav{background:rgba(255,255,255,.82);} 
.teamops-bottom-nav a{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 8px;border-radius:14px;text-decoration:none;border:1px solid transparent;color:var(--teamops-fg)!important;opacity:.75;font-weight:900;font-size:11px;} 
.teamops-bottom-nav a svg{width:18px;height:18px;} 
.teamops-bottom-nav a.is-active{opacity:1;background:rgba(0,255,179,.10);border-color:rgba(0,255,179,.22);}html.teamops-theme-light .teamops-bottom-nav a.is-active,body.teamops-theme-light .teamops-bottom-nav a.is-active{background:rgba(0,180,120,.10);border-color:rgba(0,180,120,.22);} 

/* ======================= Menu polish aliases/fixes (v0.9.12.1) ======================= */
.teamops-header{
  min-height: 44px;
}
html.teamops-theme-light .teamops-header,
body.teamops-theme-light .teamops-header{
  background: rgba(255,255,255,.88) !important;
}
html.teamops-theme-light .teamops-header *,
body.teamops-theme-light .teamops-header *{
  color: #141821 !important;
}
html.teamops-theme-dark .teamops-header *,
body.teamops-theme-dark .teamops-header *{
  color: #e6e8ee !important;
}
.teamops-theme-toggle{
  min-width: 92px;
  text-align:center;
  white-space: nowrap;
}
.teamops-header > .teamops-brand:first-child{
  flex: 0 0 auto;
}
@media (max-width: 480px){
  .teamops-header{
    padding: 10px 10px;
  }
  .teamops-brand span:last-child{
    max-width: 98px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .teamops-theme-toggle{
    min-width: 84px;
    padding: 7px 9px !important;
    font-size: 12px;
  }
  .teamops-bottom-nav a{
    font-size: 10.5px;
    padding: 9px 6px;
  }
}
