/*
  Platinum ERP public documentation - the ONE shared stylesheet. Everything else is Bootstrap 5.3.3 utilities.
  It holds the brand navy surfaces, the sticky table of contents offsets and a dark mode that follows the operating system.
  No page has a <style> block or a style="" attribute.
*/

:root {
    --pl-navy: #1b2a41;
    --pl-navy-deep: #121d2e;
    --pl-accent: #2a78d6;
}

/* 1. Brand surfaces */
.pl-navy { background-color: var(--pl-navy) !important; }
.pl-hero {
    background-color: var(--pl-navy);
    background-image:
        radial-gradient(60rem 22rem at 90% -20%, rgba(42, 120, 214, .45), transparent 65%),
        linear-gradient(180deg, var(--pl-navy) 0%, var(--pl-navy-deep) 100%);
}
.pl-lift { transition: transform .15s ease, box-shadow .15s ease; }
.pl-lift:hover, .pl-lift:focus-within { transform: translateY(-2px); box-shadow: var(--bs-box-shadow) !important; }
@media (prefers-reduced-motion: reduce) {
    .pl-lift, .pl-lift:hover, .pl-lift:focus-within { transition: none; transform: none; }
}

/* 2. The navbar is sticky: anchors and the table of contents stay below it */
html { scroll-padding-top: 5.5rem; }
@media (min-width: 992px) {
    .pl-toc { top: 5rem; z-index: 1; }
    .pl-toc .offcanvas-body { max-height: calc(100vh - 6rem); overflow-y: auto; }
}

/* 3. Dark mode by the system setting (values copied from Bootstrap 5.3.3 [data-bs-theme=dark]) */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bs-body-color: #dee2e6; --bs-body-color-rgb: 222, 226, 230;
        --bs-body-bg: #212529; --bs-body-bg-rgb: 33, 37, 41;
        --bs-emphasis-color: #fff; --bs-emphasis-color-rgb: 255, 255, 255;
        --bs-secondary-color: rgba(222, 226, 230, .75); --bs-secondary-color-rgb: 222, 226, 230;
        --bs-secondary-bg: #343a40; --bs-secondary-bg-rgb: 52, 58, 64;
        --bs-tertiary-color: rgba(222, 226, 230, .5); --bs-tertiary-color-rgb: 222, 226, 230;
        --bs-tertiary-bg: #2b3035; --bs-tertiary-bg-rgb: 43, 48, 53;
        --bs-primary-text-emphasis: #6ea8fe; --bs-secondary-text-emphasis: #a7acb1; --bs-success-text-emphasis: #75b798;
        --bs-info-text-emphasis: #6edff6; --bs-warning-text-emphasis: #ffda6a; --bs-danger-text-emphasis: #ea868f;
        --bs-light-text-emphasis: #f8f9fa; --bs-dark-text-emphasis: #dee2e6;
        --bs-primary-bg-subtle: #031633; --bs-secondary-bg-subtle: #161719; --bs-success-bg-subtle: #051b11;
        --bs-info-bg-subtle: #032830; --bs-warning-bg-subtle: #332701; --bs-danger-bg-subtle: #2c0b0e;
        --bs-light-bg-subtle: #343a40; --bs-dark-bg-subtle: #1a1d20;
        --bs-primary-border-subtle: #084298; --bs-secondary-border-subtle: #41464b; --bs-success-border-subtle: #0f5132;
        --bs-info-border-subtle: #087990; --bs-warning-border-subtle: #997404; --bs-danger-border-subtle: #842029;
        --bs-light-border-subtle: #495057; --bs-dark-border-subtle: #343a40;
        --bs-heading-color: inherit;
        --bs-link-color: #6ea8fe; --bs-link-hover-color: #8bb9fe;
        --bs-link-color-rgb: 110, 168, 254; --bs-link-hover-color-rgb: 139, 185, 254;
        --bs-code-color: #e685b5;
        --bs-highlight-color: #dee2e6; --bs-highlight-bg: #664d03;
        --bs-border-color: #495057; --bs-border-color-translucent: rgba(255, 255, 255, .15);
    }
    .table-light {
        --bs-table-color: #fff; --bs-table-bg: #2b3035; --bs-table-border-color: #495057;
        --bs-table-striped-bg: #343a40; --bs-table-striped-color: #fff;
        --bs-table-active-bg: #3d4247; --bs-table-active-color: #fff;
        --bs-table-hover-bg: #383d42; --bs-table-hover-color: #fff;
        color: var(--bs-table-color); border-color: var(--bs-table-border-color);
    }
    main .text-bg-light { color: #fff !important; background-color: #343a40 !important; }
    main .border-light { border-color: var(--bs-body-bg) !important; }
    main .btn-light {
        --bs-btn-color: #dee2e6; --bs-btn-bg: #343a40; --bs-btn-border-color: #495057;
        --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #3d4247; --bs-btn-hover-border-color: #6c757d;
    }
    .offcanvas .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
    .accordion {
        --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
        --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236ea8fe' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
    }
}
