:root {
  --sidebar-collapsed-width: 96px;
  --sidebar-expanded-width: 280px;
  --background-overlay: radial-gradient(
      circle at 20% 20%,
      rgba(12, 16, 28, 0.32),
      transparent 58%
    ),
    radial-gradient(circle at 80% 15%, rgba(6, 10, 18, 0.22), transparent 60%);
  --dot-bg: rgba(255, 255, 255, 0.6);
  --dot-active-bg: #ffffff;
  --dot-focus-ring: rgba(255, 255, 255, 0.28);
}

:root[data-theme='light'] {
  --dot-bg: rgba(255, 255, 255, 0.55);
  --dot-active-bg: #ffffff;
  --dot-focus-ring: rgba(255, 255, 255, 0.28);
}

.app-shell {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.app-shell .sidebar {
  background: #000000;
  color: #cbd5f5;
  width: var(--sidebar-collapsed-width);
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: relative;
  z-index: 10;
  min-height: 100vh;
  border: none;
  margin: 0;
  box-shadow: none;
}

.app-shell .sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: 0;
  background: #000000;
  z-index: -1;
  transition: all 0.3s ease;
}

.app-shell .sidebar:hover,
.app-shell .sidebar:focus-within {
  width: var(--sidebar-expanded-width);
}

.app-shell .logo {
  display: flex;
  align-items: center;
  padding: 0 24px;
  margin-bottom: 32px;
  white-space: nowrap;
  overflow: hidden;
}

.app-shell .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0b1120;
  font-size: 22px;
}

.app-shell .logo-text {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin-left: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.app-shell .sidebar:hover .logo-text,
.app-shell .sidebar:focus-within .logo-text {
  opacity: 1;
}

.app-shell .menu {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.app-shell .menu-item {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  margin: 4px 12px 4px 0;
  color: #cbd5f5;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 12px;
}

.app-shell .menu-item:hover,
.app-shell .menu-item:focus-visible,
.app-shell .menu-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  outline: none;
}

.app-shell .menu-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: #ffffff;
  filter: grayscale(100%);
}

.app-shell .menu-text {
  margin-left: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.app-shell .sidebar:hover .menu-text,
.app-shell .sidebar:focus-within .menu-text {
  opacity: 1;
}

.app-shell .main-content {
  flex: 1;
  min-height: 100vh;
  overflow-y: auto;
}


.background-dots {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.background-dots .dot-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.background-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: none;
  background: var(--dot-bg);
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.background-dots button::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 999px;
}

.background-dots button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px var(--dot-focus-ring);
}

.background-dots button.active {
  background: var(--dot-active-bg);
  transform: scale(1.1);
  box-shadow: 0 0 0 6px var(--dot-focus-ring);
}

.dock button {
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 960px) {
  .app-shell {
    flex-direction: column;
  }

  .app-shell .sidebar,
  .app-shell .sidebar:hover,
  .app-shell .sidebar:focus-within {
    width: 100%;
    height: auto;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    gap: 8px;
    transition: none;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 30;
  }

  .app-shell .sidebar::before {
    display: none;
  }

  .app-shell .logo {
    display: none;
  }

  .app-shell .menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .app-shell .menu-item {
    padding: 8px 10px;
    margin: 0;
    border-radius: 10px;
  }

  .app-shell .menu-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .app-shell .menu-text {
    display: none;
  }

  .app-shell .main-content {
    width: 100%;
  }
}
/* ============================================
   Felles bakgrunnsstiler for alle sider
   ============================================ */

:root {
  --background-image: url('../Scenery/Lake.png');
  --background-overlay: radial-gradient(
      circle at 20% 20%,
      rgba(12, 16, 28, 0.32),
      transparent 55%
    ),
    radial-gradient(circle at 80% 15%, rgba(6, 10, 18, 0.22), transparent 60%);
}

body.app-shell {
  background: #000000;
  --surface-bg: rgba(12, 16, 28, 0.68);
  --surface-border: rgba(255, 255, 255, 0.14);
  --surface-shadow: 0 34px 90px rgba(5, 7, 12, 0.55);
  --text-primary: rgba(255, 255, 255, 0.94);
  --text-secondary: rgba(255, 255, 255, 0.72);
  --control-bg: rgba(12, 16, 28, 0.7);
  --control-border: rgba(255, 255, 255, 0.18);
  --control-hover-bg: rgba(12, 16, 28, 0.82);
  --control-hover-border: rgba(255, 255, 255, 0.32);
  --control-text: rgba(255, 255, 255, 0.94);
  --menu-surface-bg: rgba(12, 16, 28, 0.9);
  --menu-surface-border: rgba(255, 255, 255, 0.18);
  --menu-divider: rgba(255, 255, 255, 0.14);
  --icon-background: rgba(12, 16, 28, 0.72);
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.14);
  --theme-toggle-active-bg: rgba(74, 222, 128, 0.25);
  --accent-bg: rgba(74, 222, 128, 0.18);
  --accent-border: rgba(134, 239, 172, 0.55);
  --accent-text: #bbf7d0;
  --accent-hover-bg: rgba(74, 222, 128, 0.28);
  --accent-hover-border: rgba(134, 239, 172, 0.75);
  color-scheme: dark;
}

body.app-shell[data-theme='light'] {
  background: #e9eef9;
  --surface-bg: rgba(255, 255, 255, 0.18);
  --surface-border: rgba(148, 163, 184, 0.28);
  --surface-shadow: none;
  --text-primary: rgba(255, 255, 255, 0.94);
  --text-secondary: rgba(255, 255, 255, 0.72);
  --control-bg: rgba(255, 255, 255, 0.2);
  --control-border: rgba(148, 163, 184, 0.3);
  --control-hover-bg: rgba(255, 255, 255, 0.32);
  --control-hover-border: rgba(100, 116, 139, 0.34);
  --control-text: rgba(255, 255, 255, 0.94);
  --menu-surface-bg: rgba(255, 255, 255, 0.24);
  --menu-surface-border: rgba(148, 163, 184, 0.26);
  --menu-divider: rgba(148, 163, 184, 0.24);
  --icon-background: rgba(255, 255, 255, 0.3);
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.3);
  --theme-toggle-active-bg: rgba(74, 222, 128, 0.28);
  --accent-bg: rgba(74, 222, 128, 0.24);
  --accent-border: rgba(34, 197, 94, 0.52);
  --accent-text: #bbf7d0;
  --accent-hover-bg: rgba(74, 222, 128, 0.32);
  --accent-hover-border: rgba(34, 197, 94, 0.64);
  --background-overlay: radial-gradient(
      circle at 20% 20%,
      rgba(12, 16, 28, 0.15),
      transparent 60%
    ),
    radial-gradient(circle at 80% 15%, rgba(6, 10, 18, 0.12), transparent 70%);
  color-scheme: light;
}

body.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--background-image);
  background-size: max(110vw, 1600px);
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.95;
  filter: none;
  z-index: -2;
}

body.app-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--background-overlay);
  z-index: -1;
  pointer-events: none;
}

body.app-shell[data-theme='light']::before {
  opacity: 0.95;
  filter: none;
}

body.app-shell[data-theme='light']::after {
  background: var(--background-overlay);
}
