/* App shell: fixed navy rail on the left, title bar on top.
   Tokens come from tokens.css; the rail keeps the brand navy in both themes so
   the chrome does not change identity with the viewer's theme. */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }

/* ------------------------------------------------------------------- rail */
.side {
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, #0c2440, var(--brand-navy) 48%, #0d2b47);
  color: #fff; padding: 0 10px 10px;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
}
.side__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 6px 14px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.side__seal { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fff; padding: 1px; }
.side__name { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.side__sub { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 2px; }

.side__label {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .38); padding: 14px 10px 6px;
}
.side__link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 8px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 13.5px;
  transition: background .12s, color .12s;
}
.side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side__link.is-on { background: var(--brand-navy-soft); color: #fff; font-weight: 550; }
.side__link.is-on .side__icon { opacity: 1; }
.side__link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brand-gold); }
.side__icon { width: 17px; height: 17px; flex: none; opacity: .72; }
.side__badge {
  margin-left: auto; background: var(--critical); color: #fff;
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 1.5;
}
.side__spacer { flex: 1 1 auto; min-height: 10px; }

.side__user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.side__avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--brand-gold); color: var(--brand-navy-deep);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
}
.side__who { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.side__role { font-size: 10.5px; color: rgba(255, 255, 255, .5); }
.side__out {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  color: rgba(255, 255, 255, .6); padding: 6px; border-radius: 7px; line-height: 0;
}
.side__out:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ----------------------------------------------------------------- column */
.col { display: flex; flex-direction: column; min-width: 0; }

.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 12px clamp(14px, 2.4vw, 26px);
  background: linear-gradient(100deg, var(--brand-navy-deep), var(--brand-navy) 60%, var(--brand-navy-soft));
  border-bottom: 2px solid var(--brand-gold);
  color: #fff;
}
.appbar h1 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.appbar p { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-top: 2px; }
.appbar__tools { display: flex; align-items: center; gap: var(--sp-2); }
.appbar .btn {
  background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .22);
  color: #fff; text-decoration: none;
}
.appbar .btn:hover { background: rgba(255, 255, 255, .19); }
.appbar .btn:focus-visible { box-shadow: 0 0 0 3px rgba(245, 190, 23, .55); }

/* ------------------------------------------------------------- responsive */
.side__toggle { display: none; }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40;
    transform: translateX(-100%); transition: transform .18s;
    box-shadow: 0 0 40px rgba(0, 0, 0, .35);
  }
  .app.is-open .side { transform: none; }
  .side__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-right: 10px; flex: none;
  }
  .scrim {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 39;
    opacity: 0; pointer-events: none; transition: opacity .18s;
  }
  .app.is-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) { .appbar { flex-wrap: wrap; } }
