/* 
 * App Vibrant Premium - High Energy & Modern Enterprise
 * Inspired by Mercury/Revolut FinTech Design Systems
 */

:root {
    /* Brand Colors - High Vibrancy */
    --primary: #FDB913;
    --primary-alt: #FF8c00; /* Deep Orange */
    --primary-soft: rgba(253, 185, 19, 0.12);
    --primary-gradient: linear-gradient(135deg, #FDB913 0%, #FFA800 100%);
    --secondary: #0F172A;
    
    /* Neutral Warm Palette */
    --bg-main: #FDFCF6; /* Warm Off-White */
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --border-soft: #F1F5F9;
    
    /* Text Palette */
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    
    /* Semantic High-Impact Colors */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #0EA5E9;

    /* Radii & Floating Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-floating: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-active: 0 0 0 4px var(--primary-soft);
}

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif; /* Preferred Outfit for more character */
    background: var(--bg-main) !important;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sidebar - Vibrant & Iconic */
.main-sidebar {
    background: var(--surface) !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
}

.brand-link {
    border-bottom: 2px solid var(--border-soft) !important;
    padding: 1.5rem 1rem !important;
    background: transparent !important;
}

.nav-sidebar .nav-link {
    border-radius: var(--radius-sm);
    margin: 4px 14px;
    padding: 10px 14px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-sidebar .nav-link:hover {
    background: var(--primary-soft) !important;
    color: var(--primary-alt) !important;
    transform: translateX(4px);
}

.nav-sidebar .nav-link.active {
    background: var(--primary-gradient) !important;
    color: #FFFFFF !important; /* White text on active orange */
    box-shadow: 0 4px 12px rgba(253, 185, 19, 0.3);
}

.nav-sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    /* Re-enabling icon colors based on their function */
}

/* Specific Icon Highlights to make it 'Vibrant' */
.nav-link i.fa-th-large { color: #8B5CF6; } /* Dashboard - Purple */
.nav-link i.fa-tag { color: #EC4899; } /* Brands - Pink */
.nav-link i.fa-mobile-alt { color: #06B6D4; } /* Gadgets - Cyan */
.nav-link i.fa-shopping-cart { color: #F59E0B; } /* Orders - Orange */
.nav-link i.fa-users { color: #3B82F6; } /* Customers - Blue */
.nav-link i.fa-map-marker-alt { color: #10B981; } /* Location - Green */
.nav-link i.fa-user-shield { color: #6366F1; } /* User Mgmt - Indigo */
.active i { color: #FFFFFF !important; }

/* Navbar - Clean Glass */
.main-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.navbar-search-modern {
    background: var(--border-soft);
    border: 1.5px solid transparent;
    border-radius: 99px;
    padding: 6px 16px;
}

.navbar-search-modern:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: var(--shadow-active);
}

/* Content Wrapper */
.content-wrapper {
    background: var(--bg-main) !important;
    padding-bottom: 3rem;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

/* Dashboard Floating Stat Cards */
.small-box {
    background: var(--surface) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-floating) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1.5rem;
}

.small-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.12) !important;
}

.small-box .inner {
    padding: 2rem 1.5rem !important;
}

.small-box .inner p {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.small-box .inner h3 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--secondary);
}

.small-box .icon {
    display: block !important;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    opacity: 0.15;
    color: var(--primary-alt);
    transition: all 0.3s;
}

.small-box:hover .icon {
    transform: scale(1.1) rotate(-8deg);
    opacity: 0.25;
}

.small-box-footer {
    background: var(--primary-soft) !important;
    color: var(--primary-alt) !important;
    font-weight: 700;
    padding: 10px !important;
    text-align: center !important;
    transition: all 0.2s;
}

/* Table Design - High Contrast Clean */
.card {
    background: var(--surface) !important;
    border: none !important; /* No border for 'floating' card look */
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-floating) !important;
    overflow: hidden;
}

.card-header {
    border-bottom: 1px solid var(--border-soft) !important;
    padding: 1.25rem 1.75rem !important;
}

.card-title {
    font-weight: 700;
    font-size: 1rem;
}

.cmg-main-table thead th {
    background: #F8FAFC !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    padding: 16px 1.75rem !important;
}

.cmg-main-table tbody tr:hover {
    background: #FFFAF0 !important; /* Warm brand hover */
}

.cmg-main-table td {
    padding: 1.25rem 1.75rem !important;
    border-bottom: 1px solid var(--border-soft) !important;
}

/* Badges - Solid High Vibrancy */
.badge {
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success { background: #E6FFFA !important; color: #047857 !important; border: 1px solid #B2F5EA !important; }
.badge-danger { background: #FFF5F5 !important; color: #C53030 !important; border: 1px solid #FEB2B2 !important; }
.badge-warning { background: #FFFFF0 !important; color: #B7791F !important; border: 1px solid #FAF089 !important; }
.badge-primary { background: #EBF8FF !important; color: #2B6CB0 !important; border: 1px solid #BEE3F8 !important; }

/* Refined High-Contrast Badges (Pop version) */
.badge-pop {
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Buttons - Jewel Tone Gradients */
.btn {
    border: none !important;
    border-radius: var(--radius-sm);
    font-weight: 700;
    padding: 10px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    color: #FFFFFF !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(253, 185, 19, 0.3);
}

.btn-info { background: #F8FAFC !important; color: #475569 !important; border: 1px solid var(--border) !important; }
.btn-info:hover { background: var(--border-soft) !important; }

.btn-danger { background: #FFF5F5 !important; color: var(--danger) !important; border: 1px solid #FEB2B2 !important; }
.btn-danger:hover { background: #FED7D7 !important; }

/* Input Group Alignment Fix */
.input-group .btn {
    height: 100%;
    margin: 0 !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    border-left: 1px solid var(--border) !important;
    background: #F8FAFC !important;
}

.input-group-sm .btn {
    padding: 0 12px !important;
    font-size: 0.8rem !important;
}

.form-control {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    padding: 0.6rem 1rem;
    height: auto;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-active);
}

.input-group-sm > .form-control {
    border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
    padding: 0.5rem 1rem;
}

/* Breadcrumb Styling */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
}

.breadcrumb-item a { color: var(--primary-alt); font-weight: 600; }
.breadcrumb-item.active { font-weight: 700; color: var(--secondary); }

/* Global Crystal Loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    flex-direction: column;
    gap: 20px;
}

.crystal-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(253, 185, 19, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: crystalSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 30px rgba(253, 185, 19, 0.2);
}

.loader-text {
    font-family: 'Outfit';
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes crystalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}
