.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 260px; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-color: rgba(157, 185, 188, .48) transparent; scrollbar-width: thin; padding: 24px 16px 16px; background: var(--navy); color: #edf4f5; }
.sidebar > * { flex-shrink: 0; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: rgba(157, 185, 188, .48); background-clip: padding-box; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(121, 196, 185, .55); border-radius: 11px; color: #9bd7cf; font-size: 12px; font-weight: 750; letter-spacing: -.04em; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 16px; font-weight: 660; letter-spacing: -.045em; }
.brand-copy small { color: #91aab3; font-size: 8px; font-weight: 750; letter-spacing: .16em; }
.project-card { margin: 29px 2px 0; padding: 13px 12px 11px; border: 1px solid rgba(203, 224, 227, .12); border-radius: 9px; background: rgba(255,255,255,.045); }
.project-label, .sidebar-label { color: #89a2ab; font-size: 8px; font-weight: 750; letter-spacing: .13em; }
.project-card > strong { display: block; margin-top: 8px; color: #f2f7f7; font-size: 12px; font-weight: 630; }
.project-subtitle { display: block; margin-top: 4px; color: #92aab2; font-size: 9px; }
.project-progress { height: 4px; margin-top: 14px; overflow: hidden; border-radius: 4px; background: rgba(238,247,248,.13); }
.project-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #5bc0ae; transition: width .3s ease; }
.progress-caption { display: flex; justify-content: space-between; margin-top: 7px; color: #91a9b1; font-size: 8px; }
.progress-caption span:last-child { color: #b1d8d2; font-weight: 700; }
.sidebar-label { margin: 27px 10px 9px; }
.home-nav { display: grid; gap: 4px; margin-bottom: 12px; }
.phase-nav { display: grid; gap: 4px; }
[hidden] { display: none !important; }
.sidebar-logout { align-self: flex-start; margin: 8px 0 10px; padding: 5px 0; border: 0; background: transparent; color: #91a7ad; font-size: 8px; cursor: pointer; }
.sidebar-logout:hover { color: #fff; }
.phase-link { display: grid; min-height: 40px; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #afc1c6; text-align: left; cursor: pointer; transition: .16s ease; }
.phase-link:hover:not(:disabled) { background: rgba(255,255,255,.06); color: #f4f8f8; }
.phase-link:disabled { opacity: .42; cursor: not-allowed; }
.phase-link.is-active { border-color: rgba(88, 180, 165, .2); background: rgba(27, 143, 131, .19); color: #c1e8e2; }
.phase-number { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(192, 215, 220, .18); border-radius: 6px; color: #9fb4ba; font-size: 8px; font-weight: 700; }
.phase-link.is-active .phase-number { border-color: rgba(117, 204, 190, .38); color: #a9e1d8; }
.phase-link.is-complete .phase-number { border-color: #4ea99b; background: rgba(43, 155, 141, .2); color: #9ae0d6; }
.phase-name { font-size: 9px; font-weight: 560; }
.nav-status { color: #829ba4; font-size: 7px; white-space: nowrap; }
.phase-link.is-active .nav-status { color: #9ed2ca; }
.phase-link.is-complete .nav-status { color: #8bcfc3; }
.sidebar-bottom { margin-top: auto; }
.environment-pill { display: flex; align-items: center; gap: 9px; margin: 0 3px 15px; padding: 10px; border: 1px solid rgba(203,224,227,.12); border-radius: 8px; background: rgba(255,255,255,.035); }
.pulse-dot, .connection-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #d5a452; box-shadow: 0 0 0 3px rgba(213,164,82,.12); }
.environment-pill span:last-child { display: grid; gap: 3px; }
.environment-pill strong { color: #e2edef; font-size: 9px; font-weight: 650; }
.environment-pill small { color: #8fa7af; font-size: 8px; }
.sidebar-foot { padding: 12px 8px 0; border-top: 1px solid rgba(226,239,241,.11); color: #8aa2aa; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.sidebar-foot span { display: block; margin-top: 5px; color: #6f8993; font-size: 8px; font-weight: 450; letter-spacing: 0; }

.main-area { min-height: 100vh; margin-left: 260px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; height: 61px; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid rgba(225,233,236,.94); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #8a989e; font-size: 10px; }
.breadcrumb strong { max-width: 40vw; overflow: hidden; color: #3c515b; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.crumb-slash { color: #c3cdd0; }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; color: #718088; font-size: 9px; font-weight: 560; white-space: nowrap; }
.connection-dot { width: 6px; height: 6px; background: #d5a452; box-shadow: none; }
.connection-dot.is-connected { background: #2f9b79; }
.avatar { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #dce6e8; border-radius: 50%; background: #eff6f5; color: #357d76; font-size: 8px; font-weight: 750; }
.menu-toggle { display: none; }
.workspace { width: min(1280px, 100%); margin: 0 auto; padding: 28px 34px 25px; }
.global-note { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid #e8e1d1; border-radius: 8px; background: #fbf8f1; color: #7d6b4b; }
.global-note p { margin: 0; font-size: 8px; line-height: 1.55; }
.info-icon { display: grid; width: 16px; height: 16px; flex: 0 0 16px; place-items: center; margin-top: 1px; border-radius: 50%; background: #efe4ce; color: #96713c; font-family: Georgia, serif; font-size: 11px; font-weight: 700; }
#view-root[aria-busy="true"] { opacity: .68; }
.loading-view { padding: 35px; color: var(--muted); text-align: center; }
.load-error { padding: 22px; border: 1px solid #e8d5d5; border-radius: 8px; background: #fcf5f5; color: #8b5757; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 13px 2px 0; border-top: 1px solid #e2e9eb; color: #929fa4; font-size: 8px; }
.toast { position: fixed; right: 22px; bottom: 20px; z-index: 60; max-width: min(390px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #d7e2e3; border-radius: 8px; background: #fff; color: #435d66; box-shadow: 0 12px 35px rgba(23,52,63,.15); font-size: 9px; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .sidebar { width: 232px; }
  .main-area { margin-left: 232px; }
  .workspace { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 850px) {
  .sidebar { width: 72px; align-items: center; padding-right: 9px; padding-left: 9px; }
  .brand { padding: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy, .project-card, .sidebar-label, .phase-name, .nav-status, .environment-pill, .sidebar-foot { display: none; }
  .phase-nav { width: 100%; margin-top: 34px; }
  .phase-link { display: flex; min-height: 38px; justify-content: center; padding: 0; }
  .phase-number { width: 26px; height: 26px; font-size: 8px; }
  .main-area { margin-left: 72px; }
}
@media (max-width: 620px) {
  .sidebar { width: 260px; align-items: stretch; padding-right: 16px; padding-left: 16px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 12px 0 32px rgba(14,37,48,.17); }
  .sidebar.is-open { transform: translateX(0); }
  .brand { padding: 0 8px; }
  .brand-copy { display: grid; }
  .project-card { display: block; }
  .sidebar-label, .phase-name, .nav-status, .environment-pill, .sidebar-foot { display: revert; }
  .phase-nav { margin-top: 0; }
  .phase-link { display: grid; min-height: 40px; grid-template-columns: 25px 1fr auto; justify-content: initial; padding: 0 9px; }
  .phase-number { width: 23px; height: 23px; }
  .environment-pill { display: flex; }
  .sidebar-foot { display: block; }
  .main-area { margin-left: 0; }
  .topbar { height: 55px; padding: 0 13px; }
  .menu-toggle { display: grid; width: 30px; height: 30px; place-content: center; gap: 4px; padding: 0; border: 1px solid #e1e8ea; border-radius: 7px; background: #fff; cursor: pointer; }
  .menu-toggle span { display: block; width: 13px; height: 1.5px; border-radius: 2px; background: #405b65; }
  .breadcrumb { margin-right: auto; margin-left: 10px; gap: 6px; font-size: 8px; }
  .topbar-tools { gap: 8px; }
  .connection-status { font-size: 0; }
  .avatar { width: 27px; height: 27px; }
  .workspace { padding: 19px 13px 18px; }
  .page-footer { flex-direction: column; gap: 5px; }
}
