/* Reset + temel tipografi + uygulama iskeleti yerleşimi. */

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* İnce radial accent-glow (orbitix.tr atmosferi). */
  background-image:
    radial-gradient(ellipse 900px 700px at 0% -10%, rgba(123, 122, 247, 0.14), transparent 60%),
    radial-gradient(ellipse 800px 600px at 100% 110%, rgba(88, 86, 214, 0.1), transparent 60%);
  background-attachment: fixed;
}

a {
  color: var(--accent-3);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- Uygulama kabuğu ---- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 100vh;
}

.sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 6px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
}

.brand__logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 18px var(--accent-glow);
}

.brand__name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.nav__section {
  margin: 18px 8px 8px;
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__section:first-child { margin-top: 0; border-top: none; }
.nav__section .nav__section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav__group {
  margin: 12px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.nav__group:first-child { margin-top: 0; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.nav__item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav__item.is-active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--border);
}

.nav__item.is-active .nav__icon {
  color: var(--accent-3);
}

.nav__icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Ana içerik ---- */

.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(5, 5, 10, 0.78);
  backdrop-filter: blur(8px);
}

.topbar__title {
  font-size: 16px;
  font-weight: 700;
}

.view {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-head {
  margin-bottom: 20px;
}

.page-head__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--text-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-head__sub {
  color: var(--text-muted);
  margin-top: 4px;
}

/* Mobil: sidebar üstte sıkışsın (basit fallback) */
@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
  }
}
