/* Custom Global Dark Variables & Accents */
:root {
    --bg-dark-core: #090b0e;
    --card-bg-subtle: #0f1319;
    --font-family-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-family-mono: 'JetBrains Mono', monospace;
    --paci-yellow: #f59e0b;
    --paci-green: #10b981;
    --paci-red: #ef4444;
    --paci-orange: #f97316;
    --paci-gray: #6b7280;
    --paci-blue: #3b82f6;
}

body {
    background-color: var(--bg-dark-core);
    font-family: var(--font-family-sans);
    color: #e2e8f0;
    overflow-x: hidden;
}

/* Typography Overrides */
.tracking-tight {
    letter-spacing: -0.025em;
}

/* Custom Component Layouts */
.brand-accent-bar {
    width: 4px;
    height: 24px;
    border-radius: 4px;
}

/* Cards & Modals styling */
.card {
    background-color: var(--card-bg-subtle);
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
}

.modal-content {
    background-color: var(--card-bg-subtle);
    border: 1px solid #334155;
    border-radius: 14px;
}

.modal-header {
    background-color: rgba(15, 19, 25, 0.95);
    backdrop-filter: blur(8px);
}

/* Tab Layout Overrides */
.nav-pills .nav-link {
    color: #94a3b8;
    transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
    background-color: #1e293b;
    color: #3b82f6;
    box-shadow: inset 0 0 0 1px #3b82f6;
}

.nav-tabs .nav-link {
    color: #94a3b8;
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
    background: transparent !important;
    border-bottom: 2px solid #3b82f6;
    color: #3b82f6;
}

/* JSON Code Viewer styling */
.json-viewer {
    font-family: var(--font-family-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #05070a !important;
}

.json-key {
    color: #f43f5e;
}

.json-value {
    color: #34d399;
}

.json-string {
    color: #38bdf8;
}

.json-boolean {
    color: #fb923c;
}

.json-number {
    color: #a78bfa;
}

.json-null {
    color: #94a3b8;
}

/* Timeline Components */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px dashed #334155;
    margin-left: 1rem;
}

.timeline-event {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: calc(-2rem - 6px);
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--paci-blue);
    border: 2px solid var(--card-bg-subtle);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-event.event-success::before {
    background-color: var(--paci-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.timeline-event.event-danger::before {
    background-color: var(--paci-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.timeline-event.event-warning::before {
    background-color: var(--paci-yellow);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.timeline-time {
    font-family: var(--font-family-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
}

.timeline-body {
    font-size: 0.85rem;
    color: #94a3b8;
    background-color: #05070a;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #1e293b;
    margin-top: 0.5rem;
}

/* Global Loading Overlays */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Forms & Text Fields */
.form-control, .form-select {
    background-color: #0a0e14;
    border: 1px solid #1e293b;
    color: #f1f5f9;
}

.form-control:focus, .form-select:focus {
    background-color: #0c121a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    color: #f1f5f9;
}

.form-control[readonly] {
    background-color: #111827 !important;
    border-color: #1f2937;
}

.search-box {
    position: relative;
    max-width: 320px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}

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

/* Sticky Headers */
.table-responsive {
    border-radius: 12px;
}

thead.sticky-top th {
    background-color: #0a0f16 !important;
    border-bottom: 2px solid #1e293b !important;
    box-shadow: inset 0 -1px 0 #1e293b;
}

/* Large Interactive QR Styles */
.qr-code-wrapper {
    max-width: 200px;
    transition: transform 0.25s ease;
}

.qr-code-wrapper:hover {
    transform: scale(1.05);
}