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

[dir='rtl'] .app-shell {
  direction: rtl;
}

.sidebar {
  width: 260px;
  background: var(--color-bg-dark);
  color: var(--color-text-inverted);
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.sidebar-logo span.gold {
  color: var(--color-gold);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  text-decoration: none;
}

.sidebar-link.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-primary);
}

.sidebar-link-icon {
  font-size: 1.125rem;
  width: 22px;
  text-align: center;
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  overflow-x: auto;
}

.topbar {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.locale-switcher {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.locale-switcher a {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.locale-switcher a.current {
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 600;
}

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
}

.page-header .subtitle {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 1rem;
  }
  .page-container {
    padding: 1rem;
  }
}
