

/* self added */

/* Ensure the app takes full height */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    background-color: #0d1117; /* Very dark background */
    color: #ffffff;
}

/* A better 'muted' color for dark backgrounds */
.text-muted {
    color: #9ca3af !important; /* Medium-light grey */
    font-size: 0.85rem;
}

/* Validation and helper text consistency */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Ensure labels are always visible */
.form-label {
    color: #d1d5db;
    font-weight: 500;
}

.bb-page {
    display: flex;
    height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.bg-dark-main {
    background-color: #0d1117;
    min-height: 100%;
}

/* Fix for the "Small Screen" - ensure inputs take width */
.form-control {
    width: 100% !important;
    margin-bottom: 1rem;
}

/* Styling for inputs to match the screenshot */
.bg-dark-input {
    background-color: #1a1d27 !important;
    border: 1px solid #2d323e !important;
    color: white !important;
}

    .bg-dark-input::placeholder {
        color: #6c757d;
    }

/* The teal button from your screenshot */
.btn-teal {
    background-color: #00897b;
    color: white;
    border: none;
}

    .btn-teal:hover {
        background-color: #00796b;
        color: white;
    }

/* The Sidebar Container */
.sidebar {
    background-color: #11141b; /* Matching your React app's sidebar color */
}

/* #region loading */

.skeleton-loader {
    height: 20px;
    width: 100%;
    background: linear-gradient(90deg, #1a1d20 25%, #2a2e32 50%, #1a1d20 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* #endregion */


/* #region Sidebar */
/* Sidebar Nav Links */
.nav-item a {
    color: #d1d5db !important; /* Light grey text */
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

/* Hover & Active States */
.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.nav-item a.active {
    background-color: #2d323e; /* Lighter shade for active item */
    color: #ffffff !important;
    border-radius: 4px;
}

/* #endregion */

/* Icon Spacing */
.nav-item i {
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Header Text (Dashboard, Membership, etc.) */
.nav-header {
    color: #6b7280 !important; /* Muted grey for section headers */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* Table Styles */
.custom-table thead th {
    background-color: #5c6bc0;
    color: white;
    padding: 10px 15px; /* Reduced padding */
    font-size: 0.8rem;
    text-transform: capitalize;
    border: none;
}

.custom-table tbody td {
    border-bottom: 1px solid #2d323e;
    padding: 12px 8px;
    font-size: 0.9rem;
}

/* Specific Button Colors from image_1f084e.png */
.btn-magenta {
    background-color: #9c27b0;
    color: white;
}

.btn-magenta:hover {
    background-color: #7b1fa2;
    color: white;
}

.btn-teal {
    background-color: #00897b;
    color: white;
}

/* Profile placeholder circle */
.profile-pic-sm {
    width: 32px;
    height: 32px;
}

/* Background for the entire main area */
.bg-dark-main {
    background-color: #11141b;
    min-height: 100vh;
}

.btn-outline-secondary {
    border-color: #2d323e;
    color: #adb5bd;
}

.btn-outline-secondary:hover:not(:disabled) {
    background-color: #2d323e;
    color: white;
}

.btn-outline-secondary:disabled {
    border-color: #1a1d27;
    color: #4b5563;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background-color: #1a1d27;
    border: 1px solid #2d323e;
    border-radius: 4px;
    padding: 2px 12px;
    width: 240px; /* Fixed width to prevent it from taking too much space */
}

.search-wrapper:focus-within {
    border-color: #5c6bc0; /* Highlight color when typing */
    box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.2);
}

.search-icon {
    color: #6c757d;
    margin-right: 10px;
    font-size: 0.9rem;
}

.search-input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    padding: 6px 0;
}

.search-input::placeholder {
    color: #4b5563; /* Subtle placeholder color */
}

/* Dim the text for lapsed members slightly to show they are "inactive" */
.custom-lapsed-switch .form-check-input {
    background-color: #2d323e;
    border-color: #3f446e;
    cursor: pointer;
}

.custom-lapsed-switch .form-check-input:checked {
    background-color: #5c6bc0; /* Matching your "Add New" button color */
    border-color: #5c6bc0;
}

.custom-lapsed-switch .form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.lapsed-row {
    background-color: rgba(220, 53, 69, 0.05) !important; /* Subtle red tint */
    color: #adb5bd;
}

.lapsed-row:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Highlight the membership ID of lapsed users */
.lapsed-row td:first-child {
    border-left: 3px solid #dc3545;
}

.sortable-header {
    cursor: pointer;
    user-select: none; /* Prevents text highlighting on double clicks */
    transition: background-color 0.2s;
    position: relative;
    white-space: nowrap;
}

.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.sortable-header i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

/* Fix for the pagination buttons in dark mode */
.page-link {
    transition: all 0.2s;
    color: #adb5bd;
}

    .page-link:hover:not(.active) {
        background-color: #2d323e !important;
        color: white;
    }

.page-item.disabled .page-link {
    background-color: #11141b !important;
    border-color: #2d323e !important;
    color: #4b5563 !important;
}

.bg-primary-custom {
    background-color: #5c6bc0 !important;
}

.border-primary-custom {
    border-color: #5c6bc0 !important;
}

.invalid {
    border: 1px solid #ff4d4d !important;
    background-color: rgba(255, 77, 77, 0.05) !important;
}

.validation-message {
    color: #ff4d4d;
    font-weight: 500;
    margin-top: 5px;
    display: block;
}

/* --- Custom Global Toast System --- */

.lms-notification-portal {
    /* Fixed removes the element from the normal document flow */
    /* This prevents it from 'pushing' the HTML content down */
    position: fixed !important;
    
    /* Absolute coordinates on the screen */
    top: 20px !important;
    right: 20px !important;
    left: auto !important; 
    
    /* Ensure the container doesn't block clicks to the app underneath */
    width: 350px !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    
    z-index: 999999 !important; /* Stay on top of everything */
    pointer-events: none;
    display: block !important;
}

.lms-toast {
    /* Allows the card to sit relative to the portal container */
    position: absolute !important;
    top: 0;
    right: 0;
    pointer-events: auto; /* Re-enable clicks for the button */

    min-width: 300px;
    background-color: #1b5e20 !important; /* Success Green */
    color: white !important;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    /* Animation: Slide in from the right */
    animation: lmsSlideIn 0.3s ease-out forwards;
    transition: all 0.3s ease-in-out;
}

/* Level Colors */
.lms-toast.success { background-color: #1b5e20 !important; border-left: 6px solid #4caf50; }
.lms-toast.error { background-color: #b71c1c !important; border-left: 6px solid #f44336; }
.lms-toast.info { background-color: #0d47a1 !important; border-left: 6px solid #2196f3; }

.lms-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    margin-left: 15px;
}

.lms-close-btn:hover {
    opacity: 1;
}

@keyframes lmsSlideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.modal-content {
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
}

.modal-backdrop {
    background-color: #000;
    opacity: 0.7 !important;
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #ffc107 !important; /* Brighter gold for dark theme visibility */
}

/* Ensure the Approve button fits the row height */
.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* #region fae-in animation */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-content {
    animation: fadeIn 0.4s ease-out forwards;
}

/* endregion */

/* #region mobile friendly */

@media (max-width: 768px) {
    /* Hide the traditional table headers */
    .responsive-table thead {
        display: none;
    }
    /* Force the table, body, and rows to behave like blocks */
    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 1rem;
        border: 1px solid #30363d;
        border-radius: 8px;
        background: #161b22;
        padding: 0.5rem;
    }

    .responsive-table td {
        text-align: right;
        padding: 0.5rem;
        position: relative;
        border: none;
    }
    /* Create labels using the 'data-label' attribute */
    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: #7dd3fc; /* Your Light Blue */
        text-transform: uppercase;
        font-size: 0.75rem;
    }
}

/* #endregion */