/* ===== GORU ADS — Ortak Panel Sidebar & Düzen CSS ===== */
:root {
  --sidebar-width: 250px;
  --sidebar-bg: #ffffff;
  --sidebar-border: #dadce0;
  --sidebar-hover: #f1f3f4;
  --sidebar-active-bg: #e8f0fe;
  --sidebar-active-color: #1a73e8;
  --sidebar-text: #3c4043;
}

.panel-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #f8f9fa;
  font-family: 'Google Sans', 'Roboto', -apple-system, sans-serif;
}

/* Sidebar */
.panel-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 99;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f3f4;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #202124;
}

.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 19px;
  font-weight: 700;
  color: #202124;
}

.sidebar-brand-text span {
  color: #1a73e8;
}

.sidebar-role-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e8f0fe;
  color: #1a73e8;
}

.sidebar-role-badge.publisher {
  background: #e6f4ea;
  color: #137333;
}

.sidebar-role-badge.advertiser {
  background: #e8f0fe;
  color: #1a73e8;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background-color 0.15s, color 0.15s;
}

.sidebar-link svg {
  flex-shrink: 0;
  color: #5f6368;
  transition: color 0.15s;
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: #202124;
}

.sidebar-link:hover svg {
  color: #202124;
}

.sidebar-link.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  font-weight: 600;
}

.sidebar-link.active svg {
  color: var(--sidebar-active-color);
}

.sidebar-divider {
  height: 1px;
  background: #f1f3f4;
  margin: 8px 6px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 11px;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  color: #d93025;
  text-decoration: none;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.sidebar-logout:hover {
  background: #fce8e6;
}

/* Main Content with Sidebar */
.panel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Sayfa kapsayıcıları max-width + margin:auto kullanır; sütun flex içinde auto margin
   genişlemeyi engelleyip içeriği dar şeride sıkıştırdığı için tam genişlik verilir. */
.panel-main > * {
  width: 100%;
  box-sizing: border-box;
}

.panel-main > * > .dashboard-layout,
.panel-main > * > .admin-layout,
.panel-main > * > .apps-layout,
.panel-main > * > .analytics-page,
.panel-main > * > .dashboard-container,
.panel-main > * > .main-content {
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Toggle Bar */
.panel-mobile-bar {
  display: none;
  background: #ffffff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .panel-wrapper {
    flex-direction: column;
  }
  .panel-mobile-bar {
    display: flex;
  }
  .panel-sidebar {
    display: none;
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .panel-sidebar.mobile-open {
    display: flex;
  }
}
