/* OPTIMAL HOME — application shell, based on the supplied sidebar structure. */
:root {
  --oh-sidebar-width: 260px;
  --oh-sidebar-collapsed: 60px;
  --oh-sidebar-current: var(--oh-sidebar-width);
  --oh-sidebar-bg: #102a2d;
  --oh-sidebar-border: #244044;
  --oh-sidebar-text: #afc5c1;
  --oh-topbar-height: 56px;
}
.oh-app { min-height: 100dvh; }
.oh-skip { position: fixed; top: -100px; left: 18px; z-index: 200; padding: 12px 18px; color: white; background: var(--oh-brand); border-radius: 8px; }
.oh-skip:focus { top: 12px; }
.oh-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 45; width: var(--oh-sidebar-current); height: 100dvh; display: flex; flex-direction: column; background: var(--oh-sidebar-bg); color: #e5eee8; border-right: 1px solid var(--oh-sidebar-border); transition: width var(--oh-motion), transform var(--oh-motion); }
.oh-brand { position: relative; flex-shrink: 0; padding: 16px 16px 12px; }
.oh-brand__link { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100px; border-radius: 11px; background: #fafbf8; padding: 9px 16px 10px; }
.oh-brand__logo { width: 173px; height: 80px; object-fit: contain; }
.oh-brand__mark { display: none; position: relative; width: 37px; height: 28px; overflow: hidden; }
.oh-brand__mark img { position: absolute; width: 96px; height: auto; max-width: none; left: -29px; top: -1px; }
.oh-sidebar-toggle { position: absolute; right: -13px; top: 59px; z-index: 3; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #3e5b5c; border-radius: 50%; background: #193b3f; color: #d0dfd9; box-shadow: 0 3px 8px #001b2326; }
.oh-sidebar-toggle .oh-icon { width: 13px; height: 13px; transition: transform var(--oh-motion); }
.oh-sidebar-toggle:hover { background: #285256; color: #fff; border-color: #71988e; }
.oh-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 16px; scrollbar-color: #3a5658 transparent; }
.oh-nav-section + .oh-nav-section { margin-top: 20px; }
.oh-nav-label { display: block; padding: 0 13px 9px; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; color: #88a59f; white-space: nowrap; }
.oh-nav-item { margin: 3px 0; }
.oh-nav-link { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--oh-sidebar-text); font-size: 14px; font-weight: 600; white-space: nowrap; text-align: left; transition: color var(--oh-fast), background var(--oh-fast), border-color var(--oh-fast); }
.oh-nav-link > .oh-icon { width: 18px; height: 18px; }
.oh-nav-link:hover { background: #ffffff08; color: #f5faf5; }
.oh-nav-link.is-active, .oh-nav-link[aria-current="page"] { background: linear-gradient(90deg,#2d777448,#2d777422); border-color: #478a7e3b; color: #d2f2e5; box-shadow: inset 3px 0 #ff914b; }
.oh-nav-link.is-active > .oh-icon, .oh-nav-link[aria-current="page"] > .oh-icon { color: #93cfba; }
.oh-nav-link__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.oh-nav-link__count { margin-left: auto; min-width: 22px; padding: 1px 5px; text-align: center; font-size: 11px; line-height: 18px; border-radius: 5px; background: #ffffff0c; color: #b8cdc5; }
.oh-nav-link__chevron { margin-left: auto; width: 13px !important; height: 13px !important; color: #7e9e99; transition: transform var(--oh-motion); }
.oh-nav-link[aria-expanded="true"] > .oh-nav-link__chevron { transform: rotate(180deg); }
.oh-submenu { padding: 4px 0 5px 30px; }
.oh-submenu a { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; min-height: 36px; border-left: 1px solid #34504d; color: #9eb9b0; font-size: 13px; }
.oh-submenu a::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.oh-submenu a:hover, .oh-submenu a[aria-current="page"] { color: #d4f2e6; background: #ffffff05; border-left-color: #ff914b; }
.oh-sidebar-foot { padding: 17px 17px 15px; border-top: 1px solid var(--oh-sidebar-border); background: #00161a16; }
.oh-user-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 3px 4px; border-radius: 8px; }
.oh-user-link:hover { background: #ffffff08; }
.oh-user-link .oh-avatar { background: #294b46; color: #dae5d1; border: 1px solid #486659; }
.oh-user-link .oh-online { border-color: #102a2d; }
.oh-user-copy { min-width: 0; flex: 1; }
.oh-user-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d9e6df; font-size: 13px; font-weight: 700; }
.oh-user-copy small { display: block; color: #92ada5; font-size: 11px; margin-top: 2px; }
.oh-user-link > .oh-icon { width: 14px; height: 14px; color: #7b9990; }
.oh-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 33px; padding: 8px; margin-top: 13px; border: 1px solid #304b49; border-radius: 7px; background: transparent; color: #a6bfb5; font-size: 12px; }
.oh-logout .oh-icon { width: 14px; height: 14px; }
.oh-logout:hover { background: #ffffff08; color: #e6f0e9; border-color: #506f62; }
.oh-layout { margin-left: var(--oh-sidebar-current); min-width: 0; transition: margin-left var(--oh-motion); }
.oh-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--oh-topbar-height); padding: 0 var(--oh-content-padding); border-bottom: 1px solid var(--oh-border); background: var(--oh-surface); }
.oh-breadcrumb { display: flex; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; gap: 10px; color: var(--oh-muted); font-size: 13px; }
.oh-breadcrumb .oh-icon { width: 14px; height: 14px; }
.oh-breadcrumb > .oh-icon { width: 10px; height: 10px; color: var(--oh-subtle); }
.oh-breadcrumb strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--oh-ink); font-weight: 700; }
.oh-topbar__right { display: flex; align-items: center; flex-shrink: 0; gap: 10px; margin-left: auto; }
.oh-topbar__search { display: inline-flex; align-items: center; gap: 10px; width: 230px; min-height: 36px; padding: 7px 11px; border: 1px solid var(--oh-border); border-radius: 7px; background: var(--oh-surface-2); color: var(--oh-muted); font-size: 12px; white-space: nowrap; text-align: left; }
.oh-topbar__search > .oh-icon { width: 14px; height: 14px; }
.oh-topbar__search kbd { margin-left: auto; font-size: 11px; }
.oh-topbar__separator { width: 1px; height: 22px; background: var(--oh-border); }
.oh-topbar__date { color: var(--oh-muted); font-size: 12px; white-space: nowrap; }
.oh-notification-btn { position: relative; }
.oh-notification-dot { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border: 1px solid var(--oh-surface); border-radius: 50%; background: var(--oh-accent); }
.oh-mobile-toggle { display: none; }
.oh-content { width: 100%; max-width: none; min-width: 0; margin: 0; padding: var(--oh-content-padding); min-height: calc(100dvh - var(--oh-topbar-height)); }
.oh-page-intro { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: var(--oh-content-gap); }
.oh-page-intro h1 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.035em; }
.oh-page-intro p { margin: 0; color: var(--oh-muted); font-size: 13px; }
.oh-period-button { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--oh-border); border-radius: 7px; background: var(--oh-surface); color: var(--oh-ink); font-size: 13px; }
.oh-period-button .oh-icon { width: 14px; height: 14px; color: var(--oh-muted); }
.oh-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(290px,1fr); gap: var(--oh-content-gap); }
.oh-scrim { position: fixed; inset: 0; z-index: 40; background: #071e26a3; border: 0; padding: 0; backdrop-filter: blur(3px); }
.oh-sidebar-is-collapsed { --oh-sidebar-current: var(--oh-sidebar-collapsed); }
.oh-sidebar-is-collapsed .oh-brand { padding: 21px 8px 20px; }
.oh-sidebar-is-collapsed .oh-brand__link { min-height: 43px; padding: 6px 3px; border-radius: 8px; }
.oh-sidebar-is-collapsed .oh-brand__logo { display: none; }
.oh-sidebar-is-collapsed .oh-brand__mark { display: block; }
.oh-sidebar-is-collapsed .oh-sidebar-toggle { top: 85px; }
.oh-sidebar-is-collapsed .oh-sidebar-toggle .oh-icon { transform: rotate(180deg); }
.oh-sidebar-is-collapsed .oh-nav { padding: 18px 7px; }
.oh-sidebar-is-collapsed .oh-nav-section + .oh-nav-section { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--oh-sidebar-border); }
.oh-sidebar-is-collapsed .oh-nav-label, .oh-sidebar-is-collapsed .oh-nav-link__label, .oh-sidebar-is-collapsed .oh-nav-link__count, .oh-sidebar-is-collapsed .oh-nav-link__chevron, .oh-sidebar-is-collapsed .oh-submenu, .oh-sidebar-is-collapsed .oh-user-copy, .oh-sidebar-is-collapsed .oh-user-link > .oh-icon, .oh-sidebar-is-collapsed .oh-logout span { display: none; }
.oh-sidebar-is-collapsed .oh-nav-link { justify-content: center; padding: 10px 0; min-height: 43px; }
.oh-sidebar-is-collapsed .oh-sidebar-foot { padding: 15px 8px; }
.oh-sidebar-is-collapsed .oh-user-link { justify-content: center; padding: 0; }
.oh-sidebar-is-collapsed .oh-logout { padding: 7px 0; }

/* Optional authentication / production error shells reuse exactly the same controls. */
.oh-auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.oh-auth__visual { display: flex; flex-direction: column; justify-content: space-between; padding: 50px; background: #12393b url('../images/hero-architecture.svg') center/cover; color: #eef7f0; }
.oh-auth__visual h1 { font-size: clamp(36px,4vw,60px); max-width: 520px; }
.oh-auth__visual p { color: #bed2c7; max-width: 410px; font-size: 15px; }
.oh-auth__content { display: grid; place-items: center; padding: 40px; background: var(--oh-surface); }
.oh-auth__card { width: min(100%,380px); }
.oh-auth__card > h2 { font-size: 28px; margin: 12px 0; }
.oh-auth__card > p { color: var(--oh-muted); font-size: 15px; margin-bottom: 30px; }
.oh-error { min-height: 80dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 32px; text-align: center; }
.oh-error__code { font-size: clamp(80px,16vw,180px); font-weight: 800; line-height: 1; letter-spacing: -.08em; color: var(--oh-brand-ink); opacity: .2; }
.oh-error h1 { font-size: 28px; margin: 20px 0 12px; }
.oh-error p { color: var(--oh-muted); max-width: 440px; }

@media (max-width: 1250px) {
  .oh-topbar { gap: 10px; }
  .oh-topbar__date { display: none; }
  .oh-topbar__search { width: 220px; }
  .oh-dashboard-grid { grid-template-columns: minmax(0,1.5fr) minmax(265px,1fr); gap: var(--oh-content-gap); }
}
@media (max-width: 1050px) { .oh-dashboard-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 900px) {
  .oh-sidebar { width: 260px; transform: translateX(-100%); }
  .oh-sidebar[aria-hidden="true"] { visibility: hidden; }
  .oh-sidebar-is-mobile-open .oh-sidebar { transform: translateX(0); visibility: visible; }
  .oh-layout { margin-left: 0; transition: none; }
  .oh-sidebar-toggle { display: none; }
  .oh-mobile-toggle { display: inline-flex; }
  .oh-topbar__search { width: 220px; }
  .oh-auth__visual { padding: 34px; }
}
@media (max-width: 600px) {
  :root { --oh-content-padding: 8px; --oh-content-gap: 10px; }
  .oh-topbar { padding-inline: 8px; gap: 6px; }
  .oh-breadcrumb > a, .oh-breadcrumb > .oh-icon, .oh-breadcrumb > span { display: none; }
  .oh-topbar__right { gap: 5px; }
  .oh-topbar__search { width: 40px; height: 40px; padding: 10px; justify-content: center; border: 0; background: transparent; }
  .oh-topbar__search > span, .oh-topbar__search > kbd, .oh-topbar__separator { display: none; }
  .oh-page-intro { margin-bottom: var(--oh-content-gap); }
  .oh-page-intro h1 { font-size: 21px; }
  .oh-auth { grid-template-columns: 1fr; }
  .oh-auth__visual { min-height: 150px; padding: 25px; }
  .oh-auth__visual > div:not(:first-child), .oh-auth__visual > small { display: none; }
  .oh-auth__content { padding: 35px 25px; }
}
@media print {
  .oh-sidebar, .oh-topbar, .oh-scrim { display: none !important; }
  .oh-layout { margin-left: 0 !important; }
  .oh-content { padding: 0; max-width: none; }
}

/* Local scaffold marker; hidden on compact topbars. */
.oh-scaffold-badge { font-size: 11px; white-space: nowrap; }
@media (max-width: 1250px) { .oh-scaffold-badge { display: none; } }
