/* ==========================================================================
   Mediation Server - Premium Glassmorphism & High Contrast Stylesheet
   ========================================================================== */

:root {
    --bg-main: #090d16;
    --card-bg: rgba(19, 26, 42, 0.75);
    --card-bg-hover: rgba(28, 38, 62, 0.85);
    --dark-glass: rgba(13, 18, 30, 0.9);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-hover: rgba(99, 102, 241, 0.5);
    
    --primary-indigo: #6366f1;
    --primary-purple: #a855f7;
    --accent-blue: #38bdf8;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main) !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(56, 189, 248, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    font-family: var(--font-body);
    color: #f1f5f9 !important;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    color: #ffffff !important;
}

/* ==========================================================================
   CONTRAST RULES: Dark Containers -> Crisp Light Text, Light Containers -> Crisp Dark Text
   ========================================================================== */

/* Dark Containers (Default Dark Glass Theme) */
.card-glass, .bg-dark-glass, .bg-main, .modal-content.card-glass, .card {
    background: var(--card-bg) !important;
    color: #f1f5f9 !important;
}

.card-glass .text-muted, .bg-dark-glass .text-muted, .card .text-muted, .modal-body .text-muted {
    color: #94a3b8 !important;
}

.card-glass .text-secondary, .bg-dark-glass .text-secondary {
    color: #cbd5e1 !important;
}

/* Light Containers Exception Handling */
.bg-white, .card.bg-white, .card.bg-light, .modal-content.bg-white, .alert-light {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.card.bg-white h1, .card.bg-white h2, .card.bg-white h3, .card.bg-white h4, .card.bg-white h5, .card.bg-white h6 {
    color: #0f172a !important;
}

.bg-white .text-muted, .card.bg-white .text-muted {
    color: #475569 !important;
}

/* ==========================================================================
   Form Controls & Inputs (Dark & High Contrast)
   ========================================================================== */
.form-control, .form-select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3) !important;
}

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

.form-label {
    color: #cbd5e1 !important;
    font-weight: 600;
}

/* ==========================================================================
   Navigation & Cards
   ========================================================================== */
.bg-glass {
    background: rgba(13, 18, 30, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border) !important;
}

.bg-dark-glass {
    background: var(--dark-glass) !important;
    backdrop-filter: blur(10px);
}

.card-glass, .card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glass:hover, .card:hover {
    border-color: var(--glass-border-hover) !important;
    transform: translateY(-2px);
}

.border-glass {
    border-color: var(--glass-border) !important;
}

/* ==========================================================================
   Buttons: Premium Micro-Animations & High Contrast
   ========================================================================== */
.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary, .btn-gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-gradient-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45) !important;
}

.btn-success, .btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-success:hover, .btn-gradient-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45) !important;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #f8fafc !important;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: #818cf8 !important;
}

.btn-outline-primary {
    border-color: rgba(99, 102, 241, 0.5) !important;
    color: #a5b4fc !important;
}

.btn-outline-primary:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
}

/* ==========================================================================
   Text Gradients & Soft Badges
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-primary-soft   { background: rgba(99, 102, 241, 0.18) !important; color: #a5b4fc !important; border: 1px solid rgba(99, 102, 241, 0.3) !important; }
.bg-success-soft   { background: rgba(16, 185, 129, 0.18) !important; color: #6ee7b7 !important; border: 1px solid rgba(16, 185, 129, 0.3) !important; }
.bg-warning-soft   { background: rgba(245, 158, 11, 0.18) !important; color: #fde047 !important; border: 1px solid rgba(245, 158, 11, 0.3) !important; }
.bg-danger-soft    { background: rgba(244, 63, 94, 0.18) !important; color: #fda4af !important; border: 1px solid rgba(244, 63, 94, 0.3) !important; }
.bg-info-soft      { background: rgba(56, 189, 248, 0.18) !important; color: #7dd3fc !important; border: 1px solid rgba(56, 189, 248, 0.3) !important; }
.bg-secondary-soft { background: rgba(148, 163, 184, 0.18) !important; color: #e2e8f0 !important; border: 1px solid rgba(148, 163, 184, 0.3) !important; }

.text-primary-light { color: #a5b4fc !important; }
.text-success-light { color: #6ee7b7 !important; }
.text-warning-light { color: #fde047 !important; }
.text-danger-light  { color: #fda4af !important; }

/* Status Indicator Pulse */
.status-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator.bg-success::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: inherit;
    border-radius: 50%;
    animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* ==========================================================================
   Table Styling & Hover Effects
   ========================================================================== */
.table-glass, .table {
    --bs-table-bg: transparent;
    --bs-table-color: #f1f5f9;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
}

.table-glass th, .table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8 !important;
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
}

.table-glass td, .table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
    color: #cbd5e1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.fs-xs { font-size: 0.75rem; }
.letter-spacing-1 { letter-spacing: 0.1em; }

/* ==========================================================================
   Stat Widgets - Symmetrical Alignment & Glowing Accent Styling
   ========================================================================== */
.stat-card-glass {
    background: var(--card-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.stat-card-glass.border-top-indigo::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-card-glass.border-top-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card-glass.border-top-amber::before   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card-glass.border-top-cyan::before    { background: linear-gradient(90deg, #38bdf8, #38bdf8); }

.stat-card-glass:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(99, 102, 241, 0.15);
}

.stat-icon-glow {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.stat-icon-glow.stat-indigo {
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.stat-icon-glow.stat-emerald {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.stat-icon-glow.stat-amber {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.stat-icon-glow.stat-cyan {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.stat-counter-val {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: var(--font-heading);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

