
:root {
    --bo-primary: #138a78;
    --bo-primary-strong: #0d6f61;
    --bo-primary-dark: #073e37;
    --bo-sidebar: #082f2b;
    --bo-sidebar-soft: #0d403a;
    --bo-bg: #f6f8fb;
    --bo-surface: #ffffff;
    --bo-surface-soft: #f8fafc;
    --bo-border: #e5e7eb;
    --bo-text: #172033;
    --bo-muted: #718096;
    --bo-danger: #dc2626;
    --bo-radius: 14px;
    --bo-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    --bo-sidebar-width: 276px;
    --bo-sidebar-collapsed: 88px;
    --bo-topbar-height: 76px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bo-bg) !important;
    color: var(--bo-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    -webkit-font-smoothing: antialiased;
}
body.bo-no-scroll { overflow: hidden; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

#mainContent {
    margin-left: var(--bo-sidebar-width) !important;
    min-height: calc(100vh - 64px);
    transition: margin-left .24s ease !important;
}

.bo-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--bo-sidebar-width);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(29, 174, 148, .18), transparent 32%),
        linear-gradient(180deg, #083c35 0%, var(--bo-sidebar) 55%, #062622 100%);
    color: #fff;
    box-shadow: 12px 0 30px rgba(2, 44, 34, .10);
    transition: width .24s ease, transform .24s ease;
    overflow: hidden;
}
.bo-brand {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.bo-brand-link {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none !important;
}
.bo-brand-logo { display: block; max-width: 154px; max-height: 42px; object-fit: contain; }
.bo-brand-mark {
    flex: 0 0 40px;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    font-size: 19px;
}
.bo-brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.bo-icon-btn {
    border: 0; background: transparent; cursor: pointer;
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.bo-sidebar .bo-icon-btn { color: rgba(255,255,255,.75); }
.bo-sidebar .bo-icon-btn:hover { background: rgba(255,255,255,.10); color: #fff; }
.bo-sidebar-close { display: none; }
.bo-sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px 18px;
}
.bo-nav-section { margin-bottom: 14px; }
.bo-nav-label {
    display: block;
    padding: 9px 12px 6px;
    color: rgba(226, 232, 240, .48);
    font-size: 10px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    white-space: nowrap;
}
.bo-nav-item {
    position: relative;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 3px 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(241,245,249,.78) !important;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, transform .16s ease;
    text-align: left;
}
.bo-nav-item > i:first-child {
    flex: 0 0 22px;
    width: 22px;
    text-align: center;
    font-size: 15px;
    color: rgba(153, 246, 228, .72);
}
.bo-nav-item > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-nav-item:hover {
    color: #fff !important;
    background: rgba(255,255,255,.07);
    transform: translateX(1px);
}
.bo-nav-item.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(35, 186, 158, .28), rgba(255,255,255,.08));
    box-shadow: inset 0 0 0 1px rgba(94,234,212,.11);
}
.bo-nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #5eead4;
}
.bo-nav-toggle .bo-chevron {
    margin-left: auto;
    font-size: 10px;
    color: rgba(255,255,255,.45);
    transition: transform .2s ease;
}
.bo-nav-group.open .bo-chevron { transform: rotate(180deg); }
.bo-submenu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .2s ease;
}
.bo-submenu::before { content:""; min-height: 0; }
.bo-nav-group.open .bo-submenu {
    display: block;
}
.bo-nav-group:not(.open) .bo-submenu { display: none; }
.bo-sub-item {
    position: relative;
    display: block;
    margin: 2px 0 2px 38px;
    padding: 8px 11px 8px 18px;
    border-radius: 9px;
    color: rgba(226,232,240,.68) !important;
    font-size: 12.5px;
    text-decoration: none !important;
    transition: all .16s ease;
}
.bo-sub-item::before {
    content: "";
    position: absolute; left: 5px; top: 50%;
    width: 5px; height: 5px; margin-top: -2.5px;
    border-radius: 50%; background: rgba(148,163,184,.55);
}
.bo-sub-item:hover, .bo-sub-item.active {
    color: #fff !important;
    background: rgba(255,255,255,.065);
}
.bo-sub-item.active::before { background: #5eead4; box-shadow: 0 0 0 3px rgba(94,234,212,.10); }
.bo-sidebar-footer {
    padding: 12px 10px 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.bo-sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 10px;
}
.bo-sidebar-user-avatar {
    flex: 0 0 34px; width: 34px; height: 34px;
    display: grid; place-items:center;
    border-radius: 10px;
    background: rgba(255,255,255,.10);
    color: #ccfbf1; font-size: 12px; font-weight: 700;
}
.bo-sidebar-user-copy { min-width:0; display:flex; flex-direction:column; }
.bo-sidebar-user-copy strong {
    max-width: 168px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    font-size: 12.5px; color:#fff; font-weight:600;
}
.bo-sidebar-user-copy span { font-size:10.5px; color:rgba(226,232,240,.48); }
.bo-logout { color: #fecaca !important; }
.bo-logout > i:first-child { color: #fca5a5; }

.bo-topbar {
    min-height: var(--bo-topbar-height);
    position: sticky;
    top: 0;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 26px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 4px 18px rgba(15,23,42,.035);
    backdrop-filter: blur(16px);
}
.bo-topbar-left { display:flex; align-items:center; gap:12px; min-width:0; }
.bo-page-heading { min-width:0; }
.bo-page-eyebrow {
    display:block; color: var(--bo-muted); font-size: 10px;
    font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    margin-bottom: 2px;
}
.bo-page-heading h1 {
    margin:0; color:#18312d; font-size:18px !important; line-height:1.25;
    font-weight:700 !important; letter-spacing:-.02em;
}
.bo-mobile-menu { display:none; color:#475569; }
.bo-mobile-menu:hover { background:#f1f5f9; }
.bo-topbar-actions { display:flex; align-items:center; margin-left:auto; }
.bo-user-box {
    display:flex; align-items:center; gap:10px;
    text-decoration:none !important; color:inherit !important;
    padding:5px 7px 5px 10px;
    border-radius:12px;
    transition: background .16s ease;
}
.bo-user-box:hover { background:#f8fafc; }
.bo-user-copy { display:flex; flex-direction:column; align-items:flex-end; min-width:0; }
.bo-user-copy strong {
    max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:#1f2937; font-size:12.5px; font-weight:650;
}
.bo-user-copy span {
    max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:#94a3b8; font-size:10.5px;
}
.bo-avatar {
    width:36px; height:36px; border-radius:11px; object-fit:cover;
    border:1px solid #e2e8f0; background:#f1f5f9;
}
.bo-avatar-fallback {
    display:grid; place-items:center;
    background:linear-gradient(135deg,#dff7f2,#eefaf8);
    color:var(--bo-primary-strong); font-size:12px; font-weight:700;
}

.bo-app-footer {
    margin-left: var(--bo-sidebar-width);
    min-height: 64px;
    display:flex; align-items:center; justify-content:space-between;
    gap:16px; padding:18px 26px;
    color:#94a3b8; font-size:11.5px;
    border-top:1px solid #e8edf2;
    background:rgba(255,255,255,.55);
    transition: margin-left .24s ease;
}
.bo-app-footer a { color:var(--bo-primary-strong); font-weight:600; text-decoration:none; }
.bo-app-footer a:hover { text-decoration:underline; }

.bo-sidebar-backdrop {
    position:fixed; inset:0; z-index:45;
    background:rgba(15,23,42,.48);
    backdrop-filter: blur(2px);
    opacity:0; visibility:hidden;
    transition:opacity .2s ease, visibility .2s ease;
}

body.bo-sidebar-collapsed .bo-sidebar { width:var(--bo-sidebar-collapsed); }
body.bo-sidebar-collapsed #mainContent,
body.bo-sidebar-collapsed .bo-app-footer { margin-left:var(--bo-sidebar-collapsed) !important; }
body.bo-sidebar-collapsed .bo-brand { padding-left:18px; }
body.bo-sidebar-collapsed .bo-brand-name,
body.bo-sidebar-collapsed .bo-brand-logo,
body.bo-sidebar-collapsed .bo-nav-label,
body.bo-sidebar-collapsed .bo-nav-item > span,
body.bo-sidebar-collapsed .bo-nav-toggle .bo-chevron,
body.bo-sidebar-collapsed .bo-sidebar-user-copy,
body.bo-sidebar-collapsed .bo-submenu { display:none !important; }
body.bo-sidebar-collapsed .bo-brand-link { flex:0 0 auto; }
body.bo-sidebar-collapsed .bo-sidebar-collapse { margin-left:auto; }
body.bo-sidebar-collapsed .bo-nav-item {
    justify-content:center; padding-left:10px; padding-right:10px;
}
body.bo-sidebar-collapsed .bo-nav-item > i:first-child { flex-basis:auto; }

input, select, textarea {
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus {
    outline:none !important;
    border-color:#5ac6b4 !important;
    box-shadow:0 0 0 3px rgba(19,138,120,.11) !important;
}
button, a { transition-property: background-color,color,border-color,box-shadow,transform,opacity; transition-duration:.16s; }
table { border-collapse:separate; border-spacing:0; }
thead th { letter-spacing:.01em; }
tbody tr { transition:background-color .15s ease; }
tbody tr:hover { background:rgba(240,253,250,.55); }
.shadow,.shadow-sm,.shadow-md,.shadow-lg { box-shadow:var(--bo-shadow) !important; }
.bg-white.rounded-lg, .bg-white.rounded-xl {
    border:1px solid rgba(226,232,240,.82);
    box-shadow:var(--bo-shadow) !important;
}
.card-hover { transition:transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform:translateY(-2px); box-shadow:0 16px 34px rgba(15,23,42,.08) !important; }

@media (max-width: 1024px) {
    .bo-user-copy span { display:none; }
}
@media (max-width: 767px) {
    #mainContent { margin-left:0 !important; }
    .bo-app-footer { margin-left:0 !important; padding:16px 18px; flex-direction:column; align-items:flex-start; }
    .bo-sidebar {
        width:min(86vw, 292px) !important;
        transform:translateX(-104%);
        box-shadow:20px 0 45px rgba(2,44,34,.18);
    }
    body.bo-sidebar-mobile-open .bo-sidebar { transform:translateX(0); }
    body.bo-sidebar-mobile-open .bo-sidebar-backdrop { opacity:1; visibility:visible; }
    .bo-sidebar-collapse { display:none; }
    .bo-sidebar-close { display:inline-grid; margin-left:auto; }
    .bo-mobile-menu { display:inline-grid; }
    .bo-topbar { padding:11px 15px; min-height:68px; }
    .bo-page-eyebrow { display:none; }
    .bo-page-heading h1 { font-size:16px !important; }
    .bo-user-copy { display:none; }
    .bo-user-box { padding:4px; }
    main { padding-left:1rem !important; padding-right:1rem !important; }
}
@media (max-width: 480px) {
    .bo-topbar { gap:8px; }
    .bo-page-heading h1 { max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}
