/* ========== MEE6-inspired theme for ay tee el ========== (yes i used ai for this style) */
:root {
  --bg: #0f0f12;
  --bg-elevated: #16161a;
  --bg-card: #1f2129;
  --bg-hover: #2a2d38;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #9ca3af;
  --accent: #63f58c;
  --accent-dim: rgba(99, 245, 140, 0.15);
  --primary: #2a59ff;
  --primary-hover: #3d6bff;
  --danger: #ed4245;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
  --font: "Inter", "proxima-nova", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.9rem; }
code {
  background: var(--bg-hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ========== LANDING ========== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

#bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(42, 89, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(99, 245, 140, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 60%, rgba(42, 89, 255, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.topnav {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 0;
  padding: 12px 16px 12px 20px;
  background: rgba(15, 15, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex-shrink: 0;
}

.topnav-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero {
  text-align: center;
  padding: 4.5rem 1rem 2.5rem;
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(99, 245, 140, 0.25);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}

.gradient {
  background: linear-gradient(135deg, var(--accent), #2a59ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-banner {
  max-width: 900px;
  margin: 2.5rem auto 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 80px rgba(42, 89, 255, 0.1);
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
}

.hero-banner img {
  width: 100%;
  display: block;
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98) translateY(0); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 20px rgba(42, 89, 255, 0.4);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-danger, .btn-danger:hover {
  background: rgba(237, 66, 69, 0.15);
  color: var(--danger);
  border: 1px solid rgba(237, 66, 69, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: 3rem auto;
  padding: 0;
  position: relative;
  z-index: 1;
}
.stats-row.compact {
  margin: 0 0 1.5rem;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.1rem;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(42, 89, 255, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--bg-hover);
}
.stat-card:hover::before { opacity: 1; }
.stat-value {
  position: relative;
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  position: relative;
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* Features */
.features {
  max-width: 1000px;
  margin: 3.5rem auto;
  padding: 0 0 2rem;
  position: relative;
  z-index: 1;
}
.features h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 480px;
  font-size: 1rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(42, 89, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(42, 89, 255, 0.08);
}
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.65rem;
  line-height: 1;
}
.feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* How it works */
.how-section {
  max-width: 960px;
  margin: 3rem auto;
  padding: 0;
  position: relative;
  z-index: 1;
  text-align: center;
}
.how-section h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: left;
}
.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.how-step:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 245, 140, 0.3);
}
.how-num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.how-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.how-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* CTA */
.cta-band {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2.5rem auto;
  max-width: 720px;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 80% at 50% 100%, rgba(42, 89, 255, 0.14), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cta-band h2 {
  font-size: 1.5rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.cta-band > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.site-footer-atl {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  background: transparent;
  margin-top: 1rem;
}
.footer-social { justify-self: start; }
.footer-social b {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: var(--text);
}
.footer-social-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-social-links a {
  display: inline-flex;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.footer-social-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.footer-social-links img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.footer-brand {
  justify-self: center;
  text-align: center;
}
.footer-brand .custom-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
}
.footer-brand p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(67, 181, 129, 0.1);
  border: 1px solid rgba(67, 181, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: #43b581;
  margin-left: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #43b581;
  border-radius: 50%;
  box-shadow: 0 0 8px #43b581;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(67, 181, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(67, 181, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(67, 181, 129, 0); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== APP SHELL (dashboard) ========== */
#app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.85rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  /* landing topnav stilleri buraya sızmasın */
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  margin: 0;
}
.sidebar .brand { padding: 0 0.5rem 1.25rem; }
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.nav-item {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.5rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.side-user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.side-user strong { display: block; font-size: 0.9rem; }
.side-user small { color: var(--text-muted); font-size: 0.75rem; }
.logout {
  margin: 0.5rem 0.25rem 0;
  width: calc(100% - 0.5rem);
  text-align: center;
}
.main-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem 3rem;
  max-width: 1100px;
  min-width: 0;
}
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.main-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

#header-meta {
  width: 100%;
  order: 3;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}
.card h3, .card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

/* Forms */
label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
label input[type="text"],
label input[type="url"],
label input[type="number"],
label select,
label textarea,
.row-flex input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.15s;
}
label input:focus,
label select:focus,
label textarea:focus,
.row-flex input:focus {
  border-color: var(--primary);
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: var(--text);
  font-size: 0.9rem;
}
.switch-row input[type="checkbox"] {
  width: 40px;
  height: 22px;
  appearance: none;
  background: var(--bg-hover);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border);
}
.switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 3px;
  transition: transform 0.2s;
}
.switch-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.switch-row input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.row-flex {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.row-flex input { flex: 1; }

/* Server grid */
.server-grid, .guild-mini-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.server-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
.server-card:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}
.server-card img, .icon-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}
.icon-fallback {
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.server-meta strong { display: block; font-size: 0.95rem; }
.server-meta span { font-size: 0.8rem; color: var(--text-muted); }

/* Config */
.config-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
#config-guild-icon img, #config-guild-icon .icon-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.pill {
  margin-left: auto;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-muted);
}
.pill.premium {
  background: var(--accent-dim);
  color: var(--accent);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.tab {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-muted); font-weight: 500; }
.owner-profile-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
ul#bl-list, ul#dmblock-list {
  list-style: none;
  margin-top: 0.75rem;
}
ul#bl-list li, ul#dmblock-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.premium-hero {
  border-color: rgba(99, 245, 140, 0.25);
  background: linear-gradient(135deg, rgba(99, 245, 140, 0.06), var(--bg-card));
}

.nav-ico { margin-right: 0.35rem; opacity: 0.9; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
}
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.owner-profile-fields { flex: 1; }
#owner-bot-avatar { border-radius: 16px; }

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #18191c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { border-left: 4px solid #43b581; }
.toast-error { border-left: 4px solid #f04747; }
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #2a2a35;
}
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.user-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.user-id {
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  opacity: 0.75;
}
.preview-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.preview-content {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.pill.ok { background: #1a3d2e; color: #6ee7a8; }
.pill.warn { background: #3d351a; color: #fbbf24; }
.pill.bad { background: #3d1a1a; color: #f87171; }

/* Mobile sidebar */

/* ========== MOBILE DASHBOARD FIX (must be last) ========== */
@media (max-width: 900px) {
  #app-shell {
    flex-direction: row !important; /* don’t stack sidebar above content */
    min-height: 100dvh;
  }

  #app-shell .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(280px, 85vw) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translateX(-100%) !important;
    z-index: 300 !important;
    margin: 0 !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
  }

  #app-shell .sidebar.open {
    transform: translateX(0) !important;
  }

  #app-shell .main-wrap {
    flex: 1 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0.85rem 1rem 2rem !important;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px)) !important;
  }

  #app-shell .main-header {
    margin-bottom: 1rem !important;
    padding-bottom: 0.75rem !important;
  }

  #app-shell .config-header {
    margin: 0.5rem 0 1rem !important;
  }
}

/* Kill the old 768px rule that put sidebar back in flow */
@media (max-width: 768px) {
  #app-shell {
    flex-direction: row !important;
  }

  #app-shell .sidebar,
  .sidebar {
    position: fixed !important;
    width: min(280px, 85vw) !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    border-bottom: none !important;
  }

  #app-shell .sidebar.open,
  .sidebar.open {
    transform: translateX(0) !important;
  }

  .side-nav {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }
}

@media (max-width: 640px) {
  .page { padding: 0 16px 32px; }
  .topnav {
    flex-direction: column;
    border-radius: 20px;
    padding: 14px;
    top: 10px;
  }
  .topnav-actions {
    width: 100%;
    justify-content: center;
  }
  .hero { padding: 3rem 0 1.5rem; }
  .feature-grid,
  .how-grid,
  .stats-row { grid-template-columns: 1fr; }
  .site-footer-atl {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-social { justify-self: center; }
  .footer-social-links { justify-content: center; }
}

@media (max-width: 480px) {
  #app-shell .stats-row.compact {
    grid-template-columns: 1fr;
  }
}

/* ========== THEME: LIGHT ========== */
[data-theme="light"] {
  --bg: #f0f2f5;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e8eaed;
  --border: rgba(0, 0, 0, 0.08);
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #16a34a;
  --accent-dim: rgba(22, 163, 74, 0.12);
  --primary: #2a59ff;
  --primary-hover: #1d4ed8;
}

[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="light"] #bg-glow {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(42, 89, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(22, 163, 74, 0.06), transparent);
}

[data-theme="light"] .topnav {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cta-band {
  background:
    radial-gradient(ellipse 80% 80% at 50% 100%, rgba(42, 89, 255, 0.08), transparent 60%),
    var(--bg-card);
}

[data-theme="light"] .card,
[data-theme="light"] .sidebar,
[data-theme="light"] .stat-card,
[data-theme="light"] .server-card,
[data-theme="light"] .feature,
[data-theme="light"] .how-step {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="light"] .stat-card:hover,
[data-theme="light"] .feature:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

[data-theme="light"] label input,
[data-theme="light"] label select,
[data-theme="light"] label textarea,
[data-theme="light"] .row-flex input {
  background: #f9fafb;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="light"] .preview-box {
  background: #f3f4f6;
  border-color: var(--border);
}

[data-theme="light"] .pill {
  background: #e5e7eb;
  color: #4b5563;
}

[data-theme="light"] .pill.premium {
  background: var(--accent-dim);
  color: var(--accent);
}

[data-theme="light"] .toast {
  background: #fff;
  color: #111;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .pill.ok { background: #dcfce7; color: #15803d; }
[data-theme="light"] .pill.warn { background: #fef3c7; color: #b45309; }
[data-theme="light"] .pill.bad { background: #fee2e2; color: #b91c1c; }

/* ========== PREMIUM PAGE ========== */
#view-premium {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.premium-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(42, 89, 255, 0.1), rgba(99, 245, 140, 0.06));
  border: 1px solid rgba(42, 89, 255, 0.2);
  border-radius: 16px;
}

.premium-header h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(42, 89, 255, 0.12);
  border: 1px solid rgba(42, 89, 255, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.premium-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.75rem;
}

.premium-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.6rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.premium-plan:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 89, 255, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .premium-plan:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.premium-plan.featured {
  background: linear-gradient(160deg, rgba(42, 89, 255, 0.1), rgba(99, 245, 140, 0.05));
  border-color: rgba(42, 89, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(42, 89, 255, 0.12), 0 16px 40px rgba(42, 89, 255, 0.1);
}

[data-theme="light"] .premium-plan.featured {
  background: linear-gradient(160deg, rgba(42, 89, 255, 0.08), rgba(99, 245, 140, 0.04));
  border-color: rgba(42, 89, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(42, 89, 255, 0.1), 0 12px 32px rgba(42, 89, 255, 0.08);
}

.featured-label {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #2a59ff, #6366f1);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.plan-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(42, 89, 255, 0.12);
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.save-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}

.premium-plan h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.plan-description {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.premium-price {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.premium-price strong {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.premium-price span {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.monthly-equivalent {
  font-size: 0.82rem;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.plan-divider {
  height: 1px;
  background: var(--border);
  margin: 0.9rem 0 1.1rem;
}

.premium-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex: 1;
}

.premium-features li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--text);
}

.premium-features li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 50%;
  flex-shrink: 0;
}

.premium-plan .btn {
  width: 100%;
  margin-top: auto;
  padding: 0.7rem 1rem;
  font-weight: 600;
  border-radius: 10px;
}

.premium-plan.featured .btn {
  background: linear-gradient(135deg, #2a59ff, #6366f1);
  border: none;
  color: #fff;
}

.premium-plan.featured .btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 20px rgba(42, 89, 255, 0.35);
}

.premium-section { margin-bottom: 2.75rem; }

.section-heading {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-heading h3 {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.premium-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.premium-feature {
  padding: 1.35rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.premium-feature:hover {
  border-color: rgba(42, 89, 255, 0.3);
  transform: translateY(-2px);
}

.premium-feature h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.premium-feature p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.premium-how {
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.premium-how h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.3rem;
  color: var(--text);
}

.premium-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.premium-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(42, 89, 255, 0.12);
  border: 1px solid rgba(42, 89, 255, 0.25);
  border-radius: 50%;
}

.premium-step strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  color: var(--text);
}

.premium-step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.premium-step code {
  font-size: 0.8rem;
  padding: 0.12rem 0.4rem;
  background: var(--bg-hover);
  border-radius: 5px;
  color: var(--text);
}

.premium-faq {
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.premium-faq h3 {
  margin: 0 0 1.1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.premium-faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.premium-faq details:last-child { border-bottom: none; }

.premium-faq summary {
  cursor: pointer;
  font-weight: 560;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text);
}

.premium-faq summary::-webkit-details-marker { display: none; }

.premium-faq summary::after {
  content: "+";
  font-size: 1.15rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.premium-faq details[open] summary::after { content: "−"; }

.premium-faq details p {
  margin: 0.65rem 0 0.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}


/* ========== LANDING (sadece #landing) ========== */
#landing.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Eski genel .page kuralını kaldır veya şöyle bırak: */
.page {
  min-height: 100vh;
}

/* ========== APP SHELL — full width, landing kuralları YOK ========== */
#app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

#app-shell.page {
  max-width: none;
  margin: 0;
  padding: 0;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent, #63f58c);
  border-radius: 50%;
  animation: loader-spin 0.7s linear infinite;
}

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


/* ========== PAGE LOADER ========== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0f0f12);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#page-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.loader-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.loader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #63f58c);
  box-shadow: 0 0 16px var(--accent, #63f58c);
  animation: loader-pulse 1.2s ease-in-out infinite;
}

.loader-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text, #f4f4f5);
}

.loader-bar {
  width: 160px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent, #63f58c), var(--primary, #2a59ff));
  animation: loader-slide 1.1s ease-in-out infinite;
}

.loader-text {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  letter-spacing: 0.04em;
}

@keyframes loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.7; }
}

@keyframes loader-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* Loader açıkken sayfa scroll olmasın */
body.loading {
  overflow: hidden;
}
@media (max-width: 640px) {
  .premium-header { padding: 1.35rem 1.25rem; }
  .premium-plan { padding: 1.5rem 1.25rem 1.35rem; }
  .premium-price strong { font-size: 1.85rem; }
  .premium-how,
  .premium-faq { padding: 1.35rem 1.25rem; }
}


.dashboard-announcements {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-announce {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.dash-announce.info    { border-left: 4px solid #5865F2; }
.dash-announce.success { border-left: 4px solid #3ba55d; }
.dash-announce.warning { border-left: 4px solid #faa61a; }
.dash-announce.danger  { border-left: 4px solid #ed4245; }

.dash-announce h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.dash-announce p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.dash-announce .meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ========== MULTI-SELECT ========== */
.ms-wrap {
  position: relative;
  width: 100%;
  margin-top: 0.35rem;
}

.ms-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.ms-trigger:hover {
  border-color: var(--primary);
}

.ms-wrap.open .ms-trigger {
  border-color: var(--primary);
}

.ms-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text);
}

.ms-label.muted {
  color: var(--text-muted);
}

.ms-chevron {
  opacity: 0.55;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.ms-wrap.open .ms-chevron {
  transform: rotate(180deg);
}

.ms-dropdown {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  padding: 0.4rem;
}

.ms-wrap.open .ms-dropdown {
  display: block;
}

.ms-search {
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.ms-search:focus {
  border-color: var(--primary);
}

.ms-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
}

.ms-option:hover {
  background: var(--bg-hover);
}

.ms-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
  appearance: auto;
  border-radius: 3px;
}

.ms-empty {
  padding: 0.6rem 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Light theme */
[data-theme="light"] .ms-trigger,
[data-theme="light"] .ms-search {
  background: #f9fafb;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="light"] .ms-dropdown {
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .ms-option:hover {
  background: var(--bg-hover);
}


.embed-preview {
  border-left: 4px solid #5865F2;
  background: #2b2d31;
  border-radius: 4px;
  padding: 12px 16px;
  margin-top: 8px;
  max-width: 520px;
}
.embed-preview .ep-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.embed-preview .ep-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.embed-preview .ep-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  color: #fff;
}
.embed-preview .ep-desc {
  white-space: pre-wrap;
  color: #dbdee1;
  font-size: 0.9rem;
}
.embed-preview .ep-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.embed-preview .ep-field.full {
  grid-column: 1 / -1;
}
.embed-preview .ep-field strong {
  display: block;
  font-size: 0.8rem;
  color: #fff;
}
.embed-preview .ep-field span {
  font-size: 0.85rem;
  color: #dbdee1;
}
.embed-preview .ep-image,
.embed-preview .ep-thumb {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 8px;
}
.embed-preview .ep-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #949ba4;
}
.embed-preview .ep-footer img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

/* =========================================
   AI SUPPORT CHAT
========================================= */

#ai-support-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: Inter, sans-serif;
}

/* Floating button */

#ai-support-toggle {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;

  background: linear-gradient(
    135deg,
    #5865f2,
    #7289da
  );

  color: white;
  font-size: 25px;

  cursor: pointer;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#ai-support-toggle:hover {
  transform: translateY(-3px) scale(1.04);

  box-shadow:
    0 14px 35px rgba(0, 0, 0, 0.3);
}

.ai-support-notification {
  position: absolute;

  top: 2px;
  right: 2px;

  width: 12px;
  height: 12px;

  background: #22c55e;

  border: 2px solid var(--bg, #111);

  border-radius: 50%;
}


/* Panel */

#ai-support-panel {
  position: absolute;

  right: 0;
  bottom: 72px;

  width: 370px;
  height: 540px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background: var(--card-bg, #111827);
  color: var(--text, #fff);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;

  box-shadow:
    0 25px 70px rgba(0,0,0,0.35);

  animation: aiSupportOpen 0.2s ease;
}

#ai-support-panel.hidden {
  display: none;
}

@keyframes aiSupportOpen {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* Header */

.ai-support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;

  border-bottom: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.025);
}

.ai-support-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-support-title strong {
  display: block;
  font-size: 14px;
}

.ai-support-title span {
  display: block;

  margin-top: 2px;

  font-size: 11px;

  opacity: 0.55;
}

.ai-support-avatar {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: rgba(88,101,242,0.18);
}

#ai-support-close {
  width: 32px;
  height: 32px;

  border: 0;
  background: transparent;

  color: inherit;

  font-size: 25px;

  cursor: pointer;

  opacity: 0.65;
}

#ai-support-close:hover {
  opacity: 1;
}


/* Messages */

#ai-support-messages {
  flex: 1;

  padding: 16px;

  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-message {
  display: flex;
  gap: 8px;

  max-width: 90%;
}

.ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message-avatar {
  flex: 0 0 28px;

  width: 28px;
  height: 28px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: rgba(88,101,242,0.16);

  font-size: 14px;
}

.ai-message-content {
  padding: 10px 12px;

  border-radius: 13px;

  background: rgba(255,255,255,0.06);

  font-size: 13px;
  line-height: 1.5;

  word-break: break-word;
}

.ai-message.user .ai-message-content {
  background: #5865f2;
  color: white;
}


/* Quick buttons */

.ai-support-quick-actions {
  display: flex;

  gap: 6px;

  padding: 8px 12px;

  overflow-x: auto;
}

.ai-support-quick-actions button {
  flex: 0 0 auto;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.04);

  color: inherit;

  border-radius: 999px;

  padding: 6px 10px;

  font-size: 11px;

  cursor: pointer;
}

.ai-support-quick-actions button:hover {
  background: rgba(88,101,242,0.2);
}


/* Input */

#ai-support-form {
  display: flex;

  gap: 8px;

  padding: 10px 12px;

  border-top: 1px solid rgba(255,255,255,0.08);
}

#ai-support-input {
  flex: 1;

  min-width: 0;

  border: 1px solid rgba(255,255,255,0.1);

  background: rgba(255,255,255,0.05);

  color: inherit;

  border-radius: 11px;

  padding: 10px 12px;

  outline: none;

  font-family: inherit;
}

#ai-support-input:focus {
  border-color: rgba(88,101,242,0.7);
}

#ai-support-send {
  width: 40px;
  height: 40px;

  border: 0;
  border-radius: 11px;

  background: #5865f2;

  color: white;

  cursor: pointer;

  font-size: 16px;
}

#ai-support-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* Footer */

.ai-support-footer {
  padding: 5px 12px 9px;

  text-align: center;

  font-size: 9px;

  opacity: 0.35;
}


/* Typing */

.ai-typing {
  display: flex;
  gap: 4px;

  padding: 4px;
}

.ai-typing span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: currentColor;

  opacity: 0.5;

  animation: aiTyping 1s infinite;
}

.ai-typing span:nth-child(2) {
  animation-delay: .15s;
}

.ai-typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes aiTyping {
  0%, 60%, 100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-4px);
  }
}


/* Mobile */

@media (max-width: 600px) {

  #ai-support-widget {
    right: 14px;
    bottom: 14px;
  }

  #ai-support-panel {
    position: fixed;

    left: 10px;
    right: 10px;

    bottom: 82px;

    width: auto;
    height: min(600px, calc(100vh - 110px));

    border-radius: 16px;
  }

}


/* AI Support - message area */
#ai-support-messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 12px 10px 18px;
}

/* Make sure long AI responses are never clipped */
.ai-message {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

.ai-message-content {
  min-width: 0;
  max-width: calc(100% - 42px);
  box-sizing: border-box;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;

  overflow: visible;
  height: auto;
  max-height: none;
}

/* Bot messages specifically */
.ai-message.bot .ai-message-content {
  height: auto;
  max-height: none;
  overflow: visible;
}


.ai-message-content {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
}

.ai-message-content strong {
  font-weight: 700;
}

.ai-message-content em {
  font-style: italic;
}

.ai-message-content code {
  padding: 2px 6px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
}

.ai-md-h1,
.ai-md-h2,
.ai-md-h3 {
  font-weight: 700;
  margin: 8px 0 5px;
}

.ai-md-h1 {
  font-size: 1.15rem;
}

.ai-md-h2 {
  font-size: 1.05rem;
}

.ai-md-h3 {
  font-size: 0.98rem;
}

.ai-md-list {
  margin-left: 4px;
}

.ai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ai-support-quick-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}


.user-dashboard-button {
  position: relative;
  overflow: visible !important;
}

.user-button-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-button-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.user-button-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-button-arrow {
  font-size: 16px;
  opacity: .7;
}

.logout-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;

  min-width: 150px;
  padding: 6px;

  background: #17181d;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;

  box-shadow: 0 12px 30px rgba(0,0,0,.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);

  transition:
    opacity .15s ease,
    transform .15s ease,
    visibility .15s ease;

  z-index: 9999;
}

.user-dashboard-button:hover .logout-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.logout-link {
  display: block;
  padding: 10px 12px;

  color: #fff;
  text-decoration: none;

  border-radius: 8px;
  font-size: 14px;
}

.logout-link:hover {
  background: rgba(255,255,255,.08);
}

#google_translate_element {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
}

/* Google'ın oluşturduğu ana UI */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-te-menu2,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-gadget-icon,
.goog-te-spinner-pos,
.goog-te-ftab,
.goog-tooltip,
.goog-te-balloon,
.goog-te-menu-value,
.goog-te-combo,
.goog-te-spinner,
.goog-te-banner,
.goog-te-button,
.goog-te-menu-frame,
iframe.goog-te-banner-frame,
iframe.goog-te-menu-frame,
iframe.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
}

/* Google'ın yeni Translate class'ları */
.VIpgJd-ZVi9od-aZ2wEe,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO-ibnC6b,
.VIpgJd-ZVi9od-aZ2wEe-ORHb-OEVmcd,
.VIpgJd-yAWNEb-L7lbkb,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd-fmcmS,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO-ibnC6b {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Google Translate'ın body'ye eklediği direkt elementler */
body > .skiptranslate {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Ama bizim gizli Translate elementimiz gerektiğinde çalışabilsin */
#google_translate_element .skiptranslate {
  display: none !important;
}

/* Google'ın oluşturduğu iframe'ler */
iframe[src*="translate.google.com"],
iframe[src*="translate.googleapis.com"],
iframe[src*="translate.googleusercontent.com"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}

/* Google'ın hover efektleri */
.goog-text-highlight,
.goog-text-highlight:hover,
.VIpgJd-yAWNEb-L7lbkb,
font[style],
font[style]:hover {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Google Translate'ın body'yi aşağı kaydırmasını engelle */
html,
body,
html.translated-ltr,
html.translated-rtl {
  margin-top: 0 !important;
  top: 0 !important;
}

/* Google'ın body'ye eklediği transform/position etkileri */
body.translated-ltr,
body.translated-rtl {
  top: 0 !important;
  margin-top: 0 !important;
}

/* Google'ın text selection / highlight benzeri efektleri */
.goog-text-highlight *,
.goog-text-highlight:hover * {
  background: transparent !important;
  box-shadow: none !important;
}

.notranslate,
[translate="no"] {
    translate: no !important;
}


/* =========================================================
   DASHBOARD — PREMIUM OVERHAUL (#app-shell only)
   ========================================================= */

#app-shell {
  --dash-radius: 14px;
  --dash-radius-sm: 10px;
  --dash-gap: 1rem;
  --dash-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  --dash-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.35);
  --dash-ring: 0 0 0 3px rgba(42, 89, 255, 0.22);
  --dash-glow-accent: 0 0 24px rgba(99, 245, 140, 0.12);
  --dash-glow-primary: 0 0 28px rgba(42, 89, 255, 0.2);

  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse 90% 50% at 0% 0%, rgba(42, 89, 255, 0.07), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 245, 140, 0.04), transparent 45%),
    var(--bg);
  color: var(--text);
  font-feature-settings: "ss01" on, "cv11" on;
}

/* ---------- SIDEBAR ---------- */
#app-shell .sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 0.8rem 1rem;
  background:
    linear-gradient(180deg, rgba(22, 22, 26, 0.98) 0%, rgba(15, 15, 18, 0.98) 100%);
  border-right: 1px solid var(--border);
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 50;
}

#app-shell .sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.7rem 1.15rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

#app-shell .sidebar .brand a {
  transition: color 0.15s ease, opacity 0.15s ease;
}

#app-shell .sidebar .brand a:hover {
  color: var(--accent);
}

#app-shell .logo-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(99, 245, 140, 0.15),
    0 0 16px rgba(99, 245, 140, 0.55);
  animation: dash-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dash-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(99, 245, 140, 0.15), 0 0 14px rgba(99, 245, 140, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(99, 245, 140, 0.1), 0 0 22px rgba(99, 245, 140, 0.65); }
}

#app-shell .side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  padding-top: 0.85rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

#app-shell .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: var(--dash-radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
}

#app-shell .nav-item .nav-ico {
  display: inline-flex;
  width: 1.35rem;
  justify-content: center;
  margin-right: 0.5rem;
  font-size: 1rem;
  opacity: 0.88;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

#app-shell .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transform: translateX(2px);
}

#app-shell .nav-item:hover .nav-ico {
  opacity: 1;
  transform: scale(1.08);
}

#app-shell .nav-item.active {
  background: linear-gradient(90deg, rgba(99, 245, 140, 0.14), rgba(99, 245, 140, 0.05));
  color: var(--accent);
  font-weight: 650;
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 0 20px rgba(99, 245, 140, 0.06);
}

#app-shell .nav-item.active .nav-ico {
  opacity: 1;
}

#app-shell .nav-item:focus-visible {
  outline: none;
  box-shadow: var(--dash-ring);
}

#app-shell .side-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.9rem 0.6rem 0.55rem;
  border-top: 1px solid var(--border);
}

#app-shell .side-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(99, 245, 140, 0.25);
  box-shadow: 0 0 0 3px rgba(99, 245, 140, 0.08);
}

#app-shell .side-user strong {
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

#app-shell .side-user small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

#app-shell .logout {
  display: block;
  width: calc(100% - 0.4rem);
  margin: 0.45rem 0.2rem 0;
  text-align: center;
  border-radius: var(--dash-radius-sm);
  font-size: 0.84rem;
  font-weight: 550;
  opacity: 0.85;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#app-shell .logout:hover {
  opacity: 1;
  color: var(--danger);
  border-color: rgba(237, 66, 69, 0.4);
  background: rgba(237, 66, 69, 0.1);
}

/* ---------- MAIN ---------- */
#app-shell .main-wrap {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 1.4rem 1.85rem 3rem;
  max-width: 1200px;
  scroll-behavior: smooth;
}

#app-shell .main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

#app-shell .main-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #fff 30%, #a8b0c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#app-shell .header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

#app-shell .header-actions .btn {
  border-radius: var(--dash-radius-sm);
  padding: 0.48rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 550;
}

#app-shell #header-meta {
  width: 100%;
  order: 3;
}

/* ---------- STATS ---------- */
#app-shell .stats-row.compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin: 0 0 1.4rem;
  max-width: none;
  padding: 0;
}

#app-shell .stat-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--dash-radius);
  background:
    linear-gradient(165deg, rgba(37, 39, 48, 0.95), rgba(28, 30, 38, 0.9));
  border: 1px solid var(--border);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

#app-shell .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(42, 89, 255, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#app-shell .stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 245, 140, 0.35), transparent);
  opacity: 0.5;
}

#app-shell .stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(42, 89, 255, 0.35);
  box-shadow: var(--dash-shadow), var(--dash-glow-primary);
}

#app-shell .stat-card:hover::before {
  opacity: 1;
}

#app-shell .stat-value {
  position: relative;
  display: block;
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #f8f9fb, #9aa3b5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#app-shell .stat-label {
  position: relative;
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ---------- CARDS ---------- */
#app-shell .card {
  position: relative;
  margin-bottom: var(--dash-gap);
  padding: 1.3rem 1.4rem;
  border-radius: var(--dash-radius);
  background:
    linear-gradient(165deg, rgba(35, 37, 46, 0.95), rgba(28, 30, 38, 0.92));
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

#app-shell .card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

#app-shell .card h3,
#app-shell .card h4 {
  margin: 0 0 0.8rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

#app-shell .card > p.muted:first-of-type {
  margin: -0.4rem 0 1rem;
  line-height: 1.55;
}

#app-shell .card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--dash-gap);
}

#app-shell .premium-hero {
  border-color: rgba(99, 245, 140, 0.28);
  background:
    linear-gradient(135deg, rgba(99, 245, 140, 0.08), rgba(42, 89, 255, 0.06)),
    var(--bg-card);
  box-shadow: var(--dash-glow-accent);
}

/* ---------- FORMS ---------- */
#app-shell label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

#app-shell label input[type="text"],
#app-shell label input[type="url"],
#app-shell label input[type="number"],
#app-shell label input[type="file"],
#app-shell label select,
#app-shell label textarea,
#app-shell .row-flex input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.62rem 0.85rem;
  border-radius: var(--dash-radius-sm);
  background: rgba(10, 10, 14, 0.55);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#app-shell label textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

#app-shell label input:hover,
#app-shell label select:hover,
#app-shell label textarea:hover,
#app-shell .row-flex input:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(15, 15, 20, 0.7);
}

#app-shell label input:focus,
#app-shell label select:focus,
#app-shell label textarea:focus,
#app-shell .row-flex input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--dash-ring);
  background: rgba(12, 12, 16, 0.85);
}

#app-shell .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1.15rem;
}

#app-shell .row-flex {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  align-items: stretch;
}

#app-shell .row-flex input {
  flex: 1;
  margin: 0;
}

#app-shell .row-flex .btn {
  flex-shrink: 0;
  align-self: stretch;
}

/* Switches */
#app-shell .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.5rem;
  margin: 0 -0.5rem 0.35rem;
  border-radius: 9px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

#app-shell .switch-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

#app-shell .switch-row input[type="checkbox"] {
  appearance: none;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#app-shell .switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

#app-shell .switch-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(99, 245, 140, 0.35);
}

#app-shell .switch-row input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

#app-shell .switch-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: var(--dash-ring);
}

/* Sticky save bar */
#app-shell .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding: 1.1rem 0 0.4rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, var(--bg) 22%, var(--bg) 100%);
}

#app-shell .form-actions .btn-primary {
  min-width: 170px;
  padding: 0.72rem 1.35rem;
  border-radius: var(--dash-radius-sm);
  font-weight: 650;
  box-shadow: 0 4px 18px rgba(42, 89, 255, 0.3);
}

#app-shell .form-actions .btn-primary:hover {
  box-shadow: 0 6px 24px rgba(42, 89, 255, 0.45);
}

/* ---------- BUTTONS (dashboard) ---------- */
#app-shell .btn {
  border-radius: 999px;
  font-weight: 600;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

#app-shell .btn:hover {
  transform: translateY(-1px);
}

#app-shell .btn:active {
  transform: scale(0.98) translateY(0);
}

#app-shell .btn:focus-visible {
  outline: none;
  box-shadow: var(--dash-ring);
}

#app-shell .btn-primary {
  background: linear-gradient(135deg, #2a59ff, #3d6bff);
  color: #fff;
  border: none;
}

#app-shell .btn-primary:hover {
  background: linear-gradient(135deg, #3d6bff, #4d7aff);
}

#app-shell .btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

#app-shell .btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

#app-shell .btn-danger {
  background: rgba(237, 66, 69, 0.12);
  color: var(--danger);
  border: 1px solid rgba(237, 66, 69, 0.28);
  border-radius: 8px;
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
}

#app-shell .btn-danger:hover {
  background: rgba(237, 66, 69, 0.2);
}

/* ---------- CONFIG HEADER & TABS ---------- */
#app-shell .config-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 1.35rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--dash-radius);
  background:
    linear-gradient(135deg, rgba(42, 89, 255, 0.08), rgba(99, 245, 140, 0.04)),
    var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--dash-shadow);
}

#app-shell #config-guild-icon img,
#app-shell #config-guild-icon .icon-fallback {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

#app-shell #config-guild-name {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}

#app-shell .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-hover);
  color: var(--text-muted);
}

#app-shell .pill.premium {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(99, 245, 140, 0.15);
}

#app-shell .pill.ok { background: #1a3d2e; color: #6ee7a8; }
#app-shell .pill.warn { background: #3d351a; color: #fbbf24; }
#app-shell .pill.bad { background: #3d1a1a; color: #f87171; }

#app-shell .tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

#app-shell .tab {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#app-shell .tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

#app-shell .tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 0 0 1px rgba(99, 245, 140, 0.22);
}

#app-shell .tab:focus-visible {
  outline: none;
  box-shadow: var(--dash-ring);
}

#app-shell #premium-lock-banner {
  border-radius: var(--dash-radius) !important;
  border: 1px solid rgba(234, 179, 8, 0.45) !important;
  background:
    linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(234, 179, 8, 0.04)) !important;
  box-shadow: 0 8px 28px rgba(234, 179, 8, 0.08);
}

/* ---------- SERVER GRID ---------- */
#app-shell .server-grid,
#app-shell .guild-mini-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
}

#app-shell .server-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.05rem;
  text-align: left;
  border-radius: var(--dash-radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

#app-shell .server-card:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 89, 255, 0.45);
  background: var(--bg-hover);
  box-shadow: var(--dash-shadow), 0 0 0 1px rgba(42, 89, 255, 0.08);
}

#app-shell .server-card:focus-visible {
  outline: none;
  box-shadow: var(--dash-ring);
}

#app-shell .server-card img,
#app-shell .icon-fallback {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: cover;
}

#app-shell .icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-hover), #2a2d38);
  font-weight: 750;
  font-size: 1.1rem;
}

#app-shell .server-meta strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

#app-shell .server-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- TABLES ---------- */
#app-shell .table-wrap {
  overflow-x: auto;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

#app-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

#app-shell th {
  padding: 0.75rem 0.85rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

#app-shell td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

#app-shell tbody tr {
  transition: background 0.12s ease;
}

#app-shell tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

#app-shell tbody tr:last-child td {
  border-bottom: none;
}

#app-shell .user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

#app-shell .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

#app-shell .user-name {
  font-weight: 550;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app-shell .user-id {
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.7;
}

/* ---------- LISTS (blacklist etc.) ---------- */
#app-shell ul#bl-list,
#app-shell ul#dmblock-list,
#app-shell ul#userblacklist-list,
#app-shell ul#dash-announce-list {
  list-style: none;
  margin-top: 0.75rem;
  padding: 0;
}

#app-shell ul#bl-list li,
#app-shell ul#dmblock-list li,
#app-shell ul#userblacklist-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.12s ease;
}

#app-shell ul#bl-list li:hover,
#app-shell ul#userblacklist-list li:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- PREVIEWS & EMBEDS ---------- */
#app-shell .preview-box {
  margin-top: 0.85rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--dash-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

#app-shell .preview-content {
  margin-top: 0.4rem;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  color: var(--text);
}

#app-shell .embed-preview {
  border-left: 4px solid #5865F2;
  background: #2b2d31;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 8px;
  max-width: 520px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- ANNOUNCEMENTS ---------- */
#app-shell .dashboard-announcements {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

#app-shell .dash-announce {
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#app-shell .dash-announce:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

#app-shell .dash-announce.info    { border-left: 4px solid #5865F2; }
#app-shell .dash-announce.success { border-left: 4px solid #3ba55d; }
#app-shell .dash-announce.warning { border-left: 4px solid #faa61a; }
#app-shell .dash-announce.danger  { border-left: 4px solid #ed4245; }

#app-shell .dash-announce h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 650;
}

#app-shell .dash-announce p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
  line-height: 1.5;
}

#app-shell .dash-announce .meta {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  opacity: 0.55;
}

/* ---------- MULTI-SELECT ---------- */
#app-shell .ms-wrap {
  margin-top: 0.4rem;
}

#app-shell .ms-trigger {
  padding: 0.62rem 0.85rem;
  border-radius: var(--dash-radius-sm);
  background: rgba(10, 10, 14, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#app-shell .ms-wrap.open .ms-trigger,
#app-shell .ms-trigger:hover {
  border-color: var(--primary);
}

#app-shell .ms-wrap.open .ms-trigger {
  box-shadow: var(--dash-ring);
}

#app-shell .ms-dropdown {
  border-radius: var(--dash-radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--dash-shadow-lg);
  padding: 0.45rem;
}

#app-shell .ms-option {
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}

#app-shell .ms-option:hover {
  background: var(--bg-hover);
}

/* ---------- FEATURE GRID (config premium tab) ---------- */
#app-shell #view-config .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
}

#app-shell #view-config .feature {
  padding: 1.15rem 1.1rem;
  border-radius: var(--dash-radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#app-shell #view-config .feature:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 89, 255, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* ---------- PREMIUM PAGE (in-app) ---------- */
#app-shell #view-premium {
  max-width: 1100px;
}

#app-shell .premium-header {
  border-radius: 18px;
  padding: 1.85rem 2rem;
  margin-bottom: 1.75rem;
  background:
    linear-gradient(135deg, rgba(42, 89, 255, 0.14), rgba(99, 245, 140, 0.07));
  border: 1px solid rgba(42, 89, 255, 0.25);
  box-shadow: var(--dash-glow-primary);
}

#app-shell .premium-plan {
  border-radius: 18px;
  padding: 1.85rem 1.65rem 1.55rem;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.25s ease;
}

#app-shell .premium-plan:hover {
  transform: translateY(-5px);
  border-color: rgba(42, 89, 255, 0.4);
  box-shadow: var(--dash-shadow-lg);
}

#app-shell .premium-plan.featured {
  background:
    linear-gradient(160deg, rgba(42, 89, 255, 0.14), rgba(99, 245, 140, 0.06));
  border-color: rgba(42, 89, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(42, 89, 255, 0.15),
    0 20px 48px rgba(42, 89, 255, 0.12);
}

#app-shell .premium-plan .btn {
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

#app-shell .premium-plan.featured .btn {
  background: linear-gradient(135deg, #2a59ff, #6366f1);
  box-shadow: 0 6px 24px rgba(42, 89, 255, 0.35);
}

/* ---------- OWNER PROFILE ---------- */
#app-shell .owner-profile-row {
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

#app-shell #owner-bot-avatar {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- SCROLLBAR (main + sidebar) ---------- */
#app-shell .main-wrap::-webkit-scrollbar,
#app-shell .side-nav::-webkit-scrollbar,
#app-shell .tabs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#app-shell .main-wrap::-webkit-scrollbar-thumb,
#app-shell .side-nav::-webkit-scrollbar-thumb,
#app-shell .tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

#app-shell .main-wrap::-webkit-scrollbar-thumb:hover,
#app-shell .side-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

#app-shell .main-wrap::-webkit-scrollbar-track,
#app-shell .side-nav::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- LIGHT THEME ---------- */
[data-theme="light"] #app-shell {
  background:
    radial-gradient(ellipse 90% 50% at 0% 0%, rgba(42, 89, 255, 0.05), transparent 50%),
    var(--bg);
}

[data-theme="light"] #app-shell .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] #app-shell .main-header h2 {
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--text);
}

[data-theme="light"] #app-shell .stat-card,
[data-theme="light"] #app-shell .card {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] #app-shell .stat-value {
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--text);
}

[data-theme="light"] #app-shell label input,
[data-theme="light"] #app-shell label select,
[data-theme="light"] #app-shell label textarea,
[data-theme="light"] #app-shell .row-flex input,
[data-theme="light"] #app-shell .ms-trigger {
  background: #f9fafb;
}

[data-theme="light"] #app-shell .form-actions {
  background: linear-gradient(180deg, transparent 0%, var(--bg) 22%, var(--bg) 100%);
}

[data-theme="light"] #app-shell .table-wrap {
  background: #fafbfc;
}

[data-theme="light"] #app-shell .preview-box {
  background: #f3f4f6;
  border-style: solid;
}

[data-theme="light"] #app-shell .nav-item.active {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.12), rgba(22, 163, 74, 0.04));
}

[data-theme="light"] #app-shell .server-card:hover,
[data-theme="light"] #app-shell .card:hover,
[data-theme="light"] #app-shell .stat-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* ---------- RESPONSIVE ---------- */
/* ========== iOS / MOBILE DASHBOARD — MUST BE LAST ========== */
/* Masaüstünde (PC) Sidebar Toggle Butonunu Gizleme */
@media (min-width: 901px) {
  #sidebar-toggle {
    display: none !important;
  }
}
@media (max-width: 900px) {
  html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
  }

  /* Landing must not reserve space while dashboard is open */
  body:has(#app-shell:not(.hidden)) #landing,
  #landing.hidden {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  #app-shell {
    display: block !important;          /* not flex column */
    flex-direction: unset !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #app-shell .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: min(280px, 86vw) !important;
    height: 100% !important;
    height: -webkit-fill-available !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    transform: translate3d(-100%, 0, 0) !important;
    z-index: 1000 !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: none !important;
    -webkit-overflow-scrolling: touch;
  }

  #app-shell .sidebar.open {
    transform: translate3d(0, 0, 0) !important;
  }

  #app-shell .main-wrap {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 16px 40px !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    overflow: visible !important;
    min-height: 0 !important;
  }

  #app-shell .main-header {
    margin: 0 0 12px !important;
    padding: 0 0 10px !important;
  }

  #app-shell .config-header {
    margin: 8px 0 12px !important;
  }

  #app-shell .side-nav {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }
}

@media (max-width: 768px) {
  #app-shell .main-header h2 {
    font-size: 1.25rem;
  }

  #app-shell .card {
    padding: 1.1rem 1.15rem;
  }

  #app-shell .config-header {
    padding: 1rem;
  }

  #app-shell .tabs {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

@media (max-width: 480px) {
  #app-shell .main-wrap {
    padding: 0.95rem 0.9rem 2rem;
  }

  #app-shell .stats-row.compact {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  #app-shell .stat-value {
    font-size: 1.4rem;
  }

  #app-shell .form-actions .btn-primary {
    width: 100%;
  }

  #app-shell .row-flex {
    flex-direction: column;
  }

  #app-shell .row-flex .btn {
    width: 100%;
  }
}


.sponsor-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 2rem auto 0;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.sponsor-card {
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 22px;

  background: rgba(31, 33, 41, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    0 0 35px rgba(42, 89, 255, 0.06);
}

.sponsor-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);

  padding: 5px 9px;
  border-radius: 999px;

  background: rgba(99, 245, 140, 0.08);
  border: 1px solid rgba(99, 245, 140, 0.16);
}

.sponsor-name {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 600px) {
  .sponsor-card {
    padding: 12px 16px;
    gap: 10px;
  }

  .sponsor-label {
    font-size: 0.6rem;
  }

  .sponsor-name {
    font-size: 0.85rem;
  }
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #app-shell *,
  #app-shell *::before,
  #app-shell *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}