.mw-app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.mw-app-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 24px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 78% 48%, rgba(83, 218, 250, 0.3), transparent 32%),
    linear-gradient(115deg, #08739d 0%, #078fc9 58%, #25b8dd 100%);
  background-size: 36px 36px, 36px 36px, auto, auto;
  border-right: 1px solid rgba(91, 207, 235, 0.4);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.1), 14px 0 36px rgba(8, 115, 157, 0.1);
}

.mw-app-sidebar-overlay {
  display: none;
}

.mw-app-sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 26%);
}

.mw-app-brand {
  display: grid;
  gap: 8px;
}

.mw-logo {
  display: grid;
  gap: 6px;
  color: #0f172a;
  text-decoration: none;
  line-height: 14px;
}

.mw-logo > span {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.mw-logo small {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.mw-app-wordmark {
  gap: 2px;
  line-height: 1;
}

.mw-app-wordmark strong {
  font-size: 2.05rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.mw-app-wordmark__mi {
  color: #ffffff;
}

.mw-app-wordmark__web,
.mw-app-wordmark__dot {
  color: #35d2f2;
}

.mw-app-wordmark small {
  color: rgba(226, 247, 255, 0.76);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.055em;
}

.mw-app-sidebar__group {
  display: grid;
  gap: 10px;
}

.mw-app-sidebar__eyebrow {
  padding: 0 10px;
  color: rgba(197, 238, 252, 0.76);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.mw-app-nav {
  display: grid;
  gap: 4px;
}

.mw-app-nav a,
.mw-app-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #edfaff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.mw-app-nav a:hover,
.mw-app-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: inset 0 0 0 1px rgba(178, 237, 255, 0.1);
}

.mw-app-nav a.is-active,
.mw-app-nav-item.is-active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(220, 247, 255, 0.14) 100%);
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 10px 24px rgba(4, 70, 102, 0.12), inset 0 0 0 1px rgba(218, 248, 255, 0.24);
}

.mw-app-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(196, 240, 255, 0.18);
  color: inherit;
  box-shadow: none;
}

.mw-app-nav a.is-active .mw-app-nav-icon,
.mw-app-nav-item.is-active .mw-app-nav-icon {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(224, 249, 255, 0.32);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(4, 70, 102, 0.1);
}

.mw-app-nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-app-nav-label {
  min-width: 0;
}

.mw-app-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  flex: 0 0 30px;
  border: 1px solid rgba(196, 240, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mw-app-nav a.is-active .mw-app-nav-count,
.mw-app-nav-item.is-active .mw-app-nav-count {
  border-color: rgba(224, 249, 255, 0.32);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(4, 70, 102, 0.1);
}

.mw-app-nav__separator {
  display: block;
  height: 1px;
  margin: 10px 8px 8px;
  background: rgba(198, 239, 253, 0.22);
}

.mw-app-sidebar__footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(198, 239, 253, 0.22);
}

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

.mw-app-main > *,
.mw-app-header,
.mw-app-content {
  min-width: 0;
}

.mw-app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(126, 193, 215, 0.42);
  box-shadow: 0 8px 24px rgba(22, 89, 118, 0.1);
  backdrop-filter: blur(14px);
}

.mw-app-header__title {
  min-width: 0;
}

.mw-app-header strong {
  color: #0b2c45;
}

.mw-app-header small {
  display: block;
  margin-top: 0px;
  color: #587789;
  font-size: 0.82rem;
}

.mw-app-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.mw-app-header__account {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.mw-app-header__quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mw-app-header__quick-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(126, 193, 215, 0.38);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  color: #0877a8;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.mw-app-header__quick-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-app-header__quick-link:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 143, 201, 0.55);
  background: #ffffff;
  color: #05638d;
  box-shadow: 0 8px 20px rgba(15, 91, 125, 0.12);
}

.mw-app-header__quick-link:focus-visible {
  outline: 3px solid rgba(11, 143, 232, 0.18);
  outline-offset: 3px;
}

.mw-app-header__quick-count {
  position: absolute;
  top: -6px;
  right: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 2px 4px 0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #e5484d;
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 9px rgba(188, 36, 43, 0.24);
}

.mw-app-header__help {
  padding: 4px 0 3px;
  border-bottom: 1px solid rgba(7, 106, 151, 0.32);
  color: #075b83;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.mw-app-header__help:hover,
.mw-app-header__help:focus-visible {
  border-bottom-color: #075b83;
  color: #063f5e;
}

.mw-app-header__help:focus-visible,
.mw-app-user-menu__trigger:focus-visible,
.mw-app-user-menu__items a:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(11, 143, 232, 0.18);
  outline-offset: 3px;
}

.mw-app-user-menu {
  position: relative;
}

.mw-app-user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(218, 246, 255, 0.7);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--mw-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.mw-app-user-menu__trigger:hover {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(3, 53, 78, 0.2);
}

.mw-app-header .mw-app-mobile-toggle {
  border-color: rgba(43, 139, 177, 0.3);
  background: rgba(255, 255, 255, 0.58);
  color: #075b83;
}

.mw-app-header .mw-app-mobile-toggle:hover,
.mw-app-header .mw-app-mobile-toggle:focus-visible {
  border-color: rgba(7, 106, 151, 0.48);
  background: rgba(255, 255, 255, 0.82);
  color: #063f5e;
}

.mw-app-user-menu__trigger[aria-expanded="true"] {
  border-color: var(--mw-blue);
  background: var(--mw-sky);
  box-shadow: 0 0 0 3px rgba(11, 143, 232, 0.1);
}

.mw-app-user-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--mw-gradient);
  color: var(--mw-white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.mw-app-user-menu__name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-app-user-menu__chevron {
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23066bb3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  flex: 0 0 auto;
  transition: transform .16s ease;
}

.mw-app-user-menu__trigger[aria-expanded="true"] .mw-app-user-menu__chevron {
  transform: rotate(180deg);
}

.mw-app-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: min(320px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--mw-border);
  border-radius: 16px;
  background: var(--mw-white);
  box-shadow: var(--mw-shadow-soft);
}

.mw-app-user-menu__dropdown[hidden] {
  display: none;
}

.mw-app-user-menu__identity {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 16px 17px;
  border-bottom: 1px solid var(--mw-border);
}

.mw-app-user-menu__identity strong,
.mw-app-user-menu__identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-app-user-menu__identity span {
  color: var(--mw-muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.mw-app-user-menu__identity strong {
  color: var(--mw-text);
  font-weight: 600;
}

.mw-app-user-menu__items {
  display: grid;
  padding: 7px;
}

.mw-app-user-menu__items a {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--mw-text);
  font-weight: 500;
  text-decoration: none;
}

.mw-app-user-menu__items a:hover,
.mw-app-user-menu__items a:focus-visible {
  background: var(--mw-sky);
  color: var(--mw-blue-dark);
}

.mw-app-user-menu__items .mw-app-user-menu__logout {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--mw-border);
  border-radius: 0 0 9px 9px;
  color: var(--mw-danger-text);
  font-weight: 600;
}

.mw-app-user-menu__items .mw-app-user-menu__logout:hover,
.mw-app-user-menu__items .mw-app-user-menu__logout:focus-visible {
  background: var(--mw-danger-soft);
  color: var(--mw-danger-text);
}

.mw-app-content {
  padding: 28px;
  max-width: 100%;
}

.mw-app-content .mw-app-page {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}

.mw-app-content .mw-app-page > * {
  min-width: 0;
  max-width: 100%;
}

.mw-app-mobile-toggle {
  display: none;
}

.mw-auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mw-auth-shell {
  flex: 1 0 auto;
  width: min(480px, calc(100% - 32px));
}

@media (min-width: 1024px) {
  .mw-app-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    max-height: 100vh;
  }

  .mw-app-mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .mw-app-shell {
    grid-template-columns: 1fr;
  }

  .mw-app-sidebar-overlay {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(15, 35, 55, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 30;
  }

  body.mw-sidebar-open .mw-app-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mw-app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(275px, calc(100vw - 24px));
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18);
  }

  body.mw-sidebar-open .mw-app-sidebar,
  .mw-app-shell.is-sidebar-open .mw-app-sidebar {
    transform: translateX(0);
  }

  .mw-app-mobile-toggle {
    display: inline-flex;
  }

  .mw-app-header__meta {
    flex: 0 1 auto;
  }

  .mw-app-header {
    padding: 16px 18px;
  }

  .mw-app-content {
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  .mw-app-sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .mw-app-header {
    align-items: center;
    gap: 10px;
    padding: 15px 14px;
  }

  .mw-app-header__meta {
    gap: 10px;
  }

  .mw-app-header__title {
    display: none;
  }

  .mw-app-header__account {
    gap: 10px;
  }

  .mw-app-header__help {
    display: none;
  }

  .mw-app-user-menu__name {
    display: none;
  }

  .mw-app-user-menu__dropdown {
    right: 0;
  }
}

@media (max-width: 400px) {
  .mw-app-header {
    gap: 6px;
    padding-inline: 10px;
  }

  .mw-app-header__meta {
    flex: 0 0 auto;
    gap: 0;
  }

  .mw-app-header__account {
    gap: 6px;
  }

  .mw-app-header__quick-actions {
    gap: 4px;
  }

  .mw-app-header .mw-app-mobile-toggle {
    padding-inline: 12px;
  }

  .mw-app-user-menu__trigger {
    gap: 6px;
    padding-right: 6px;
  }
}

@media (max-width: 340px) {
  .mw-app-header {
    gap: 5px;
    padding-inline: 8px;
  }

  .mw-app-header__account {
    gap: 5px;
  }

  .mw-app-header__quick-link {
    width: 36px;
    height: 36px;
  }

  .mw-app-header__quick-link svg {
    width: 21px;
    height: 21px;
  }

  .mw-app-user-menu__trigger {
    min-height: 40px;
    padding: 3px 5px 3px 3px;
  }

  .mw-app-user-menu__avatar {
    width: 32px;
    height: 32px;
  }

  .mw-app-user-menu__chevron {
    width: 14px;
    height: 14px;
    background-size: 14px 14px;
  }
}
