.layout { display: block; min-height: 100vh; }

.sidebar { display: none; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.login { justify-content: space-between; }

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 32px;
}
.login-logo { width: 96px; height: auto; margin-bottom: 24px; opacity: .95; }
.login-tag {
  font-size: 11px;
  color: var(--steel);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.login-form { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }

.password-wrap { position: relative; }
.password-wrap .input { padding-right: 48px; }
.toggle-pw {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel);
  border-radius: 50%;
  transition: color .15s ease, background .15s ease;
}
.toggle-pw:hover { color: var(--platinum); }
.toggle-pw:active { background: rgba(184,192,204,0.08); }
.toggle-pw i { font-size: 18px; line-height: 1; }

.login-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.login-footer {
  text-align: center;
  padding-top: 24px;
  font-size: 11px;
  color: var(--steel);
  letter-spacing: .04em;
}
.login-footer a { color: var(--platinum); }

.login-error {
  background: rgba(229,72,77,0.10);
  border: 0.5px solid rgba(229,72,77,0.30);
  color: #F2A5A5;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  display: none;
}
.login-error.show { display: block; }

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 22px;
}
.home-greeting-date {
  font-size: 11px;
  color: var(--steel);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-greeting-name {
  font-size: 20px;
  color: var(--pearl);
  font-weight: 500;
  margin-top: 2px;
}
.home-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ice-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ice-100);
  font-weight: 500;
}

.metrics {
  background: rgba(184,192,204,0.04);
  border: 0.5px solid rgba(220,226,234,0.10);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.metric-desktop { display: none; }
.metric-value {
  font-size: 24px;
  color: var(--pearl);
  font-weight: 500;
}
.metric-value.accent { color: var(--ice-300); }
.metric-label {
  font-size: 11px;
  color: var(--platinum);
  margin-top: 2px;
}

.section-label {
  font-size: 10px;
  color: var(--steel);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.module-card {
  background: rgba(184,192,204,0.05);
  border: 0.5px solid rgba(220,226,234,0.08);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
  min-height: 92px;
}
.module-card:hover {
  background: rgba(184,192,204,0.08);
  border-color: rgba(220,226,234,0.18);
}
.module-card:active { transform: scale(.98); }
.module-card.featured {
  background: rgba(111,138,176,0.10);
  border-color: rgba(111,138,176,0.28);
}
.module-icon { font-size: 20px; color: var(--silver); }
.module-card.featured .module-icon { color: var(--ice-300); }
.module-name { font-size: 13px; color: var(--pearl); font-weight: 500; }
.module-meta { font-size: 11px; color: var(--steel); }
.module-card.featured .module-meta { color: var(--ice-300); }

.dashboard-bottom { display: block; }
.panel-desktop { display: none; }
.panel { margin-bottom: 12px; }

.next-event {
  background: rgba(184,192,204,0.05);
  border: 0.5px solid rgba(220,226,234,0.10);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.next-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ice-300);
  flex-shrink: 0;
}
.next-body { flex: 1; min-width: 0; }
.next-title { font-size: 13px; color: var(--pearl); }
.next-meta { font-size: 11px; color: var(--steel); }
.next-action {
  background: var(--silver);
  color: var(--carbon);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}

.bottom-nav {
  margin-top: auto;
  padding-top: 14px;
  border-top: 0.5px solid rgba(220,226,234,0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.bottom-nav button {
  min-width: var(--tap);
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--steel);
}
.bottom-nav button.active { color: var(--silver); }

.module-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 28px;
}
.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(184,192,204,0.05);
  border: 0.5px solid rgba(220,226,234,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  font-size: 18px;
  transition: background .15s;
}
.back-btn:hover { background: rgba(184,192,204,0.12); }
.module-title-wrap { display: flex; align-items: center; gap: 12px; }
.module-title-icon { font-size: 24px; color: var(--silver); }
.module-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--pearl);
  letter-spacing: -0.01em;
}

.coming-soon {
  margin: auto;
  text-align: center;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 420px;
}
.coming-icon {
  font-size: 48px;
  color: var(--steel);
  margin-bottom: 4px;
}
.coming-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--pearl);
  letter-spacing: -0.01em;
}
.coming-desc {
  font-size: 14px;
  color: var(--platinum);
  line-height: 1.65;
  margin-bottom: 8px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 0.5px solid rgba(220,226,234,0.06);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  font-size: 18px;
  color: var(--steel);
  margin-top: 2px;
  flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; color: var(--pearl); }
.activity-meta { font-size: 11px; color: var(--steel); margin-top: 2px; }


@media (min-width: 768px) {
  .screen.login {
    max-width: 460px;
    margin: 0 auto;
    padding: 48px 36px;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .screen.login .login-header { padding: 24px 0 36px; }
  .screen.login .login-logo { max-width: 120px; }
  .screen.login .login-footer { padding-top: 36px; }

  .layout {
    display: grid;
    grid-template-columns: 72px 1fr;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    background-color: #060709;
    background-image:
      linear-gradient(180deg, rgba(184,192,204,0.04) 0%, transparent 100%),
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.82  0 0 0 0 0.86  0 0 0 0 0.92  0 0 0 0.20 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    border-right: 0.5px solid rgba(220,226,234,0.08);
    padding: 24px 0;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
  }
  .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 28px;
  }
  .sidebar-logo-img { width: 36px; height: auto; opacity: .95; }
  .sidebar-brand { display: none; }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    flex: 1;
  }
  .sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: var(--radius-md);
    color: var(--steel);
    font-size: 20px;
    transition: background .15s, color .15s;
  }
  .sidebar-nav a span { display: none; }
  .sidebar-nav a:hover { background: rgba(184,192,204,0.06); color: var(--platinum); }
  .sidebar-nav a.active { background: rgba(111,138,176,0.18); color: var(--ice-100); }

  .sidebar-footer {
    padding: 16px 12px 0;
    border-top: 0.5px solid rgba(220,226,234,0.06);
  }
  .sidebar-footer button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: var(--radius-md);
    color: var(--steel);
    font-size: 20px;
    transition: background .15s, color .15s;
  }
  .sidebar-footer button span { display: none; }
  .sidebar-footer button:hover { color: var(--platinum); background: rgba(184,192,204,0.06); }

  .screen {
    max-width: none;
    margin: 0;
    padding: 32px 28px;
    min-height: 100vh;
  }
  .bottom-nav { display: none; }

  .modules { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .module-card { min-height: 110px; padding: 18px 16px; }
  .module-icon { font-size: 22px; }
  .module-name { font-size: 14px; }

  .home-greeting-name { font-size: 24px; }
  .home-avatar { width: 42px; height: 42px; font-size: 14px; }
}


@media (min-width: 1024px) {
  .layout { grid-template-columns: 240px 1fr; }

  .sidebar { padding: 28px 0; }
  .sidebar-logo {
    justify-content: flex-start;
    padding: 0 20px 32px;
    gap: 12px;
  }
  .sidebar-brand {
    display: inline;
    font-size: 13px;
    color: var(--pearl);
    font-weight: 500;
    letter-spacing: .02em;
  }

  .sidebar-nav { padding: 0 14px; gap: 2px; }
  .sidebar-nav a {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 400;
  }
  .sidebar-nav a i { font-size: 18px; }
  .sidebar-nav a span {
    display: inline;
    font-size: 14px;
    color: inherit;
  }

  .sidebar-footer { padding: 18px 14px 0; }
  .sidebar-footer button {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px;
    font-size: 14px;
  }
  .sidebar-footer button i { font-size: 18px; }
  .sidebar-footer button span { display: inline; }

  .screen { padding: 40px 48px; max-width: 1400px; }

  .metrics { padding: 20px 24px; margin-bottom: 28px; }
  .metrics-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .metric-desktop { display: block; }
  .metric-value { font-size: 30px; }
  .metric-label { font-size: 12px; margin-top: 4px; }

  .home-header { padding: 0 0 28px; }
  .home-greeting-name { font-size: 28px; }

  .modules {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 32px;
  }
  .module-card { min-height: 120px; padding: 20px 18px; }
  .module-icon { font-size: 24px; }
  .module-name { font-size: 15px; }
  .module-meta { font-size: 12px; }

  .dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .panel-desktop { display: block; }
  .panel {
    background: rgba(184,192,204,0.03);
    border: 0.5px solid rgba(220,226,234,0.08);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 0;
  }
  .panel .section-label { margin-bottom: 16px; }
  .panel .next-event { background: transparent; border: none; padding: 10px 0; margin-bottom: 0; border-bottom: 0.5px solid rgba(220,226,234,0.06); }
  .panel .next-event:last-child { border-bottom: none; }

  .module-header { padding: 0 0 32px; }
  .module-title { font-size: 28px; }
}
