:host { display: block; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ═══ LAYOUT ═══ */
.fd-layout {
  display: flex;
  min-height: calc(100vh - 92px);
  position: relative;
}

/* ═══ SIDEBAR ═══ */
.fd-sidebar {
  width: 260px;
  position: sticky;
  top: 0;
  height: calc(100vh - 92px);
  z-index: 10;
  background: #ffffff;
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  flex-shrink: 0;
}
.fd-sidebar.collapsed {
  width: 64px;
}

/* ═══ GERİ BUTONU ═══ */
.fd-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #8c8c8c;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
  white-space: nowrap;
}
.fd-back:hover {
  color: #1677ff;
  background: #f0f5ff;
}
.collapsed .fd-back {
  justify-content: center;
  padding: 12px;
}

/* ═══ FİRMA HEADER ═══ */
.fd-firma-header {
  padding: 20px 18px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.collapsed .fd-firma-header {
  padding: 16px 8px;
}

.fd-firma-logo-wrap {
  flex-shrink: 0;
}
.fd-firma-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 2px solid #f5f5f5;
}
.collapsed .fd-firma-logo,
.collapsed .fd-firma-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 16px;
}
.fd-firma-logo-fallback {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.fd-firma-info {
  text-align: center;
  width: 100%;
  min-width: 0;
}
.fd-firma-adi {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fd-firma-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.fd-firma-kod {
  font-size: 11px;
  padding: 1px 6px;
  background: #f5f5f5;
  border-radius: 4px;
  color: #595959;
  font-weight: 500;
}
.fd-firma-sektor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: #8c8c8c;
}

/* ═══ NAVİGASYON ═══ */
.fd-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.fd-nav::-webkit-scrollbar { width: 3px; }
.fd-nav::-webkit-scrollbar-thumb { background: #e8e8e8; border-radius: 3px; }

.fd-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #595959;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2px;
  position: relative;
  white-space: nowrap;
}
.collapsed .fd-nav-item {
  justify-content: center;
  padding: 10px;
}
.fd-nav-item:hover {
  background: #f5f5f5;
  color: #262626;
}
.fd-nav-item.active {
  background: #e6f4ff;
  color: #1677ff;
  font-weight: 600;
}
.fd-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #1677ff;
}
.collapsed .fd-nav-item.active::before {
  display: none;
}

.fd-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.fd-nav-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ SIDEBAR FOOTER ═══ */
.fd-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid #f5f5f5;
  flex-shrink: 0;
}
.fd-abonelik-kart {
  padding: 10px 12px;
  background: linear-gradient(135deg, #fffbe6 0%, #fff7e6 100%);
  border: 1px solid #fff1b8;
  border-radius: 10px;
  text-align: center;
}
.fd-abonelik-baslik {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #8c6e00;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.fd-abonelik-tarih {
  font-size: 11px;
  color: #8c8c8c;
  margin-top: 4px;
}

/* ═══ COLLAPSE BUTTON ═══ */
.fd-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin: 4px 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #bfbfbf;
  font-size: 13px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.fd-collapse-btn:hover {
  background: #f5f5f5;
  color: #595959;
}

/* ═══ ANA İÇERİK ═══ */
.fd-main {
  flex: 1;
  min-width: 0;
  padding: 0;
}

/* ═══ DARK MODE ═══ */
:host-context(.dark-mode) .fd-sidebar {
  background: #1f1f1f;
  border-right-color: #303030;
}
:host-context(.dark-mode) .fd-back {
  color: rgba(255,255,255,0.45);
  border-bottom-color: #303030;
}
:host-context(.dark-mode) .fd-back:hover {
  color: #1677ff;
  background: rgba(24,119,255,0.08);
}
:host-context(.dark-mode) .fd-firma-header {
  border-bottom-color: #303030;
}
:host-context(.dark-mode) .fd-firma-adi { color: rgba(255,255,255,0.88); }
:host-context(.dark-mode) .fd-firma-kod {
  background: #303030;
  color: rgba(255,255,255,0.65);
}
:host-context(.dark-mode) .fd-firma-sektor { color: rgba(255,255,255,0.45); }
:host-context(.dark-mode) .fd-nav-item {
  color: rgba(255,255,255,0.65);
}
:host-context(.dark-mode) .fd-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
:host-context(.dark-mode) .fd-nav-item.active {
  background: rgba(24,119,255,0.12);
  color: #1677ff;
}
:host-context(.dark-mode) .fd-sidebar-footer {
  border-top-color: #303030;
}
:host-context(.dark-mode) .fd-abonelik-kart {
  background: linear-gradient(135deg, rgba(250,173,20,0.06) 0%, rgba(250,173,20,0.03) 100%);
  border-color: rgba(250,173,20,0.15);
}
:host-context(.dark-mode) .fd-abonelik-baslik { color: #faad14; }
:host-context(.dark-mode) .fd-abonelik-tarih { color: rgba(255,255,255,0.35); }
:host-context(.dark-mode) .fd-collapse-btn {
  color: rgba(255,255,255,0.25);
}
:host-context(.dark-mode) .fd-collapse-btn:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
}
