﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
:root {
    --appbar-height: 64px; /* match your header height */
}

/* ================================
   ADMIN PORTAL THEME (LIGHT)
   Match Customer Portal look
================================ */

/* page background */
/* page background */
html, body {
    margin: 0;
    padding: 0;
    background-color: #f5f6f7 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* IMPORTANT: let the page scroll normally again */
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.vs-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 🔑 stops page scroll */
}

/* LAYOUT ROOT */
.vs-layout-root {
    /* min-height: 100vh;  <-- REMOVE this */
    height: 100%; /* NEW */
    background: #f5f6f7;
    color: #111;
    display: flex;
    flex-direction: column;
}

/* Shell under the top bar */
.vs-shell {
    display: flex;
    height: calc(100vh - var(--appbar-height));
}



/* =========================
   TOP BAR
========================= */
.vs-topbar {
    background: #363535;
    border-bottom: 1px solid #222;
    color: #fff;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.vs-topbar-inner {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vs-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vs-topbar-logo-img {
    height: 36px;
    width: auto;
}

.vs-topbar-brand {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.vs-topbar-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    flex: 1;
}

.vs-user-email {
    font-size: 14px;
    color: #f5f5f5;
}

.sidebar-toggle {
    border: none;
    background: transparent;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    margin-right: 4px;
    cursor: pointer;
    font-size: 1.25rem;
}

    .sidebar-toggle:focus {
        outline: none;
    }


/* =========================
   SIDEBAR
========================= */
.vs-sidebar {
    width: 220px;
    min-width: 220px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    color: #111;
    display: flex;
    flex-direction: column;
    transition: width 0.18s ease;
    /* NEW: allow its own vertical scroll so Logout is always reachable */
    overflow-y: auto;
    min-height: 0;
    /* 🔹 NEW: make sidebar full viewport height so footer sits at bottom */
    height: 100vh;
}


    /* collapsed state */
    .vs-sidebar.collapsed {
        width: 64px;
        min-width: 64px;
    }

        /* hide header text when collapsed */
        .vs-sidebar.collapsed .vs-sidebar-header {
            padding-left: 0;
            padding-right: 0;
            text-align: center;
        }

        .vs-sidebar.collapsed .vs-sidebar-logo,
        .vs-sidebar.collapsed .vs-sidebar-sub {
            display: none;
        }

        /* nav links: only icon centered */
        .vs-sidebar.collapsed .vs-nav-link {
            justify-content: center;
            padding: 10px 0;
        }

            .vs-sidebar.collapsed .vs-nav-link i {
                margin: 0;
            }

        /* hide text labels */
        .vs-sidebar.collapsed .nav-text {
            display: none;
        }

        /* logout button icon only */
        .vs-sidebar.collapsed .vs-logout {
            justify-content: center;
            padding: 10px 0;
            text-align: center !important;
        }

            .vs-sidebar.collapsed .vs-logout i {
                margin-right: 0;
                text-align: center !important;
            }

.vs-sidebar-header {
    padding: 16px 16px 8px;
    border-bottom: 1px solid #eeeeee;
}

.vs-sidebar-logo {
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.vs-sidebar-sub {
    font-size: 12px;
    color: #777;
}

/* nav links list */
.vs-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* individual links */
.vs-nav-link {
    color: #333 !important;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

    .vs-nav-link i {
        font-size: 1rem;
    }

    .vs-nav-link:hover {
        background: rgba(0,0,0,0.03);
        color: #000 !important;
        text-decoration: none;
    }

    /* active route */
    .vs-nav-link.active {
        background: #00719E;
        color: #ffffff !important;
    }

/* logout fixed at bottom */
.vs-sidebar-footer {
    padding: 12px 16px 18px;
    border-top: 1px solid #eeeeee;
}

.vs-logout {
    width: 100%;
    background: transparent;
    color: #d9534f !important;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
    font-size: 0.95rem;
}

    .vs-logout:hover {
        background: #fbe9e7;
    }
.vs-nav-logout {
    margin-top: 16px;
}
/* =========================
   MAIN CONTENT AREA
========================= */
.vs-main {
    flex: 1;
    background: #f5f6f7;
    padding: 20px 20px 10px;
    overflow: hidden; /* keep page from scrolling; grid scrolls instead */
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.vs-main-inner {
    flex: 1 1 auto;
    min-height: 0; /* 🔑 REQUIRED for flex scrolling */
    display: flex;
    flex-direction: column;
}




/* page title */
.admin-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

/* =========================
   LOGIN PAGE
========================= */
.admin-auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f7;
}

.admin-auth-card {
    width: 760px;
    max-width: 95%;
    background: #ffffff;
    border-radius: 20px;
    padding: 26px 30px 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

/* top title */
.admin-auth-header {
    margin-bottom: 12px;
}

.admin-auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
}

.admin-auth-subtitle {
    font-size: 14px;
    color: #777;
}

/* inner box for fields (like Customer Portal) */
.admin-auth-inner {
    margin-top: 8px;
    padding: 20px 18px;
    border-radius: 14px;
    background-color: #ffffff;
    border: 1px solid #e3e3e3;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

/* labels + inputs */
.input-label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
    display: block;
}

.admin-auth-input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    background: #fff;
}

    .admin-auth-input:focus {
        outline: none;
        border-color: #00719E;
        box-shadow: 0 0 0 3px rgba(0,113,158,0.16);
    }

/* password with eye icon */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-auth-input-password {
    padding-right: 40px; /* make room for eye */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #888;
    padding: 0;
}

    .toggle-password i {
        font-size: 16px;
    }

/* links row under password */
.login-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 10px;
    font-size: 13px;
}

.login-link {
    color: #00719E;
    text-decoration: none;
    cursor: pointer;
}

    .login-link:hover {
        text-decoration: underline;
    }

/* login button */
.admin-auth-btn {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: none;
    background: #00719E;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

    .admin-auth-btn:hover {
        opacity: 0.95;
    }

/* error text */
.alert-error {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #d9534f;
    text-align: center;
}


/* =========================
   GRID / TABLE STYLING
========================= */

/* =========================
   GRID / TABLE STYLING
========================= */

/* outer card for grids */
.admin-grid-card {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    flex: 1; /* fill remaining space under page title */
    min-height: 0; /* allow inner scroll */
}

/* SCROLLABLE AREA – this is where BOTH scrollbars live */
.admin-grid-table-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
}

/* table */
.admin-table {
    border-collapse: collapse;
    font-size: 14px;
    color: #222;
    table-layout: auto;
    /* override Bootstrap .table { width:100% } */
    width: max-content;
    min-width: 100%;
}

    /* header row */
    .admin-table thead tr {
        background: #363535;
        color: #ffffff;
    }

    .admin-table thead th {
        padding: 10px 12px;
        border-bottom: 1px solid #e3e3e3;
        font-weight: 600;
        white-space: nowrap;
        /* sticky within the scroll container */
        position: sticky;
        top: 0;
        z-index: 2;
        background: #363535;
    }

    /* body rows */
    .admin-table tbody tr {
        border-bottom: 1px solid #eeeeee;
    }

    .admin-table tbody td {
        padding: 9px 12px;
        vertical-align: middle;
    }

    .admin-table tbody tr:nth-child(even) {
        background: #fafafa;
    }

    .admin-table tbody tr:hover {
        background: #f0f4ff;
    }

    /* important columns: keep in one line + wide enough */
    .admin-table th.no-wrap,
    .admin-table td.no-wrap {
        white-space: nowrap;
        min-width: 130px; /* covers Phone, 3cx Key, 3CX Version, Status */
    }

    /* tiny breathing room in the very last column */
    .admin-table thead th:last-child,
    .admin-table tbody td:last-child {
        padding-right: 16px;
    }

/* utilities */
.no-wrap {
    white-space: nowrap;
}

.btn-action {
    padding: 3px 8px;
    font-size: 13px;
}

/* checkboxes smaller */
.custom-checkbox {
    transform: scale(0.9);
}

.vs-appbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #333; /* match your existing header color */
    color: #fff;
    padding: 8px 16px;
}

.vs-appbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vs-appbar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
}

.vs-appbar-right {
    display: flex;
    align-items: center;
}

.vs-appbar-logout {
    border: none;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}

    .vs-appbar-logout:hover {
        background: rgba(255, 255, 255, 0.12);
        cursor: pointer;
    }
.vs-page-toggle {
    margin-bottom: 8px;
}
.vs-sidebar-toggle-container {
    padding: 10px 12px 4px;
    display: flex;
    justify-content: flex-end;
}

.vs-sidebar-toggle {
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: background 0.15s ease;
}

    .vs-sidebar-toggle:hover {
        background: #e5e5e5;
    }

/* In collapsed mode, center the toggle */
.vs-sidebar.collapsed .vs-sidebar-toggle-container {
    justify-content: center;
}
