@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

:root {
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    --font-mono: 'Fira Code', Consolas, Monaco, monospace;

    /* Core Dark Background Palette */
    --bg-dark: #090d16;
    --bg-card: rgba(18, 26, 43, 0.75);
    --bg-card-hover: rgba(26, 37, 61, 0.85);
    --bg-sidebar: rgba(15, 23, 42, 0.8);
    --bg-input: rgba(15, 23, 42, 0.85);

    /* Glassmorphism Borders */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-bright: rgba(255, 255, 255, 0.18);
    --border-glow-primary: rgba(99, 102, 241, 0.4);

    /* Harmonized Accent Colors */
    --accent-primary: #6366f1;
    --accent-indigo: #818cf8;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-cyan: #38bdf8;
    --accent-teal: #14b8a6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Text Hierarchy */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #64748b;

    /* Shadows & Glows */
    --shadow-main: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
    --shadow-glow-indigo: 0 0 25px rgba(99, 102, 241, 0.25);
    --shadow-glow-cyan: 0 0 25px rgba(56, 189, 248, 0.25);
    --shadow-glow-pink: 0 0 25px rgba(236, 72, 153, 0.25);
}

/* General Reset & Page Background */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.1) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title,
.navbar-brand {
    font-family: var(--font-heading);
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-dim {
    color: var(--text-dim) !important;
}

/* Glassmorphism Containers */
.glass-card,
.card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass) !important;
    border-radius: 1.25rem !important;
    box-shadow: var(--shadow-main);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

/* Navigation Bar */
.navbar-custom {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.85rem 1.75rem;
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand i {
    color: #818cf8 !important;
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.6));
}

.user-badge {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-badge strong {
    color: #ffffff;
}

/* Sidebar Styling */
.sidebar-panel {
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 1.25rem;
    padding: 1.25rem;
}

.sidebar-title {
    font-size: 0.725rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.sidebar-link {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.4rem;
    position: relative;
    overflow: hidden;
}

.sidebar-link i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.sidebar-link:hover i {
    transform: scale(1.15);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: 1.25rem !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .card-title {
    font-size: 0.825rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85) !important;
}

.stat-card .display-stat {
    font-family: var(--font-heading);
    font-size: 2.85rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin: 0.6rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-card-ecomus-total {
    background: linear-gradient(135deg, rgba(55, 48, 163, 0.9), rgba(91, 33, 182, 0.9)) !important;
    border: 1px solid rgba(165, 180, 252, 0.3) !important;
    box-shadow: 0 10px 25px rgba(55, 48, 163, 0.3);
}

.stat-card-ecomus-active {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.9), rgba(4, 120, 87, 0.9)) !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    box-shadow: 0 10px 25px rgba(6, 95, 70, 0.3);
}

.stat-card-ecomus-blocked {
    background: linear-gradient(135deg, rgba(154, 52, 18, 0.9), rgba(194, 65, 12, 0.9)) !important;
    border: 1px solid rgba(251, 146, 60, 0.3) !important;
    box-shadow: 0 10px 25px rgba(154, 52, 18, 0.3);
}

.stat-card-gcl-total {
    background: linear-gradient(135deg, rgba(7, 89, 133, 0.9), rgba(3, 105, 161, 0.9)) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    box-shadow: 0 10px 25px rgba(7, 89, 133, 0.3);
}

.stat-card-gcl-active {
    background: linear-gradient(135deg, rgba(157, 23, 77, 0.9), rgba(190, 24, 93, 0.9)) !important;
    border: 1px solid rgba(244, 114, 182, 0.3) !important;
    box-shadow: 0 10px 25px rgba(157, 23, 77, 0.3);
}

/* Forms & Input Controls */
.form-control,
.form-select {
    background-color: var(--bg-input) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border-radius: 0.65rem !important;
    padding: 0.6rem 0.95rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: #0d1527 !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: #64748b !important;
}

.form-label {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.input-group-text {
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

/* Text Hierarchy */
.text-muted {
    color: #cbd5e1 !important;
}

.text-dim {
    color: #94a3b8 !important;
}

/* High Contrast & Responsive Table */
.table-responsive {
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--border-glass) !important;
    background: rgba(15, 23, 42, 0.75) !important;
}

.table {
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-color: #f1f5f9 !important;
    color: #f1f5f9 !important;
    margin-bottom: 0;
    vertical-align: middle;
    background-color: transparent !important;
}

.table> :not(caption)>*>* {
    background-color: transparent !important;
    color: #f1f5f9 !important;
    border-bottom: 1px solid var(--border-glass) !important;
    box-shadow: none !important;
}

.table thead th {
    background-color: rgba(9, 13, 22, 0.95) !important;
    color: #94a3b8 !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.1rem;
    border-bottom: 2px solid var(--border-glass-bright) !important;
}

.table tbody tr {
    background-color: transparent !important;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover>* {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.table tbody td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--border-glass) !important;
    color: #f1f5f9 !important;
    font-size: 0.9rem;
}

.table td.text-muted,
.table .text-muted {
    color: #cbd5e1 !important;
}

.table td.text-dim,
.table .text-dim {
    color: #94a3b8 !important;
}

/* Click-to-Copy Interactive Code Pills */
code,
.code-pill {
    background: #0f172a !important;
    color: #e0e7ff !important;
    border: 1px solid rgba(99, 102, 241, 0.5) !important;
    padding: 0.35rem 0.7rem !important;
    border-radius: 0.5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem !important;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
    position: relative;
}

code:hover,
.code-pill:hover {
    background: #1e293b !important;
    border-color: #818cf8 !important;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.4);
    color: #ffffff !important;
    transform: translateY(-1px);
}

code::after {
    content: '\F290';
    /* bootstrap icon bi-copy */
    font-family: 'bootstrap-icons';
    font-size: 0.75rem;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

code:hover::after {
    opacity: 1;
}

/* Status Badges */
.badge {
    padding: 0.45em 0.9em;
    font-weight: 700;
    font-size: 0.725rem;
    border-radius: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.badge.bg-secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge.bg-primary {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Modern Buttons */
.btn {
    border-radius: 0.6rem !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-xs {
    padding: 0.25rem 0.55rem !important;
    font-size: 0.8rem !important;
    border-radius: 0.45rem !important;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border: 1px solid #818cf8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 1px solid #f87171 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #fbbf24 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f1f5f9 !important;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Collapsible Add Box */
details {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass-bright);
    border-radius: 0.9rem;
    padding: 1rem 1.25rem;
    transition: all 0.25s ease;
}

details[open] {
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

summary {
    cursor: pointer;
    color: #ffffff !important;
    font-size: 0.95rem;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

summary:hover {
    color: var(--accent-indigo) !important;
}

/* Custom Text Accents */
.text-cyan {
    color: #38bdf8 !important;
}

.text-pink {
    color: #f472b6 !important;
}

/* Toast Cpy Cues */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.copy-toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid #6366f1;
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    font-weight: 600;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #090d16;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}