* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    /* font-family: 'Open Sans', sans-serif; */
    /* font-family: 'Roboto', sans-serif; */
    font-family: 'Urbanist', sans-serif;
}

.pointer {
    cursor: pointer;
}

.sidebar {
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #333;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidebar content fills the full height via flex; menu scrolls within it */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-content h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
}

.logo {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.logo img {
    width: 70px;
    height: auto;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-menu {
    width: 100%;
    padding: 20px 0;
    flex: 1;          /* take all space after the logo header */
    overflow-y: auto; /* scroll when content is taller than the space */
    min-height: 0;    /* required for flex children to shrink below content size */
}

.sidebar-menu li {
    list-style: none;
    /* padding: 20px 0; */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar-menu a {
    display: block;
    width: 100%;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: #2D3B48;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 14px 0;
    cursor: pointer;
}

.sidebar-menu a i {
    margin: 0 15px;
    transition: color 0.3s ease;
}

.sidebar-menu li:hover {
    background-color: rgb(195 119 88 / 15%);
    cursor: pointer;
}

.sidebar-menu li:hover i {
    color: #eb6029;
}

/* Active State */
.sidebar-menu li.active>a {
    color: #eb6029;
    background-color: rgb(195 119 88 / 15%);
    /* border-left: 4px solid #eb6029; Optional: Add a left border indicator */
}

.sidebar-menu li.active>a i {
    color: #eb6029;
}

/* Submenu Styles */
.submenu {
    display: none;
    background-color: #f9f9f9;
    /* Slightly different background for submenu */
    padding-left: 0;
}

.submenu.show {
    display: block;
}

.submenu li a {
    padding-left: 50px;
    /* Indent submenu items */
    font-size: 0.95rem;
}

/* Requests row: keep everything on one line */
.submenu-toggle {
    display: flex;
    justify-content: space-between;
    /* left vs right */
    align-items: center;
    white-space: nowrap;
}

/* Left: bell + "Requests" */
.submenu-toggle .menu-left {
    display: inline-flex;
    align-items: center;
}

/* Right: two badges + chevron */
.submenu-toggle .menu-right {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    /* don't let badges wrap under bell */
}

/* Show Requests top badges side by side instead of stacked */
#menuRequestsContactBadge,
#menuRequestsSponsorBadge {
    position: static !important;
    /* stop absolute positioning */
    top: auto !important;
    right: auto !important;
    transform: none !important;
    display: inline-flex !important;
    margin-left: 0.35rem !important;
    /* put them next to each other */
}

/* space between badges */
.submenu-toggle .menu-right .badge-notification {
    margin-left: 0.35rem;
}

.dropdown-icon {
    margin-right: 15px !important;
    /* Override default margin */
    transition: transform 0.3s ease;
}

.has-submenu.open>.submenu-toggle .dropdown-icon {
    transform: rotate(180deg);
}

/* Main Content Start */
.main-content {
    background-color: #eff3f6;
    min-height: 100vh;
    margin-left: 300px;
    /* Same as sidebar width */
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* Collapsed sidebar */
.sidebar.collapsed {
    width: 60px;
    /* ~10-15% of typical desktop width */
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar.collapsed .sidebar-menu a {
    font-size: 0;
    padding: 16px 0;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu li {
    text-align: center;
}

.sidebar.collapsed .sidebar-menu li i {
    margin: 0;
    font-size: 1.4rem;
}

/* Adjust main content when sidebar is collapsed */
.main-content.sidebar-collapsed {
    margin-left: 60px;
}

.admin-heading {
    color: #2D3B48;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.admin-card {
    width: 100%;
    max-height: 100vh;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.edit-card {
    width: 100%;
    height: auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}


.blog-label {
    color: #110b11;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2%;
}

/* Main Content End */

/* Scroll Start */
.scroll {
    overflow-y: auto;
    max-height: 70vh;
}

/* Scroll End */


/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
    }

    .sidebar-menu li {
        margin-bottom: 20px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    /* Ensure collapsed state overrides the media query width if needed, 
       though the specific class should handle it. 
       We need to ensure main-content margin also collapses.
    */
    .sidebar.collapsed {
        width: 60px;
    }

    .main-content.sidebar-collapsed {
        margin-left: 60px;
    }
}

/* Additional responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .sidebar {
        width: 0;
        /* Hide sidebar by default on mobile or use toggle */
        left: -250px;
        /* Move off-screen */
    }

    .sidebar.collapsed {
        width: 0;
        left: -250px;
    }

    /* When we want to show it on mobile, we might need a different class like .mobile-open */

    /* For now, let's keep the user's requested behavior of "responsive".
       A common pattern:
       Sidebar hidden, toggle shows it as overlay.
       But to minimize drastic changes, let's just fix the width/alignment for now
       and maybe just reduce width further or allow horizontal scroll?
       Actually, let's make the sidebar 60px (collapsed) by default on mobile?
    */

    .sidebar {
        width: 60px;
    }

    .sidebar:not(.collapsed) {
        width: 250px;
        position: fixed;
        z-index: 1001;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    .main-content {
        margin-left: 60px;
    }

    .main-content.sidebar-collapsed {
        margin-left: 60px;
    }

    /* When expanded on mobile, it overlays, so we don't push main-content */

    .logo-text {
        font-size: 1.2rem;
        display: none;
        /* Hide text on mobile default (collapsed) */
    }

    .sidebar:not(.collapsed) .logo-text {
        display: flex;
    }
}


/* Dashboard Stats Widgets */
.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-content h1 {
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #2D3B48;
    font-size: 2rem;
}

.stat-content p {
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-card-icon {
    font-size: 3.5rem;
    color: #eb6029;
    opacity: 0.8;
    background: rgba(235, 96, 41, 0.1);
    padding: 10px;
    border-radius: 12px;
}

/* Table Enhancements */
.table thead th {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Lightbox overlay: full dark backdrop */
.main-content .lightbox-overlay,
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    /* darker backdrop */
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.main-content .lightbox-overlay.active,
.lightbox-overlay.active {
    display: flex;
}

/* Image sizing inside lightbox */
.lightbox-main {
    max-width: 90vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
    max-width: 90vw;
    padding: 10px 0;
}

/* Lightbox nav arrows in admin */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 2100;
    /* higher than image */
}

.lightbox-nav.prev {
    left: 10px;
}

.lightbox-nav.next {
    right: 10px;
}

.lightbox-nav i {
    font-size: 3rem;
    line-height: 1;
    color: #fff;
}

/* Admin gallery cards: keep total height stable */
.event-gallery-card {
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* or calc(100vh - 120px) if header present */
    max-height: 100vh;
}

/* Image section takes fixed space, text scrolls if needed */
.event-gallery-card .event-gallery-hero {
    flex: 0 0 auto;
    /* keep your 80vh hero height from styles.css */
}

.event-gallery-card .p-3 {
    flex: 1 1 auto;
    overflow-y: auto;
    /* scroll text, not whole card */
}

/* Stop base admin-card from auto-growing */
.admin-card {
    max-height: none;
}

/* Admin gallery cards: fixed height, no internal scroll */
.admin-card.event-gallery-card.gallery-card {
    display: flex;
    flex-direction: column;
    height: auto;
    /* let card size naturally */
    max-height: none;
}

/* Hero keeps fixed 80vh from styles.css */
.admin-card.event-gallery-card.gallery-card .event-gallery-hero {
    flex: 0 0 auto;
    height: 80vh;
    max-height: 80vh;
}

/* Text area: natural size, no scroll */
.admin-card.event-gallery-card.gallery-card .p-3 {
    flex: 0 0 auto;
    overflow: visible;
}

/* Fix floating alerts appearing behind modals */
.float-tip-warning,
.float-tip-success,
.float-tip-error {
    z-index: 2000 !important;
    position: fixed !important;
}

/* ════════════════════════════════════════════════════════════════
   ADMIN MOBILE UX IMPROVEMENTS
   ════════════════════════════════════════════════════════════════ */

/* ── Desktop: hide admin bottom nav ────────────────────────── */
@media (min-width: 992px) {
    .admin-mob-bottom-nav { display: none !important; }
}

/* ── Mobile: hide desktop sidebar, restore full-width layout ── */
@media (max-width: 991.98px) {
    .sidebar        { display: none !important; }
    .sidebar-toggle { display: none !important; }
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 76px !important;
    }
    .main-content.sidebar-collapsed {
        margin-left: 0 !important;
    }
}

/* ── Admin Mobile Bottom Navigation Bar ─────────────────────── */
.admin-mob-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
    z-index: 1100;
    align-items: stretch;
    justify-content: space-around;
    transition: transform 0.28s ease;
}
@media (max-width: 991.98px) {
    .admin-mob-bottom-nav { display: flex !important; }
}

/* ── Admin bottom nav items (orange active colour) ─────────── */
.admin-mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    background: none;
    border: none;
    border-top: 2px solid transparent;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.admin-mob-nav-item i {
    font-size: 22px;
    line-height: 1;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.admin-mob-nav-item.active,
.admin-mob-nav-item.pop-open {
    color: #eb6029;
    border-top-color: #eb6029;
}
.admin-mob-nav-item.active i,
.admin-mob-nav-item.pop-open i {
    transform: scale(1.15) translateY(-1px);
}
.admin-mob-nav-item:active { opacity: 0.65; }

/* ── Notification badge on bottom nav item ─────────────────── */
.admin-mob-nav-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ── Override sub-popup / drawer colours for admin (orange) ─── */
/* (position/animation comes from styles.css mob-subnav-pop etc.) */
.admin-mob-bottom-nav ~ .mob-subnav-pop .mob-subnav-link i,
.admin-mob-bottom-nav ~ .mob-more-drawer .mob-acc-icon,
.admin-mob-bottom-nav ~ .mob-more-drawer .mob-acc-direct i {
    color: #eb6029;
}

/* ── Drawer brand header (logo + Sampige NC) ─────────────────── */
.mob-drawer-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}
.mob-drawer-brand-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.mob-drawer-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #2D3B48;
    letter-spacing: 0.3px;
}

/* ────────────────────────────────────────────────────────────────
   ADMIN TABLE MOBILE — hide secondary columns below md (768px)
   Pages with unique tbody IDs are handled here.
   Pages sharing the #latestMembershipRequestsBody id get their own
   <style> block within the respective .php files.
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    /* ── Payments ── hide Email(3), Year(6), Pay Method(8) */
    #paymentsBody tr td:nth-child(3),
    #paymentsBody tr td:nth-child(6),
    #paymentsBody tr td:nth-child(8) {
        display: none !important;
    }
    #paymentsHead th:nth-child(3),
    #paymentsHead th:nth-child(6),
    #paymentsHead th:nth-child(8) {
        display: none !important;
    }

    /* ── Contact Requests ── hide Email(2), Phone(3), Date(6) */
    #contactRequestsBody tr td:nth-child(2),
    #contactRequestsBody tr td:nth-child(3),
    #contactRequestsBody tr td:nth-child(6) {
        display: none !important;
    }
    #contactRequestsHead th:nth-child(2),
    #contactRequestsHead th:nth-child(3),
    #contactRequestsHead th:nth-child(6) {
        display: none !important;
    }

    /* ── Sponsors Admin (Applications) ── hide ID(1), Email(3), Date(6) */
    #sponsorsTableBody tr td:nth-child(1),
    #sponsorsTableBody tr td:nth-child(3),
    #sponsorsTableBody tr td:nth-child(6) {
        display: none !important;
    }
    #sponsorsHead th:nth-child(1),
    #sponsorsHead th:nth-child(3),
    #sponsorsHead th:nth-child(6) {
        display: none !important;
    }

    /* ── Users ── hide ID(1), Email(3), Phone(4) */
    #usersTableBody tr td:nth-child(1),
    #usersTableBody tr td:nth-child(3),
    #usersTableBody tr td:nth-child(4) {
        display: none !important;
    }
    #usersHead th:nth-child(1),
    #usersHead th:nth-child(3),
    #usersHead th:nth-child(4) {
        display: none !important;
    }

    /* ── Teams members ── hide Order(1), Location(6), Year(7) */
    #teamMembersBody tr td:nth-child(1),
    #teamMembersBody tr td:nth-child(6),
    #teamMembersBody tr td:nth-child(7) {
        display: none !important;
    }
    #teamMembersHead th:nth-child(1),
    #teamMembersHead th:nth-child(6),
    #teamMembersHead th:nth-child(7) {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════════════════════
   END ADMIN MOBILE UX IMPROVEMENTS
   ════════════════════════════════════════════════════════════════ */