/* PriceCompare - Custom Styles */

:root {
    --pc-primary: #0d6efd;
    --pc-success: #198754;
    --pc-danger:  #dc3545;
    --pc-warning: #ffc107;
    --pc-sidebar-width: 250px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* ── Login page ─────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

.login-logo {
    font-size: 2rem;
    color: var(--pc-primary);
}

/* ── Dashboard cards ────────────────────────────────────────────── */
.stat-card {
    background: #fff !important;
    border: 1px solid #adb5bd;
    border-radius: 8px;
    color: #212529 !important;
    transition: transform .2s, box-shadow .2s;
}

.stat-card.bg-primary { border-color: #0d6efd !important; }
.stat-card.bg-success { border-color: #198754 !important; }
.stat-card.bg-info { border-color: #0dcaf0 !important; }
.stat-card.bg-warning { border-color: #ffc107 !important; }
.stat-card.bg-danger { border-color: #dc3545 !important; }
.stat-card.bg-dark,
.stat-card.bg-secondary { border-color: #6c757d !important; }

.stat-card.bg-primary .card-icon,
.stat-card.bg-primary .fw-bold { color: #0d6efd !important; }
.stat-card.bg-success .card-icon,
.stat-card.bg-success .fw-bold { color: #198754 !important; }
.stat-card.bg-info .card-icon,
.stat-card.bg-info .fw-bold { color: #0aa2c0 !important; }
.stat-card.bg-warning .card-icon,
.stat-card.bg-warning .fw-bold { color: #a97700 !important; }
.stat-card.bg-danger .card-icon,
.stat-card.bg-danger .fw-bold { color: #dc3545 !important; }
.stat-card.bg-dark .card-icon,
.stat-card.bg-dark .fw-bold,
.stat-card.bg-secondary .card-icon,
.stat-card.bg-secondary .fw-bold { color: #495057 !important; }

.stat-card .card-body {
    padding: .75rem 1rem;
}

.stat-card .fs-2 {
    font-size: 1.45rem !important;
}

.stat-card .fs-3,
.stat-card .fs-4,
.stat-card .fs-5 {
    font-size: 1.25rem !important;
}

.stat-card .opacity-75 {
    color: #495057 !important;
    opacity: 1 !important;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

.stat-card .card-icon {
    font-size: 1.8rem;
    opacity: 1;
}

.dashboard-card-link {
    color: inherit;
    display: block;
    height: 100%;
    text-decoration: none;
}

.dashboard-card-link:focus-visible {
    border-radius: 8px;
    outline: 3px solid #0d6efd;
    outline-offset: 3px;
}

.dashboard-card-link:hover .stat-card {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table th {
    background-color: #f1f3f5;
    font-weight: 600;
    white-space: nowrap;
}

/* ── ROI badge colours ───────────────────────────────────────────── */
.roi-positive { color: var(--pc-success); font-weight: 600; }
.roi-negative { color: var(--pc-danger);  font-weight: 600; }
.roi-neutral  { color: #6c757d; }

/* ── Progress bars ──────────────────────────────────────────────── */
.progress { height: 10px; border-radius: 5px; }

/* ── Navbar active state ────────────────────────────────────────── */
.navbar .nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #fff;
}

/* Keep the high-volume administration menu in a dedicated left rail. */
@media (min-width: 992px) {
    body.role-vertical-layout main,
    body.role-vertical-layout .role-vertical-footer,
    .role-vertical-banner {
        margin-left: var(--pc-sidebar-width);
        width: calc(100% - var(--pc-sidebar-width));
        box-sizing: border-box;
    }

    body.role-vertical-layout {
        overflow-x: hidden;
    }

    .role-vertical-navbar .navbar-collapse {
        align-items: center;
    }

    .role-vertical-navbar .role-menu-sidebar {
        display: flex !important;
        position: fixed !important;
        top: 56px;
        bottom: 0;
        left: 0;
        z-index: 1020;
        width: var(--pc-sidebar-width);
        margin: 0 !important;
        padding: .75rem .5rem 1rem;
        overflow-y: auto;
        flex-direction: column !important;
        align-items: stretch !important;
        background: var(--pc-primary);
        box-shadow: 3px 0 12px rgba(0, 0, 0, .12);
    }

    .role-vertical-navbar .role-menu-sidebar > .nav-item,
    .role-vertical-navbar .role-menu-sidebar > .nav-item > .nav-link {
        width: 100% !important;
    }

    .role-vertical-navbar .role-menu-sidebar > .nav-item > .nav-link {
        border-radius: .375rem;
        padding: .6rem .75rem;
    }

    .role-vertical-navbar .role-menu-sidebar .dropdown-menu {
        position: static !important;
        width: 100%;
        margin: 0;
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 991.98px) {
    .role-vertical-navbar .role-menu-sidebar {
        position: static;
        width: auto;
        box-shadow: none;
    }
}

.guided-tour-highlight {
    outline: 3px solid #ffc107;
    outline-offset: 3px;
    border-radius: 6px;
}

.popover {
    max-width: 320px;
}

/* ── Page header ────────────────────────────────────────────────── */
.page-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: .75rem;
    margin-bottom: 1.5rem;
}

/* ── Breakeven / ROI summary box ────────────────────────────────── */
.analysis-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
    margin-top: auto;
}

/* ── Responsive tweaks ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .stat-card .card-icon { font-size: 1.8rem; }
}



/* =============================================================================
   Payroll Module – Base Styles
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #212529;
    background: #f8f9fa;
}

/* ---------- Layout ---------- */
.pr-wrapper { display: flex; min-height: 100vh; }

.pr-sidebar {
    width: 220px;
    background: #1a2b3c;
    color: #c8d6e5;
    flex-shrink: 0;
    padding: 0;
}
.pr-sidebar .sidebar-logo {
    padding: 20px 16px 12px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #2e4055;
}
.pr-sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}
.pr-sidebar nav li a {
    display: block;
    padding: 9px 20px;
    color: #c8d6e5;
    text-decoration: none;
    font-size: 13.5px;
    transition: background .15s;
}
.pr-sidebar nav li a:hover,
.pr-sidebar nav li a.active {
    background: #2e4055;
    color: #fff;
}
.pr-sidebar nav .nav-section {
    padding: 10px 20px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #5d7a96;
}

.pr-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pr-topbar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 28px;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pr-topbar a { color: #0d6efd; text-decoration: none; }
.pr-topbar a:hover { text-decoration: underline; }
.pr-topbar .sep::before { content: "/"; margin: 0 6px; color: #adb5bd; }

.pr-content {
    padding: 28px;
    flex: 1;
}

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 24px;
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 14.5px;
}
.card-body { padding: 20px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    background: #f1f3f5;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8f9fa; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-primary   { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.btn-primary:hover { background: #0b5ed7; border-color: #0a58ca; }
.btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.btn-secondary:hover { background: #5c636a; }
.btn-success   { background: #198754; color: #fff; border-color: #198754; }
.btn-success:hover { background: #157347; }
.btn-warning   { background: #ffc107; color: #000; border-color: #ffc107; }
.btn-warning:hover { background: #ffca2c; }
.btn-danger    { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #bb2d3b; }
.btn-outline   { background: transparent; color: #0d6efd; border-color: #0d6efd; }
.btn-outline:hover { background: #0d6efd; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px 24px;
}
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
label { font-weight: 500; font-size: 13px; }
.required::after { content: " *"; color: #dc3545; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="password"], input[type="tel"], select, textarea {
    padding: 7px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13.5px;
    width: 100%;
    background: #fff;
    color: #212529;
}
input:focus, select:focus, textarea:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.form-hint { font-size: 12px; color: #6c757d; }
.form-actions { margin-top: 24px; display: flex; gap: 10px; align-items: center; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-size: 13.5px;
}
.alert-success { background: #d1e7dd; border-color: #a3cfbb; color: #0a3622; }
.alert-error   { background: #f8d7da; border-color: #f1aeb5; color: #58151c; }
.alert-warning { background: #fff3cd; border-color: #ffe69c; color: #664d03; }
.alert-info    { background: #cff4fc; border-color: #9eeaf9; color: #055160; }

/* ---------- Badges / Status ---------- */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active     { background:#d1e7dd; color:#0a3622; }
.badge-inactive   { background:#e2e3e5; color:#41464b; }
.badge-terminated { background:#f8d7da; color:#58151c; }
.badge-on_leave   { background:#fff3cd; color:#664d03; }
.badge-draft      { background:#e2e3e5; color:#41464b; }
.badge-submitted  { background:#cff4fc; color:#055160; }
.badge-approved   { background:#d1e7dd; color:#0a3622; }
.badge-rejected   { background:#f8d7da; color:#58151c; }
.badge-pending_review       { background:#fff3cd; color:#664d03; }
.badge-pending_confirmation { background:#cff4fc; color:#055160; }
.badge-confirmed  { background:#d1e7dd; color:#0a3622; }
.badge-paid       { background:#d1e7dd; color:#0a3622; }
.badge-failed     { background:#f8d7da; color:#58151c; }
.badge-voided     { background:#e2e3e5; color:#41464b; }

/* ---------- Misc ---------- */
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-muted   { color: #495057; }
.text-success { color: #198754; }
.text-danger  { color: #dc3545; }
.mb-0  { margin-bottom: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.gap-2 { gap: 8px; }

.divider { border: none; border-top: 1px solid #dee2e6; margin: 20px 0; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px 20px;
}
.stat-card .stat-label { font-size: 12px; color: #495057; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}
.empty-state p { margin: 8px 0; }

/* ---------- Payroll run table ---------- */
.payroll-summary td.money { text-align: right; font-variant-numeric: tabular-nums; }
.payroll-summary tfoot td { font-weight: 700; border-top: 2px solid #dee2e6; }