/*
===================================================================================
    Template Name: Nexora - Advanced Admin & Analytics Dashboard
    Author: Themesfamily
    Description: Corporate, Dashboard, and Analytics UI Template
    Version: 1.0.0
===================================================================================
*/

/* --------------------------------------------------------------------------------
    01. GLOBAL VARIABLES & TYPOGRAPHY
----------------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f7fc;
    color: #1a1e2b;
    transition: background 0.2s ease, color 0.2s ease;
}

/* --------------------------------------------------------------------------------
    02. CORE CORE LAYOUT STRUCTURE
----------------------------------------------------------------------------------- */
.wrapper {
    display: flex;
    width: 100%;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    padding: 1.5rem 1.8rem 2rem;
    transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------------
    03. NAVIGATION & SIDEBAR COMPONENT
----------------------------------------------------------------------------------- */
.sidebar {
    width: 270px;
    background: #ffffff;
    border-right: 1px solid #e9edf4;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 1.2rem 0 2rem;
    z-index: 1030;
    flex-shrink: 0;
    transition: transform 0.3s ease, margin 0.3s ease;
}

.sidebar.collapsed {
    margin-left: -270px;
}

.sidebar .nav-group-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b93a7;
    padding: 0.5rem 1.2rem 0.2rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #3e4559;
    padding: 0.6rem 1.2rem;
    margin: 0.1rem 0.6rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar .nav-link i {
    font-size: 1.2rem;
    width: 1.6rem;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    background: #f0f3fe;
    color: #4f6af5;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1029;
}

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

.toggle-sidebar {
    cursor: pointer;
}

/* --------------------------------------------------------------------------------
    04. TOPBAR & BRANDING
----------------------------------------------------------------------------------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #fff;
    padding: 0.7rem 1.5rem;
    margin-bottom: 1.8rem;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.brand span {
    color: #4f6af5;
}

/* --------------------------------------------------------------------------------
    05. SEARCH UTILITY
----------------------------------------------------------------------------------- */
.search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.search-wrapper .search-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: #6c7a8a;
    transition: color 0.2s ease;
}

.search-wrapper .search-icon:hover {
    color: #4f6af5;
}

.search-wrapper .search-input {
    width: 0;
    opacity: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 0.2rem 0;
    font-size: 0.95rem;
    outline: none;
    transition: width 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.search-wrapper .search-input.open {
    width: 180px;
    opacity: 1;
    border-bottom-color: #4f6af5;
}

/* --------------------------------------------------------------------------------
    06. UI CARDS & STATISTICS BLOCK
----------------------------------------------------------------------------------- */
.card {
    background: #ffffff;
    border: 1px solid #f0f3fa;
    border-radius: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f0f3fa;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 24px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------------
    07. BUTTONS, BADGES & INTERACTIVE ELEMENT
----------------------------------------------------------------------------------- */
.btn-primary {
    background: #4f6af5;
    border: none;
    border-radius: 40px;
    padding: 0.5rem 1.6rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: #3a54e0;
}

.badge-soft {
    background: #eef2fe;
    color: #4f6af5;
    padding: 0.4rem 1rem;
    border-radius: 40px;
}

.page-badge {
    background: #eef2fe;
    color: #4f6af5;
    padding: 0.2rem 0.9rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------------
    08. TABLES & CHARTS CONTAINERS
----------------------------------------------------------------------------------- */
.table th {
    border-top: none;
    font-weight: 600;
    color: #3e4559;
}

.chart-box {
    min-height: 220px;
}

/* --------------------------------------------------------------------------------
    09. MODALS UTILITIES
----------------------------------------------------------------------------------- */
.modal-content {
    border-radius: 28px;
    border: none;
}
.cursor-pointer {
    cursor: pointer !important;
}

.dropdown-min-width {
    min-width: 200px;
}
.rounded-circle.user_profile {
	width: 90px;
	height: 90px;
	margin: 0 auto;
}
/* --------------------------------------------------------------------------------
    10. DARK THEME MODIFIERS
----------------------------------------------------------------------------------- */
body.dark-mode {
    background: #11131f;
    color: #eef2f6;
}

body.dark-mode .card,
body.dark-mode .bg-white,
body.dark-mode .sidebar,
body.dark-mode .topbar {
    background: #1a1e2b !important;
    color: #eef2f6 !important;
    border-color: #2d3344 !important;
}

body.dark-mode .text-muted { 
    color: #8b93a7 !important; 
}

body.dark-mode .border-bottom { 
    border-color: #2d3344 !important; 
}

body.dark-mode .table { 
    color: #eef2f6; 
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * { 
    background: #252a3a; 
}

body.dark-mode .form-control, 
body.dark-mode .form-select {
    background: #252a3a;
    border-color: #3a4055;
    color: #eef2f6;
}

body.dark-mode .dropdown-menu { 
    background: #1a1e2b; 
    border-color: #2d3344; 
}

body.dark-mode .dropdown-item { 
    color: #eef2f6; 
}

body.dark-mode .dropdown-item:hover { 
    background: #2d3344; 
    color: #fff; 
}

body.dark-mode .sidebar .nav-link { 
    color: #bcc3d4; 
}

body.dark-mode .sidebar .nav-link:hover,
body.dark-mode .sidebar .nav-link.active {
    background: #2a3150;
    color: #8ba0ff;
}

body.dark-mode .btn-outline-secondary { 
    color: #bcc3d4; 
    border-color: #3a4055; 
}

body.dark-mode .btn-outline-secondary:hover { 
    background: #2d3344; 
}

body.dark-mode .modal-content { 
    background: #1a1e2b; 
    color: #eef2f6; 
    border-color: #2d3344; 
}

body.dark-mode .search-wrapper .search-input { 
    color: #eef2f6; 
}

body.dark-mode .col-md-4.border.rounded.p-3.text-center.bg-light{  
	background: #1a1e2b !important;
}
body.dark-mode .search-wrapper .search-input.open { 
    border-bottom-color: #8ba0ff; 
}

/* --------------------------------------------------------------------------------
    11. RESPONSIVE MEDIA QUERIES
----------------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        margin-left: 0 !important;
        height: 100vh;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open { 
        transform: translateX(0); 
    }
    
    .sidebar.collapsed { 
        margin-left: 0; 
        transform: translateX(-100%); 
    }
    
    .sidebar-overlay.show { 
        display: block; 
    }
    
    .main-content { 
        padding: 1rem; 
    }
    
    .topbar { 
        padding: 0.7rem 1rem; 
    }
    
    .search-wrapper .search-input.open { 
        width: 120px; 
    }
}

@media (min-width: 769px) {
    .sidebar-overlay { 
        display: none !important; 
    }
    
    .sidebar.collapsed { 
        margin-left: -270px; 
        transform: none; 
    }
}