/*
 * WMS theme - P Mohan & Associates LLP
 * Loaded after bootstrap.min.css, sb-admin-2.css, metisMenu and font-awesome
 * (includes/header.php, pages/login.php). Overrides only; no page markup depends on it.
 */

/* ---------- Font (Inter, bundled locally; falls back to system UI fonts) ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../fonts/inter/Inter-Variable-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
    --wms-navy:        #174c7a;
    --wms-navy-dark:   #113a5e;
    --wms-navy-50:     #eaf1f8;
    --wms-navy-100:    #d4e3f1;
    --wms-ink:         #1e293b;
    --wms-ink-2:       #475569;
    --wms-muted:       #64748b;
    --wms-line:        #e2e8f0;
    --wms-line-2:      #eef2f6;
    --wms-bg:          #f3f5f8;
    --wms-card:        #ffffff;
    --wms-green:       #1a7f55;
    --wms-amber:       #b7791f;
    --wms-red:         #c0392b;
    --wms-sky:         #2f6fa3;
    --wms-radius:      8px;
    --wms-shadow:      0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
    --wms-shadow-lg:   0 10px 30px rgba(16, 24, 40, .12);
    --wms-topbar-h:    56px;
    --wms-sidebar-w:   232px;
}

/* ---------- Base ---------- */
html, body {
    background: var(--wms-bg);
}
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--wms-ink);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--wms-navy); }
a:hover, a:focus { color: var(--wms-navy-dark); }
h1, h2, h3, h4, h5, h6 { font-family: inherit; color: var(--wms-ink); font-weight: 600; letter-spacing: -.01em; }
strong, b { font-weight: 600; }
.text-muted { color: var(--wms-muted); }

/* ---------- Top bar ---------- */
.navbar.wms-topbar {
    background: var(--wms-navy);
    border: 0;
    border-radius: 0;
    min-height: var(--wms-topbar-h);
    margin-bottom: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 2px 8px rgba(16, 24, 40, .10);
    position: relative;
    z-index: 1030;
}
.wms-topbar .navbar-header { min-height: var(--wms-topbar-h); }
.wms-topbar .navbar-brand.wms-brand {
    height: var(--wms-topbar-h);
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.wms-topbar .navbar-brand.wms-brand:hover,
.wms-topbar .navbar-brand.wms-brand:focus { color: #fff; }
.wms-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    flex: 0 0 auto;
}
.wms-brand-name { white-space: nowrap; }
.wms-branch {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #e6eef6;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .01em;
    white-space: nowrap;
}
/* Branch switcher (header.php): shown instead of the plain pill when the user has more than one branch */
.wms-branch-switch {
    float: left;
    height: var(--wms-topbar-h);
    display: flex;
    align-items: center;
    margin-left: -10px;
}
.wms-branch-switch .wms-branch-toggle {
    cursor: pointer;
    text-decoration: none;
    padding: 3px 10px 3px 9px;
    transition: background .15s ease, border-color .15s ease;
}
.wms-branch-switch .wms-branch-toggle .fa-angle-down { margin-left: 2px; opacity: .8; }
.wms-branch-switch .wms-branch-toggle:hover,
.wms-branch-switch .wms-branch-toggle:focus,
.wms-branch-switch.open .wms-branch-toggle {
    background: rgba(255, 255, 255, .24);
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}
.wms-branch-menu {
    min-width: 220px;
    margin-top: 2px;
    padding: 6px 0;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
}
.wms-branch-menu .dropdown-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7a90;
    padding: 4px 16px 6px;
}
.wms-branch-menu > li > a {
    padding: 8px 16px;
    font-size: 13.5px;
    color: #1f2937;
}
.wms-branch-menu > li > a small {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #eef2f7;
    color: #5b6b80;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.wms-branch-menu > li > a .fa { color: #9aa8bb; }
.wms-branch-menu > li.active > a,
.wms-branch-menu > li.active > a:hover,
.wms-branch-menu > li.active > a:focus {
    background: #eef4fa;
    color: var(--wms-navy);
    font-weight: 600;
}
.wms-branch-menu > li.active > a .fa { color: var(--wms-navy); }
.wms-branch-menu > li > a.is-switching { opacity: .6; pointer-events: none; }
.wms-topbar .navbar-toggle {
    margin-top: 11px;
    border-color: rgba(255, 255, 255, .35);
}
.wms-topbar .navbar-toggle .icon-bar { background: #fff; }
.wms-topbar .navbar-toggle:hover,
.wms-topbar .navbar-toggle:focus { background: rgba(255, 255, 255, .12); }

.wms-topbar .navbar-top-links { margin-right: 8px; }
.wms-topbar .navbar-top-links > li > a.wms-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--wms-topbar-h);
    padding: 8px 14px;
    color: #fff;
}
.wms-topbar .navbar-top-links > li > a.wms-user:hover,
.wms-topbar .navbar-top-links > li > a.wms-user:focus,
.wms-topbar .navbar-top-links > li.open > a.wms-user {
    background: rgba(255, 255, 255, .10);
    color: #fff;
}
.wms-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    flex: 0 0 auto;
}
.wms-user-meta { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.wms-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.wms-user-role { font-size: 11.5px; color: #c9d8e6; white-space: nowrap; }
.wms-user .fa-angle-down { color: #c9d8e6; }

.dropdown-menu {
    border: 1px solid var(--wms-line);
    border-radius: 10px;
    box-shadow: var(--wms-shadow-lg);
    padding: 6px;
    font-size: 13px;
}
.dropdown-menu > li > a {
    border-radius: 6px;
    padding: 7px 12px !important;
    color: var(--wms-ink-2);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background: var(--wms-navy-50); color: var(--wms-navy); }
.dropdown-menu > li > a .fa { color: var(--wms-muted); margin-right: 4px; }
.dropdown-menu .divider { margin: 6px 0; background: var(--wms-line-2); }
.dropdown-header.wms-dropdown-header {
    padding: 8px 12px 6px;
    font-size: 12px;
    color: var(--wms-muted);
    white-space: normal;
}
.dropdown-header.wms-dropdown-header strong { display: block; color: var(--wms-ink); font-size: 13px; }

/* ---------- Sidebar ---------- */
.wms-topbar .sidebar {
    background: var(--wms-card);
    border-right: 1px solid var(--wms-line);
}
.sidebar ul li { border-bottom: 0; }
.sidebar .sidebar-nav { padding: 12px 0 24px; }
.sidebar-section {
    padding: 14px 20px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
}
#side-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 10px;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--wms-ink-2);
    font-weight: 500;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background-color .12s ease, color .12s ease;
}
#side-menu > li > a > .fa:first-child {
    width: 18px;
    text-align: center;
    color: #8a9bb0;
    font-size: 14px;
}
#side-menu > li > a:hover,
#side-menu > li > a:focus {
    background: #f1f5f9;
    color: var(--wms-ink);
}
#side-menu > li > a:hover > .fa:first-child { color: var(--wms-navy); }
#side-menu > li > a.active,
#side-menu > li.active > a {
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    font-weight: 600;
    border-left-color: var(--wms-navy);
}
#side-menu > li > a.active > .fa:first-child,
#side-menu > li.active > a > .fa:first-child { color: var(--wms-navy); }
.sidebar .arrow { margin-left: auto; float: none; }
.sidebar .nav-second-level { padding: 2px 0 6px; }
.sidebar .nav-second-level li a {
    margin: 0 10px 0 22px;
    padding: 7px 12px 7px 26px !important;
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--wms-muted);
}
.sidebar .nav-second-level li a:hover { background: #f1f5f9; color: var(--wms-ink); }
.sidebar .nav-second-level li a.active { background: var(--wms-navy-50); color: var(--wms-navy); font-weight: 600; }
.sidebar .nav-second-level li a .fa { color: #9aa9bb; margin-right: 4px; }

@media (min-width: 768px) {
    /* Keep the top bar in view; the sidebar is fixed just below it. */
    .navbar.wms-topbar { position: sticky; top: 0; }
    .wms-topbar .sidebar {
        position: fixed;
        top: var(--wms-topbar-h);
        bottom: 0;
        left: 0;
        width: var(--wms-sidebar-w);
        margin-top: 0;
        overflow-y: auto;
        z-index: 1020;
    }
    #page-wrapper {
        margin-left: var(--wms-sidebar-w);
        padding: 8px 28px 32px;
        border-left: 0;
    }
}
@media (max-width: 767px) {
    .wms-brand-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
    .wms-branch-switch { margin-left: -12px; }
    .wms-branch-switch .wms-branch-toggle { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
    .wms-branch-menu { left: 0; right: auto; }
    .wms-user-meta { display: none; }
    .wms-topbar .navbar-top-links { position: absolute; top: 0; right: 56px; }
    .wms-topbar .sidebar { border-right: 0; border-top: 1px solid rgba(255, 255, 255, .15); }
}

/* ---------- Page wrapper & headings ---------- */
#page-wrapper {
    background: transparent;
}
.page-header {
    margin: 22px 0 18px;
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--wms-ink);
}

/* ---------- Cards (Bootstrap panels) ---------- */
.panel {
    border: 1px solid var(--wms-line);
    border-radius: var(--wms-radius);
    box-shadow: var(--wms-shadow);
    background: var(--wms-card);
    margin-bottom: 20px;
}
.panel > .panel-heading,
.panel-default > .panel-heading {
    background: var(--wms-card);
    color: var(--wms-ink);
    border-color: var(--wms-line-2);
    border-top-left-radius: calc(var(--wms-radius) - 1px);
    border-top-right-radius: calc(var(--wms-radius) - 1px);
    padding: 12px 16px;
    font-size: 13.5px;
}
.panel > .panel-heading + .panel-heading { border-radius: 0; padding-top: 10px; }
.panel > .panel-heading strong { font-size: 15px; font-weight: 600; }
.panel-title { font-size: 15px; font-weight: 600; }
.panel-body { padding: 16px; }
.panel-footer {
    background: #f8fafc;
    border-top-color: var(--wms-line-2);
    border-bottom-left-radius: calc(var(--wms-radius) - 1px);
    border-bottom-right-radius: calc(var(--wms-radius) - 1px);
}
.panel-group .panel { border-radius: var(--wms-radius); }
.panel-group .panel + .panel { margin-top: 10px; }
.panel .panel { box-shadow: none; }

/* Dashboard KPI tiles (panel-primary / green / yellow / red with .huge) */
.panel-primary  { border-color: var(--wms-navy); }
.panel-primary  > .panel-heading { background: var(--wms-navy);  border-color: var(--wms-navy);  color: #fff; }
.panel-green    { border-color: var(--wms-green); }
.panel-green    > .panel-heading { background: var(--wms-green); border-color: var(--wms-green); color: #fff; }
.panel-green a  { color: var(--wms-green); }
.panel-yellow   { border-color: var(--wms-amber); }
.panel-yellow   > .panel-heading { background: var(--wms-amber); border-color: var(--wms-amber); color: #fff; }
.panel-yellow a { color: var(--wms-amber); }
.panel-red      { border-color: var(--wms-red); }
.panel-red      > .panel-heading { background: var(--wms-red);   border-color: var(--wms-red);   color: #fff; }
.panel-red a    { color: var(--wms-red); }
.panel-primary > .panel-heading,
.panel-green > .panel-heading,
.panel-yellow > .panel-heading,
.panel-red > .panel-heading { padding: 16px 18px; }
.panel-primary > .panel-heading .fa-5x,
.panel-green > .panel-heading .fa-5x,
.panel-yellow > .panel-heading .fa-5x,
.panel-red > .panel-heading .fa-5x { font-size: 3.2em; opacity: .55; }
.huge { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.panel-primary > a .panel-footer,
.panel-green > a .panel-footer,
.panel-yellow > a .panel-footer,
.panel-red > a .panel-footer { font-weight: 500; font-size: 12.5px; background: #fff; }

/* Accordion headers used on Reports */
.panel-group .panel-heading h4.panel-title > a { display: block; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    padding: 7px 14px;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
    box-shadow: none;
}
.btn:focus, .btn:active:focus, .btn.active:focus { outline: 0; box-shadow: 0 0 0 3px rgba(23, 76, 122, .22); }
.btn-lg { padding: 10px 18px; font-size: 14.5px; border-radius: 8px; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; border-radius: 5px; }

.btn-default { background: #fff; border-color: #d5dde7; color: var(--wms-ink-2); }
.btn-default:hover, .btn-default:focus { background: #f8fafc; border-color: #c3cdda; color: var(--wms-ink); }

.btn-primary { background: var(--wms-navy); border-color: var(--wms-navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active { background: var(--wms-navy-dark); border-color: var(--wms-navy-dark); color: #fff; }

.btn-info { background: var(--wms-sky); border-color: var(--wms-sky); color: #fff; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background: #265d8a; border-color: #265d8a; color: #fff; }

.btn-success { background: var(--wms-green); border-color: var(--wms-green); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background: #146645; border-color: #146645; color: #fff; }

.btn-warning { background: #d38b16; border-color: #d38b16; color: #fff; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: #b5760f; border-color: #b5760f; color: #fff; }

.btn-danger { background: var(--wms-red); border-color: var(--wms-red); color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: #a02f23; border-color: #a02f23; color: #fff; }

.btn-outline { background: #fff; }
.btn-primary.btn-outline { color: var(--wms-navy); }
.btn-success.btn-outline { color: var(--wms-green); }
.btn-info.btn-outline    { color: var(--wms-sky); }
.btn-warning.btn-outline { color: #b5760f; }
.btn-danger.btn-outline  { color: var(--wms-red); }
.btn-primary.btn-outline:hover { background: var(--wms-navy); color: #fff; }
.btn-success.btn-outline:hover { background: var(--wms-green); color: #fff; }
.btn-info.btn-outline:hover    { background: var(--wms-sky); color: #fff; }
.btn-warning.btn-outline:hover { background: #d38b16; color: #fff; }
.btn-danger.btn-outline:hover  { background: var(--wms-red); color: #fff; }

/* "Add New ..." full-width buttons inside panel headings */
.panel-heading > .btn-block,
.panel-heading > a.btn-block { padding: 9px 14px; font-weight: 600; }
.btn .fa { margin-right: 2px; }
.btn.disabled, .btn[disabled] { opacity: .5; }

/* ---------- Forms ---------- */
label { font-weight: 500; font-size: 12.5px; color: var(--wms-ink-2); margin-bottom: 5px; }
.form-group { margin-bottom: 14px; }
.form-control {
    height: 36px;
    padding: 7px 11px;
    font-size: 13.5px;
    color: var(--wms-ink);
    border: 1px solid #d5dde7;
    border-radius: 6px;
    box-shadow: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
textarea.form-control { height: auto; }
select.form-control { padding: 6px 9px; }
.form-control:focus {
    border-color: var(--wms-navy);
    box-shadow: 0 0 0 3px rgba(23, 76, 122, .15);
}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
    background: #f4f6f9;
    color: var(--wms-muted);
}
.form-control::-webkit-input-placeholder { color: #9aa7b6; }
.form-control::placeholder { color: #9aa7b6; }
.input-group-addon { border-color: #d5dde7; background: #f8fafc; border-radius: 6px; }
.has-success .form-control, .has-error .form-control { border-color: #d5dde7; box-shadow: none; }
.has-success label, .has-error label { color: var(--wms-ink-2); }
.checkbox label, .radio label { font-weight: 400; font-size: 13px; }

/* ---------- Tables ---------- */
.table { margin-bottom: 0; color: var(--wms-ink); }
.table > thead > tr > th {
    background: #f6f8fb;
    color: var(--wms-ink-2);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--wms-line) !important;
    white-space: nowrap;
    vertical-align: middle;
    padding: 9px 10px;
}
.table > tbody > tr > td,
.table > tbody > tr > th {
    padding: 8px 10px;
    border-top: 1px solid var(--wms-line-2);
    vertical-align: middle;
}
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tbody > tr > th { border-color: var(--wms-line-2); }
.table-bordered { border-radius: var(--wms-radius); border-color: var(--wms-line); }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fbfcfd; }
.table-hover > tbody > tr:hover { background: #f1f6fb; }
.dataTable_wrapper { overflow-x: auto; }
.tablesorter-header { cursor: pointer; }

/* jQuery DataTables controls — overrides the stock jquery.dataTables.min.css theme
   (gradients, #111 borders, PNG sort icons) so it matches the rest of the app. */
.dataTables_wrapper { padding-top: 2px; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d5dde7;
    border-radius: 6px;
    padding: 5px 9px;
    margin-left: 6px;
    height: 32px;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { color: var(--wms-muted) !important; font-size: 12.5px; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--wms-ink-2) !important;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border: 1px solid var(--wms-line) !important;
    background: #f1f6fb !important;
    color: var(--wms-ink) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--wms-navy) !important;
    border-color: var(--wms-navy) !important;
    color: #fff !important;
    border-radius: 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--wms-muted) !important;
}
table.dataTable thead th,
table.dataTable thead td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--wms-line) !important;
}
table.dataTable.no-footer { border-bottom: 1px solid var(--wms-line); }
table.dataTable tbody th,
table.dataTable tbody td { padding: 8px 10px; }
table.dataTable.row-border tbody th,
table.dataTable.row-border tbody td,
table.dataTable.display tbody th,
table.dataTable.display tbody td,
table.dataTable.cell-border tbody th,
table.dataTable.cell-border tbody td { border-top: 1px solid var(--wms-line-2) !important; }
/* Kill the stock sort_*.png icons and draw lightweight CSS carets instead */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    background-image: none !important;
    position: relative;
    padding-right: 18px !important;
}
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    font-family: FontAwesome;
    font-weight: normal;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    opacity: .35;
}
table.dataTable thead .sorting::after { content: "\f0dc"; }
table.dataTable thead .sorting_asc::after { content: "\f0de"; opacity: .7; }
table.dataTable thead .sorting_desc::after { content: "\f0dd"; opacity: .7; }

/* ---------- Alerts, labels, badges ---------- */
.alert { border-radius: 8px; border-width: 1px; padding: 11px 14px; font-size: 13px; }
.alert-success { background: #ecfdf3; border-color: #b7ebc9; color: #146645; }
.alert-danger  { background: #fef2f2; border-color: #f5c2c2; color: #9b2c22; }
.alert-warning { background: #fffbeb; border-color: #f3dfa2; color: #8a5a0b; }
.alert-info    { background: var(--wms-navy-50); border-color: var(--wms-navy-100); color: var(--wms-navy-dark); }
.label { border-radius: 999px; font-weight: 600; padding: .25em .65em; font-size: 10.5px; letter-spacing: .02em; }
.label-danger  { background: var(--wms-red); }
.label-success { background: var(--wms-green); }
.label-primary { background: var(--wms-navy); }

/* ---------- Tabs ---------- */
.nav-tabs { border-bottom: 1px solid var(--wms-line); }
.nav-tabs > li > a { border-radius: 6px 6px 0 0; color: var(--wms-muted); font-weight: 500; }
.nav-tabs > li > a:hover { background: #f4f7fa; border-color: transparent; color: var(--wms-ink); }
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus { color: var(--wms-navy); font-weight: 600; border-color: var(--wms-line) var(--wms-line) transparent; }

/* ---------- Modals ---------- */
.modal-content { border: 0; border-radius: 12px; box-shadow: var(--wms-shadow-lg); }
.modal-header { border-bottom-color: var(--wms-line-2); }
.modal-footer { border-top-color: var(--wms-line-2); }
.modal-backdrop.in { opacity: .45; }

/* ---------- Work details wizard (addwork.php) ---------- */
#page-wrapper .bs-wizard > .bs-wizard-step .bs-wizard-stepnum { color: var(--wms-ink-2); font-size: 11.5px; font-weight: 600; }
#page-wrapper .bs-wizard > .bs-wizard-step > .progress { background: var(--wms-line); }
#page-wrapper .bs-wizard > .bs-wizard-step > .progress > .progress-bar { background: var(--wms-navy-100); }
#page-wrapper .bs-wizard > .bs-wizard-step > .bs-wizard-dot { background: var(--wms-navy-100); }
#page-wrapper .bs-wizard > .bs-wizard-step > .bs-wizard-dot:after { background: var(--wms-navy); }
#page-wrapper .bs-wizard > .bs-wizard-step.complete > .bs-wizard-dot { background: #cdebdc; }
#page-wrapper .bs-wizard > .bs-wizard-step.complete > .bs-wizard-dot:after { background: var(--wms-green); }
#page-wrapper .bs-wizard > .bs-wizard-step.disabled > .bs-wizard-dot { background: #eef2f6; }

/* ---------- Misc widgets ---------- */
.popover { border-radius: 8px; border-color: var(--wms-line); box-shadow: var(--wms-shadow-lg); font-family: inherit; }
.datepicker.dropdown-menu { padding: 8px; }
.datepicker table tr td.active,
.datepicker table tr td.active:hover { background: var(--wms-navy) !important; background-image: none !important; color: #fff; }
.chosen-container .chosen-choices { border-radius: 6px; border-color: #d5dde7; background-image: none; }
.blockUI.blockMsg { border: 0 !important; border-radius: 10px; box-shadow: var(--wms-shadow-lg); padding: 14px !important; font-family: inherit; }

/* ---------- Page header + sectioned forms (e.g. addclients.php) ---------- */
.wms-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 22px 0 18px;
}
.wms-page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.02em; }
.wms-page-sub { margin: 0; color: var(--wms-muted); font-size: 13.5px; }
.wms-page-sub .label { vertical-align: 1px; margin-left: 4px; }
.wms-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wms-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
}
.req { color: var(--wms-red); font-weight: 600; }
.one-of { color: var(--wms-amber); font-weight: 700; }

.wms-section { margin-bottom: 16px; }
.wms-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wms-line-2);
}
.wms-section-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.wms-section-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--wms-muted); }
.wms-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: 0 0 auto;
}
.wms-section > .panel-body { padding: 18px 18px 4px; }

/* Form grid: fields flow into equal columns, so no row is left half empty.
   Bootstrap .row/.col-* markup stays in place for narrow screens. */
@media (min-width: 992px) {
    .wms-grid { display: grid; column-gap: 20px; align-items: start; }
    .wms-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wms-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .wms-grid > .row { display: contents; }
    .wms-grid::before,
    .wms-grid::after,
    .wms-grid > .row::before,
    .wms-grid > .row::after { display: none; }
    .wms-grid > .row > [class*="col-"] { float: none; width: auto; min-width: 0; padding: 0; }
    .wms-grid .wms-span-2 { grid-column: span 2; }
    .wms-grid .wms-span-full { grid-column: 1 / -1; }
    .wms-grid .wms-grid-last { order: 1; }
}
.wms-name-pair { display: flex; gap: 8px; }
.wms-name-pair > select { flex: 0 0 84px; }
.wms-name-pair > input { flex: 1 1 auto; min-width: 0; }
.wms-form .help-block { margin: 4px 0 0; font-size: 11.5px; color: #94a3b8; }
.wms-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-weight: 400;
    font-size: 12px;
    color: var(--wms-muted);
    cursor: pointer;
}
.wms-inline-check input { margin: 0; }
.wms-checkbox-field {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
    font-weight: 400;
    font-size: 13px;
    color: var(--wms-ink-2);
    cursor: pointer;
}
.wms-checkbox-field input { margin: 0; }
.wms-upper { text-transform: uppercase; }
.wms-upper::placeholder { text-transform: none; }
.wms-form .chosen-container { width: 100% !important; }
.wms-form .chosen-container-multi .chosen-choices {
    min-height: 36px;
    padding: 3px 6px;
    border: 1px solid #d5dde7;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}
.wms-form .chosen-container-multi .chosen-choices li.search-choice {
    background: var(--wms-navy-50);
    border: 1px solid var(--wms-navy-100);
    border-radius: 999px;
    box-shadow: none;
    color: var(--wms-navy);
    padding: 3px 20px 3px 9px;
    margin: 3px 4px 3px 0;
    font-size: 12px;
}
.wms-form .chosen-container-active .chosen-choices { border-color: var(--wms-navy); box-shadow: 0 0 0 3px rgba(23, 76, 122, .15); }

.wms-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px -28px 0;
    padding: 12px 28px;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--wms-line);
    box-shadow: 0 -4px 14px rgba(16, 24, 40, .06);
}
.wms-actionbar-note { font-size: 12.5px; color: var(--wms-muted); }
.wms-actionbar-buttons { display: flex; gap: 8px; margin-left: auto; }
.wms-actionbar-buttons .btn { min-width: 110px; }
/* Card variant: sits in the column like a section card instead of spanning the page */
.wms-actionbar.wms-actionbar-card {
    bottom: 12px;
    margin: 0 0 16px;
    padding: 12px 18px;
    border: 1px solid var(--wms-line);
    border-radius: var(--wms-radius);
    background: var(--wms-card);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .10);
}
.wms-modal-msg { margin: 10px 0 6px; font-size: 12.5px; color: var(--wms-green); }
@media (max-width: 767px) {
    .wms-actionbar { margin: 4px -15px 0; padding: 10px 15px; }
    .wms-actionbar-note { display: none; }
    .wms-page-actions .btn { flex: 1 1 auto; }
}

.wms-settings-narrow { max-width: 460px; }
.wms-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- List pages: toolbar, search, switch, list table (e.g. clients.php) ---------- */
.wms-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wms-list-card { overflow: visible; }
.wms-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wms-line-2);
}
.wms-toolbar-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-left: auto; }
.wms-toolbar-filters select.form-control { width: auto; min-width: 160px; }
.wms-search { position: relative; flex: 1 1 320px; max-width: 520px; }
.wms-search > .fa { position: absolute; left: 12px; top: 50%; margin-top: -7px; color: #94a3b8; pointer-events: none; }
.wms-search .form-control { padding-left: 34px; padding-right: 34px; height: 38px; }
.wms-search-sm { max-width: none; margin: 4px 0 12px; }
.wms-search-sm .form-control { height: 34px; }
.wms-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    margin-top: -13px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
}
.wms-search-clear:hover { background: #eef2f6; color: var(--wms-ink); }

.wms-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--wms-ink-2); user-select: none; }
.wms-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wms-switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background-color .15s ease; flex: 0 0 auto; }
.wms-switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.wms-switch input:checked + .wms-switch-track { background: var(--wms-navy); }
.wms-switch input:checked + .wms-switch-track .wms-switch-thumb { transform: translateX(14px); }
.wms-switch input:focus + .wms-switch-track { box-shadow: 0 0 0 3px rgba(23, 76, 122, .2); }

.wms-table-wrap { overflow-x: auto; }
.wms-table-wrap .table { margin-bottom: 0; }

.wms-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--wms-line); }
.wms-pager-info { color: var(--wms-muted); font-size: 13px; }
.wms-pager .btn[disabled] { opacity: .45; }
.wms-client-table > thead > tr > th:first-child,
.wms-client-table > tbody > tr > td:first-child { padding-left: 16px; }
.wms-client-table > thead > tr > th:last-child,
.wms-client-table > tbody > tr > td:last-child { padding-right: 16px; }
.wms-client-table > tbody > tr > td { padding-top: 10px; padding-bottom: 10px; }
.wms-col-sl { width: 44px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.wms-col-client { min-width: 220px; }
.wms-col-contact { max-width: 240px; }
.wms-client-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 600; }
.wms-client-name > a:not(.wms-icon-link) { color: var(--wms-ink); }
.wms-client-name > a:not(.wms-icon-link):hover { color: var(--wms-navy); text-decoration: none; }
.wms-sub { color: var(--wms-muted); font-size: 12px; margin-top: 1px; }
.wms-col-contact .fa { width: 14px; color: #94a3b8; }
.wms-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.wms-nowrap { white-space: nowrap; }
.wms-mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; }
.wms-type {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--wms-ink-2);
    font-size: 11.5px;
    font-weight: 600;
}
.wms-work-fy { color: var(--wms-red); font-weight: 700; white-space: nowrap; }
/* Work-stage pill (7-stage workflow) - dot + colored text/background, used on the
   dashboard "View Details" modals wherever a work's current stage is shown. */
.wms-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.wms-stage:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.wms-stage-pending  { background: #f1f5f9; color: var(--wms-ink-2); }
.wms-stage-progress { background: #fdf3e0; color: var(--wms-amber); }
.wms-stage-review   { background: var(--wms-navy-50); color: var(--wms-navy); }
.wms-stage-done     { background: #e7f6ee; color: var(--wms-green); }
.wms-stage-danger   { background: #fdecec; color: var(--wms-red); }
/* ---------- Client/partner search-as-you-type suggestion dropdown ---------- */
.wms-suggest-wrap { position: relative; }
.wms-suggest-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 1000; margin: 4px 0 0; padding: 0;
    list-style: none; background: var(--wms-card); border: 1px solid var(--wms-line); border-radius: var(--wms-radius);
    box-shadow: var(--wms-shadow-lg); max-height: 320px; overflow-y: auto;
}
.wms-suggest-list .wms-suggest-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--wms-line-2); }
.wms-suggest-list .wms-suggest-item:last-child { border-bottom: 0; }
.wms-suggest-list .wms-suggest-item.active,
.wms-suggest-list .wms-suggest-item:hover { background: var(--wms-navy-50); }
.wms-suggest-name { font-size: 13px; color: var(--wms-ink); }
.wms-suggest-name b { color: var(--wms-navy); font-weight: 600; }
.wms-suggest-meta { font-size: 11.5px; color: var(--wms-muted); margin-top: 1px; }
.wms-suggest-meta b { color: var(--wms-navy); font-weight: 600; }
.wms-suggest-note { padding: 9px 12px; font-size: 11.5px; color: var(--wms-muted); font-style: italic; }

.wms-icon-link { color: #94a3b8; cursor: pointer; }
.wms-icon-link:hover, .wms-icon-link:focus { color: var(--wms-navy); text-decoration: none; outline: 0; }
.wms-approved { color: var(--wms-green); }
.wms-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wms-status:before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.wms-status-on  { color: var(--wms-green); }
.wms-status-on:before  { background: var(--wms-green); }
.wms-status-off { color: var(--wms-red); }
.wms-status-off:before { background: var(--wms-red); }
.wms-prio-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.wms-prio-red    > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.wms-prio-green  > td:first-child { box-shadow: inset 3px 0 0 #16a34a; }
.wms-prio-yellow > td:first-child { box-shadow: inset 3px 0 0 #eab308; }
.wms-prio-red    .wms-prio-dot { background: #dc2626; }
.wms-prio-green  .wms-prio-dot { background: #16a34a; }
.wms-prio-yellow .wms-prio-dot { background: #eab308; }
.btn.wms-btn-danger-ghost { color: var(--wms-muted); }
.btn.wms-btn-danger-ghost:hover { color: #fff; background: var(--wms-red); border-color: var(--wms-red); }
.wms-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.wms-empty { text-align: center; padding: 48px 16px; color: var(--wms-muted); }
.wms-empty .fa { font-size: 28px; color: #cbd5e1; }
.wms-empty p { margin: 10px 0 2px; font-size: 15px; font-weight: 600; color: var(--wms-ink); }
.wms-empty span { font-size: 13px; }
.wms-loading { padding: 40px 16px; text-align: center; color: var(--wms-muted); }
@media (max-width: 767px) {
    .wms-toolbar-filters { margin-left: 0; width: 100%; }
    .wms-search { max-width: none; }
}

/* ---------- Flash messages / toasts (Auth::displayNotificationSession + wms-ui.js) ---------- */
.wms-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 12px 12px 14px;
    background: #fff;
    border: 1px solid var(--wms-line);
    border-left: 4px solid var(--wms-navy);
    border-radius: 10px;
    box-shadow: var(--wms-shadow);
    color: var(--wms-ink);
    font-size: 13.5px;
}
.wms-flash > .fa { font-size: 18px; line-height: 1.2; flex: 0 0 auto; }
.wms-flash-text { flex: 1 1 auto; line-height: 1.45; padding-top: 1px; }
.wms-flash-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    padding: 0 2px;
    margin-top: -1px;
}
.wms-flash-close:hover { color: var(--wms-ink); }
.wms-flash-success { border-left-color: var(--wms-green); }
.wms-flash-success > .fa { color: var(--wms-green); }
.wms-flash-danger  { border-left-color: var(--wms-red); }
.wms-flash-danger  > .fa { color: var(--wms-red); }
.wms-toast-stack {
    position: fixed;
    top: calc(var(--wms-topbar-h) + 14px);
    right: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 380px;
    max-width: calc(100vw - 36px);
}
.wms-toast-stack .wms-flash {
    margin: 0;
    box-shadow: var(--wms-shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
}
.wms-toast-stack .wms-flash.in { opacity: 1; transform: none; }

/* ---------- Confirm dialog (wmsConfirm) ---------- */
.wms-confirm { z-index: 1070; }                       /* above any modal it is opened from */
.wms-confirm .modal-dialog { width: 420px; max-width: calc(100vw - 30px); margin: 14vh auto 0; }
.wms-confirm .modal-content { padding: 24px 24px 20px; }
.wms-confirm-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 14px;
}
.wms-confirm-danger  .wms-confirm-icon { background: #fdecec; color: var(--wms-red); }
.wms-confirm-primary .wms-confirm-icon { background: var(--wms-navy-50); color: var(--wms-navy); }
.wms-confirm h4 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.wms-confirm-message { margin: 0; color: var(--wms-ink-2); font-size: 13.5px; line-height: 1.55; }
.wms-confirm-message strong { color: var(--wms-ink); }
.wms-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.wms-confirm-actions .btn { min-width: 96px; }

/* ---------- Users list (users.php) ---------- */
.wms-user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
}
.wms-modal-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--wms-muted); font-weight: 400; }

/* ---------- Dashboard stat cards (index.php) ---------- */
.wms-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 16px;
}
@media (max-width: 1200px) { .wms-stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .wms-stat-grid { grid-template-columns: 1fr; } }
.wms-stat-card {
    display: flex;
    flex-direction: column;
    background: var(--wms-card);
    border: 1px solid var(--wms-line);
    border-radius: 12px;
    box-shadow: var(--wms-shadow);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}
.wms-stat-card:hover { box-shadow: var(--wms-shadow-lg); transform: translateY(-1px); }
.wms-stat-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.wms-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}
.wms-stat-text { flex: 1 1 auto; text-align: right; min-width: 0; }
.wms-stat-value { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--wms-ink); }
.wms-stat-label { margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--wms-muted); line-height: 1.35; }
.wms-stat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    margin-top: auto;
    background: #f8fafc;
    border-top: 1px solid var(--wms-line-2);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wms-ink-2);
}
.wms-stat-link:hover, .wms-stat-link:focus { background: #f1f5f9; text-decoration: none; }
.wms-stat-link:focus, .wms-stat-link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(23, 76, 122, .25); }
.wms-stat-link .fa { font-size: 11px; }

.wms-stat-navy   .wms-stat-icon { background: var(--wms-navy-50); color: var(--wms-navy); }
.wms-stat-navy   .wms-stat-link { color: var(--wms-navy); }
.wms-stat-green  .wms-stat-icon { background: #e7f6ee; color: var(--wms-green); }
.wms-stat-green  .wms-stat-link { color: var(--wms-green); }
.wms-stat-amber  .wms-stat-icon { background: #fdf3e0; color: var(--wms-amber); }
.wms-stat-amber  .wms-stat-link { color: var(--wms-amber); }
.wms-stat-red    .wms-stat-icon { background: #fbeae8; color: var(--wms-red); }
.wms-stat-red    .wms-stat-link { color: var(--wms-red); }
.wms-stat-teal   .wms-stat-icon { background: #e3f5f2; color: #147d6f; }
.wms-stat-teal   .wms-stat-link { color: #147d6f; }
.wms-stat-brown  .wms-stat-icon { background: #f1e9e9; color: #886a6a; }
.wms-stat-brown  .wms-stat-link { color: #886a6a; }

.wms-dash-card .panel-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.wms-dash-card .panel-heading strong { font-size: 15px; }
.wms-dash-fy {
    height: 32px;
    padding: 5px 30px 5px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wms-ink);
    border: 1px solid #d5dde7;
    border-radius: 999px;
    background: #fff;
}
.wms-dash-table thead th { text-align: right; }
.wms-dash-table thead th:first-child { text-align: left; }
.wms-dash-table tbody td, .wms-dash-table tbody th { text-align: right; font-variant-numeric: tabular-nums; }
.wms-dash-table tbody th:first-child, .wms-dash-table tbody td:first-child { text-align: left; }
.wms-dash-table tbody tr:last-child th { background: var(--wms-navy-50); border-top: 2px solid var(--wms-navy-100); }

/* ---------- Standard modal header (all app modals) ---------- */
/* Markup: .modal-header.wms-modal-head > .close + .wms-modal-head-icon + .wms-modal-head-text
   (.wms-modal-head-text holds .modal-title and, optionally, a .wms-modal-head-count/.wms-modal-sub line) */
.modal-header.wms-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}
.modal-header.wms-modal-head .close { margin-left: auto; order: 3; opacity: .45; }
.modal-header.wms-modal-head .close:hover,
.modal-header.wms-modal-head .close:focus { opacity: .8; }
.wms-modal-head-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 0 0 auto;
}
.wms-modal-head-icon.wms-icon-danger  { background: #fdecec; color: var(--wms-red); }
.wms-modal-head-icon.wms-icon-green   { background: #e7f6ee; color: var(--wms-green); }
.wms-modal-head-icon.wms-icon-amber   { background: #fdf3e0; color: var(--wms-amber); }
.wms-modal-head-text { display: flex; flex-direction: column; min-width: 0; padding-right: 20px; }
.wms-modal-head-text .modal-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.wms-modal-head-count,
.wms-modal-head-text .wms-modal-sub { font-size: 12px; color: var(--wms-muted); font-weight: 500; margin: 0; }

/* ---------- Data-table modal body (scrollable, sticky header) ---------- */
.wms-dash-modal .modal-dialog,
.wms-modal-lg .modal-dialog { width: 92%; max-width: 1080px; }
.wms-dash-modal.wms-modal-xl .modal-dialog { width: 96%; max-width: 1400px; }
.wms-modal-scroll {
    max-height: 62vh;
    overflow: auto;
    padding: 0;
}
.wms-modal-scroll .wms-table-wrap { overflow: visible; }
.wms-modal-scroll table { margin-bottom: 0; }
.wms-modal-scroll thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--wms-line); }
.wms-modal-scroll .dataTables_wrapper { padding: 14px 16px; }
.wms-loading .fa-spinner { display: block; margin: 0 auto 12px; color: var(--wms-navy); }

/* ---------- Form modal body (small dialogs: add/edit forms) ---------- */
.modal-body.wms-modal-form { padding: 20px; }
.modal-body.wms-modal-form .form-group:last-child { margin-bottom: 0; }

/* Searchable single select (Chosen) styled like .form-control */
body .chosen-container-single .chosen-single {
    height: 36px;
    line-height: 34px;
    padding: 0 0 0 12px;
    border: 1px solid #d5dde7;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    color: var(--wms-ink);
    font-size: 13.5px;
}
body .chosen-container-single .chosen-default { color: #94a3b8; }
body .chosen-container-single .chosen-single div b { background-position: 0 8px; }
body .chosen-container-single .chosen-single abbr { top: 11px; }
body .chosen-container-active.chosen-with-drop .chosen-single div b { background-position: -18px 8px; }
body .chosen-container-active .chosen-single,
body .chosen-container-active.chosen-with-drop .chosen-single {
    border-color: var(--wms-navy);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(23, 76, 122, .15);
}
body .chosen-container-active.chosen-with-drop .chosen-single { border-radius: 6px 6px 0 0; }
body .chosen-container .chosen-drop { border-color: var(--wms-navy); border-radius: 0 0 6px 6px; box-shadow: 0 8px 20px rgba(16, 24, 40, .12); }
body .chosen-container-single .chosen-search input[type="text"] { height: 32px; padding: 4px 28px 4px 8px; border: 1px solid #d5dde7; border-radius: 4px; font-size: 13px; }
body .chosen-container .chosen-results { max-height: 260px; font-size: 13px; }
body .chosen-container .chosen-results li { padding: 7px 10px; }
body .chosen-container .chosen-results li.highlighted { background: var(--wms-navy); }
body .chosen-container .chosen-results li em { background: #fde68a; font-style: normal; }
body .chosen-container .chosen-results li.highlighted em { background: transparent; text-decoration: underline; }

/* ---------- Reports tabs (reports.php) ---------- */
.wms-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    border-bottom: 0;
}
.wms-report-tabs > li { float: none; }
.wms-report-tabs > li > a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--wms-line);
    border-radius: 999px;
    background: var(--wms-card);
    color: var(--wms-ink-2);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    outline: none;
}
.wms-report-tabs > li.active > a:focus { box-shadow: 0 0 0 3px rgba(0, 0, 0, .18); }
.wms-report-tabs > li:not(.active) > a:hover,
.wms-report-tabs > li:not(.active) > a:focus {
    background: #fafbfc;
    border-color: #d5dde7;
    color: var(--wms-ink);
    text-decoration: none;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 76, 122, .15);
}
.wms-report-tab-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: 0 0 auto;
    background: #eef1f5;
    color: #8a97a8;
}
.wms-report-tabs > li.wms-report-tab-client.active > a,
.wms-report-tabs > li.wms-report-tab-client.active > a:hover,
.wms-report-tabs > li.wms-report-tab-client.active > a:focus { background: var(--wms-navy); border-color: var(--wms-navy); color: #fff; }
.wms-report-tab-client.active .wms-report-tab-icon { background: rgba(255,255,255,.2); color: #fff; }
.wms-report-tabs > li.wms-report-tab-dsc.active > a,
.wms-report-tabs > li.wms-report-tab-dsc.active > a:hover,
.wms-report-tabs > li.wms-report-tab-dsc.active > a:focus { background: #147d6f; border-color: #147d6f; color: #fff; }
.wms-report-tab-dsc.active .wms-report-tab-icon { background: rgba(255,255,255,.2); color: #fff; }
.wms-report-tabs > li.wms-report-tab-work.active > a,
.wms-report-tabs > li.wms-report-tab-work.active > a:hover,
.wms-report-tabs > li.wms-report-tab-work.active > a:focus { background: var(--wms-amber); border-color: var(--wms-amber); color: #fff; }
.wms-report-tab-work.active .wms-report-tab-icon { background: rgba(255,255,255,.2); color: #fff; }
.wms-report-tabs > li.wms-report-tab-emp.active > a,
.wms-report-tabs > li.wms-report-tab-emp.active > a:hover,
.wms-report-tabs > li.wms-report-tab-emp.active > a:focus { background: var(--wms-red); border-color: var(--wms-red); color: #fff; }
.wms-report-tab-emp.active .wms-report-tab-icon { background: rgba(255,255,255,.2); color: #fff; }
@media (max-width: 700px) {
    .wms-report-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .wms-report-tabs > li > a { white-space: nowrap; }
}
.wms-report-tab-content { padding: 4px 0 0; }
.wms-report-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 16px 18px;
}
.wms-report-row + .wms-report-row { border-top: 1px solid var(--wms-line-2); }
.wms-report-row-label {
    flex: 0 0 auto;
    width: 220px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wms-ink);
    padding-top: 8px;
}
.wms-report-row-label .fa { color: #9aa9bb; width: 16px; text-align: center; }
.wms-report-row-fields {
    flex: 1 1 320px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    min-width: 0;
}
.wms-report-row-fields .form-group { margin-bottom: 0; min-width: 150px; }
.wms-report-row-fields .form-group label { display: block; font-size: 11.5px; margin-bottom: 3px; }
.wms-report-row-fields .wms-inline-check { padding-top: 8px; margin: 0; }
.wms-report-row-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding-top: 4px;
    margin-left: auto;
}
@media (max-width: 900px) {
    .wms-report-row-label { width: 100%; padding-top: 0; }
    .wms-report-row-actions { margin-left: 0; width: 100%; }
}

/* ---------- Report result panel (rendered output) ---------- */
.wms-report-result { margin-top: 18px; scroll-margin-top: 16px; }
.wms-report-result-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wms-line-2);
}
.wms-report-result-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex: 0 0 auto;
}
.wms-report-result-head h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1 1 auto; }
.wms-report-result-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.wms-report-result-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
}
.wms-report-result-close:hover { background: #f1f5f9; color: var(--wms-ink); }
.wms-report-result .wms-table-wrap { padding: 4px; }

/* ---------- Login ---------- */
body.wms-login {
    min-height: 100vh;
    background: var(--wms-bg);
}
.wms-login-shell {
    min-height: 100vh;
    display: flex;
}
.wms-login-brand {
    flex: 1 1 50%;
    background: linear-gradient(160deg, var(--wms-navy) 0%, var(--wms-navy-dark) 100%);
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.wms-login-brand:after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .05);
}
.wms-login-mark { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; }
.wms-login-mark .wms-logo { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }
.wms-login-brand h1 { color: #fff; font-size: 30px; line-height: 1.25; font-weight: 700; margin: 0 0 12px; max-width: 440px; }
.wms-login-brand p { color: #c9d8e6; font-size: 14.5px; max-width: 420px; margin: 0; }
.wms-login-points { list-style: none; padding: 0; margin: 28px 0 0; }
.wms-login-points li { color: #dbe7f2; font-size: 13.5px; margin-bottom: 10px; }
.wms-login-points .fa { width: 18px; color: #9fc0de; }
.wms-login-foot { color: #9fb7cd; font-size: 12px; position: relative; z-index: 1; }
.wms-login-main {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.wms-login-card {
    width: 100%;
    max-width: 380px;
    background: var(--wms-card);
    border: 1px solid var(--wms-line);
    border-radius: 14px;
    box-shadow: var(--wms-shadow-lg);
    padding: 32px 30px 28px;
}
.wms-login-card h2 { font-size: 22px; margin: 0 0 4px; }
.wms-login-card .wms-login-sub { color: var(--wms-muted); margin: 0 0 22px; font-size: 13.5px; }
.wms-login-card .form-control { height: 42px; font-size: 14px; }
.wms-login-card .input-icon { position: relative; }
.wms-login-card .input-icon .fa { position: absolute; left: 13px; top: 50%; margin-top: -7px; color: #94a3b8; }
.wms-login-card .input-icon .form-control { padding-left: 36px; }
.wms-login-card .btn-primary { height: 44px; font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.wms-login-card .checkbox { margin: 4px 0 10px; }
.wms-login-mobile-mark { display: none; }
/* Two-factor step (login2fa.php) */
.wms-login-card.wms-tfa-enrol { max-width: 440px; }
.wms-tfa-steps { list-style: none; counter-reset: tfa; padding: 0; margin: 0 0 18px; }
.wms-tfa-steps > li { counter-increment: tfa; position: relative; padding-left: 32px; margin-bottom: 14px; font-size: 13.5px; }
.wms-tfa-steps > li:before {
    content: counter(tfa); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--wms-navy); color: #fff; font-size: 12px; font-weight: 600; text-align: center; line-height: 22px;
}
.wms-tfa-qr { width: 184px; height: 184px; margin: 10px 0 6px; border: 1px solid var(--wms-line); border-radius: 8px; overflow: hidden; }
.wms-tfa-qr svg { display: block; width: 100%; height: 100%; }
.wms-tfa-key { font-family: Consolas, Menlo, monospace; font-size: 13px; letter-spacing: 1px; background: #f1f5f9; border-radius: 6px; padding: 6px 8px; display: inline-block; word-break: break-all; }
.wms-tfa-code { text-align: center; font-size: 22px !important; letter-spacing: 6px; font-family: Consolas, Menlo, monospace; }
.wms-tfa-cancel { display: block; text-align: center; margin-top: 14px; font-size: 13px; }
.wms-tfa-icon { width: 48px; height: 48px; border-radius: 12px; background: #e8f0f8; color: var(--wms-navy); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px; }
@media (max-width: 900px) {
    .wms-login-brand { display: none; }
    .wms-login-mobile-mark { display: flex; justify-content: center; margin-bottom: 20px; color: var(--wms-navy); }
    .wms-login-mobile-mark .wms-logo { background: var(--wms-navy); color: #fff; }
}

/* ---------- Work page (addwork.php) ---------- */
.wms-chip-status { background: #fff7e6; color: #9a5b00; }
.wms-stepper-card { padding: 18px 12px 14px; }
.wms-stepper { display: flex; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.wms-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
/* connector to the previous step */
.wms-step + .wms-step::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--wms-line);
    z-index: 0;
}
.wms-step.complete + .wms-step::before { background: var(--wms-navy); }
.wms-step-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 2px solid var(--wms-line);
    color: #94a3b8;
}
.wms-step-label { font-size: 12.5px; color: var(--wms-muted); line-height: 1.3; padding: 0 4px; }
.wms-step.complete .wms-step-dot { background: var(--wms-navy); border-color: var(--wms-navy); color: #fff; }
.wms-step.complete .wms-step-label { color: var(--wms-ink); }
.wms-step.active .wms-step-dot { border-color: var(--wms-navy); color: var(--wms-navy); box-shadow: 0 0 0 4px rgba(23, 76, 122, .15); }
.wms-step.active .wms-step-label { color: var(--wms-navy); font-weight: 600; }
@media (max-width: 767px) {
    .wms-step-label { font-size: 11px; }
    .wms-step-dot { width: 26px; height: 26px; font-size: 11px; }
    .wms-step + .wms-step::before { top: 12px; }
}

.wms-doc-add { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; }
.wms-doc-add > select { flex: 1 1 220px; }
.wms-doc-add > input { flex: 2 1 260px; }
.wms-doc-add > .btn { flex: 0 0 auto; }

.wms-comment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 991px) { .wms-comment-grid { grid-template-columns: 1fr; } }
.wms-comment-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--wms-line);
    border-top: 3px solid var(--wms-navy);
    border-radius: 8px;
    background: #fbfcfe;
}
.wms-comment-box label { margin: 0; }
.wms-comment-box .btn { align-self: flex-start; }
.wms-comment-user { border-top-color: #3b82f6; }
.wms-comment-supervisor { border-top-color: #f59e0b; }
.wms-comment-admin { border-top-color: #10b981; }
.wms-tab-content { padding-top: 10px; }
.wms-tab-content .table { margin-bottom: 0; }
.wms-tab-empty { margin: 0; padding: 18px 4px; color: var(--wms-muted); font-size: 13px; }

/* Assign row inside a form modal: searchable select + inline button */
.wms-assign-row { display: flex; gap: 8px; align-items: flex-start; }
.wms-assign-row > select,
.wms-assign-row > .chosen-container { flex: 1 1 auto; min-width: 0; }
.wms-assign-row > .btn { flex: 0 0 auto; height: 36px; }
.wms-modal-subhead {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 8px;
    padding-top: 14px;
    border-top: 1px solid var(--wms-line-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--wms-ink);
}
.wms-modal-subhead span {
    padding: 0 8px;
    border-radius: 999px;
    background: var(--wms-navy-50);
    color: var(--wms-navy);
    font-size: 12px;
}
.wms-modal-form .wms-table-wrap { border: 1px solid var(--wms-line); border-radius: 6px; overflow: hidden; }
.wms-modal-form .wms-table-wrap .table { margin-bottom: 0; }

/* ---------- Messages: send / sent log / templates (templates.php, messagelog.php, msgtemplates.php) ---------- */
.wms-msg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.wms-msg-tabs > li { float: none; }
.wms-msg-tabs > li > a {
    display: flex; align-items: center; gap: 8px; padding: 8px 15px;
    border: 1px solid var(--wms-line); border-radius: 999px; background: var(--wms-card);
    color: var(--wms-ink-2); font-weight: 600; font-size: 13px; line-height: 1.2;
}
.wms-msg-tabs > li > a:hover, .wms-msg-tabs > li > a:focus { background: #fafbfc; border-color: #d5dde7; color: var(--wms-ink); text-decoration: none; }
.wms-msg-tabs > li.active > a { background: var(--wms-navy); border-color: var(--wms-navy); color: #fff; }
.wms-msg-tabs .fa { opacity: .85; }
.wms-msg-badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--wms-navy-50); color: var(--wms-navy); font-size: 11px; text-align: center; }
.wms-msg-badge-red { background: #fde8e6; color: var(--wms-red); }
.wms-msg-tabs > li.active .wms-msg-badge { background: rgba(255,255,255,.22); color: #fff; }

.wms-step-num {
    width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wms-navy); color: #fff; font-size: 13px; font-weight: 700;
}
.wms-section-head .wms-head-aside { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.wms-aud-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.wms-aud-row > .form-group { margin-bottom: 0; }
.wms-aud-picker { flex: 1 1 360px; min-width: 0; }
.wms-wnr { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--wms-line-2); }
.wms-wnr-types { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.wms-wnr-types label { font-weight: 500; margin: 0; display: inline-flex; align-items: center; gap: 6px; }

.wms-rcp-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.wms-rcp-stat { padding: 6px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--wms-line-2); font-size: 12.5px; color: var(--wms-ink-2); }
.wms-rcp-stat b { color: var(--wms-ink); font-size: 14px; margin-right: 3px; }
.wms-rcp-stat .fa { color: #94a3b8; margin-right: 4px; }

.wms-selbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    margin: 0; padding: 9px 16px; background: var(--wms-navy-50); color: var(--wms-navy-dark); font-size: 13px;
    border-bottom: 1px solid var(--wms-navy-100);
}
.wms-selbar b { font-weight: 700; }
.wms-selbar .btn-link { padding: 0; font-weight: 600; color: var(--wms-navy); }
.wms-selbar[hidden] { display: none; }

.wms-recipient-table td, .wms-recipient-table th { vertical-align: middle !important; }
.wms-col-check { width: 36px; text-align: center; }
.wms-col-check input { margin: 0; cursor: pointer; }
.wms-recipient-table tr.wms-row-selected > td { background: #f5f9fd; }
.wms-rcp-name { font-weight: 600; color: var(--wms-ink); }
.wms-recipient-table .wms-rcp-name { min-width: 160px; }
.wms-miss { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #fdf0ee; color: var(--wms-red); font-size: 11.5px; font-weight: 600; cursor: help; }

.wms-aud-path { margin: 6px 0 0; font-size: 12.5px; color: var(--wms-muted); }
.wms-channel { border: 1px solid var(--wms-line); border-radius: 8px; margin-bottom: 14px; }
.wms-channel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; margin: 0; font-weight: 600; }
.wms-channel-head input { margin: 0; }
.wms-channel-head .wms-sub { margin: 0 0 0 auto; font-weight: 500; }
.wms-channel-body { padding: 0 14px 12px; }
.wms-channel.is-off .wms-channel-body { display: none; }
.wms-channel.is-disabled .wms-channel-head { cursor: not-allowed; color: var(--wms-muted); }
.wms-channel-note { margin: 0 14px 12px; font-size: 12px; color: var(--wms-muted); }
.wms-ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; font-size: 12px; color: var(--wms-muted); align-items: center; }
.wms-ph-chip { border: 1px dashed #b9c7d6; background: #fff; border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--wms-navy); cursor: pointer; }
.wms-ph-chip:hover { background: var(--wms-navy-50); }
.wms-sms-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--wms-muted); }
.wms-sms-meta .is-warn { color: var(--wms-red); font-weight: 600; }
.wms-send-bar { border-top: 1px solid var(--wms-line-2); padding: 14px 18px; background: #fbfcfd; border-radius: 0 0 var(--wms-radius) var(--wms-radius); }
.wms-send-summary { font-size: 13px; color: var(--wms-ink-2); margin-bottom: 10px; }
.wms-send-summary b { color: var(--wms-ink); }
.wms-send-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wms-send-actions .btn-primary { flex: 1 1 auto; }
.wms-export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--wms-line); }
.wms-export-row .wms-sub { flex: 1 1 100%; margin: 0; }

.wms-preview-meta { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; font-size: 13px; margin-bottom: 12px; }
.wms-preview-meta dt { color: var(--wms-muted); font-weight: 500; }
.wms-preview-meta dd { margin: 0; }
.wms-preview-mail { border: 1px solid var(--wms-line); border-radius: 8px; padding: 18px; background: #fff; max-height: 52vh; overflow: auto; }
.wms-preview-sms { max-width: 340px; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: #eef2f6; white-space: pre-wrap; font-size: 13px; line-height: 1.45; }
.wms-preview-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wms-muted); margin: 0 0 8px; }
.wms-result { padding: 14px 16px; border-radius: 8px; background: #effaf4; border: 1px solid #bfe5d0; margin-bottom: 14px; }
.wms-result h4 { margin: 0 0 4px; font-size: 14.5px; color: var(--wms-green); }
.wms-result p { margin: 0; font-size: 13px; }
.wms-result details { margin-top: 8px; font-size: 12.5px; color: var(--wms-ink-2); }
.wms-result summary { cursor: pointer; font-weight: 600; }

.wms-msg-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wms-msg-st:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wms-msg-st-sent { color: var(--wms-green); }
.wms-msg-st-pending { color: var(--wms-amber); }
.wms-msg-st-failed { color: var(--wms-red); }
.wms-msg-st-dismissed { color: var(--wms-muted); }
.wms-chip.wms-chip-sms { margin: 0 4px 0 0; padding: 0 7px; font-size: 10.5px; background: #eef7f4; color: #147d6f; }
.wms-msg-subject { max-width: 360px; }
.wms-ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wms-msglog-table td { vertical-align: top !important; }
.wms-date-range { display: flex; align-items: center; gap: 6px; }
.wms-date-range input { width: 140px; }

.wms-tpl-table td { vertical-align: middle !important; }
.wms-tpl-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: #f1f5f9; color: var(--wms-ink-2); }
.wms-tpl-tag-sys { background: #fff7e6; color: #9a5b00; }
.wms-tpl-tag-sms { background: #eef7f4; color: #147d6f; }
tr.wms-tpl-inactive td { color: var(--wms-muted); }
@media (min-width: 992px) {
    .modal-dialog.wms-modal-xl { width: 960px; }
}

/* Filter dialog: two-column field grid inside .wms-modal-form */
.wms-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.wms-filter-grid .wms-filter-wide { grid-column: 1 / -1; }
@media (max-width: 575px) { .wms-filter-grid { grid-template-columns: 1fr; } }
.wms-modal-form #errorMsg.alert { margin-bottom: 14px; padding: 10px 12px; font-size: 13px; }
.wms-modal-form + .modal-footer { padding: 12px 20px; background: #fafbfc; border-radius: 0 0 var(--wms-radius) var(--wms-radius); }

/* ---------- My Profile (userprofile.php) ---------- */
.wms-profile-card { overflow: hidden; }
.wms-profile-hero {
    padding: 26px 20px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--wms-navy-50) 0%, var(--wms-card) 100%);
    border-bottom: 1px solid var(--wms-line-2);
}
.wms-profile-avatar {
    width: 76px; height: 76px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wms-navy); color: #fff;
    font-size: 26px; font-weight: 700; letter-spacing: .02em;
    box-shadow: 0 0 0 4px #fff, 0 4px 14px rgba(23, 76, 122, .25);
}
.wms-profile-name { margin: 14px 0 2px; font-size: 18px; font-weight: 700; }
.wms-profile-login { margin: 0; color: var(--wms-muted); font-size: 13px; }
.wms-profile-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.wms-profile-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
    border-radius: 999px; background: var(--wms-card); border: 1px solid var(--wms-line);
    font-size: 12px; font-weight: 600; color: var(--wms-ink-2);
}
.wms-profile-chip .fa { color: var(--wms-navy); }
.wms-profile-facts { margin: 0; padding: 6px 20px; }
.wms-profile-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--wms-line-2); font-size: 13px; }
.wms-profile-facts > div:last-child { border-bottom: 0; }
.wms-profile-facts dt { font-weight: 500; color: var(--wms-muted); }
.wms-profile-facts dd { margin: 0; text-align: right; color: var(--wms-ink); font-weight: 500; }
.wms-profile-foot { padding: 14px 20px 18px; border-top: 1px solid var(--wms-line-2); background: #fbfcfd; }
.wms-profile-foot .wms-sub { margin: 10px 0 0; text-align: center; }

.wms-field-error { margin: 5px 0 0; font-size: 12px; color: var(--wms-red); }
.wms-form .has-field-error .form-control,
.has-field-error .form-control { border-color: var(--wms-red); box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.has-field-error label { color: var(--wms-red); }
.wms-input-icon { position: relative; }
.wms-input-icon .form-control { padding-right: 34px; }
.wms-input-icon > .fa { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.wms-dirty-dot { font-size: 8px; color: var(--wms-amber); vertical-align: 2px; margin-right: 4px; }

/* ---- Lookup Lists (pickupmst.php) ---- */
.wms-pick-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.wms-pick-nav { padding: 8px; margin: 0; }
.wms-pick-nav-head { padding: 8px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wms-muted); }
.wms-pick-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--wms-ink-2); font-weight: 500; }
.wms-pick-nav-item > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wms-pick-nav-item .fa { color: #94a3b8; }
.wms-pick-nav-item:hover, .wms-pick-nav-item:focus { background: var(--wms-line-2); color: var(--wms-ink); text-decoration: none; }
.wms-pick-nav-item.active { background: var(--wms-navy-50); color: var(--wms-navy); }
.wms-pick-nav-item.active .fa { color: var(--wms-navy); }
.wms-pick-count { min-width: 26px; padding: 1px 7px; border-radius: 10px; background: var(--wms-line-2); color: var(--wms-muted); font-size: 12px; text-align: center; }
.wms-pick-nav-item.active .wms-pick-count { background: var(--wms-navy-100); color: var(--wms-navy); }
.wms-pick-main { margin: 0; }
.wms-pick-main-head { padding: 16px 16px 4px; }
.wms-pick-main-head h2 { margin: 0 0 2px; font-size: 17px; font-weight: 600; color: var(--wms-ink); }
.wms-pick-main-head p { margin: 0; }
.wms-pick-add { display: flex; gap: 10px; padding: 12px 16px 14px; border-bottom: 1px solid var(--wms-line-2); }
.wms-pick-add .form-control { flex: 1; height: 38px; }
.wms-pick-add .btn { white-space: nowrap; }
@media (max-width: 991px) {
    .wms-pick-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .wms-pick-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; }
    .wms-pick-nav-head { display: none; }
    .wms-pick-nav-item { flex: 0 0 auto; }
}

/* ---------- Module access (usermodules.php grid + Create/Edit User section) ---------- */
.wms-switch-sm .wms-switch-track { width: 30px; height: 18px; }
.wms-switch-sm .wms-switch-thumb { width: 14px; height: 14px; }
.wms-switch-sm input:checked + .wms-switch-track .wms-switch-thumb { transform: translateX(12px); }
.wms-switch input:disabled + .wms-switch-track { opacity: .55; }
.wms-module-grid > thead > tr > th { vertical-align: bottom; }
.wms-module-grid .wms-mod-col { text-align: center; width: 1%; white-space: nowrap; }
.wms-module-grid > tbody > tr > td { vertical-align: middle; }
.wms-module-grid > tbody > tr:hover > td { background: #f8fafc; }
.wms-mod-head { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border: 0; border-radius: 6px; background: none;
                color: var(--wms-ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.wms-mod-head .fa:first-child { font-size: 14px; color: #94a3b8; }
.wms-mod-head:hover, .wms-mod-head:focus, .open > .wms-mod-head { background: var(--wms-navy-50); color: var(--wms-navy); outline: 0; }
.wms-mod-head:hover .fa:first-child, .open > .wms-mod-head .fa:first-child { color: var(--wms-navy); }
.wms-mod-caret { font-size: 11px; color: #94a3b8; }
.wms-module-grid .dropdown-menu { text-align: left; font-weight: 400; }
.wms-module-grid .dropdown-header { max-width: 240px; white-space: normal; }
.wms-mod-user { min-width: 200px; }
.wms-mod-user .wms-chip { margin-left: 4px; padding: 0 7px; font-size: 10.5px; background: #fff7e6; color: #9a5b00; }
.wms-mod-foot { padding: 12px 16px; border-top: 1px solid var(--wms-line-2); font-size: 12.5px; color: var(--wms-muted); }
.wms-mod-foot .fa { margin-right: 4px; }
.wms-mod-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wms-mod-option { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--wms-line); border-radius: var(--wms-radius);
                  font-weight: 400; cursor: pointer; }
.wms-mod-option:hover { border-color: var(--wms-navy-100); background: #fbfcfe; }
.wms-mod-option .wms-switch-track { margin-top: 1px; }
.wms-br-home { background: #eef2f7; color: #5b6b80; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.wms-branch-option.is-home { opacity: .55; background: #f7f9fc; }
.wms-branch-option.is-home .wms-switch-track { visibility: hidden; }
.wms-extra-branches { display: inline-block; margin-top: 3px; font-size: 11.5px; }
.wms-extra-branches .fa { margin-right: 2px; }
.wms-mod-option strong { display: block; color: var(--wms-ink); font-size: 13px; }
.wms-mod-option small { display: block; color: var(--wms-muted); font-size: 12px; line-height: 1.35; }

/* Two-step sign-in section on Edit User (adduser.php) */
.wms-tfa-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--wms-line); border-radius: 8px; font-size: 13px; }
.wms-tfa-status .wms-tfa-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.wms-tfa-badge { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--wms-navy); background: #e8f0f8; border-radius: 10px; padding: 1px 7px; vertical-align: middle; }

/* ---------- Sign-in security (userprofile.php) ---------- */
.wms-sec { overflow: hidden; }
.wms-sec.is-flash { animation: wms-sec-flash 1.6s ease-out 1; }
@keyframes wms-sec-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--wms-navy-100); } 100% { box-shadow: var(--wms-shadow); } }
.wms-sec-list { list-style: none; margin: 0; padding: 4px 20px; }
.wms-sec-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--wms-line-2); }
.wms-sec-item:last-child { border-bottom: 0; }
.wms-sec-icon {
    width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: var(--wms-ink-2); font-size: 16px;
}
.wms-sec-icon.is-on { background: #e7f6ee; color: var(--wms-green); }
.wms-sec-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wms-sec-text strong { font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wms-sec-text small { color: var(--wms-muted); font-size: 12px; }
.wms-sec-pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #f1f5f9; color: var(--wms-muted); }
.wms-sec-pill.is-on  { background: #e7f6ee; color: var(--wms-green); }
.wms-sec-pill.is-due { background: #fdf3e0; color: var(--wms-amber); }
.wms-sec-detail { margin: 0 20px; padding: 10px 14px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--wms-line-2); }
.wms-sec-detail > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12.5px; }
.wms-sec-detail span { color: var(--wms-muted); }
.wms-sec-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 18px; }
.wms-sec-note { margin: -6px 20px 16px; font-size: 12px; color: var(--wms-muted); }
.wms-sec-promo {
    position: relative; margin: 4px 14px 16px; padding: 22px 20px 18px; border-radius: 12px; text-align: center; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, #2f6fa3 0%, transparent 60%), linear-gradient(160deg, var(--wms-navy) 0%, var(--wms-navy-dark) 100%);
    overflow: hidden;
}
.wms-sec-promo:after { content: ''; position: absolute; width: 180px; height: 180px; right: -70px; bottom: -90px; border-radius: 50%; border: 28px solid rgba(255,255,255,.05); }
.wms-sec-promo h4 { color: #fff; font-size: 15.5px; font-weight: 700; margin: 12px 0 6px; }
.wms-sec-promo p { color: #c9d8e6; font-size: 12.5px; margin: 0 auto 14px; max-width: 280px; }
.wms-sec-promo .btn-primary { background: #fff; border-color: #fff; color: var(--wms-navy); font-weight: 600; padding: 8px 18px; position: relative; z-index: 1; }
.wms-sec-promo .btn-primary:hover, .wms-sec-promo .btn-primary:focus { background: #eaf1f8; border-color: #eaf1f8; color: var(--wms-navy-dark); }
.wms-sec-promo small { display: block; margin-top: 10px; color: #9fb7cd; font-size: 11.5px; }
.wms-sec-promo-art { position: relative; width: 64px; height: 64px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.wms-sec-promo-art .fa { position: relative; font-size: 34px; color: #fff; }
.wms-sec-ring { position: absolute; inset: 0; border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: 0 0 0 8px rgba(255,255,255,.06); animation: wms-sec-pulse 2.6s ease-in-out infinite; }
@keyframes wms-sec-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Two-step setup wizard / turn-off dialog ---------- */
.wms-tfa-modal [hidden] { display: none !important; }
.wms-tfa-modal .modal-dialog { width: 460px; max-width: calc(100vw - 24px); margin-top: 8vh; }
.wms-tfa-modal-sm .modal-dialog { width: 420px; }
.wms-tfa-modal .modal-body { padding: 18px 26px 22px; min-height: 250px; }
.wms-tfa-modal-sm .modal-body { min-height: 0; }
.wms-tfa-modal .modal-footer { display: flex; justify-content: flex-end; gap: 8px; }
.wms-tfa-modal .modal-footer .pull-left { margin-right: auto; float: none !important; }
.wms-tfa-progress { display: flex; list-style: none; margin: 0; padding: 12px 26px 0; gap: 6px; }
.wms-tfa-progress li { flex: 1 1 0; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--wms-muted); padding-bottom: 10px; border-bottom: 3px solid var(--wms-line); transition: border-color .25s, color .25s; }
.wms-tfa-progress li span { width: 20px; height: 20px; border-radius: 50%; background: var(--wms-line); color: var(--wms-muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; transition: background .25s, color .25s; }
.wms-tfa-progress li.is-active { color: var(--wms-navy); border-bottom-color: var(--wms-navy); }
.wms-tfa-progress li.is-active span { background: var(--wms-navy); color: #fff; }
.wms-tfa-progress li.is-done { color: var(--wms-green); border-bottom-color: var(--wms-green); }
.wms-tfa-progress li.is-done span { background: var(--wms-green); color: #fff; font-size: 0; }
.wms-tfa-progress li.is-done span:before { content: '\f00c'; font-family: FontAwesome; font-size: 10px; }
.wms-tfa-pane { animation: wms-tfa-in .25s ease-out; }
@keyframes wms-tfa-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.wms-tfa-pane h4 { text-align: center; font-size: 16px; margin: 4px 0 6px; }
.wms-tfa-pane > .wms-sub { text-align: center; margin-bottom: 14px; }
.wms-tfa-hero { width: 72px; height: 72px; margin: 6px auto 12px; border-radius: 20px; background: linear-gradient(160deg, var(--wms-navy-50), var(--wms-navy-100)); color: var(--wms-navy); font-size: 40px; display: flex; align-items: center; justify-content: center; }
.wms-tfa-stores { display: flex; justify-content: center; gap: 10px; margin: 4px 0 12px; }
.wms-tfa-stores > span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.1; }
.wms-tfa-stores > span .fa { font-size: 20px; }
.wms-tfa-stores small { display: block; font-size: 10px; font-weight: 400; color: #cbd5e1; }
.wms-tfa-hint { text-align: center; font-size: 12px; color: var(--wms-muted); margin: 0; }
.wms-tfa-qrbox { display: flex; justify-content: center; }
.wms-tfa-qrbox .wms-tfa-qr { width: 200px; height: 200px; margin: 0 0 12px; padding: 6px; border-radius: 14px; border: 1px solid var(--wms-line); box-shadow: var(--wms-shadow); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--wms-muted); font-size: 22px; }
.wms-tfa-manual { margin: 0 auto; max-width: 400px; font-size: 12.5px; }
.wms-tfa-manual summary { cursor: pointer; text-align: center; color: var(--wms-navy); font-weight: 500; list-style: none; }
.wms-tfa-manual summary::-webkit-details-marker { display: none; }
.wms-tfa-manual[open] summary { margin-bottom: 8px; }
.wms-tfa-keyrow { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 4px; }
.wms-tfa-keyrow .wms-tfa-key { color: var(--wms-ink); font-size: 12px; letter-spacing: .5px; white-space: nowrap; word-break: normal; }
.wms-tfa-manual .wms-sub { display: block; text-align: center; }
.wms-otp { display: flex; justify-content: center; gap: 8px; margin: 8px 0 14px; }
.wms-otp input {
    width: 44px; height: 54px; border-radius: 10px; border: 1.5px solid var(--wms-line); background: #f8fafc;
    text-align: center; font-size: 22px; font-weight: 600; font-family: Consolas, Menlo, monospace; color: var(--wms-ink);
    transition: border-color .15s, box-shadow .15s, background .15s; outline: 0;
}
.wms-otp input:nth-child(3) { margin-right: 10px; }
.wms-otp input:focus { border-color: var(--wms-navy); background: #fff; box-shadow: 0 0 0 3px var(--wms-navy-50); }
.wms-otp input.is-filled { background: #fff; border-color: #94a3b8; }
.wms-otp.is-error input { border-color: var(--wms-red); }
.wms-otp.is-error { animation: wms-otp-shake .35s; }
@keyframes wms-otp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wms-tfa-error { text-align: center; color: var(--wms-red); font-size: 12.5px; margin: -4px 0 10px; }
.wms-tfa-trust { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 400; font-size: 12.5px; color: var(--wms-ink-2); margin: 0; }
.wms-tfa-trust input { margin: 0; }
.wms-tfa-done { text-align: center; padding-top: 10px; }
.wms-tfa-check { width: 76px; height: 76px; margin: 6px auto 14px; border-radius: 50%; background: #e7f6ee; color: var(--wms-green); font-size: 34px; display: flex; align-items: center; justify-content: center; animation: wms-tfa-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes wms-tfa-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 400px) { .wms-otp input { width: 38px; height: 48px; font-size: 19px; } .wms-otp { gap: 6px; } }

/* ---------- Client Import (pages/clientimport.php) ---------- */
.wms-import-page .wms-section > .panel-body { padding-bottom: 16px; }
.wms-import-download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 12px; }
.wms-import-notes { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--wms-ink-2); }
.wms-import-notes li { margin: 3px 0; }
.wms-import-notes code { font-size: 11.5px; }
.wms-import-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wms-import-file {
    position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 6px 6px 12px;
    border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 400; max-width: 100%;
}
.wms-import-file:hover { border-color: var(--wms-navy); }
.wms-import-file input { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.wms-import-file .fa { color: var(--wms-muted); }
.wms-import-file-name { min-width: 160px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wms-ink-2); font-size: 13px; }
.wms-import-file input:focus ~ .btn { box-shadow: 0 0 0 3px rgba(23, 76, 122, .2); }
.wms-import-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.wms-import-stat { min-width: 150px; padding: 10px 14px; border-radius: 8px; background: var(--wms-navy-50); display: flex; flex-direction: column; }
.wms-import-stat b { font-size: 20px; line-height: 1.1; color: var(--wms-navy); }
.wms-import-stat span { font-size: 12px; color: var(--wms-ink-2); }
.wms-import-stat.is-bad { background: #fff4f2; }
.wms-import-stat.is-bad b { color: var(--wms-red); }
.wms-import-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 12px; }
.wms-import-field {
    display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 9px 11px;
    border: 1px solid var(--wms-line-2); border-radius: 8px; background: #fff; font-weight: 400; cursor: pointer;
}
.wms-import-field:hover { border-color: var(--wms-navy); }
.wms-import-field input { margin: 3px 0 0; flex: 0 0 auto; }
.wms-import-field-text { display: flex; flex-direction: column; min-width: 0; }
.wms-import-field-text strong { font-size: 13px; font-weight: 600; color: var(--wms-ink); }
.wms-import-field-text small { font-size: 11.5px; color: var(--wms-muted); }
.wms-import-field.is-quiet { background: #f8fafc; }
.wms-import-field.is-quiet strong { color: var(--wms-ink-2); font-weight: 500; }
.wms-import-field.has-errors { border-color: #f3c6bd; }
.wms-import-fields-done .wms-import-field { cursor: default; }
.wms-import-bad { color: var(--wms-red); font-weight: 600; }
.wms-import-problem { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fff4f2; border: 1px solid #f3c6bd; font-size: 12.5px; color: var(--wms-ink-2); }
.wms-import-problem .fa { color: var(--wms-red); margin-right: 4px; }
.wms-import-errors { margin: 0 0 12px; font-size: 12.5px; }
.wms-import-errors summary { cursor: pointer; font-weight: 600; color: var(--wms-ink-2); padding: 8px 0; }
.wms-import-errors summary .fa { color: var(--wms-amber); }
.wms-import-errors .wms-table-wrap { margin-top: 6px; border: 1px solid var(--wms-line-2); border-radius: 8px; max-height: 320px; overflow: auto; }
.wms-import-error-table { margin: 0; }
.wms-import-error-table > tbody > tr > td { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
.wms-import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--wms-line-2); }
@media (max-width: 767px) { .wms-import-file-name { min-width: 0; } }

/* ---------- Branch-wide two-step sign-in (users.php) ---------- */
.wms-tfa-policy { padding: 4px 18px; margin-bottom: 16px; }
.wms-tfa-policy-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--wms-line-2); }
.wms-tfa-policy-row:last-child { border-bottom: 0; }
.wms-tfa-policy-icon {
    width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: var(--wms-muted); font-size: 19px; transition: background .2s, color .2s;
}
.wms-tfa-policy-row.is-on .wms-tfa-policy-icon { background: linear-gradient(160deg, var(--wms-navy), var(--wms-navy-dark)); color: #fff; }
.wms-tfa-policy-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wms-tfa-policy-text strong { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wms-tfa-policy-text small { color: var(--wms-muted); font-size: 12.5px; }
.wms-tfa-policy-meter { height: 5px; max-width: 320px; border-radius: 3px; background: var(--wms-line-2); overflow: hidden; margin-top: 4px; }
.wms-tfa-policy-meter span { display: block; height: 100%; border-radius: 3px; background: var(--wms-green); transition: width .4s; }
.wms-tfa-policy-row:not(.is-on) .wms-tfa-policy-meter span { background: var(--wms-sky); }
.wms-tfa-policy .wms-tfa-policy-meta { font-size: 11.5px; }
.wms-tfa-policy-switch { flex: 0 0 auto; margin: 0; }
.wms-tfa-branch-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--wms-navy-50); color: var(--wms-ink-2); font-size: 12.5px; }
.wms-tfa-branch-note .fa { color: var(--wms-navy); margin-right: 4px; }
@media (max-width: 600px) { .wms-tfa-policy-row { flex-wrap: wrap; } .wms-tfa-policy-icon { display: none; } }
