:root {
    --iigoc-orange: #f24e00;
    --iigoc-orange-dark: #d63d00;
    --iigoc-orange-light: #fff2ed;
    --navy-dark: #0f172a;
    --navy-medium: #1e293b;
    --gold: #b8860b;
    --blue-accent: #2563eb;
    --green-accent: #059669;
    --amber-accent: #d97706;
    --red-accent: #dc2626;
    --light-grey: #f8fafc;
    --mid-grey: #e2e8f0;
}

body {
    background-color: var(--light-grey);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Top Navigation Bar in Official IIGOC Orange */
.brand-navbar {
    background: linear-gradient(135deg, #f24e00 0%, #d63d00 100%) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 12px rgba(242, 78, 0, 0.25) !important;
    min-height: 56px;
}

.brand-navbar .navbar-brand {
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
    color: #ffffff !important;
}

/* Sidebar Toggle Button */
#sidebarToggleBtn {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#sidebarToggleBtn:hover {
    transform: scale(1.1);
}

/* App Layout Container */
.app-layout-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
    width: 100%;
}

/* Collapsible Sidebar Container (Desktop >= 992px) */
.app-sidebar {
    width: 240px;
    min-width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.app-sidebar.collapsed {
    width: 72px;
    min-width: 72px;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    color: #475569;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 0.95rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.app-sidebar .nav-link i {
    font-size: 1.1rem;
}

.app-sidebar.collapsed .sidebar-heading,
.app-sidebar.collapsed .menu-text {
    display: none !important;
}

.app-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem 0;
}

.app-sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
    background: linear-gradient(135deg, #f24e00 0%, #d63d00 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(242, 78, 0, 0.25) !important;
}

/* Main Content Area */
.app-main-content {
    flex-grow: 1;
    min-width: 0;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Universal Responsive Table Styling */
.table-responsive {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table th,
.table td {
    white-space: nowrap !important;
    padding: 0.85rem 1rem !important;
    vertical-align: middle !important;
}

/* Sidebar Mobile Overlay Backdrop */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* =========================================================
   Mobile & Tablet Specific Responsive Breakpoints (< 992px)
   ========================================================= */
@media (max-width: 991.98px) {
    .app-layout-wrapper {
        flex-direction: column;
    }

    /* Transform Sidebar into Mobile Slide-Over Drawer */
    .app-sidebar {
        position: fixed;
        top: 0;
        left: -285px;
        width: 285px !important;
        min-width: 285px !important;
        height: 100vh;
        z-index: 1050;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto;
        padding-top: 1rem !important;
    }

    .app-sidebar.show-mobile {
        left: 0 !important;
    }

    .app-sidebar.show-mobile .sidebar-heading,
    .app-sidebar.show-mobile .menu-text {
        display: block !important;
    }

    .app-sidebar.show-mobile .nav-link {
        justify-content: flex-start !important;
        padding: 0.65rem 0.95rem !important;
    }

    .app-sidebar.show-mobile .nav-link i {
        margin-right: 0.5rem !important;
    }

    .app-main-content {
        padding: 1rem 0.75rem !important;
        width: 100% !important;
    }

    /* Navbar User Details on Mobile */
    .user-info-detail {
        display: none !important;
    }

    .page-title {
        font-size: 1.3rem !important;
    }
}

/* Extra Small Phones (< 576px) */
@media (max-width: 575.98px) {
    .stat-card-hover {
        padding: 0.85rem !important;
    }

    .stat-card-hover .fs-3 {
        font-size: 1.35rem !important;
    }

    .quick-action-btn-custom,
    .action-btn-hover {
        padding: 0.65rem 0.5rem !important;
    }

    .action-btn-hover span.text-nowrap {
        font-size: 0.78rem !important;
    }
}

/* Login Auth Card */
.auth-card {
    max-width: 420px;
    margin: 8vh auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(242, 78, 0, 0.15);
    overflow: hidden;
}

.auth-card .card-header {
    background: linear-gradient(135deg, #f24e00 0%, #d63d00 100%) !important;
    color: #ffffff !important;
    text-align: center;
    padding: 1.85rem 1.5rem 1.35rem;
    border-bottom: 3px solid #ffffff !important;
}

/* Brand Buttons in IIGOC Orange */
.btn-brand {
    background-color: var(--iigoc-orange) !important;
    border-color: var(--iigoc-orange) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--iigoc-orange-dark) !important;
    border-color: var(--iigoc-orange-dark) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 78, 0, 0.3) !important;
}

/* Outline Brand Button */
.btn-outline-brand {
    color: var(--iigoc-orange) !important;
    border-color: var(--iigoc-orange) !important;
    font-weight: 600;
}

.btn-outline-brand:hover {
    background-color: var(--iigoc-orange) !important;
    color: #ffffff !important;
    border-color: var(--iigoc-orange) !important;
}

/* Text Accent */
.text-navy,
.text-brand {
    color: var(--iigoc-orange) !important;
}

/* Page Titles */
.page-title {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.6px;
}

/* White Action Buttons Reset & Hover */
.btn-white {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

.action-btn-hover {
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
}

.action-btn-hover:hover,
.action-btn-hover:focus {
    background-color: #f24e00 !important;
    border-color: #f24e00 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px rgba(242, 78, 0, 0.25) !important;
    text-decoration: none !important;
}

.action-btn-hover:hover span {
    color: #ffffff !important;
}

.action-btn-hover:hover .bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Executive Stat Cards Hover */
.stat-card-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.stat-card-hover:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(242, 78, 0, 0.12) !important;
}

/* Dashboard Chart Container */
.chart-card {
    background: #ffffff;
    border: 1px solid var(--mid-grey);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

/* Activity Feed */
.activity-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 16px;
    border-left: 2px solid var(--mid-grey);
}

.activity-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--iigoc-orange);
    border: 2px solid #ffffff;
}
