:root {
  --primary: #0f9f93;
  --primary-dark: #0a6d66;
  --primary-soft: rgba(15, 159, 147, 0.14);
  --ink: #111111;
  --ink-soft: #4b4b4b;
  --ink-muted: #7f7f7f;
  --page: #f7f7f4;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-hover: rgba(255, 255, 255, 1);
  --border: rgba(17, 17, 17, 0.08);
  --border-strong: rgba(17, 17, 17, 0.16);
  --shadow: 0 16px 50px rgba(17, 17, 17, 0.08);
  --text-primary: #111111;
  --text-secondary: #525252;
  --text-muted: #8d8d8d;
  --success: #168f55;
  --warning: #b7791f;
  --danger: #c94d3f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(15, 159, 147, 0.18), transparent 28rem),
    radial-gradient(circle at bottom left, rgba(17, 17, 17, 0.05), transparent 24rem),
    linear-gradient(180deg, #fbfbf8 0%, var(--page) 100%);
}

#nav,
#outlet {
  position: relative;
  z-index: 1;
}

#nav {
  position: sticky;
  top: 0;
  z-index: 40;
}

#outlet > * {
  animation: page-in 220ms ease-out both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.orb-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.6;
}

.orb-1 {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  right: -6rem;
  background: rgba(15, 159, 147, 0.18);
}

.orb-2 {
  width: 24rem;
  height: 24rem;
  bottom: -8rem;
  left: -6rem;
  background: rgba(17, 17, 17, 0.08);
}

.orb-3 {
  width: 16rem;
  height: 16rem;
  top: 38%;
  left: 42%;
  background: rgba(15, 159, 147, 0.1);
}

.glass,
.glass-dark,
.surface-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass {
  border-radius: 1.25rem;
}

.glass-dark {
  border-radius: 1rem;
  background: rgba(17, 17, 17, 0.04);
}

.surface-panel {
  border-radius: 1.5rem;
}

.btn-primary,
.btn-ghost,
.nav-link,
.sidebar-link {
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 159, 147, 0.2);
  background: var(--primary);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.glass-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glass-input,
textarea.glass-input,
select.glass-input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-primary);
  padding: 0.9rem 1rem;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.glass-input:focus {
  border-color: rgba(15, 159, 147, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 159, 147, 0.12);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.main-nav {
  background: rgba(247, 247, 244, 0.82);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(17, 17, 17, 0.05);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 45;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(21rem, 88vw);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 50px rgba(17, 17, 17, 0.12);
  transform: translateX(100%);
  transition: transform 180ms ease;
  z-index: 50;
}

.mobile-menu-panel.open {
  transform: translateX(0);
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 18.5rem;
  padding: 1.5rem 1rem;
  background: rgba(247, 247, 244, 0.94);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 35;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  margin-left: 18.5rem;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.05);
  background: rgba(247, 247, 244, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--border);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(15, 159, 147, 0.16);
  color: var(--primary-dark);
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-green {
  color: var(--success);
  background: rgba(22, 143, 85, 0.1);
}

.badge-red {
  color: var(--danger);
  background: rgba(201, 77, 63, 0.1);
}

.badge-violet,
.badge-blue {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.gradient-text {
  background: linear-gradient(135deg, var(--ink) 0%, var(--primary) 55%, var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.font-display {
  font-family: "Syne", system-ui, sans-serif;
}

.error-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(201, 77, 63, 0.18);
  border-radius: 1rem;
  color: var(--danger);
  background: rgba(201, 77, 63, 0.08);
  font-size: 0.92rem;
}

.glass-divider {
  height: 1px;
  background: rgba(17, 17, 17, 0.07);
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 60;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 18rem;
  max-width: 24rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.toast-msg {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.presentation-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(15, 159, 147, 0.16), transparent 24rem),
    linear-gradient(180deg, #fafaf7 0%, #f2f2ee 100%);
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
  }
}
