/*
 * Pack & Track Couriers — console branding.
 *
 * The admin template ships in its own bright blue (#0f9cf3), which appears on
 * roughly a hundred rules across bootstrap.css and app.css. Rather than edit
 * the vendor stylesheets — where the change would be invisible and would be
 * lost the moment they were replaced — this file is loaded after them and
 * restates the rules that carry a brand colour.
 *
 * The palette is sampled from the logo: the mark is #65000a artwork on an
 * #efeef4 ground. #600008 is the value the Flutter app and the sign-in page
 * already use, so the console, the phone and the login screen carry one
 * colour between them.
 */

:root {
    --pt-brand: #600008;
    --pt-brand-dark: #4d0006;
    --pt-brand-light: #8c1220;

    /* The wash behind a selected row or an active menu item. */
    --pt-tint: #f6edee;
    --pt-tint-ink: #8c2230;

    /* The page ground, a shade off white so cards read as raised. */
    --pt-ground: #f7f4f4;

    --bs-primary: #600008;
    --bs-primary-rgb: 96, 0, 8;
    --bs-link-color: #600008;
    --bs-link-hover-color: #4d0006;
}

/* ---------------------------------------------------------------- surfaces */

body {
    background-color: var(--pt-ground);
}

/*
 * The topbar is light. The logo is dark artwork on a near-white ground, so on
 * a coloured bar it would sit in a white box of its own and read as a sticker
 * rather than as a mark.
 */
#page-topbar {
    background-color: #fff;
    box-shadow: 0 1px 0 rgba(96, 0, 8, .08);
}

.navbar-brand-box {
    background-color: #fff;
}

.navbar-brand-box .logo-txt {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--pt-brand);
    white-space: nowrap;
}

/* ---------------------------------------------------------------- sidebar */

.vertical-menu {
    border-right: 1px solid rgba(96, 0, 8, .07);
}

#sidebar-menu ul li a:hover {
    color: var(--pt-brand);
}

#sidebar-menu ul li a:hover i {
    color: var(--pt-brand);
}

/*
 * The current page. The template marks it with colour alone; the tinted plate
 * and the bar make it findable without relying on the reader telling maroon
 * from near-black at 13px.
 */
#sidebar-menu ul li a.active,
.mm-active,
.mm-active > a,
.mm-active > a i,
.mm-active > i,
.mm-active .active,
.mm-active .active i {
    color: var(--pt-brand) !important;
}

#sidebar-menu ul li a.active,
.mm-active > a {
    background-color: var(--pt-tint);
    border-right: 3px solid var(--pt-brand);
    font-weight: 600;
}

.menu-title {
    color: var(--pt-tint-ink);
    letter-spacing: .06em;
}

/* ---------------------------------------------------------------- buttons */

.btn-primary,
.btn-info {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:first-child:active,
.btn-check:checked + .btn-primary,
.show > .btn-primary.dropdown-toggle,
.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: var(--pt-brand-dark) !important;
    border-color: var(--pt-brand-dark) !important;
    color: #fff !important;
}

.btn-primary:focus,
.btn-info:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 .15rem rgba(96, 0, 8, .25) !important;
}

.btn-primary.disabled,
.btn-primary:disabled {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
    opacity: .5;
}

.btn-outline-primary {
    color: var(--pt-brand);
    border-color: var(--pt-brand);
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
    color: #fff;
}

.btn-soft-primary {
    background-color: var(--pt-tint);
    color: var(--pt-brand);
}

/* ------------------------------------------------------------------ text */

a {
    color: var(--pt-brand);
}

a:hover {
    color: var(--pt-brand-dark);
}

.text-primary {
    color: var(--pt-brand) !important;
}

.bg-primary {
    background-color: var(--pt-brand) !important;
}

.badge.bg-primary,
.badge.bg-info {
    background-color: var(--pt-brand) !important;
}

.bg-soft-primary {
    background-color: var(--pt-tint) !important;
    color: var(--pt-brand) !important;
}

.border-primary {
    border-color: var(--pt-brand) !important;
}

/* The page heading rule the template draws under section titles. */
.page-title-box h4,
.page-title-box .page-title {
    color: #1a1416;
}

/* --------------------------------------------------------------- controls */

.form-control:focus,
.form-select:focus {
    border-color: var(--pt-brand-light);
    box-shadow: 0 0 0 .15rem rgba(96, 0, 8, .12);
}

.form-check-input:checked {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
}

.form-check-input:focus {
    border-color: var(--pt-brand-light);
    box-shadow: 0 0 0 .15rem rgba(96, 0, 8, .12);
}

/* ------------------------------------------------------- tabs, pagination */

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--pt-brand);
    color: #fff;
}

.nav-pills .nav-link {
    color: var(--pt-tint-ink);
}

.nav-tabs-custom .nav-item .nav-link.active {
    color: var(--pt-brand);
}

.nav-tabs-custom .nav-item .nav-link::after {
    background: var(--pt-brand);
}

.page-item.active .page-link {
    background-color: var(--pt-brand);
    border-color: var(--pt-brand);
}

.page-link {
    color: var(--pt-brand);
}

.page-link:hover {
    color: var(--pt-brand-dark);
    background-color: var(--pt-tint);
}

/* ------------------------------------------------------------------ table */

.table > :not(caption) > * > * {
    /* The template's table borders are a cool grey against a warm ground. */
    border-bottom-color: rgba(96, 0, 8, .06);
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--pt-tint);
}

.table-light,
.table > thead {
    color: var(--pt-tint-ink);
}

/* ------------------------------------------------------------ odds & ends */

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--pt-tint);
    color: var(--pt-brand);
}

.spinner-border.text-primary,
.spinner-grow.text-primary {
    color: var(--pt-brand) !important;
}

.progress-bar {
    background-color: var(--pt-brand);
}

.alert-primary {
    background-color: var(--pt-tint);
    border-color: rgba(96, 0, 8, .18);
    color: var(--pt-brand);
}

::selection {
    background: var(--pt-tint);
    color: var(--pt-brand);
}
