/* ═══ rankzupAI tasarım sistemi v3 — açık tema "aurora" ═══ */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* yüzeyler */
  --bg: #f4f6fb;
  --surface: rgba(255, 255, 255, .72);
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --card-hover: rgba(255, 255, 255, .95);
  --inset: rgba(244, 246, 251, .75);
  --border: rgba(15, 23, 42, .07);
  --border-strong: rgba(15, 23, 42, .13);
  /* mürekkep */
  --text: #0f172a;
  --text-2: #3f4c63;
  --muted: #64748b;
  --faint: #94a3b8;
  /* marka */
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --cyan: #06b6d4;
  --grad: linear-gradient(120deg, #4f46e5, #7c3aed 70%, #06b6d4 160%);
  --grad-soft: linear-gradient(120deg, rgba(79,70,229,.09), rgba(124,58,237,.09));
  /* durum */
  --ok: #059669;
  --bad: #dc2626;
  --warn: #d97706;
  /* seriler (dataviz — açık yüzeyde doğrulandı, ΔE 47) */
  --s-openai: #2a78d6;
  --s-gemini: #1baf7a;
  --s-perplexity: #eda100;
  --s-all: #4a3aa7;
  /* geometri */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -16px rgba(15, 23, 42, .10);
  --shadow-2: 0 2px 4px rgba(15, 23, 42, .05), 0 20px 44px -20px rgba(15, 23, 42, .18);
  --glow: 0 8px 24px -8px rgba(79, 70, 229, .45);
  --ring: 0 0 0 3px rgba(79, 70, 229, .25);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #c4ccdd var(--bg); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* aurora zemin — sabit, yavaşça süzülen renk bulutları */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%;
  filter: blur(90px); pointer-events: none; opacity: .55;
}
body::before {
  width: 780px; height: 560px; top: -220px; right: -160px;
  background: radial-gradient(closest-side, rgba(124,58,237,.20), rgba(79,70,229,.10), transparent);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  width: 720px; height: 540px; bottom: -240px; left: -180px;
  background: radial-gradient(closest-side, rgba(6,182,212,.16), rgba(79,70,229,.07), transparent);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-90px, 70px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(110px, -60px) scale(1.08); } }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.32rem; font-weight: 750; margin: 0; letter-spacing: -.022em; }
h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .9rem; letter-spacing: -.012em; }
h3 { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 1.1rem 0 .5rem; text-transform: uppercase; letter-spacing: .07em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
.icon { vertical-align: -3.5px; opacity: .9; }
::selection { background: rgba(79,70,229,.18); }

/* ═══ Uygulama kabuğu ═══ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--surface);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  padding: 1.15rem .8rem .9rem;
  display: flex; flex-direction: column; gap: .35rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--text); display: flex; align-items: center; gap: .5rem;
  padding: .15rem .6rem 1rem;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem; font-weight: 900; letter-spacing: 0;
  box-shadow: var(--glow);
  animation: markfloat 5s ease-in-out infinite;
}
@keyframes markfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.logo-ai {
  background: linear-gradient(120deg, #4f46e5, #7c3aed, #06b6d4, #4f46e5);
  background-size: 280% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueflow 7s linear infinite;
}
@keyframes hueflow { to { background-position: -280% 0; } }

/* proje değiştirici */
.switcher { position: relative; margin: 0 0 .4rem; }
.switcher summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: .55rem;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: .55rem .7rem; font-weight: 600; font-size: .88rem;
  box-shadow: var(--shadow-1);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.switcher summary .chev { margin-left: auto; color: var(--muted); transition: transform .15s var(--ease); }
.switcher[open] summary .chev { transform: rotate(180deg); }
.switcher-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: .35rem; max-height: 300px; overflow-y: auto;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.switcher-menu a {
  display: block; padding: .5rem .65rem; border-radius: var(--r-sm);
  color: var(--text-2); font-size: .88rem; font-weight: 500;
}
.switcher-menu a:hover { background: rgba(15,23,42,.045); color: var(--text); text-decoration: none; }
.switcher-menu a.sel { color: var(--accent); background: rgba(79,70,229,.08); }
.switcher-menu .new { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .45rem; color: var(--accent); }

.side-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .11em;
  color: var(--faint); padding: .75rem .6rem .3rem; font-weight: 750;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: .65rem;
  color: var(--text-2); padding: .54rem .65rem; border-radius: var(--r-sm);
  font-weight: 550; font-size: .9rem; position: relative;
  transition: background .12s var(--ease), color .12s var(--ease), transform .12s var(--ease);
}
.sidebar nav a:hover { background: rgba(15,23,42,.045); color: var(--text); text-decoration: none; transform: translateX(2px); }
.sidebar nav a.active {
  background: var(--grad); color: #fff; font-weight: 650;
  box-shadow: var(--glow);
}
.sidebar nav a.active .icon { opacity: 1; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: .7rem; padding-top: 1rem; }
.usage { background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--r-md); padding: .7rem .8rem; box-shadow: var(--shadow-1); }
.usage-row { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-2); margin-bottom: .45rem; font-weight: 550; }
.bar { height: 6px; background: rgba(15,23,42,.08); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 999px; transform-origin: left; animation: growbar .9s var(--ease); transition: width .4s var(--ease); }
@keyframes growbar { from { transform: scaleX(0); } }
.bar-fill.bar-warn { background: linear-gradient(120deg, var(--warn), var(--bad)); }
.user-row { display: flex; align-items: center; gap: .6rem; padding: .2rem .3rem; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-name { flex: 1; font-size: .86rem; font-weight: 550; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row a { color: var(--faint); display: inline-flex; padding: .3rem; border-radius: var(--r-sm); }
.user-row a:hover { color: var(--bad); background: rgba(220,38,38,.08); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.8rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 246, 251, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.crumb { color: var(--muted); font-size: .82rem; font-weight: 550; margin-bottom: .1rem; }
.crumb a { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: .7rem; }
.content { flex: 1; padding: 1.5rem 1.8rem 2rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-sub { color: var(--muted); font-size: .88rem; margin: -1rem 0 1.2rem; }

/* ═══ Kartlar ═══ */
.card {
  background: var(--card);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.3rem 1.4rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.cardgrid .card { margin-bottom: 0; }
.kpigrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpigrid .card { margin-bottom: 0; position: relative; overflow: hidden; }
.kpigrid .card::before {
  content: ""; position: absolute; top: 0; left: 1.4rem; right: 1.4rem; height: 2px;
  border-radius: 999px; background: var(--grad); opacity: .55;
}
.stat-label { font-size: .73rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.hero-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.045em; line-height: 1.15; margin: .2rem 0 .1rem; font-variant-numeric: tabular-nums; }
.hero-num.small-hero { font-size: 1.6rem; }
.hero-num .unit { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.stat-foot { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: .76rem; font-weight: 750; padding: .08rem .5rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); background: rgba(5,150,105,.1); }
.delta.down { color: var(--bad); background: rgba(220,38,38,.09); }
.delta.flat { color: var(--muted); background: rgba(15,23,42,.06); }
.spark { display: block; margin-top: .4rem; }
.spark polyline { fill: none; stroke: url(#sparkgrad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .sparkfill { fill: url(#sparkfillgrad); stroke: none; }

a.projcard { display: block; color: inherit; transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
a.projcard:hover { text-decoration: none; border-color: rgba(79,70,229,.4); transform: translateY(-3px); box-shadow: var(--shadow-2), var(--glow); }
.projcard-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.projcard-head h2 { margin: 0; }
.provchips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.provchip {
  display: inline-flex; align-items: center; gap: .15rem;
  font-size: .78rem; color: var(--muted); font-weight: 550;
  background: var(--inset); border: 1px solid var(--border);
  border-radius: 999px; padding: .18rem .65rem;
}
.provchip b { color: var(--text); font-weight: 750; margin-left: .25rem; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 3.2rem 1.5rem; color: var(--muted); }
.empty .empty-art { margin: 0 auto 1rem; width: 88px; height: 88px; border-radius: 26px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.empty h2 { margin: .4rem 0; color: var(--text); }
.empty p { max-width: 400px; margin: .4rem auto 1.2rem; }
.empty-mini { color: var(--muted); padding: .7rem 0; display: flex; gap: .5rem; align-items: center; font-size: .88rem; }

.notice { border-color: rgba(79,70,229,.3); background: linear-gradient(120deg, rgba(79,70,229,.06), rgba(6,182,212,.05)), var(--card-solid); display: flex; gap: .7rem; align-items: flex-start; }
.notice.warn { border-color: rgba(217,119,6,.35); background: linear-gradient(120deg, rgba(217,119,6,.06), transparent), var(--card-solid); }
.danger { border-color: rgba(220,38,38,.25); }

/* ═══ Gösterge (gauge) ═══ */
.gauge-wrap { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.gauge { position: relative; width: 168px; height: 168px; flex-shrink: 0; }
.gauge svg { transform: rotate(-90deg); }
.gauge .track { stroke: rgba(15,23,42,.07); }
.gauge .value { stroke: url(#gaugegrad); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-center .gnum { font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-center .glabel { font-size: .6rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-top: .3rem; max-width: 104px; text-align: center; line-height: 1.35; }
.gauge-side { flex: 1; min-width: 220px; }
.gauge-side .row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.gauge-side .row:last-child { border-bottom: none; }

/* ═══ Form ═══ */
label { display: block; margin-bottom: .95rem; font-size: .84rem; color: var(--text-2); font-weight: 600; }
input, textarea, select {
  display: block; width: 100%; margin-top: .4rem; padding: .62rem .85rem;
  border-radius: var(--r-md); border: 1px solid var(--border-strong);
  background: var(--card-solid); color: var(--text); font-size: .93rem; font-family: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.narrow-form { max-width: 580px; }
.inline-form { display: flex; gap: .4rem; align-items: center; }
.inline-form select { width: auto; margin: 0; padding: .32rem .5rem; font-size: .8rem; }
.filterbox { max-width: 280px; margin: 0 0 .8rem; }
.filterbox input { margin-top: 0; padding: .45rem .75rem; font-size: .86rem; }

button {
  padding: .55rem 1.15rem; border: none; border-radius: var(--r-md);
  font-weight: 650; font-size: .9rem; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: filter .12s var(--ease), background .12s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
button:active { transform: translateY(1px); }
.btn-primary, button[type="submit"]:not(.btn-ghost):not(.btn-danger) {
  background: var(--grad); color: #fff;
  padding: .55rem 1.15rem; border: none; border-radius: var(--r-md);
  font-weight: 700; font-size: .9rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  box-shadow: var(--glow);
}
a.btn-primary { text-decoration: none; }
.btn-primary:hover, button[type="submit"]:not(.btn-ghost):not(.btn-danger):hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(79,70,229,.5); text-decoration: none; }
.btn-ghost { background: rgba(15,23,42,.05); color: var(--text-2); border: 1px solid transparent; }
.btn-ghost:hover { background: rgba(15,23,42,.09); color: var(--text); }
.btn-danger { background: rgba(220,38,38,.07); color: var(--bad); border: 1px solid rgba(220,38,38,.25); }
.btn-danger:hover { background: rgba(220,38,38,.13); }
button.small { padding: .3rem .7rem; font-size: .78rem; border-radius: var(--r-sm); }
.wide { width: 100%; justify-content: center; }
button:disabled { opacity: .45; cursor: default; }

/* ═══ Tablolar ═══ */
.tablewrap { overflow-x: auto; margin: 0 -.35rem; }
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .55rem .65rem; border-bottom: 1px solid var(--border-strong);
  white-space: nowrap; position: sticky; top: 0;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
}
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--text-2); }
th[data-sort]::after { content: "↕"; opacity: .35; margin-left: .3rem; font-size: .8em; }
th[data-sort].asc::after { content: "↑"; opacity: 1; color: var(--accent); }
th[data-sort].desc::after { content: "↓"; opacity: 1; color: var(--accent); }
td { padding: .62rem .65rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .1s var(--ease); }
tbody tr:hover { background: rgba(79,70,229,.03); }
tbody tr:last-child td { border-bottom: none; }
table.mini td { border: none; padding: .32rem .4rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.strong { font-weight: 700; }
tr.highlight td { background: rgba(79,70,229,.05); }
tr.highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.listrow { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.listrow:last-child { border-bottom: none; }

/* ═══ Küçük parçalar ═══ */
.pill { display: inline-block; background: rgba(15,23,42,.06); border-radius: 999px; padding: .12rem .6rem; font-size: .74rem; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.pill-accent { background: rgba(79,70,229,.1); color: var(--accent); }
.pill-warn { background: rgba(217,119,6,.11); color: var(--warn); }
.pill-ok { background: rgba(5,150,105,.1); color: var(--ok); }
.ok { color: var(--ok); font-weight: 650; }
.bad { color: var(--bad); font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; }
.error { color: var(--bad); background: rgba(220,38,38,.06); border: 1px solid rgba(220,38,38,.22); border-radius: var(--r-md); padding: .6rem .9rem; font-size: .88rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.dot-openai { background: var(--s-openai); }
.dot-gemini { background: var(--s-gemini); }
.dot-perplexity { background: var(--s-perplexity); }
.dot-all { background: var(--s-all); }
blockquote.snippet { border-left: 3px solid var(--border-strong); margin: .65rem 0; padding: .4rem 1rem; color: var(--text-2); font-size: .92rem; }
blockquote.frame-positive { border-color: var(--ok); }
blockquote.frame-negative { border-color: var(--bad); }
.chartbox { position: relative; height: 320px; }
.footnote { text-align: center; color: var(--faint); font-size: .76rem; padding: 1.1rem; }
code { background: var(--inset); border: 1px solid var(--border); padding: .14rem .5rem; border-radius: 6px; font-size: .86em; }

/* ═══ Paket kartları ═══ */
.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 1rem; }
.plancard { text-align: center; margin-bottom: 0; padding-top: 1.6rem; position: relative; transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.plancard:hover { border-color: rgba(79,70,229,.35); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.plancard.current { border-color: rgba(79,70,229,.5); box-shadow: 0 0 0 1px rgba(79,70,229,.2), var(--shadow-2); }
.plancard .hero-num { font-size: 2rem; }
.plancard ul { list-style: none; padding: 0; margin: .8rem 0 1.1rem; color: var(--muted); font-size: .85rem; display: flex; flex-direction: column; gap: .35rem; }
.plancard li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* ═══ Yığılmış bar (algı çerçevesi) ═══ */
.stackbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; margin: .8rem 0 1rem; background: transparent; }
.stackbar span { display: block; height: 100%; border-radius: 2px; min-width: 2px; }
.sb-pos { background: var(--ok); }
.sb-neu { background: #a3b0c2; }
.sb-neg { background: var(--bad); }
.legendrow { display: flex; align-items: center; justify-content: space-between; padding: .4rem 0; font-size: .88rem; border-bottom: 1px solid var(--border); }
.legendrow:last-child { border-bottom: none; }
.legendrow .lg { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-2); }
.legendrow .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ağırlıklı sıfat bulutu */
.tagcloud { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.tagcloud .pill { padding: .18rem .7rem; }
.pill.w2 { font-size: .86rem; background: rgba(79,70,229,.08); color: var(--text-2); }
.pill.w3 { font-size: .98rem; background: rgba(79,70,229,.12); color: var(--text); font-weight: 700; }

/* tier ve durum rozetleri */
.pill-p1 { background: rgba(79,70,229,.11); color: var(--accent); }
.pill-p2 { background: rgba(15,23,42,.06); color: var(--text-2); }
.pill-p3 { background: rgba(15,23,42,.04); color: var(--muted); }
.pill-bad { background: rgba(220,38,38,.09); color: var(--bad); }

/* snippet üst bilgisi */
.snippet-meta { display: flex; align-items: center; gap: .6rem; font-size: .76rem; color: var(--muted); margin-bottom: .2rem; font-weight: 600; }

/* sistem kontrolleri */
.controlgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.control-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--border); border-radius: var(--r-md); padding: .8rem 1rem;
  background: var(--card-solid); box-shadow: var(--shadow-1);
}
.control-item.control-off { border-color: rgba(220,38,38,.3); background: rgba(220,38,38,.02); }
.control-label { font-weight: 650; display: flex; align-items: center; gap: .5rem; margin-bottom: .15rem; }

/* fırsat listesi */
.opp-item {
  border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-md);
  padding: .9rem 1.1rem; margin-bottom: .8rem; background: var(--card-solid);
  display: flex; flex-direction: column; gap: .55rem; box-shadow: var(--shadow-1);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.opp-item:hover { transform: translateX(2px); box-shadow: var(--shadow-2); }
.opp-item.sev-high { border-left-color: var(--bad); }
.opp-item.sev-medium { border-left-color: var(--warn); }
.opp-item.sev-low { border-left-color: var(--faint); }
.opp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.opp-head a { color: var(--text); font-weight: 650; font-size: .95rem; }
.opp-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.opp-rivals { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.opp-hint { color: var(--muted); font-size: .82rem; }
.sev-pill-high { background: rgba(220,38,38,.09); color: var(--bad); }
.sev-pill-medium { background: rgba(217,119,6,.1); color: var(--warn); }
.sev-pill-low { background: rgba(15,23,42,.05); color: var(--muted); }

/* yatay mini bar (kıyas) */
.minibar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 48px; align-items: center; gap: .8rem; padding: .38rem 0; font-size: .88rem; }
.minibar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.minibar-row.me .name { color: var(--accent); font-weight: 700; }
.minibar { height: 8px; background: rgba(15,23,42,.07); border-radius: 999px; overflow: hidden; }
.minibar > span { display: block; height: 100%; border-radius: 999px; background: #a3b0c2; transform-origin: left; animation: growbar .8s var(--ease); }
.minibar-row.me .minibar > span { background: var(--grad); }
.minibar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* platform bazlı küçük stackbar */
.pstack { margin-bottom: .9rem; }
.pstack .pstack-head { display: flex; justify-content: space-between; font-size: .84rem; color: var(--text-2); margin-bottom: .35rem; font-weight: 550; }
.pstack .stackbar { height: 8px; margin: 0; }

/* sihirbaz adımları */
.step { display: flex; gap: .9rem; margin-bottom: 1.3rem; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; box-shadow: var(--glow);
}
.step-body { flex: 1; }
.step-body > label:last-of-type { margin-bottom: 0; }
.step-title { font-weight: 650; margin-bottom: .5rem; }

/* ═══ Toast ═══ */
.toast-wrap { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--card-solid); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); padding: .7rem 1rem; box-shadow: var(--shadow-2);
  font-size: .88rem; animation: slidein .25s var(--ease);
}
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } }

/* ═══ Auth sayfaları ═══ */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; position: relative; overflow: hidden; }
.auth-body::before {
  content: ""; position: fixed; top: -25%; left: 50%; transform: translateX(-50%);
  width: 980px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(124,58,237,.16), rgba(6,182,212,.08), transparent);
  pointer-events: none; filter: blur(50px);
  animation: drift-a 24s ease-in-out infinite alternate;
}
.auth-wrap { width: 100%; max-width: 420px; position: relative; }
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand .logo { font-size: 1.5rem; padding: 0; justify-content: center; }
.auth-card { padding: 1.7rem 1.8rem; background: var(--card-solid); box-shadow: var(--shadow-2); }
.auth-card h1 { margin-bottom: .5rem; font-size: 1.35rem; }
.auth-card form { margin-top: 1.1rem; }

/* ═══ Yardımcılar ═══ */
.fade-in { animation: fadein .35s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.kpigrid .card, .cardgrid .card { animation: fadein .4s var(--ease) backwards; }
.kpigrid .card:nth-child(2), .cardgrid .card:nth-child(2) { animation-delay: .05s; }
.kpigrid .card:nth-child(3), .cardgrid .card:nth-child(3) { animation-delay: .1s; }
.kpigrid .card:nth-child(4), .cardgrid .card:nth-child(4) { animation-delay: .15s; }
.kpigrid .card:nth-child(5), .cardgrid .card:nth-child(5) { animation-delay: .2s; }
.kpigrid .card:nth-child(6), .cardgrid .card:nth-child(6) { animation-delay: .25s; }
.skeleton { background: linear-gradient(90deg, rgba(15,23,42,.05), rgba(15,23,42,.1), rgba(15,23,42,.05)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═══ Mobil ═══ */
@media (max-width: 880px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .7rem .8rem; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .side-label { display: none; }
  .switcher { min-width: 180px; margin: 0; }
  .side-bottom { margin: 0 0 0 auto; flex-direction: row; align-items: center; padding: 0; }
  .usage { display: none; }
  .content { padding: 1rem; }
  .topbar { padding: .8rem 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .gauge-wrap { justify-content: center; }
}
