/* Family Connect - VHT Portal styling (Bootstrap 5 + custom sidebar layout) */

:root {
    --vht-primary: #1a5f7a;
    --vht-primary-dark: #123f52;
    --vht-sidebar-width: 250px;
}

body.vht-body {
    background: #f4f6f8;
    color: #22303f;
}

/* ---------------- Sidebar ---------------- */
.vht-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--vht-sidebar-width);
    background: var(--vht-primary-dark);
    color: #fff;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
body.vht-sidebar-open .vht-sidebar {
    transform: translateX(0);
}
.vht-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.vht-sidebar-brand i {
    font-size: 22px;
    color: #6fd0e8;
}
.vht-sidebar-brand small {
    font-weight: 400;
    opacity: 0.75;
}
.vht-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
}
.vht-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #dce9ee;
    text-decoration: none;
    font-size: 14px;
}
.vht-sidebar-nav a i {
    width: 18px;
    text-align: center;
    color: #9fd4e6;
}
.vht-sidebar-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Overlay behind the sidebar on mobile */
.vht-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
}
body.vht-sidebar-open .vht-overlay {
    display: block;
}

/* ---------------- Content area ---------------- */
.vht-content-wrapper {
    min-height: 100vh;
}
.vht-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-bottom: 1px solid #e6e9ec;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.vht-toggle-btn {
    border: none;
    background: var(--vht-primary);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 16px;
    flex-shrink: 0;
}
.vht-toggle-btn:hover {
    background: var(--vht-primary-dark);
}
.vht-welcome {
    font-size: 14px;
}
.vht-main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

/* Desktop: sidebar always visible, content shifted over */
@media (min-width: 992px) {
    .vht-sidebar {
        transform: translateX(0);
    }
    .vht-content-wrapper {
        margin-left: var(--vht-sidebar-width);
    }
    .vht-overlay {
        display: none !important;
    }
}

.vht-page-title {
    font-size: 22px;
    margin-bottom: 16px;
}
.vht-page-subtitle {
    font-size: 18px;
    margin: 24px 0 8px;
}

/* ---------------- Cards ---------------- */
.vht-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.vht-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: inherit;
}
.vht-card-icon {
    font-size: 26px;
    color: var(--vht-primary);
    margin-bottom: 8px;
}
.vht-card-value { font-size: 32px; font-weight: 700; color: var(--vht-primary); }
.vht-card-label { margin-top: 6px; color: #55606a; }
.vht-card-warning .vht-card-icon,
.vht-card-warning .vht-card-value { color: #c0392b; }
.vht-card-action { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ---------------- Cards/table/form containers ---------------- */
.vht-table-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 4px;
}
.vht-form-card {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 760px;
}

/* ---------------- Searchable select ---------------- */
.vht-searchable-select {
    position: relative;
}
.vht-ss-results {
    display: none;
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cdd5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.vht-ss-item {
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
}
.vht-ss-item:hover {
    background: #eef3f5;
}

/* ---------------- Auth pages (login / forgot password) ---------------- */
.vht-auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--vht-primary), #2c8fa8);
    margin: 0;
    padding: 16px;
}
.vht-auth-box {
    background: #fff;
    padding: 36px 32px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}
.vht-auth-icon {
    text-align: center;
    font-size: 34px;
    color: var(--vht-primary);
    margin-bottom: 8px;
}
.vht-auth-box h1 { font-size: 20px; margin: 0 0 4px; text-align: center; }
.vht-subtitle { color: #67737d; font-size: 13px; margin: 0 0 20px; text-align: center; }
.vht-auth-links { margin-top: 16px; font-size: 13px; text-align: center; }

.btn-primary {
    --bs-btn-bg: var(--vht-primary);
    --bs-btn-border-color: var(--vht-primary);
    --bs-btn-hover-bg: var(--vht-primary-dark);
    --bs-btn-hover-border-color: var(--vht-primary-dark);
    --bs-btn-active-bg: var(--vht-primary-dark);
}
