/* aTeam WMS brand theme — matches blue/navy logo */
:root,
.c-app {
    --ateam-navy: #002d52;
    --ateam-navy-deep: #001f3a;
    --ateam-blue: #0a74da;
    --ateam-blue-bright: #00aeef;
    --ateam-blue-dark: #0054a6;
    --ateam-muted: #6b7c93;
    --ateam-surface: #f4f7fb;
    --ateam-white: #ffffff;

    --primary-legacy-theme: #0a74da;
    --primary-dark-theme: #0054a6;
    --primary: #0a74da;
    --secondary: #6b7c93;
    --dark: #002d52;
    --light: #f4f7fb;
    --info: #00aeef;
}

.c-app {
    --primary: #0a74da;
    --secondary: #6b7c93;
    --dark: #002d52;
    --info: #00aeef;
    color: #1e293b;
    background-color: #f4f7fb;
    --color: #1e293b;
}

/* Primary buttons / badges / alerts */
.btn-primary,
.bg-primary,
.badge-primary,
.alert-primary,
.page-item.active .page-link,
.nav-pills .nav-link.active,
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #0a74da !important;
    border-color: #0a74da !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: #0054a6 !important;
    border-color: #0054a6 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #0a74da !important;
    border-color: #0a74da !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #0a74da !important;
    border-color: #0a74da !important;
    color: #ffffff !important;
}

.text-primary,
a.text-primary,
.page-link {
    color: #0a74da !important;
}

a {
    color: #0a74da;
}

a:hover {
    color: #0054a6;
}

/* Sidebar — navy to match logo text */
.c-sidebar.c-sidebar-dark {
    background: #002d52 !important;
}

.c-sidebar-brand {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.65rem 0.85rem;
}

.c-sidebar-brand img.c-sidebar-brand-full {
    max-width: 190px;
    height: auto;
    display: block;
}

/* Sidebar nav — color change on hover only (no purple block) */
.c-sidebar .c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown-toggle {
    color: #c5d4e8 !important;
    background-color: transparent !important;
    border-left: 3px solid transparent;
    transition: color 0.15s ease;
}

.c-sidebar .c-sidebar-nav-link {
    background-image: none !important;
}

.c-sidebar .c-sidebar-nav-link .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon {
    color: #8fa6c4 !important;
}

@media (hover: hover), (-ms-high-contrast: none) {
    .c-sidebar .c-sidebar-nav-link:hover,
    .c-sidebar .c-sidebar-nav-dropdown-toggle:hover,
    .c-sidebar .c-sidebar-nav-link:focus,
    .c-sidebar .c-sidebar-nav-dropdown-toggle:focus {
        color: #00aeef !important;
        background: transparent !important;
        background-color: transparent !important;
        text-decoration: none;
    }

    .c-sidebar .c-sidebar-nav-link:hover {
        background-image: none !important;
    }

    .c-sidebar .c-sidebar-nav-link:hover .c-sidebar-nav-icon,
    .c-sidebar .c-sidebar-nav-dropdown-toggle:hover .c-sidebar-nav-icon,
    .c-sidebar .c-sidebar-nav-link:focus .c-sidebar-nav-icon,
    .c-sidebar .c-sidebar-nav-dropdown-toggle:focus .c-sidebar-nav-icon {
        color: #00aeef !important;
    }

    .c-sidebar .c-sidebar-nav-dropdown-items .c-sidebar-nav-link:hover {
        background: transparent !important;
        background-color: transparent !important;
    }
}

.c-sidebar .c-sidebar-nav-link.c-active,
.c-sidebar .c-sidebar-nav-dropdown-toggle.c-active,
.c-sidebar .c-active.c-sidebar-nav-link,
.c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle {
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    border-left-color: #00aeef;
}

.c-sidebar .c-sidebar-nav-link.c-active .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown-toggle.c-active .c-sidebar-nav-icon,
.c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle .c-sidebar-nav-icon {
    color: #00aeef !important;
}

/* Explicit open/close icons on sidebar dropdowns */
.c-sidebar .c-sidebar-nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    position: relative;
    padding-right: 2rem !important;
}

.c-sidebar .c-sidebar-nav-dropdown-toggle .nav-toggle-icon {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: -0.2rem;
    border-right: 2px solid #c5d4e8;
    border-bottom: 2px solid #c5d4e8;
    transform: rotate(45deg);
    transition: transform 0.2s ease, border-color 0.15s ease;
    pointer-events: none;
}

/* Open (c-show): point up = close */
.c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle .nav-toggle-icon {
    margin-top: 0.05rem;
    border-color: #00aeef;
    transform: rotate(-135deg);
}

.c-sidebar .c-sidebar-nav-dropdown-toggle:hover .nav-toggle-icon {
    border-color: #00aeef;
}

/* Hide CoreUI default ::after so we don't get double icons */
.c-sidebar .c-sidebar-nav-dropdown-toggle::after,
html:not([dir="rtl"]) .c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle::after,
*[dir="rtl"] .c-sidebar .c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle::after {
    display: none !important;
    content: none !important;
    background-image: none !important;
}

/* Ensure closed dropdowns actually collapse (style.css had overflow commented out) */
.c-sidebar .c-sidebar-nav-dropdown-items {
    overflow: hidden;
}

.c-sidebar .c-sidebar-nav-dropdown:not(.c-show) > .c-sidebar-nav-dropdown-items {
    max-height: 0;
}

.c-header {
    border-bottom: 1px solid #e2e8f0;
}

/* Login / auth header strip */
.card .bg-primary,
.card-body .bg-primary,
.p-4.bg-primary {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* Form focus rings */
.form-control:focus,
.custom-select:focus,
.page-link:focus {
    border-color: #0a74da !important;
    box-shadow: 0 0 0 0.2rem rgba(10, 116, 218, 0.25) !important;
}

/* Tables / DataTables accents */
table.dataTable thead th,
.table thead th {
    border-top-color: #e2e8f0;
}

.page-item.active .page-link {
    background-color: #0a74da !important;
    border-color: #0a74da !important;
}

/* Progress / switch accents */
.progress-bar,
.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #0a74da !important;
}

/* Footer */
.c-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    color: #6b7c93;
}

.c-footer a {
    color: #002d52;
}
