/**
 * Şimşek CRM — Mobil öncelikli özel stiller
 */

/* Alt yapışkan menü için içerik boşluğu */
body.has-bottom-nav .content-wrapper {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

body.has-bottom-nav .content-footer {
  margin-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* Yapışkan alt navigasyon */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1080;
  display: none;
  background: var(--bs-paper-bg, #fff);
  border-top: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.08));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-bottom-nav__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 100%;
  margin: 0 auto;
  min-height: 64px;
}

.app-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  text-decoration: none;
  color: var(--bs-secondary-color, #6d6b77);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.1;
  border: none;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
  min-width: 0;
}

.app-bottom-nav__item i {
  font-size: 1.35rem;
  line-height: 1;
}

.app-bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
}

.app-bottom-nav__badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff4c51;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.app-bottom-nav__item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.app-bottom-nav__item:hover,
.app-bottom-nav__item:focus {
  color: var(--bs-primary, #7367f0);
}

.app-bottom-nav__item.is-active {
  color: var(--bs-primary, #7367f0);
}

.app-bottom-nav__item.is-highlight {
  color: #fff;
  background: var(--bs-primary, #7367f0);
  border-radius: 12px;
  margin: 6px 4px;
  padding-top: 6px;
  padding-bottom: 4px;
  box-shadow: 0 4px 12px rgba(115, 103, 240, 0.35);
}

.app-bottom-nav__item.is-highlight:hover,
.app-bottom-nav__item.is-highlight.is-active {
  color: #fff;
  background: var(--bs-primary, #7367f0);
}

.app-bottom-nav__item--highlight {
  color: #fff !important;
  background: var(--bs-primary, #7367f0);
  border-radius: 12px;
  margin: 6px 4px;
  box-shadow: 0 4px 12px rgba(115, 103, 240, 0.35);
}

.app-bottom-nav__item--btn {
  cursor: pointer;
}

/* Giriş sayfası — ortalanmış kart */
.auth-page-body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #f8f7fa 0%, #e8e6f0 100%);
}

[data-bs-theme="dark"] .auth-page-body {
  background: linear-gradient(135deg, #25293c 0%, #1a1d2e 100%);
}

.auth-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-page-card {
  width: 100%;
  max-width: 420px;
  border: 0;
}

/* Mobil sol menü */
@media (max-width: 1199.98px) {
  .layout-menu {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1100;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease;
  }

  .layout-menu-expanded .layout-menu {
    transform: translate3d(0, 0, 0);
  }

  .layout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1095;
    display: none;
  }

  .layout-menu-expanded .layout-overlay {
    display: block;
  }
}

/* Menü başlıkları */
.menu-header .menu-header-text {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

/* Sol menü — onay/badge sayıları */
.menu-link .menu-badge {
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  margin-left: auto;
  border-radius: 999px;
}

/* Boş durum ikonları */
.simsek-empty-state__icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--bs-gray-100, #f5f5f9);
  color: var(--bs-secondary-color, #6d6b77);
  font-size: 1.35rem;
}

[data-bs-theme="dark"] .simsek-empty-state__icon {
  background: rgba(255, 255, 255, 0.06);
}

/* Harita */
.simsek-map {
  width: 100%;
  background: #f5f5f5;
  z-index: 1;
}

/* Alt menü — tablet ve mobil */
@media (max-width: 1199.98px) {
  .app-bottom-nav {
    display: block;
  }

  body.has-bottom-nav .layout-menu-horizontal {
    display: none !important;
  }

  /* Mobilde navbar daha kompakt */
  body.has-bottom-nav .layout-navbar {
    min-height: 56px;
  }

  body.has-bottom-nav .container-p-y {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  /* Kartlar mobilde tam genişlik */
  .stat-card .card-body h3 {
    font-size: 1.5rem;
  }
}

/* Masaüstünde alt menü gizli */
@media (min-width: 1200px) {
  body.has-bottom-nav .content-wrapper {
    padding-bottom: 0;
  }
}

/* Mobil daha fazla menü offcanvas */
.mobile-more-menu .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.mobile-more-menu .list-group-item i {
  font-size: 1.25rem;
  color: var(--bs-primary);
  width: 1.5rem;
  text-align: center;
}

/* Hızlı aksiyon FAB (temsilci ziyaret) — opsiyonel */
.app-fab {
  display: none;
}

/* Flash mesajları */
.app-flash {
  position: fixed;
  top: 70px;
  right: 16px;
  left: 16px;
  z-index: 1090;
  max-width: 420px;
  margin-left: auto;
}

@media (min-width: 576px) {
  .app-flash {
    left: auto;
  }
}

/* Tablo mobil kaydırma */
.table-responsive-mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Dashboard stat kartları */
.stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.stat-card__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

/* Sayfa başlığı mobil */
.page-header-mobile h4 {
  font-size: 1.15rem;
}

.page-header-mobile .breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* Giriş sayfası marka */
.auth-brand-title {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Boş durum */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--bs-secondary-color);
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
}
