/* HVDS Client Portal - shared styling */

/* ---- Header (customer-portal navbar) ---- */
.cp-navbar { background-color: #083a81; }
.cp-navbar-inner {
    display: flex; align-items: center; gap: .5rem;
    width: 90%; max-width: 1400px; margin: 0 auto; min-height: 64px;
}
.cp-navbar-logo { margin-right: auto; padding: .5rem 0; display: flex; align-items: center; }
.cp-navbar-logo img { height: 40px; width: auto; }
.cp-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: .15rem; }
.cp-nav-item {
    display: flex; align-items: center; gap: .5rem; padding: 0 .8rem;
    color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
    background: none; border: 0;
}
.cp-nav-item:hover { color: #fff; text-decoration: none; opacity: .85; }
.cp-nav-item .cp-icon { color: rgba(255,255,255,.55); }
.cp-sep { width: 1px; height: 24px; background: #839dc0; margin: 0 .5rem; }
.cp-company .dropdown-toggle { color: #fff; border-color: rgba(255,255,255,.4); }

/* ---- Page shell: align content to the header container ---- */
.cp-shell { width: 90%; max-width: 1400px; margin: 0 auto; }

/* ---- Sub-navigation bar (site name + tabs) ---- */
.cp-subnav { background: #fff; border-bottom: 1px solid #e5e8ec; }
.cp-subnav-inner {
    width: 90%; max-width: 1400px; margin: 0 auto;
    display: flex; align-items: stretch; min-height: 56px;
}
.cp-site-name {
    display: flex; align-items: center; flex: 0 0 auto;
    width: 16.666%; min-width: 160px; padding-right: 1rem;
    font-weight: 700; color: #03275b;
    border-right: 1px solid #e5e8ec;
}
.cp-tabs { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0 0 0 .75rem; }
.cp-tabs li { display: flex; }
.cp-tabs .cp-tab {
    display: flex; align-items: center; padding: 0 1.15rem;
    color: #03275b; font-weight: 600; text-decoration: none;
    border-bottom: 3px solid transparent; transition: .15s ease background;
}
.cp-tabs .cp-tab:hover { background: #f4f6f9; }
.cp-tabs .cp-tab.active { background: #eef1f5; border-bottom-color: #083a81; }

@media (max-width: 900px) {
    .cp-subnav-inner { flex-wrap: wrap; }
    .cp-site-name { width: 100%; padding: .6rem 0; min-height: auto; }
    .cp-tabs { flex-wrap: wrap; }
}

/* ---- Sidebar (site details / account manager) ---- */
.cp-aside { border-right: 1px solid #e5e8ec; }
.cp-shell > .row > main { padding-left: 1.5rem; }
@media (max-width: 767px) {
    .cp-aside { border-right: 0; border-bottom: 1px solid #e5e8ec; }
    .cp-shell > .row > main { padding-left: 0; }
}
.cp-side-heading { font-weight: 700; color: #03275b; margin: 0 0 .5rem; }
.cp-side-label { font-weight: 700; font-size: .85rem; color: #000; margin: 0; }
.cp-side-value { color: #333; margin: 0 0 .25rem; }

/* ---- Home service tiles ---- */
.home-wrap {
    padding: 1.5rem 2rem 2.5rem;
    min-height: calc(100vh - 64px);
    background-image: linear-gradient(rgba(240, 242, 245, 0.78), rgba(240, 242, 245, 0.78)), url("../img/hvds_login_bg.jpeg");
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}
.service-cards {
    display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center;
    margin: 2rem auto; max-width: 1200px;
}
.service-card {
    background: #fff; width: calc(25% - 1.5rem); min-width: 220px;
    box-shadow: 0 0 1rem rgba(0,0,0,.1); border-radius: 1rem;
    text-align: center; overflow: hidden;
}
.service-card > a {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 2.5rem 1.5rem; min-height: 220px; height: 100%;
    text-decoration: none; transition: .3s ease all;
}
.service-card > a:hover { background: rgba(8,58,129,.08); }
.service-card .cp-tile-icon { font-size: 3.4rem; color: #03275b; }
.service-card .title { font-size: 1.35rem; font-weight: 600; color: #000; margin: 1.25rem 0 .25rem; }
.service-card .cta { margin-top: 1rem; color: #03275b; font-size: 1.2rem; }
.service-card.blue { background: linear-gradient(285deg, #083A81 0%, #083A81 50%, #1B498B 50%); }
.service-card.blue .cp-tile-icon,
.service-card.blue .title,
.service-card.blue .cta { color: #fff; }
.service-card.blue > a:hover { background: rgba(255,255,255,.06); }
@media (max-width: 1100px) { .service-card { width: calc(33.333% - 1.34rem); } }
@media (max-width: 800px)  { .service-card { width: calc(50% - 1rem); } }
@media (max-width: 560px)  { .service-card { width: 100%; } }

/* ---- Site Visits (int_type) ---- */
.breadcrumb {
    background: #f3f5f7; padding: .7rem 1.1rem; border-radius: 8px;
    margin-bottom: 1.25rem; font-size: .9rem;
}
.breadcrumb a { color: #03275b; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.cp-page-title { font-weight: 700; color: #03275b; margin: .25rem 0 1.5rem; }

.filter-controls {
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.filter-controls .search-bar { position: relative; flex: 1 1 260px; max-width: 420px; }
.filter-controls .search-bar input {
    width: 100%; padding: .6rem 2.4rem .6rem .9rem;
    border: 1px solid #cdd4df; border-radius: 8px;
}
.filter-controls .search-bar .fa-magnifying-glass {
    position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: #83919f;
}
.filter-controls .filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hvds-input { padding: .55rem .8rem; border: 1px solid #cdd4df; border-radius: 8px; background: #fff; }

.card-view-wrapper { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.card-view-wrapper .site-visit {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start; row-gap: .6rem;
    background: #fff; border: 1px solid #e0e0e0; border-radius: .75rem;
    width: calc(16.666% - .84rem); min-width: 140px;
    padding: 1.5rem .75rem 1.25rem; text-align: center;
    text-decoration: none; transition: .2s ease background;
}
.card-view-wrapper .site-visit:hover { background: #e0e0e0; }
.site-visit .icon-wrapper { position: relative; }
.site-visit .cp-folder { font-size: 2.6rem; color: #03275b; }
.site-visit .counter {
    position: absolute; top: -.3rem; right: -.6rem;
    width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: #083a81; color: #fff; font-weight: 700; font-size: .8rem;
    display: grid; place-content: center;
}
.site-visit .date { font-size: .95rem; font-weight: 700; color: #000; margin: .4rem 0 0; }
.site-visit .status {
    display: inline-block; font-size: .72rem; color: #fff; font-weight: 700;
    padding: .3rem .8rem; border-radius: 10px; background: #5e5e5e; margin-top: .25rem;
}
.site-visit .status.booked { background: #cb670a; }
.site-visit .status.in-progress { background: #4764f9; }
.site-visit .status.completed { background: #027700; }

.cp-empty { color: #6c757d; padding: 2rem 0; }

.cp-pagination {
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; justify-content: space-between; margin-top: 1.5rem;
}
.cp-pagination .results { color: #4a4a4a; font-size: .9rem; }
.cp-pagination .pages { display: flex; list-style: none; gap: .35rem; margin: 0; padding: 0; }
.cp-pagination .pages li a {
    display: grid; place-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem;
    border: 1px solid #cdd4df; border-radius: 6px; text-decoration: none; color: #03275b; background: #fff;
}
.cp-pagination .pages li.active a { background: #083a81; color: #fff; border-color: #083a81; }

@media (max-width: 1200px) { .card-view-wrapper .site-visit { width: calc(25% - .75rem); } }
@media (max-width: 800px)  { .card-view-wrapper .site-visit { width: calc(33.333% - .667rem); } }
@media (max-width: 560px)  { .card-view-wrapper .site-visit { width: calc(50% - .5rem); } }
