:root {
  --bg: #08111c;
  --bg-deep: #0d2239;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --ink: #111926;
  --muted: #5d6775;
  --accent: #0c5f9a;
  --accent-soft: #1781cf;
  --accent-deep: #0a3f69;
  --line: rgba(17, 25, 38, 0.1);
  --shadow: 0 28px 70px rgba(5, 19, 36, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Aptos", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(23, 129, 207, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(12, 95, 154, 0.28), transparent 24%),
    linear-gradient(160deg, #08111c 0%, #0c1c2f 42%, #0f2742 100%);
  position: relative;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
  opacity: 0.7;
}

.ambient-one {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -40px;
  background: rgba(23, 129, 207, 0.2);
}

.ambient-two {
  width: 260px;
  height: 260px;
  bottom: 80px;
  left: -90px;
  background: rgba(12, 95, 154, 0.18);
}

.shell {
  width: min(620px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 32px;
}

.login-card {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-soft);
}

.intro,
.install-copy {
  color: var(--muted);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login-card {
  width: min(100%, 560px);
  padding: 30px 22px;
  border-radius: 30px;
}

.login-head {
  margin-top: 10px;
  text-align: center;
}

.login-logo {
  display: block;
  width: min(100%, 360px);
  margin: 0 auto;
}

.login-head h1 {
  margin: 10px 0 0;
  line-height: 1.02;
  font-size: clamp(2rem, 8vw, 2.5rem);
}

.intro {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 34ch;
  margin-inline: auto;
}

.login-form {
  margin-top: 28px;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input::placeholder {
  color: #90a0b0;
}

.field input:focus {
  border-color: rgba(12, 95, 154, 0.4);
  box-shadow: 0 0 0 4px rgba(12, 95, 154, 0.08);
  transform: translateY(-1px);
}

.helper-row {
  display: grid;
  gap: 12px;
  margin: 8px 0 24px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.helper-row a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.primary-action,
.install-action {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-action {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #0a3f69 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(12, 95, 154, 0.24);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-action:hover,
.primary-action:focus-visible,
.install-action:hover,
.install-action:focus-visible {
  transform: translateY(-1px);
}

.install-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(12, 95, 154, 0.09), rgba(10, 63, 105, 0.07));
  display: grid;
  gap: 14px;
}

.install-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
}

.install-copy {
  margin: 6px 0 0;
  line-height: 1.55;
  font-size: 0.92rem;
}

.install-action {
  justify-self: start;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--accent);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(17, 25, 38, 0.08);
}

@media (min-width: 720px) {
  .shell {
    width: min(620px, calc(100% - 48px));
    padding: 28px 0;
  }

  .login-card {
    padding: 40px 38px;
  }

  .helper-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .install-box {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.dashboard-shell {
  width: calc(100% - 32px);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 32px;
}

.dashboard-card {
  width: 100%;
  min-height: calc(100vh - 56px);
  padding: 26px 20px;
  border-radius: 30px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

.dashboard-header {
  display: grid;
  gap: 20px;
}

.dashboard-brand {
  display: grid;
  gap: 18px;
}

.dashboard-logo {
  width: min(100%, 280px);
}

.dashboard-brand-copy h1 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.02;
}

.dashboard-session {
  display: grid;
  gap: 14px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(12, 95, 154, 0.1), rgba(10, 63, 105, 0.08));
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(12, 95, 154, 0.22);
}

.user-role,
.user-state,
.menu-card p {
  margin: 0;
}

.user-role {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
}

.user-state {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}

.logout-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: fit-content;
  padding: 0 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 800;
  background: rgba(12, 95, 154, 0.08);
}

.dashboard-menu {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.menu-card {
  display: block;
  padding: 22px 20px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 252, 0.94));
  border: 1px solid rgba(12, 95, 154, 0.1);
  box-shadow: 0 14px 32px rgba(17, 25, 38, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(12, 95, 154, 0.12);
  border-color: rgba(12, 95, 154, 0.2);
}

.menu-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.menu-card h2 {
  margin: 0;
  font-size: clamp(1.28rem, 4.6vw, 1.72rem);
  line-height: 1.08;
}

.menu-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

@media (min-width: 720px) {
  .dashboard-shell {
    width: calc(100% - 48px);
    padding: 24px 0;
  }

  .dashboard-card {
    padding: 34px 32px;
  }
}

@media (min-width: 980px) {
  .dashboard-shell {
    width: calc(100% - 64px);
  }

  .dashboard-card {
    min-height: calc(100vh - 48px);
    padding: 40px 40px 44px;
  }

  .dashboard-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .dashboard-session {
    justify-items: end;
  }

  .dashboard-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1440px) {
  .dashboard-shell {
    width: calc(100% - 72px);
  }

  .dashboard-card {
    padding: 46px 48px 52px;
  }

  .dashboard-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.activity-shell {
  width: min(100%, 100vw);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.activity-card {
  width: 100%;
  min-height: 100vh;
  padding: 22px 18px 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 254, 0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.activity-header {
  display: grid;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 800;
  background: rgba(12, 95, 154, 0.08);
}

.activity-logo {
  width: min(100%, 250px);
}

.activity-copy h1 {
  margin: 10px 0 0;
  font-size: clamp(1.95rem, 8vw, 2.6rem);
  line-height: 1.02;
}

.activity-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.field-control {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  outline: none;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  appearance: none;
}

.field-control:focus {
  border-color: rgba(12, 95, 154, 0.4);
  box-shadow: 0 0 0 4px rgba(12, 95, 154, 0.08);
  transform: translateY(-1px);
}

.activity-submit {
  margin-top: 8px;
}

@media (min-width: 720px) {
  .activity-shell {
    width: calc(100% - 32px);
    padding: 24px 0;
  }

  .activity-card {
    width: min(100%, 760px);
    min-height: auto;
    padding: 30px 30px 34px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
  }
}

@media (min-width: 980px) {
  .activity-card {
    width: min(100%, 860px);
    padding: 36px 36px 40px;
  }

  .activity-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .activity-form .field:first-child,
  .activity-form .field:nth-child(3),
  .activity-submit {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
