/* AsyaCrm – Şık ve sade tema (CSS değişkenleri) */
:root {
  --asya-bg: #f8fafc;
  --asya-surface: #ffffff;
  --asya-sidebar: #1e293b;
  --asya-sidebar-hover: #334155;
  --asya-text: #0f172a;
  --asya-text-muted: #64748b;
  --asya-accent: #0d9488;
  --asya-accent-hover: #0f766e;
  --asya-border: #e2e8f0;
  --asya-shadow: 0 1px 3px rgba(0,0,0,.08);
  --asya-radius: 8px;
  --asya-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html, body {
  font-family: var(--asya-font);
  background: var(--asya-bg);
  color: var(--asya-text);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--asya-text);
}

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

a:hover {
  color: var(--asya-accent-hover);
}

.btn-primary {
  background-color: var(--asya-accent);
  border-color: var(--asya-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--asya-accent-hover);
  border-color: var(--asya-accent-hover);
  color: #fff;
}

.page {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--asya-sidebar);
  color: #e2e8f0;
  flex-shrink: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.65rem 1rem;
  border-radius: var(--asya-radius);
  margin: 0 0.5rem 2px;
}

.sidebar .nav-link:hover {
  background: var(--asya-sidebar-hover);
  color: #fff;
}

.sidebar .nav-link.active {
  background: var(--asya-accent);
  color: #fff;
}

.sidebar .navbar-brand {
  color: #fff;
  font-weight: 600;
  padding: 1rem;
}

/* Sol menü üstü logo: koyu çerçeve + yuvarlatılmış köşe, beyaz kutu etkisini azaltır */
.sidebar .top-row {
  background: var(--asya-sidebar);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar .navbar-logo-wrap {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  padding: 6px 10px;
  border-radius: 8px;
}
.sidebar .navbar-logo {
  max-height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}


.top-row {
  background: var(--asya-surface);
  border-bottom: 1px solid var(--asya-border);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--asya-shadow);
}

.content {
  padding: 1.5rem;
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* İçerik alanında container kullanılsa bile tam genişlik kullanılsın */
main .content.container,
main .content .container,
main article.container {
  max-width: 100%;
  width: 100%;
}

.nav-scrollable {
  overflow-y: auto;
  padding: 0.5rem 0;
}

.navbar-toggler {
  border-color: rgba(255,255,255,.3);
}

.navbar-toggler-icon {
  filter: invert(1);
}

#blazor-error-ui {
  background: #fef3c7;
  color: #92400e;
}

/* Ana sayfa grafik alanı: taşma/kayma önlenir */
.chart-container {
  min-width: 0;
  overflow: hidden;
}
.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.chart-wrap canvas {
  max-width: 100%;
  display: block;
}

/* Ana sayfa logo: yumuşak köşe */
.index-logo {
  max-height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .page:not(.layout-shell) .sidebar {
    width: 100%;
  }
  .index-logo {
    max-height: 44px;
    max-width: 200px;
  }
}

/* Üst çubuk menü aç/kapa + mobil yan panel */
.layout-shell {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  position: relative;
}

.layout-shell main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .layout-shell .sidebar {
    width: 260px;
    flex-shrink: 0;
    transition: width 0.22s ease, opacity 0.18s ease;
    overflow: hidden;
  }
  .layout-shell.is-closed .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 767.98px) {
  .layout-shell .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1050;
    height: 100vh;
    width: min(280px, 88vw);
    transition: transform 0.22s ease;
    box-shadow: 2px 0 14px rgba(0, 0, 0, 0.12);
  }
  .layout-shell.is-closed .sidebar {
    transform: translateX(-100%);
  }
  .layout-shell.is-open .sidebar {
    transform: translateX(0);
  }
  .layout-shell main {
    width: 100%;
  }
}

.layout-shell .sidebar-backdrop {
  display: none;
}

@media (max-width: 767.98px) {
  .layout-shell.is-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
  }
}

.menu-group-header {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78) !important;
  border-radius: 6px;
}

.menu-group-header:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.menu-search-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.menu-search-input::placeholder {
  color: rgba(226, 232, 240, 0.55);
}

.menu-search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: none;
}
