:root {
  --bg: #0a0e14;
  --surface: #121820;
  --surface2: #1a2230;
  --border: #2a3548;
  --text: #e8edf5;
  --muted: #8b9cb3;
  --moi: #B266FF;
  --moi-rgb: 178, 102, 255;
  --accent: var(--moi);
  --accent-light: #C989FF;
  --accent-dark: #9438F0;
  --hazirlik: #6b7280;
  --hazirlik-bg: rgba(107, 114, 128, 0.15);
  --baslangic: #22c55e;
  --baslangic-bg: rgba(34, 197, 94, 0.12);
  --level17: #6b7280;
  --level17-bg: rgba(107, 114, 128, 0.15);
  --pivot: #f59e0b;
  --pivot-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --radius: 12px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 0.9rem 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent-dark), var(--moi) 55%, var(--accent-light));
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.app-toast.hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(178, 102, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 102, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2rem) clamp(0.75rem, 3vw, 2rem) 3rem;
}

/* —— App shell (header + nav) —— */
.app-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -0.25rem 0 1.25rem;
  padding: 0.35rem 0 0.75rem;
  background: linear-gradient(180deg, var(--bg) 55%, rgba(10, 14, 20, 0.92) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-shell-card {
  padding: 0.85rem 1rem 0.75rem;
  border-radius: 14px;
  background: rgba(18, 24, 32, 0.92);
}

.app-shell-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.65rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  max-width: 160px;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(178, 102, 255, 0.35), rgba(178, 102, 255, 0.12));
  border: 1px solid rgba(178, 102, 255, 0.35);
  color: #e9d5ff;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.15rem;
}

.toolbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.toolbar-btn:hover {
  color: var(--text);
  border-color: rgba(178, 102, 255, 0.4);
  background: rgba(178, 102, 255, 0.08);
}

.toolbar-btn.active {
  color: #e9d5ff;
  border-color: rgba(178, 102, 255, 0.5);
  background: rgba(178, 102, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

a.toolbar-btn {
  text-decoration: none;
}

.toolbar-btn--ghost:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.toolbar-icon {
  flex-shrink: 0;
}

.toolbar-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 2px solid var(--surface);
}

.app-nav {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.8rem;
  padding: 0.28rem;
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.main-nav {
  margin-bottom: 0;
}

.main-nav .nav-tab.hidden {
  display: none !important;
}

.nav-tab {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.nav-tab:hover {
  color: var(--text);
  background: rgba(178, 102, 255, 0.06);
}

.nav-tab:hover .nav-icon {
  opacity: 1;
}

.nav-tab.active {
  background: rgba(178, 102, 255, 0.18);
  color: #e9d5ff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.nav-tab.active .nav-icon {
  opacity: 1;
  color: #C989FF;
}

.nav-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(178, 102, 255, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(178, 102, 255, 0.3);
  line-height: 1.1rem;
  text-align: center;
}

.nav-badge.hidden {
  display: none;
}

.nav-badge--alert {
  background: #ef4444;
  color: #fff;
  border-color: rgba(239, 68, 68, 0.5);
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.login-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.login-glow-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(178, 102, 255, 0.35);
  animation: floatGlow 12s ease-in-out infinite;
}

.login-glow-b {
  width: 360px;
  height: 360px;
  bottom: -100px;
  right: -60px;
  background: rgba(34, 197, 94, 0.18);
  animation: floatGlow 14s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, 18px) scale(1.06); }
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow-y: auto;
}

.login-screen-inner {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.login-hero {
  padding: 0.5rem 0;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-logo-icon {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  color: var(--accent);
  filter: drop-shadow(0 0 24px rgba(178, 102, 255, 0.55));
  animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

.login-logo-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.login-logo-slogan {
  margin-top: 0.35rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  max-width: 22rem;
}

.slogan-moi,
.brand-moi {
  color: var(--moi);
  font-weight: inherit;
}

.slogan-moi {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-hook {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 600;
  line-height: 1.5;
  color: #e9d5ff;
  max-width: 34rem;
  margin-bottom: 0.65rem;
}

.login-tagline {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.65;
  color: #c8d3e6;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
  color: var(--muted);
}

.feat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}

.feat-dot.kanalbasi { background: #C989FF; color: #C989FF; }
.feat-dot.baslangic { background: var(--baslangic); color: var(--baslangic); }
.feat-dot.accent { background: var(--accent); color: var(--accent); }

.login-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: rgba(18, 24, 32, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(178, 102, 255, 0.22);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-mode-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.28rem;
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.login-mode-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.login-mode-tab:hover {
  color: var(--text);
  background: rgba(178, 102, 255, 0.06);
}

.login-mode-tab.active {
  color: #e9d5ff;
  background: rgba(178, 102, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.login-card-head {
  margin-bottom: 1.25rem;
}

.login-card-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.login-card-head p {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-screen-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.login-screen-form .field > input[type="text"],
.login-screen-form .field > input[type="email"],
.password-field input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-screen-form .field > input[type="text"] {
  padding: 0.85rem 1rem;
}

.login-screen-form .field > input[type="email"] {
  padding: 0.85rem 1rem;
}

.password-field input {
  padding: 0.85rem 2.75rem 0.85rem 1rem;
}

.password-field {
  position: relative;
}

.password-field input {
  display: block;
  width: 100%;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(178, 102, 255, 0.1);
}

.password-toggle.is-visible {
  color: #C989FF;
}

.password-toggle-icon {
  flex-shrink: 0;
}

.login-screen-form .field > input[type="text"]:focus,
.password-field input:focus,
.login-screen-form .field > input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(178, 102, 255, 0.18);
}

.btn-login-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, var(--accent-dark), var(--moi) 55%, var(--accent-light));
  color: white;
  border: none;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px rgba(178, 102, 255, 0.35);
}

.btn-login-full:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(178, 102, 255, 0.42);
}

.btn-login-full:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

body.is-authenticated .login-glow {
  opacity: 0.15;
}

.logged-in {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-mark-read {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-mark-read:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* —— Bildirimler sayfası —— */
.notif-page .profile-head {
  margin-bottom: 1rem;
}

.notif-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.notif-summary {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.notif-summary strong {
  color: #e9d5ff;
  font-weight: 700;
}

.notif-filters {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.notif-filter {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s, background 0.15s;
}

.notif-filter:hover {
  color: var(--text);
}

.notif-filter.active {
  background: rgba(178, 102, 255, 0.18);
  color: #e9d5ff;
}

.notif-filter-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  line-height: 1.15rem;
  text-align: center;
}

.notifications-grouped {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.notif-date-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notif-date-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 0.15rem;
}

.notif-date-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.notif-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: left;
}

.notif-card:hover {
  border-color: rgba(178, 102, 255, 0.35);
  background: rgba(26, 34, 48, 0.95);
}

.notif-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.notif-card.unread {
  border-left: 4px solid var(--pivot);
  background: var(--surface2);
}

.notif-card__leading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.65rem;
  align-self: stretch;
}

.notif-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(178, 102, 255, 0.2);
  flex-shrink: 0;
}

.notif-card__dot.is-read {
  background: transparent;
  box-shadow: none;
  border: 1.5px solid var(--border);
}

.notif-card__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.notif-card__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
}

.notif-market-pill {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.18rem 0.42rem;
  border-radius: 4px;
  background: rgba(178, 102, 255, 0.14);
  color: var(--accent);
}

.notif-market-pill.binance {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.notif-card__symbol {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.2;
}

.notif-card__name {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.notif-card__prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
}

.notif-price-from {
  color: var(--muted);
}

.notif-price-arrow {
  color: var(--border);
  font-size: 0.75rem;
}

.notif-price-to {
  color: var(--text);
  font-weight: 600;
}

.notif-price-label {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.85;
}

.notif-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.notif-card__pct-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.notif-card__pct-badge--up {
  background: var(--baslangic-bg);
  color: var(--baslangic);
}

.notif-card__pct-badge--down {
  background: rgba(239, 68, 68, 0.12);
  color: #f472b6;
}

.notif-card__arrow {
  flex-shrink: 0;
}

.notif-card__time {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
  white-space: nowrap;
}

.notif-pct-up {
  color: var(--baslangic);
  font-weight: 600;
}

.notif-pct-down {
  color: #f472b6;
  font-weight: 600;
}

@media (max-width: 640px) {
  .notif-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .notif-card__aside {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .notif-card__name {
    flex-basis: 100%;
  }

  .notif-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .notif-filters {
    justify-content: center;
  }
}

.profile {
  padding: 1.25rem 1.5rem;
}

.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.profile-head h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.profile-sub {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.profile-count {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
}

.profile-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(178, 102, 255, 0.06);
}

.profile-block-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.profile-block-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* —— Favoriler & İzleme Listesi (portfolio) —— */
.portfolio-page .profile-head {
  margin-bottom: 0.75rem;
}

.portfolio-summary {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  min-height: 1.25rem;
}

.portfolio-summary strong {
  color: #e9d5ff;
  font-weight: 700;
}

.portfolio-search {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.portfolio-page .profile-block {
  border-radius: 12px;
  overflow: hidden;
}

.portfolio-page .profile-block--bist {
  border-left: 3px solid var(--accent);
}

.portfolio-page .profile-block--kripto {
  border-left: 3px solid #fbbf24;
}

.profile-block-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.profile-block-title h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.market-pill {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(178, 102, 255, 0.14);
  color: var(--accent);
}

.market-pill.binance {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.portfolio-table thead {
  background: rgba(18, 24, 32, 0.98);
}

.portfolio-table th {
  padding: 0.75rem 1rem;
  font-size: 0.68rem;
}

.portfolio-table td {
  padding: 0.8rem 1rem;
  vertical-align: middle;
}

.portfolio-table tbody tr.portfolio-row {
  transition: background 0.12s ease;
}

.portfolio-table tbody tr.portfolio-row:hover {
  background: rgba(178, 102, 255, 0.06);
}

.portfolio-table tbody tr.portfolio-row:last-child td {
  border-bottom: none;
}

.asset-cell {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  max-width: 220px;
}

.asset-symbol {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.2;
}

.asset-name {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-val {
  display: inline-block;
  font-size: 0.84rem;
}

.price-val--added {
  color: var(--muted);
}

.price-val--current {
  color: var(--text);
  font-weight: 600;
}

.price-val--muted,
.price-val--loading {
  color: var(--muted);
}

.chg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.28rem 0.55rem;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.chg-pill--up {
  background: var(--baslangic-bg);
  color: var(--baslangic);
}

.chg-pill--down {
  background: rgba(239, 68, 68, 0.12);
  color: #f472b6;
}

.chg-pill--flat,
.chg-pill--muted,
.chg-pill--loading {
  background: rgba(42, 53, 72, 0.5);
  color: var(--muted);
}

.signal-pill {
  display: inline-block;
  max-width: 140px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border);
}

.signal-pill--kanalbasi {
  background: rgba(178, 102, 255, 0.12);
  color: #C989FF;
  border-color: rgba(178, 102, 255, 0.3);
}

.signal-pill--vurgun,
.signal-pill--hazirlik {
  background: var(--hazirlik-bg);
  color: #c4cad4;
  border-color: rgba(107, 114, 128, 0.35);
}

.signal-pill--baslangic {
  background: var(--baslangic-bg);
  color: var(--baslangic);
  border-color: rgba(34, 197, 94, 0.35);
}

.signal-pill--pivot {
  background: var(--pivot-bg);
  color: var(--pivot);
  border-color: rgba(245, 158, 11, 0.35);
}

.signal-pill--neutral,
.signal-pill--muted {
  background: transparent;
  color: var(--muted);
}

.date-cell {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.col-price,
.col-current,
.col-change,
.col-signal {
  white-space: nowrap;
}

.col-added {
  min-width: 88px;
}

.btn-portfolio-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.btn-portfolio-remove:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
}

.portfolio-empty {
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
}

.portfolio-empty-main {
  margin-top: 0.5rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(26, 34, 48, 0.35);
}

.portfolio-page .fav-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid transparent;
}

.portfolio-page .fav-btn:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.portfolio-page .fav-btn.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.col-fav {
  width: 42px;
  text-align: center;
}

.fav-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem;
  transition: transform 0.15s, color 0.15s;
}

.fav-btn:hover {
  transform: scale(1.15);
  color: #fbbf24;
}

.fav-btn.active {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

.col-flag {
  width: 36px;
  text-align: center;
}

.flag-btn {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
  background: transparent;
  box-shadow: inset 0 0 0 2px #64748b;
  transition: box-shadow 0.15s, background 0.15s;
}

.flag-btn:hover {
  box-shadow: inset 0 0 0 2px #94a3b8;
}

.flag-btn.has-flag {
  background: var(--flag-color);
  box-shadow: none;
}

.flag-btn.has-flag:hover {
  box-shadow: 0 0 6px color-mix(in srgb, var(--flag-color) 55%, transparent);
}

.flag-picker {
  position: fixed;
  z-index: 2000;
  min-width: 220px;
  padding: 0.65rem 0.75rem;
  background: #1e2433;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.flag-picker.hidden {
  display: none;
}

.flag-picker-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flag-picker-colors {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.flag-color-opt {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--flag-color);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.flag-color-opt:hover {
  transform: scale(1.12);
}

.flag-color-opt.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, 0.35);
  transform: scale(1.08);
}

.flag-picker-clear {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.35rem 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.flag-picker-clear:hover {
  color: var(--text);
  border-color: var(--muted);
}

.flag-picker-clear.hidden {
  display: none;
}

.flag-picker-error {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #f87171;
  line-height: 1.35;
}

.flag-picker-error.hidden {
  display: none;
}

.col-current {
  min-width: 90px;
}

.col-change {
  min-width: 72px;
}

.fav-chg-up {
  color: var(--baslangic);
}

.fav-chg-down {
  color: #f472b6;
}

.login-error {
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  font-size: 1.65rem;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(178, 102, 255, 0.45));
  flex-shrink: 0;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
  max-width: 22rem;
}

.brand-icon {
  font-size: 2rem;
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(178, 102, 255, 0.5));
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.badge.kanalbasi {
  background: rgba(178, 102, 255, 0.12);
  color: #C989FF;
  border-color: rgba(178, 102, 255, 0.35);
}

.badge.hazirlik {
  background: var(--hazirlik-bg);
  color: #c4cad4;
  border-color: rgba(107, 114, 128, 0.4);
}

.badge.baslangic {
  background: var(--baslangic-bg);
  color: var(--baslangic);
  border-color: rgba(34, 197, 94, 0.35);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scanner-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.scanner-page {
  gap: 1.1rem;
}

.scanner-hero {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.scanner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.scanner-head h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.scanner-search-block {
  margin-bottom: 0;
  border: none;
  padding: 0;
  background: transparent;
}

.scanner-controls {
  padding: clamp(1rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);
}

.scanner-summary {
  margin-bottom: 0;
  min-height: 0;
}

.scanner-summary:empty {
  display: none;
}

.scanner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.scanner-stat {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.scanner-stat:hover {
  background: rgba(26, 34, 48, 0.6);
}

.scanner-stat-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.scanner-stat-value {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.scanner-stat-time {
  font-size: 0.78rem;
  font-weight: 600;
}

.scanner-stat--kanalbasi {
  border-left-color: #C989FF;
}

.scanner-stat--kanalbasi .scanner-stat-value {
  color: #C989FF;
}

.scanner-stat--vurgun,
.scanner-stat--hazirlik {
  border-left-color: #94a3b8;
}

.scanner-stat--vurgun .scanner-stat-value,
.scanner-stat--hazirlik .scanner-stat-value {
  color: #c4cad4;
}

.scanner-stat--baslangic {
  border-left-color: var(--baslangic);
}

.scanner-stat--baslangic .scanner-stat-value {
  color: var(--baslangic);
}

.scanner-stat--pivot {
  border-left-color: var(--pivot);
}

.scanner-stat--pivot .scanner-stat-value {
  color: var(--pivot);
}

.scanner-stat--kirilim {
  border-left-color: #22c55e;
}

.scanner-stat--kirilim .scanner-stat-value {
  color: #4ade80;
}

.scanner-stat--kirilim-touch {
  border-left-color: #14b8a6;
}

.scanner-stat--kirilim-touch .scanner-stat-value {
  color: #2dd4bf;
}

.kirilim-page .scan-table--kirilim thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.kirilim-page .scan-table--kirilim thead th.sortable:hover {
  color: var(--text, #e2e8f0);
}

  padding: 1rem 1.1rem;
  border-left: 3px solid #22c55e;
}

.kirilim-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.kirilim-results-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.kirilim-controls .controls-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

@media (max-width: 900px) {
  .kirilim-controls .controls-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kirilim-controls .control-scan {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .kirilim-controls .controls-grid {
    grid-template-columns: 1fr;
  }

  .kirilim-controls .control-scan {
    grid-column: auto;
  }
}

.btn-kirilim {
  width: 100%;
}

.scanner-stat--time {
  border-left-color: var(--accent);
}

.scanner-stat--time .scanner-stat-value {
  color: #e9d5ff;
  font-size: 0.78rem;
}

.scanner-error {
  margin-bottom: 0;
}

.scanner-results {
  gap: 0.65rem;
}

.scanner-page .accordion-item {
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.scanner-page .accordion-item--kanalbasi {
  border-left: 3px solid #C989FF;
}

.scanner-page .accordion-item--vurgun,
.scanner-page .accordion-item--hazirlik {
  border-left: 3px solid #94a3b8;
}

.scanner-page .accordion-item--baslangic {
  border-left: 3px solid var(--baslangic);
}

.scanner-page .accordion-item--pivot {
  border-left: 3px solid var(--pivot);
}

.panel-desc {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.kirilim-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.kirilim-pill--break {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.kirilim-pill--touch {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
}

.kirilim-pill--both {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}

.accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.accordion-signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.accordion-signal-dot.kanalbasi {
  background: #C989FF;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2);
}

.accordion-signal-dot.vurgun,
.accordion-signal-dot.hazirlik {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.accordion-signal-dot.baslangic {
  background: var(--baslangic);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.accordion-signal-dot.pivot {
  background: var(--pivot);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.accordion-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  line-height: 1.65rem;
  text-align: center;
}

.scanner-page .accordion-item.open .accordion-count {
  background: rgba(178, 102, 255, 0.15);
  border-color: rgba(178, 102, 255, 0.35);
  color: #e9d5ff;
}

.scanner-page .fav-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid transparent;
}

.scanner-page .fav-btn:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.scanner-page .fav-btn.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.dist-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: 0.28rem 0.55rem;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dist-pill--ok {
  background: var(--baslangic-bg);
  color: var(--baslangic);
}

.dist-pill--warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.dist-pill--muted {
  background: rgba(42, 53, 72, 0.5);
  color: var(--muted);
}

.col-target,
.col-dist {
  white-space: nowrap;
}

/* —— Mobil: tablolar → kart listesi (yatay scroll yok) —— */
@media (max-width: 768px) {
  .table-wrap:has(.portfolio-table) {
    overflow-x: visible;
  }

  .accordion-item.open .accordion-body > .table-wrap:has(.portfolio-table) {
    overflow-x: visible;
    max-height: none;
  }

  .portfolio-table {
    display: block;
    width: 100%;
  }

  .portfolio-table thead {
    display: none;
  }

  .portfolio-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .portfolio-table tbody tr.mobile-data-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem 0.65rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface2);
  }

  .portfolio-table tbody tr.mobile-data-row:hover {
    background: rgba(26, 34, 48, 0.98);
    border-color: rgba(178, 102, 255, 0.3);
  }

  .portfolio-table tbody tr.mobile-data-row td {
    display: block;
    padding: 0;
    border: none;
  }

  .portfolio-table tbody tr.mobile-data-row td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.25rem;
  }

  .portfolio-table .col-fav,
  .portfolio-table .col-action,
  .portfolio-table .col-flag {
    flex: 0 0 auto;
    align-self: flex-start;
  }

  .portfolio-table .col-fav,
  .portfolio-table .col-action {
    order: 1;
  }

  .portfolio-table .col-flag {
    order: 2;
  }

  .portfolio-table .col-asset {
    flex: 1 1 8rem;
    min-width: 0;
    max-width: none;
    order: 3;
  }

  .portfolio-table .col-asset .asset-cell {
    max-width: none;
  }

  .portfolio-table .col-change {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-start;
    order: 4;
  }

  .portfolio-table .col-change::before {
    display: none !important;
  }

  .portfolio-table .col-signal {
    flex: 1 1 100%;
    order: 10;
  }

  .portfolio-table .scan-row .col-price {
    order: 11;
  }

  .portfolio-table .scan-row .col-target {
    order: 12;
  }

  .portfolio-table .scan-row .col-dist {
    order: 13;
  }

  .portfolio-table .mobile-data-row:not(.scan-row) .col-price {
    order: 11;
  }

  .portfolio-table .mobile-data-row:not(.scan-row) .col-current {
    order: 12;
  }

  .portfolio-table .mobile-data-row:not(.scan-row) .col-added {
    order: 13;
  }

  .portfolio-table .scan-row .col-price,
  .portfolio-table .scan-row .col-target,
  .portfolio-table .scan-row .col-dist,
  .portfolio-table .mobile-data-row:not(.scan-row) .col-price,
  .portfolio-table .mobile-data-row:not(.scan-row) .col-current,
  .portfolio-table .mobile-data-row:not(.scan-row) .col-added {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 0;
  }

  .portfolio-table .chg-pill,
  .portfolio-table .dist-pill {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .portfolio-table .signal-pill {
    max-width: none;
  }

  .portfolio-table .date-cell {
    font-size: 0.7rem;
    white-space: normal;
  }
}

.watchlist {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.watchlist-sections {
  margin-top: 0;
}

.search-result-market {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(178, 102, 255, 0.12);
  color: var(--accent);
}

.search-result-market.binance {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.search-result-add {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(178, 102, 255, 0.35);
  background: rgba(178, 102, 255, 0.08);
}

.search-result-item.in-watchlist .search-result-add {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}

.col-action {
  width: 42px;
  text-align: center;
}

.scanner-search {
  padding: 1rem clamp(1rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.scanner-search-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.search-wrap-full {
  width: 100%;
}

.search-wrap-full input[type="search"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
}

.controls {
  padding: clamp(1rem, 2vw, 1.25rem) clamp(1rem, 2.5vw, 1.5rem);
  width: 100%;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: end;
  width: 100%;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.control-label-invisible {
  visibility: hidden;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.control-tolerance .range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-tolerance input[type="range"] {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.control-scan {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.btn-scan {
  width: 100%;
  justify-content: center;
  margin-left: 0;
}

select {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  background-color: var(--surface2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9cb3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select::-ms-expand {
  display: none;
}

select:hover {
  border-color: #3d4f6a;
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(178, 102, 255, 0.2);
}

select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select option {
  background: var(--surface);
  color: var(--text);
}

.control-group select {
  min-width: 0;
}

input[type="search"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}

input[type="range"] {
  accent-color: var(--accent);
}

input[type="search"]::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(178, 102, 255, 0.2);
}

.search-wrap {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(42, 53, 72, 0.6);
  transition: background 0.12s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(178, 102, 255, 0.1);
}

.search-result-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.search-result-name {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown .fav-btn {
  flex-shrink: 0;
}

.search-hint {
  font-size: 0.7rem;
  color: var(--muted);
}

output {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-dark), var(--moi));
  color: white;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.stat {
  padding: 1rem 1.25rem;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
}

.stat-time {
  font-size: 0.85rem;
}

.stat.kanalbasi .stat-value { color: #C989FF; }
.stat.level17 .stat-value { color: var(--level17); }
.stat.hazirlik .stat-value { color: #c4cad4; }
.stat.baslangic .stat-value { color: var(--baslangic); }
.stat.pivot .stat-value { color: var(--pivot); }

.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.accordion-item.open {
  border-color: rgba(178, 102, 255, 0.35);
}

.panel { overflow: hidden; }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border: none;
  border-bottom: 1px solid transparent;
  background: var(--surface2);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.accordion-trigger:hover {
  background: rgba(178, 102, 255, 0.08);
}

.accordion-item.open .accordion-trigger {
  border-bottom-color: var(--border);
}

.accordion-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.accordion-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(-135deg);
  border-color: var(--accent);
}

.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.accordion-item.open .accordion-body {
  grid-template-rows: 1fr;
}

.accordion-body > .table-wrap {
  overflow: hidden;
  min-height: 0;
}

.accordion-item.open .accordion-body > .table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
}

.accordion-trigger h2,
.accordion-title-wrap h2,
.panel-head h2 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--hazirlik);
  margin-left: 0.35rem;
}

.tag.purple { color: var(--moi); }

.tag.green { color: var(--baslangic); }

.count {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--surface);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

th.sortable:hover {
  color: var(--text, #e2e8f0);
}

th.sortable::after {
  content: " \2195";
  font-size: 0.65em;
  opacity: 0.35;
  margin-left: 0.15em;
}

th.sort-asc::after {
  content: " \2191";
  opacity: 0.95;
  color: var(--accent);
}

th.sort-desc::after {
  content: " \2193";
  opacity: 0.95;
  color: var(--accent);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(42, 53, 72, 0.6);
}

tbody tr:hover {
  background: rgba(178, 102, 255, 0.04);
}

.sym {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.pct-ok { color: var(--baslangic); }
.pct-warn { color: #fbbf24; }

.chg-up { color: var(--baslangic); }
.chg-down { color: var(--danger); }

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .controls-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .control-scan {
    grid-column: 1 / -1;
  }

  .btn-scan {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .login-screen-inner {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .login-hero {
    text-align: center;
  }

  .login-logo {
    justify-content: center;
  }

  .login-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .login-features {
    align-items: center;
  }

  .app-shell-row {
    flex-wrap: wrap;
  }

  .app-toolbar {
    margin-left: auto;
  }

  .user-chip {
    max-width: 130px;
  }

  .app-nav {
    flex-wrap: wrap;
  }

  .nav-tab {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: calc(50% - 0.2rem);
  }

  .main-nav .nav-tab {
    flex: 1;
    min-width: 0;
  }

  .controls-grid {
    grid-template-columns: 1fr 1fr;
  }

  .control-tolerance {
    grid-column: 1 / -1;
  }

  .profile-head {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .control-scan {
    grid-column: auto;
  }

  .app-shell-card {
    padding: 0.75rem 0.85rem 0.65rem;
  }

  .user-name {
    display: none;
  }

  .toolbar-divider {
    display: none;
  }

  .nav-tab span:not(.nav-badge) {
    font-size: 0.75rem;
  }

  .logged-in {
    flex-wrap: wrap;
  }

  .scanner-head {
    flex-direction: column;
    gap: 0.75rem;
  }

  .scanner-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scanner-stat-value {
    font-size: 1.15rem;
  }
}
