/* ---------- Theme tokens ---------- */
:root{
  --bg: #f4f6fb;
  --bg2: #e8edf7;
  --panel: #ffffff;
  --text: #141824;
  --muted: #5b6478;

  --sidebar: #111214;
  --sidebar2:#0b0c0d;

  --border: rgba(20,24,36,.10);
  --shadow: 0 18px 40px rgba(20,24,36,.10);

  --yellow: #f5c542; /* brand yellow */
  --yellow2:#ffd76b;

  --radius: 16px;
}

:root[data-theme="dark"]{
  --bg: #0e1014;
  --bg2:#121622;
  --panel: #0f131b;
  --text: #f2f5ff;
  --muted:#aeb6c9;

  --sidebar:#0b0c0d;
  --sidebar2:#000000;

  --border: rgba(255,255,255,.08);
  --shadow: 0 20px 55px rgba(0,0,0,.40);
}

/* ✅ Make native UI controls follow the theme (fixes white dropdown menus in dark mode) */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);   /* samo “base” boja */
  min-height:100vh;
}
/* Fixed viewport background (no seams on scroll / any resolution) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(245,197,66,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(120,150,255,.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  transform: translateZ(0); /* pomaže render stabilnosti */
}


/* ---------- App shell ---------- */
.app{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width: 76px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
  position: sticky;
  top:0;
  /* Ensure sidebar tooltips always render above main content (e.g., SprintMate filters) */
  z-index: 50;
  height: 100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding: 16px 10px;
  border-right: 1px solid rgba(255,255,255,.06);
}

.brand{
  width: 48px;
  height: 48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
  margin-bottom: 18px;
  text-decoration:none;
}
.brand img{
  width: 30px;
  height: 30px;
  display:block;
}

.nav, .nav-bottom{
  width:100%;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.nav{ padding-top: 10px; }
.nav-bottom{
  margin-top:auto;
  padding-bottom: 4px;
}

.nav-item{
  position: relative;
  height: 46px;
  width: 56px;
  margin: 0 auto;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,.72);
  text-decoration:none;
  outline:none;
}
.nav-item .icon{
  width: 22px;
  height: 22px;
  display:inline-flex;
}
.nav-item .icon svg{
  width: 22px;
  height: 22px;
}

.nav-item:hover{
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-item:focus-visible{
  box-shadow: 0 0 0 3px rgba(245,197,66,.35);
}

.nav-item.active{
  background: rgba(245,197,66,.12);
  color: var(--yellow);
}
.nav-item.active::before{
  content:"";
  position:absolute;
  left: -10px;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: var(--yellow);
}

/* Tooltip box */
.tooltip{
  position:absolute;
  left: 74px;
  top: 50%;
  transform: translateY(-50%);
  /* Keep hover tooltip above any sticky panels in the main column */
  z-index: 9999;
  width: 260px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(10,11,12,.92);
  border: 1px solid rgba(255,255,255,.10);
  color:#fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition: opacity .12s ease, transform .12s ease;
}
.tooltip .t-title{
  display:block;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 4px;
  letter-spacing: .2px;
}
.tooltip .t-desc{
  display:block;
  font-size: 13px;
  line-height: 1.25;
  color: rgba(255,255,255,.82);
}

.nav-item:hover .tooltip,
.nav-item:focus-visible .tooltip{
  opacity:1;
  transform: translateY(-50%) translateX(6px);
}

/* Main column */
.main{
  flex:1;
  display:flex;
  flex-direction:column;
}

/* ✅ Topbar with left title + right actions */
.topbar{
  height: 64px;
  display:flex;
  align-items:center;
  justify-content:space-between; /* title left, theme icon right */
  padding: 0 22px;
}

.topbar-left{
  display:flex;
  align-items:center;
  min-width: 0;
}

.topbar-title{
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap: 10px;
}

.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color: var(--text);
  box-shadow: 0 12px 25px rgba(20,24,36,.08);
}
:root[data-theme="dark"] .icon-btn{
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.icon-btn:hover{
  transform: translateY(-1px);
}
.icon-btn:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 12px 25px rgba(20,24,36,.10);
}

.theme-icon svg{
  width: 20px;
  height: 20px;
}

/* ---------- Donate pill (topbar) ---------- */
.paypal-inline{
  display:flex;
  align-items:center;
}
.paypal-inline form{
  margin:0;
  display:flex;
  align-items:center;
  line-height:0; /* uklanja baseline “skok” */
}

.donate-pill{
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;

  display:inline-flex;
  align-items:center;
  gap: 8px;

  background: linear-gradient(180deg, var(--yellow2), var(--yellow));
  color: #111;
  font-weight: 950;
  letter-spacing: .2px;

  box-shadow: 0 12px 25px rgba(245,197,66,.22);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.donate-pill:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 16px 32px rgba(245,197,66,.26);
}

.donate-pill:active{
  transform: translateY(0);
  filter: brightness(.99);
}

.donate-pill:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 16px 32px rgba(245,197,66,.26);
}

.donate-heart{
  width: 18px;
  height: 18px;
  fill: #111;
  display:block;
}

/* Content */
.content{
  padding: 0 22px 40px; /* ✅ remove extra space on top */
}

.page-title{
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 10px 0 14px;
}

.hero{
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.55));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
:root[data-theme="dark"] .hero{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}

.hero-head{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 6px;
}
.hero-badge{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(245,197,66,.18);
  border: 1px solid rgba(245,197,66,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: var(--yellow);
}
.hero-title{
  font-size: 22px;
  font-weight: 900;
  margin:0;
}
.hero-sub{
  margin: 4px 0 0;
  color: var(--muted);
}

/* Modules cards */
.modules{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow:hidden;
}
:root[data-theme="dark"] .card{
  background: rgba(255,255,255,.03);
}

.card-top{
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(120,150,255,.22), rgba(245,197,66,.10));
}
:root[data-theme="dark"] .card-top{
  background: linear-gradient(135deg, rgba(120,150,255,.12), rgba(245,197,66,.08));
}

.card-row{
  display:flex;
  align-items:flex-start;
  gap: 14px;
}
.card-icon{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(20,24,36,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 12px 25px rgba(20,24,36,.10);
}
:root[data-theme="dark"] .card-icon{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.card-icon svg{
  width: 26px;
  height: 26px;
}

.card-title{
  margin: 2px 0 2px;
  font-size: 22px;
  font-weight: 900;
}
.card-desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.card-bottom{
  padding: 16px 18px 18px;
  display:flex;
  justify-content:center;
}

.btn{
  border:none;
  cursor:pointer;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .2px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 200px;
}
.btn-primary{
  background: linear-gradient(180deg, var(--yellow2), var(--yellow));
  color: #161616;
  box-shadow: 0 16px 35px rgba(245,197,66,.25);
}
.btn-primary:hover{
  transform: translateY(-1px);
}
.btn-primary:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 16px 35px rgba(245,197,66,.25);
}

/* Responsive */
@media (max-width: 980px){
  .modules{ grid-template-columns: 1fr; }
  .page-title{ font-size: 36px; }
  .tooltip{ display:none; } /* mobile: bez hover tooltipa */
}

@media (max-width: 560px){
  .sidebar{ width: 66px; }
  .content{ padding: 0 14px 32px; } /* ✅ keep top tight on mobile too */
  .topbar{ padding: 0 14px; }
}

/* ---------- Readable content spacing inside cards ---------- */
.prose{
  padding: 4px 2px;          /* daje luft od border linije */
}

.prose h2, .prose h3{
  margin: 10px 0 10px;
}

.prose p{
  margin: 10px 0;
  line-height: 1.75;
  color: var(--muted);
}

.prose p:first-child{ margin-top: 6px; }
.prose p:last-child{ margin-bottom: 6px; }

/* ---------- Cookie bar (global) ---------- */
.cookiebar{
  position: fixed;
  left: 0; right: 0;
  bottom: 14px;
  margin: 0 auto;
  width: min(980px, calc(100% - 24px));
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .cookiebar{
  background: rgba(15,19,27,.85);
}

.cookiebar__text strong{
  display:block;
  font-weight: 950;
  margin-bottom: 4px;
}

.cookiebar__text p{
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

.cookiebar__text a{
  color: var(--yellow);
  text-decoration: none;
}
.cookiebar__text a:hover{ text-decoration: underline; }

.cookiebar__actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-btn{
  border: 0;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: .2px;
}

.cookie-btn.primary{
  background: linear-gradient(180deg, var(--yellow2), var(--yellow));
  color: #161616;
  box-shadow: 0 16px 35px rgba(245,197,66,.20);
}

.cookie-btn.ghost{
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(120,130,150,.45);
}
:root[data-theme="dark"] .cookie-btn.ghost{
  border-color: rgba(255,255,255,.18);
}

@media (max-width: 680px){
  .cookiebar{
    flex-direction: column;
    align-items: stretch;
  }
  .cookiebar__actions{
    justify-content: stretch;
  }
  .cookie-btn{
    width: 100%;
  }
}

/* ---------- SprintMate report: widget filter UI ---------- */
.sm-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  margin-top: 14px;
  margin-bottom: 10px;
}

.sm-filter{
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 25px rgba(20,24,36,.08);
  padding: 10px 12px;
  max-width: 360px;
}

:root[data-theme="dark"] .sm-filter{
  background: rgba(255,255,255,.06);
}

.sm-filter summary{
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}
.sm-filter summary::-webkit-details-marker{ display:none; }

.sm-filter-body{
  margin-top: 10px;
  display:grid;
  gap: 8px;
}

.sm-check{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  font-size: 14px;
  color: var(--text);
}
.sm-check input{ margin-top: 2px; }

.sm-check small{
  display:block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

.sm-card{ padding: 18px; }

.sm-title{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 950;
}

.sm-muted{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

