.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.app-top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--top-nav-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 30px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.94);
  color: var(--nav-ink);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 46px;
  min-width: 194px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--nav-ink);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-text {
  display: grid;
  gap: 3px;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--nav-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--nav-muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line-soft);
}

.nav-link:focus-visible,
.mobile-menu-button:focus-visible {
  outline: 3px solid rgba(10, 102, 194, 0.24);
  outline-offset: 2px;
}

.nav-link.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #c9e2ff;
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 13px;
}

.desktop-nav {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.nav-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 194px;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-menu-name {
  max-width: 120px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-page {
  min-height: 100vh;
  background: var(--bg);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand h1 {
  font-size: 25px;
  letter-spacing: 0;
}

.login-brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-state {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.login-state[data-tone="error"] {
  color: var(--danger);
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.notification-icon {
  position: relative;
  width: 16px;
  height: 18px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 9px 9px 5px 5px;
  border-bottom-width: 3px;
}

.notification-icon::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 5px;
  margin-top: -6px;
  margin-left: 2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.notification-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 3px;
  margin-top: 18px;
  margin-left: 3px;
  border-radius: 0 0 8px 8px;
  background: currentColor;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 11px;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-header,
.notification-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-panel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.notification-close:hover,
.notification-close:focus-visible,
.notification-button:hover,
.notification-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-soft);
}

.notification-item.unread {
  border-color: rgba(10, 102, 194, 0.28);
  background: var(--accent-soft);
}

.notification-item-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.notification-item-message,
.notification-item-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.button-small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.desktop-settings-nav {
  display: flex;
}

.mobile-active-page,
.mobile-nav-panel,
.mobile-menu-button {
  display: none;
}

.main-area {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-temporarily-hidden {
  display: none;
}

.topbar h1 {
  font-size: 25px;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.page-content {
  min-width: 0;
  padding: 28px 34px 36px;
}

.page-grid {
  display: grid;
  gap: 20px;
}

.two-column-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.three-column-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
