.mobile-account {
  display: none;
}

.school-monogram-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 701px) {
  .sidebar {
    overflow: hidden;
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .sidebar-identity,
  .sidebar .nav-label,
  .sidebar-bottom {
    flex-shrink: 0;
  }

  .sidebar-identity .school-chip {
    padding: 8px;
  }

  .sidebar-connection-status {
    margin-top: 7px;
    padding: 5px 8px;
  }

  .sidebar .nav-label {
    margin-top: 15px;
    margin-bottom: 7px;
  }

  .sidebar .navigation {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .sidebar-bottom .sidebar-mobile-brand {
    display: none;
  }

  .sidebar-bottom .sidebar-desktop-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
    padding: 6px;
    border: 1px solid #e0e9e2;
    border-radius: 10px;
    background: #f0f6f1;
    font-size: 13px;
  }

  .sidebar-bottom .sidebar-desktop-brand .brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 10px;
  }

  .sidebar-bottom .account {
    border-top: 0;
    gap: 7px;
    margin-top: 3px;
    padding: 6px;
    border: 1px solid #e0e9e2;
    border-radius: 10px;
    background: #f0f6f1;
  }

  .sidebar-bottom .account .user-monogram {
    width: 28px;
    height: 28px;
    font-size: 9px;
  }

  .sidebar-bottom .account .account-copy strong {
    font-size: 9px;
  }

  .sidebar-bottom .account .account-copy small {
    margin-top: 2px;
    font-size: 8px;
  }

  .sidebar-bottom .account .icon-button {
    width: 29px;
    height: 29px;
    border-color: #d7e5da;
    background: #e6f0e8;
    color: #286346;
    font-size: 13px;
  }

  .sidebar-connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 9px 2px 0;
    padding: 7px 8px;
    border: 1px solid #e8eee8;
    border-radius: 9px;
    background: #f7faf8;
    color: #6b7b70;
    font-size: 7px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .35px;
    white-space: nowrap;
  }

  .sidebar-connection-dot {
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: #42a571;
  }

  .sidebar-connection-status>span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-connection-status>strong {
    flex: none;
    margin-left: auto;
    color: #267451;
    font-size: 7px;
    letter-spacing: .45px;
  }
}

@media (max-width: 700px) {
  .sidebar-bottom .sidebar-desktop-brand {
    display: none;
  }

  .sidebar-bottom {
    display: flex;
    flex-direction: column;
  }

  .sidebar-bottom .account {
    order: 2;
    gap: 7px;
    margin-top: 3px;
    padding: 8px;
    border: 1px solid #dce8df;
    border-radius: 10px;
    background: #f0f6f1;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, calc(100vw - 48px));
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(15px, env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: 0 16px 16px 0;
    box-shadow: 10px 0 32px rgba(30, 43, 35, .16);
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

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

  .dashboard-grid > * {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar-identity,
  .sidebar .nav-label,
  .sidebar-bottom {
    flex-shrink: 0;
  }

  .sidebar .navigation {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sidebar-identity {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: -7px -3px 0;
    padding: 13px 12px 10px;
    border: 1px solid rgba(205, 178, 113, .34);
    border-radius: 15px;
    background:
      radial-gradient(ellipse at 100% 0, rgba(89, 164, 125, .24), transparent 49%),
      linear-gradient(145deg, #102d24, #174b37 68%, #123a2c);
    box-shadow: 0 9px 22px rgba(13, 51, 35, .15), inset 0 1px rgba(255, 255, 255, .09);
  }

  .sidebar-identity::after {
    position: absolute;
    z-index: -1;
    top: -34px;
    right: -37px;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(228, 205, 150, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 12px rgba(228, 205, 150, .035), 0 0 0 25px rgba(255, 255, 255, .025);
    content: "";
    pointer-events: none;
  }

  .sidebar-bottom .sidebar-mobile-brand {
    order: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 2px;
    padding: 8px 10px;
    border: 1px solid rgba(205, 178, 113, .34);
    border-radius: 12px;
    background: linear-gradient(145deg, #102d24, #174b37 68%, #123a2c);
    box-shadow: 0 5px 14px rgba(13, 51, 35, .12);
    color: #f5f8f5;
    font-size: 13px;
    letter-spacing: -.3px;
  }

  .sidebar-bottom .sidebar-mobile-brand .brand-mark {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(231, 207, 151, .72);
    border-radius: 9px;
    background: linear-gradient(145deg, #2d8060, #174a37);
    box-shadow: 0 4px 12px rgba(4, 25, 16, .24), inset 0 1px rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 13px;
  }

  .sidebar-bottom .sidebar-mobile-brand .brand-accent {
    color: #d7c17f;
  }

  .sidebar-identity .school-chip {
    position: relative;
    z-index: 1;
    gap: 9px;
    padding: 10px 0 8px;
    border: 0;
    background: transparent;
  }

  .sidebar-identity .school-monogram {
    width: 34px;
    height: 34px;
    overflow: hidden;
    border: 1px solid rgba(229, 205, 148, .48);
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    color: #245940;
    font-size: 13px;
  }

  .sidebar-identity .school-chip strong {
    color: #fff;
    font-size: 10px;
    line-height: 1.4;
  }

  .sidebar-identity .school-chip small {
    margin-top: 3px;
    color: rgba(235, 243, 237, .7);
    font-size: 9px;
  }

  .sidebar-connection-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(235, 243, 237, .72);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .65px;
  }

  .sidebar-connection-dot {
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: #64d39a;
    box-shadow: 0 0 0 3px rgba(100, 211, 154, .14), 0 0 9px rgba(100, 211, 154, .65);
  }

  .sidebar-connection-status strong {
    margin-left: auto;
    color: #8ce2b2;
    font-size: 7px;
    letter-spacing: .8px;
  }

  .sidebar-connection-status[data-state="disconnected"] .sidebar-connection-dot {
    background: #f2a58e;
    box-shadow: 0 0 0 3px rgba(242, 165, 142, .14), 0 0 9px rgba(242, 165, 142, .55);
  }

  .sidebar-connection-status[data-state="disconnected"] strong {
    color: #ffc0ad;
  }

  .sidebar .nav-label {
    margin-top: 17px;
  }

  .topbar {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .breadcrumb {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-spacer {
    display: none;
  }

  .mobile-account {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .mobile-profile-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 1px solid #dfe9e2;
    border-radius: 50%;
    background: #fff;
    color: var(--green-dark);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
  }

  .mobile-profile-icon:hover,
  .mobile-profile-icon[aria-expanded="true"] {
    border-color: #b7cdbb;
    background: #f2f7f2;
  }

  .mobile-profile-icon:focus-visible {
    outline: 2px solid rgba(23, 79, 56, .26);
    outline-offset: 2px;
  }

  .mobile-profile-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .mobile-account .icon-button {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .mobile-profile-menu {
    position: absolute;
    z-index: 60;
    top: 42px;
    right: 38px;
    display: grid;
    width: min(250px, calc(100vw - 28px));
    gap: 5px;
    padding: 14px;
    border: 1px solid #e3eae3;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(24, 54, 38, .16);
  }

  .mobile-profile-menu[hidden] {
    display: none;
  }

  .mobile-profile-menu-label {
    color: #8a7650;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .9px;
  }

  .mobile-profile-menu>strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-profile-menu>small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-profile-role {
    width: fit-content;
    margin-top: 2px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f1f6f1;
    color: #315b40;
    font-size: 9px;
    font-weight: 600;
  }

  .mobile-profile-menu>button {
    margin-top: 5px;
    padding: 8px 10px;
    border: 1px solid #e0e9e1;
    border-radius: 8px;
    background: #f7faf7;
    color: #245640;
    font-size: 10px;
    font-weight: 600;
    text-align: left;
  }

  .mobile-profile-menu>button:hover {
    background: #edf5ee;
  }

  .server-indicator {
    flex: 0 0 8px;
    margin-left: auto;
    font-size: 0;
  }
}
