
/* ================================================================
   Shared Chrome FINAL: desktop sidebar + mobile drawer
   - Desktop/tablet wide: full sidebar is always visible.
   - Windowed desktop: compact icon rail.
   - Mobile only: sidebar is hidden behind C medallion button.
   - Topbar is disabled; account status lives inside the sidebar.
   ================================================================ */

:root {
  --sidebar-desktop-width: 260px;
  --sidebar-compact-width: 82px;
  --sidebar-mobile-width: min(252px, 82vw);
}

.site-topbar,
.account-hud {
  display: none !important;
}

.sidebar-shell {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-desktop-width) !important;
  height: 100vh !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

.sidebar-shell .sidebar,
.sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-desktop-width) !important;
  min-width: var(--sidebar-desktop-width) !important;
  max-width: var(--sidebar-desktop-width) !important;
  height: 100vh !important;
  transform: none !important;
  translate: none !important;
  transition: none !important;
  z-index: 1001 !important;
  overflow: hidden !important;
  box-shadow: 4px 0 32px rgba(0,0,0,.7) !important;
  display: block !important;
}

.sidebar-trigger,
.sidebar-close {
  display: none !important;
}

.main,
main.main {
  margin-left: var(--sidebar-desktop-width) !important;
  padding-top: 0 !important;
}

.sidebar-account {
  margin: .75rem 1rem .85rem;
  padding: .8rem .9rem;
  border: 1px solid rgba(61,51,38,.18);
  background: rgba(61,51,38,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  display: grid;
  gap: .48rem;
}

.sidebar-account-row,
.sidebar-account-profile {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  font-family: var(--font-display, 'Cinzel', serif);
  color: var(--ink, #3d3326);
}

.sidebar-account-icon { width: 1.1rem; text-align: center; }

.sidebar-account-value {
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .08em;
}

.sidebar-account-label {
  margin-left: auto;
  font-size: .43rem;
  letter-spacing: .16em;
  color: var(--ink-light, #5a4d3a);
  opacity: .72;
}

.sidebar-account-profile {
  padding-top: .45rem;
  border-top: 1px solid rgba(61,51,38,.14);
}

.sidebar-account-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(61,51,38,.08);
  border: 1px solid rgba(61,51,38,.16);
  font-size: .78rem;
}

.sidebar-account-name {
  font-size: .58rem;
  letter-spacing: .14em;
}

.sidebar-nav .nav-item.active {
  background: rgba(61,51,38,.16) !important;
  color: var(--ink, #3d3326) !important;
}
.sidebar-nav .nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 3px !important;
  background: var(--brass, #b58b4a) !important;
}

/* Windowed desktop / smaller laptop: preserve navigation as a slim icon rail. */
@media (min-width: 761px) and (max-width: 1180px) {
  .sidebar-shell {
    width: var(--sidebar-compact-width) !important;
  }

  .sidebar-shell .sidebar,
  .sidebar {
    width: var(--sidebar-compact-width) !important;
    min-width: var(--sidebar-compact-width) !important;
    max-width: var(--sidebar-compact-width) !important;
  }

  .main,
  main.main {
    margin-left: var(--sidebar-compact-width) !important;
  }

  .sidebar-scroll {
    overflow-x: hidden !important;
  }

  .sidebar-logo {
    min-height: 72px !important;
    padding: .75rem 0 .55rem !important;
    display: grid !important;
    place-items: center !important;
  }

  .sidebar-logo .medallion-placeholder {
    margin: 0 !important;
    transform: scale(.86);
    transform-origin: center;
  }

  .sidebar-brand,
  .sidebar-nav .nav-label,
  .sidebar-account-name,
  .sidebar-auth-actions,
  .sidebar-account-status,
  .sidebar-stamp {
    display: none !important;
  }

  .sidebar-nav .nav-item {
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    min-height: 41px !important;
    padding: .45rem 0 !important;
    gap: 0 !important;
  }

  .sidebar-nav .nav-icon {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 1rem !important;
  }

  .sidebar-nav .nav-divider {
    margin-left: .8rem !important;
    margin-right: .8rem !important;
  }

  .sidebar-account {
    margin: .7rem .65rem !important;
    padding: .55rem 0 !important;
    display: grid !important;
    place-items: center !important;
  }

  .sidebar-account-profile {
    padding: 0 !important;
    border-top: 0 !important;
  }

  .sidebar-account-avatar {
    margin: 0 !important;
  }
}

@media (max-width: 760px) {
  .sidebar-shell {
    width: 0 !important;
    overflow: visible !important;
    z-index: 2000 !important;
  }

  .sidebar-trigger {
    position: fixed !important;
    left: .75rem !important;
    top: .75rem !important;
    z-index: 2003 !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(181,139,74,.48) !important;
    background: radial-gradient(circle at 35% 28%, rgba(207,165,94,.98), rgba(181,139,74,.92) 50%, #7a5c28 100%) !important;
    color: var(--ink, #3d3326) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 0 3px rgba(181,139,74,.14), inset 0 1px 0 rgba(255,255,255,.22) !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  .sidebar-shell.open .sidebar-trigger {
    display: none !important;
  }

  .sidebar-trigger-mark {
    font-family: var(--font-display, 'Cinzel', serif) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }
  .sidebar-trigger-lines { display: none !important; }

  .sidebar-shell .sidebar,
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: var(--sidebar-mobile-width) !important;
    min-width: var(--sidebar-mobile-width) !important;
    max-width: var(--sidebar-mobile-width) !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    transition: transform .25s ease, box-shadow .25s ease !important;
    z-index: 2002 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    display: block !important;
  }

  .sidebar-shell.open .sidebar,
  .sidebar-shell:focus-within .sidebar {
    transform: translateX(0) !important;
    box-shadow: 8px 0 34px rgba(0,0,0,.72) !important;
  }

  .sidebar-close {
    position: absolute !important;
    top: .7rem !important;
    right: .7rem !important;
    z-index: 3 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(61,51,38,.22) !important;
    background: rgba(61,51,38,.08) !important;
    color: var(--ink, #3d3326) !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: block !important;
  }

  .sidebar-scroll {
    overflow-x: hidden !important;
  }

  .sidebar-logo {
    padding-left: .8rem !important;
    padding-right: 2.55rem !important;
  }

  .sidebar-nav .nav-item {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: .55rem !important;
    min-height: 38px !important;
    padding: .48rem .8rem !important;
  }

  .sidebar-nav .nav-icon {
    width: 24px !important;
    min-width: 24px !important;
    text-align: center !important;
    font-size: .9rem !important;
  }

  .sidebar-nav .nav-label {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    font-size: .58rem !important;
    line-height: 1.25 !important;
    letter-spacing: .075em !important;
    word-break: normal !important;
  }

  .sidebar-account {
    margin-left: .7rem !important;
    margin-right: .7rem !important;
    padding: .7rem !important;
  }

  .sidebar-account-name {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: .54rem !important;
  }

  .main,
  main.main {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }
}

.notif-bell-btn {
  position: fixed;
  top: .85rem;
  right: .85rem;
  z-index: 2005;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(181,139,74,.4);
  background: radial-gradient(circle at 40% 35%, #0d1e0d, #07110b);
  color: #f5f0e8;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 0 0 3px rgba(181,139,74,.1);
  transition: border-color .15s, box-shadow .15s;
}
.notif-bell-btn:hover { border-color: rgba(181,139,74,.8); box-shadow: 0 4px 24px rgba(0,0,0,.6), 0 0 0 3px rgba(181,139,74,.2); }
.notif-bell-badge { position:absolute;top:4px;right:4px;width:16px;height:16px;border-radius:50%;background:#b58b4a;color:#2b1d0a;font-family:'Cinzel',serif;font-size:.38rem;font-weight:700;display:flex;align-items:center;justify-content:center; }
.notif-drawer-overlay { position:fixed;inset:0;z-index:3000;display:flex;justify-content:flex-end; }
.notif-drawer-overlay.hidden { display:none!important; }
.notif-drawer-backdrop { position:absolute;inset:0;background:rgba(3,7,6,.72);backdrop-filter:blur(4px); }
.notif-drawer { position:relative;width:min(400px,100vw);background:linear-gradient(180deg,#08130d,#030706);border-left:1px solid rgba(181,139,74,.28);box-shadow:-24px 0 60px rgba(0,0,0,.5);overflow-y:auto;display:flex;flex-direction:column; }
.notif-drawer-head { display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid rgba(181,139,74,.15);position:sticky;top:0;background:#08130d;z-index:1; }
.notif-drawer-title { font-family:'Cinzel',serif;font-size:.62rem;letter-spacing:.22em;color:#b58b4a;text-align:center; }
.notif-close-btn { background:none;border:none;color:#f5f0e8;font-size:1.4rem;cursor:pointer;opacity:.6;line-height:1; }
.notif-close-btn:hover { opacity:1; }
.notif-mark-all { background:none;border:none;font-family:'Cinzel',serif;font-size:.42rem;letter-spacing:.14em;color:#b58b4a;cursor:pointer;opacity:.6;white-space:nowrap; }
.notif-mark-all:hover { opacity:1; }
.notif-list { display:flex;flex-direction:column;padding:.75rem;gap:.5rem; }
.notif-item { display:grid;grid-template-columns:36px 1fr;gap:.75rem;padding:.75rem .85rem;border:1px solid rgba(181,139,74,.15);cursor:pointer;position:relative;transition:border-color .15s; }
.notif-item.unread { background:rgba(181,139,74,.06); }
.notif-item.read { background:rgba(255,255,255,.02);opacity:.65; }
.notif-item:hover { border-color:rgba(181,139,74,.4);opacity:1; }
.notif-icon { font-size:1.3rem;padding-top:.1rem; }
.notif-title { font-family:'Cinzel',serif;font-size:.58rem;font-weight:600;letter-spacing:.08em;color:#f5f0e8;margin-bottom:.2rem; }
.notif-body { font-family:'IM Fell English',serif;font-style:italic;font-size:.82rem;color:#ece3cf;opacity:.7;line-height:1.45;margin-bottom:.2rem; }
.notif-time { font-family:'Cinzel',serif;font-size:.42rem;letter-spacing:.12em;color:#ece3cf;opacity:.4; }
.notif-unread-dot { position:absolute;top:.8rem;right:.8rem;width:7px;height:7px;border-radius:50%;background:#b58b4a; }
.notif-empty { text-align:center;padding:3rem 1rem;font-family:'IM Fell English',serif;font-style:italic;font-size:.95rem;color:#ece3cf;opacity:.35; }
