/* =========================
   GLOBAL
========================= */

/*html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: #17191b;
    color: white;
    font-family: Arial, sans-serif;
}*/


/* =========================
   TOP NAVBAR
========================= */

/*.top-navbar {
    height: 56px;
    background: #1b1d1f;
    border-bottom: 1px solid #34373a;
    padding: 0 18px;
}

    .top-navbar .navbar-brand {
        color: #e4ded7;
        font-size: 16px;
        font-weight: 700;
    }

    .top-navbar .nav-link {
        color: #bdbdbd;
        font-size: 14px;
    }

        .top-navbar .nav-link:hover {
            color: #ffffff;
        }*/


/* =========================
   APP LAYOUT
========================= */

/*.app-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}*/


/* =========================
   SIDEBAR
========================= */

/*.sidebar {
    width: 190px;
    flex-shrink: 0;
    background: #191b1d;
    border-right: 1px solid #34373a;
    display: flex;
    justify-content: center;
}*/


/* This centers the navigation vertically */
/*.sidebar-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-height: 420px;
}*/


/* =========================
   SIDEBAR ITEMS
========================= */

/*.sidebar-item {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 44px;
    padding: 0 22px;
    color: #bcbcbc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .sidebar-item i {
        font-size: 17px;
        width: 20px;
        text-align: center;
        color: #9ea5aa;
    }

    .sidebar-item:hover {
        background: #26292b;
        color: #ffffff;
    }

        .sidebar-item:hover i {
            color: #ffffff;
        }*/


    /* ACTIVE ITEM */

    /*.sidebar-item.active {
        background: #303335;
        color: #ffffff;
        border-left-color: #8faed0;
    }

        .sidebar-item.active i {
            color: #a8c7e5;
        }*/


/* =========================
   MAIN CONTENT
========================= */

/*.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px;
    background: #17191b;
}*/


/* =========================
   PAGE TITLE
========================= */

/*.page-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #d8d8d8;
}*/


/* =========================
   STATISTICS
========================= */

/*.stats-row {
    max-width: 520px;
}

.stat-card {
    height: 84px;
    background: #1b1d1f;
    border-radius: 9px;
    padding: 17px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #adadad;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 25px;
    font-weight: 700;
    color: #d3d3d3;
    line-height: 1;
}*/


/* =========================
   RECENT PASSES
========================= */

/*.recent-passes {
    margin-top: 23px;
    max-width: 515px;
    border: 1px solid #393c3f;
    border-radius: 13px;
    overflow: hidden;
    background: #1a1c1e;
}

.recent-passes-header {
    padding: 11px 17px;
    font-size: 14px;
    font-weight: 700;
    color: #cccccc;
    border-bottom: 1px solid #34373a;
}*/


/* =========================
   TABLE
========================= */

/*.passes-table {
    color: #c6c6c6;
}

    .passes-table > :not(caption) > * > * {
        background: transparent;
        color: #bfbfbf;
        border-bottom-color: #34373a;
        padding: 8px 17px;
        font-size: 13px;
    }

    .passes-table thead th {
        color: #9d9d9d;
        font-weight: 700;
    }

    .passes-table tbody td {
        font-weight: 600;
    }

    .passes-table tbody tr:last-child td {
        border-bottom: none;
    }*/


/* =========================
   STATUS
========================= */

/*.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.status-active {
    background: #0d3218;
    color: #42b766;
}

.status-expired {
    background: #3c1118;
    color: #e46b79;
}*/


/* =========================
   FOOTER
========================= */

/*.app-footer {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #1b1d1f;
    border-top: 1px solid #34373a;
    color: #777;
    font-size: 14px;
}

    .app-footer a {
        color: #6ea8dc;
        text-decoration: none;
    }

        .app-footer a:hover {
            text-decoration: underline;
        }*/


/* =========================
   MOBILE
========================= */

/*@media (max-width: 768px) {

    .sidebar {
        width: 60px;
    }

    .sidebar-content {
        max-height: 420px;
    }

    .sidebar-item {
        justify-content: center;
        padding: 0;
    }

        .sidebar-item span {
            display: none;
        }

        .sidebar-item i {
            font-size: 18px;
        }

    .main-content {
        padding: 15px;
    }
}*/


body {
    background: #f5f6f8;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Sidebar */
.sidebar {
    width: 220px;
    min-height: calc(100vh - 56px);
    background: #1e2530;
    color: #cfd3d8;
    position: fixed;
    left: 0;
    top: 56px;
}

    .sidebar .brand {
        font-weight: 600;
        font-size: 1.1rem;
        color: #fff;
        padding: 1.1rem 1.25rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .sidebar .nav-link {
        color: #cfd3d8;
        padding: 0.65rem 1.25rem;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9rem;
        border-left: 3px solid transparent;
    }

        .sidebar .nav-link:hover {
            background: rgba(255,255,255,0.05);
            color: #fff;
        }

        .sidebar .nav-link.active {
            background: rgba(255,255,255,0.08);
            color: #fff;
            border-left: 3px solid #4f8cff;
        }

.main-content {
    margin-left: 220px;
    
    padding: 1.5rem 1.75rem;
}

.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

    .stat-card .stat-number {
        font-size: 1.6rem;
        font-weight: 600;
    }

    .stat-card .stat-label {
        font-size: 0.8rem;
        color: #8a8f98;
    }

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8a8f98;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.badge-status-active {
    background: #e6f7ee;
    color: #1a9c5e;
    font-weight: 500;
}

.badge-status-expired {
    background: #fdeaea;
    color: #d9463f;
    font-weight: 500;
}

.badge-status-suspended {
    background: #fff4e0;
    color: #c8790a;
    font-weight: 500;
}

.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9ecf2;
    color: #5b6472;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.topbar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 0.85rem 1.25rem;
}
.topnav {
    height: 56px;
    background: #1e2530;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

    .topnav .nav-link {
        color: #cfd3d8 !important;
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem !important;
    }

        .topnav .nav-link:hover {
            color: #fff !important;
        }

    /* Force the login partial's <ul> to sit on the right and lay out inline */
    .topnav ul.navbar-nav {
        margin-left: auto !important;
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        list-style: none;
        padding: 0;
    }

        .topnav ul.navbar-nav .nav-item {
            list-style: none;
        }

        /* Style the plain nav-link/text-dark links as buttons, without editing _LoginPartial */
        .topnav ul.navbar-nav .nav-link.text-dark,
        .topnav ul.navbar-nav .btn-link.text-dark {
            color: #cfd3d8 !important;
            text-decoration: none;
            border: 1px solid transparent;
            border-radius: 0.375rem;
            padding: 0.35rem 0.9rem !important;
            font-size: 0.85rem;
        }

        /* Signed-out state: 1st link = Register (outline), 2nd = Login (solid blue) */
        .topnav ul.navbar-nav .nav-item:nth-child(1) .nav-link {
            border-color: #cfd3d8 !important;
        }

            .topnav ul.navbar-nav .nav-item:nth-child(1) .nav-link:hover {
                background: rgba(255,255,255,0.08);
            }

        .topnav ul.navbar-nav .nav-item:nth-child(2) .nav-link {
            background: #0d6efd !important;
            color: #fff !important;
        }

            .topnav ul.navbar-nav .nav-item:nth-child(2) .nav-link:hover {
                background: #0b5ed7 !important;
            }



.page-section {
    margin-top:2.5rem;
}

.chart-wrap {
    position: relative;
    height: 260px;
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chart-wrap canvas {
        max-width: 100%;
        max-height: 100%;
    }



.badge-status-superseded {
    background: #eef0f3;
    color: #6b7280;
    font-weight: 500;
}

.badge-status-info {
    background: #e8f0ff;
    color: #3b6fd4;
    font-weight: 500;
}

/* two-column layout: fixed profile column + flexible history column */
#page-person-details .pd-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

#page-person-details .pd-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

#page-person-details .pd-grow {
    flex: 1 1 auto;
}

@media (max-width: 991.98px) {
    #page-person-details .pd-grid {
        grid-template-columns: 1fr;
    }
}

/* make every card on this page match the dashboard cards */
#page-person-details .card {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* profile */
#page-person-details .pd-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    background: #e9ecf2;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e3e6eb;
}

#page-person-details .pd-dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f0f1f4;
    font-size: .9rem;
}

    #page-person-details .pd-dl > div:last-child {
        border-bottom: 0;
    }

#page-person-details .pd-dl dt {
    font-weight: 400;
    color: #8a8f98;
}

#page-person-details .pd-dl dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

/* current pass */
#page-person-details .pd-qr {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: #1e2530;
    background: #f5f6f8;
    border-radius: 10px;
}

#page-person-details .pd-pass-code {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

#page-person-details .pd-last-scan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid #f0f1f4;
}

/* stat cards (uses your .stat-card / .stat-icon / .stat-number / .stat-label) */
#page-person-details .pd-stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 767.98px) {
    #page-person-details .pd-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#page-person-details .pd-ic-blue {
    background: #e8f0ff;
    color: #3b7ddd;
}

#page-person-details .pd-ic-green {
    background: #e6f7ee;
    color: #1a9c5e;
}

#page-person-details .pd-ic-red {
    background: #fdeaea;
    color: #d9463f;
}

#page-person-details .pd-ic-amber {
    background: #fff4e0;
    color: #c8790a;
}

/* tabs */
#page-person-details .pd-tabs {
    display: flex;
    gap: .25rem;
    padding: .4rem 1rem 0;
    border-bottom: 1px solid #eef0f3;
}

#page-person-details .pd-tab {
    display: flex;
    align-items: center;
    gap: .45rem;
    background: none;
    border: 0;
    padding: .75rem .9rem;
    font-size: .9rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

    #page-person-details .pd-tab:hover {
        color: #1e2530;
    }

    #page-person-details .pd-tab.active {
        color: var(--bs-primary, #0d6efd);
        border-bottom-color: var(--bs-primary, #0d6efd);
    }

    #page-person-details .pd-tab:focus {
        outline: 0;
    }

    #page-person-details .pd-tab:focus-visible {
        box-shadow: inset 0 0 0 2px rgba(13,110,253,.35);
        border-radius: 6px 6px 0 0;
    }

#page-person-details .pd-count {
    background: #eef0f3;
    color: #6b7280;
    font-size: .7rem;
    font-weight: 600;
    padding: .05rem .5rem;
    border-radius: 999px;
}

#page-person-details .pd-tab.active .pd-count {
    background: #e8f0ff;
    color: var(--bs-primary, #0d6efd);
}

#page-person-details .pd-pane {
    padding: 1rem 1.25rem 1.25rem;
}

/* filter pills */
#page-person-details .pd-filter {
    display: inline-flex;
    gap: .35rem;
    flex-wrap: wrap;
}

    #page-person-details .pd-filter button {
        background: #fff;
        border: 1px solid #e3e6eb;
        color: #5b6472;
        padding: .2rem .8rem;
        border-radius: 999px;
        font-size: .8rem;
        font-weight: 500;
    }

        #page-person-details .pd-filter button:hover {
            background: #f5f6f8;
        }

        #page-person-details .pd-filter button.active {
            background: var(--bs-primary, #0d6efd);
            border-color: var(--bs-primary, #0d6efd);
            color: #fff;
        }

        #page-person-details .pd-filter button:focus {
            outline: 0;
        }

        #page-person-details .pd-filter button:focus-visible {
            box-shadow: 0 0 0 3px rgba(13,110,253,.25);
        }

.pd-open {
    cursor: pointer;
}

    .pd-open:hover span {
        text-decoration: underline;
    }