/* =====================================
   GLOBAL RESET & TYPOGRAPHY
===================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

*, h1, h2, h3, h4, h5 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif !important;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
}

body {
    background-color: #f2f2f2;
}



/* =====================================
   CARD & TABLE STYLES
===================================== */

.custom-card {
    border: 2px solid hsl(225, 16%, 29%);
    border-radius: 16px;
    min-height: 550px;
    background: #fff;
}

/* Optional table polish (only applies if you add .custom-table) */
.custom-table thead th {
    border: 1px solid hsl(225, 16%, 29%);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    background-color: #f9f9f9;
}

.custom-table td,
.custom-table th {
    border-bottom: none;
}



/* =====================================
   SIDEBAR CONTENT
===================================== */

.netinfo-list {
    font-size: 12px;
}

.netinfo-item {
    line-height: 1.2;
    margin-bottom: 2px;
}

.netinfo-item b {
    font-weight: 500;
}



/* =====================================
   LOADING OVERLAY
===================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}



/* =====================================
   SIDEBAR & RESPONSIVE BEHAVIOR
===================================== */

/* Sidebar base (desktop) */
.sidebar {
    background: #f2f2f2;
}

/* Mobile hamburger button (INLINE, not floating) */
.sidebar-toggle {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 16px;
    cursor: pointer;
}

/* Mobile sidebar behavior */
@media (max-width: 767.98px) {

    .sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        padding: 20px 15px;
        overflow-y: auto;
        z-index: 1050;
        transition: left 0.3s ease-in-out;
        box-shadow: 4px 0 12px rgba(0,0,0,0.2);
    }

    .sidebar.show {
        left: 0;
    }
}



/* =====================================
   SIDEBAR OVERLAY
===================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}


/* =====================================
   Users.php
===================================== */

/* Status color styles */
.status-active {
    color: #198754; /* Bootstrap green */
    font-weight: 500;
}

.status-inactive {
    color: #6c757d; /* Bootstrap gray */
    font-weight: 500;
}

/* Card container */
.users-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Header */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.users-header h5 {
    margin: 0;
    font-weight: 600;
}

/* Table wrapper */
.users-table-wrapper {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

/* Table */
.users-table {
    margin: 0;
}

.users-table thead {
    background: #f8f9fa;
}

.users-table th {
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #dee2e6;
}

.users-table td {
    vertical-align: middle;
    font-size: 13px;
}

/* Status dropdown */
.status-select {
    min-width: 110px;
    font-size: 12px;
    border-radius: 8px;
}

/* Footer note */
.users-footer {
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
}


/* ==============================
   Billing Details – Responsive
============================== */

@media (max-width: 768px) {

    /* Header */
    .users-header h5 {
        font-size: 1rem;
    }

    /* Filters & buttons stack */
    .users-card .d-flex.align-items-center.gap-2 {
        flex-direction: column;
        align-items: stretch;
    }

    #monthFilter {
        max-width: 100% !important;
    }

    #btnLoadDetails,
    #btnSaveChanges {
        width: 100%;
    }

    /* Copy button */
    #copyTableBtn {
        width: 100%;
    }

    /* Billing period */
    #billingPeriodText {
        display: block;
        margin-top: 4px;
    }

    /* Table text */
    .users-table th,
    .users-table td {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Footer hint */
    .users-footer {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    .users-table th,
    .users-table td {
        font-size: 0.8rem;
    }
}

/* ==============================
   Billing Table X & Y Scroll
============================== */

.users-table-scroll {
    max-height: 420px;          /* Y scroll height */
    overflow-y: auto;           /* Vertical scroll */
    overflow-x: auto;           /* Horizontal scroll */
    border-radius: 12px;
}

/* Prevent column wrapping */
.users-table th,
.users-table td {
    white-space: nowrap;
}

/* Sticky header */
.users-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
    box-shadow: 0 1px 0 #dee2e6;
}
