/* Venturis Developer Data Ledger Stylesheet */
:root {
    --bg-dark: #0B0E14;
    --bg-surface: #121820;
    --bg-surface-hover: #1b232e;
    --border-color: rgba(56, 189, 248, 0.08);
    --border-color-strong: rgba(56, 189, 248, 0.2);
    
    /* Harmonious colors */
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --accent-emerald: #10B981;
    --accent-cyan: #06B6D4;
    --accent-amber: #F59E0B;
    --accent-purple: #8B5CF6;
    
    --heading-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --mono-font: "IBM Plex Mono", "Fira Code", "Consolas", monospace;
    
    --shadow-dev: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

html, body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--body-font);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle tech-grid background */
body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%),
        linear-gradient(rgba(56, 189, 248, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.01) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

.developer-view {
    padding: 20px 30px 60px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Navigation */
.data-ledger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color-strong);
    margin-bottom: 24px;
}

.data-ledger-brand {
    font-family: var(--mono-font);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.nav-sub {
    color: var(--accent-cyan);
}

.data-ledger-links {
    display: flex;
    gap: 20px;
    font-family: var(--mono-font);
    font-size: 0.8rem;
}

.data-ledger-links a {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.data-ledger-links a:hover {
    color: var(--accent-cyan);
}

/* Header */
.data-ledger-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.header-main h1 {
    font-family: var(--mono-font);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.status-pulse-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    display: inline-block;
    animation: pulse 2s infinite;
}

.ledger-tag {
    font-family: var(--mono-font);
    font-size: 0.7rem;
    color: var(--accent-emerald);
    letter-spacing: 0.1em;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Metrics Strip (Spreadsheet summary) */
.header-metrics-strip {
    display: flex;
    gap: 1px;
    background: var(--border-color-strong);
    border: 1px solid var(--border-color-strong);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-dev);
}

.metric-strip-item {
    background: var(--bg-surface);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.metric-strip-label {
    font-family: var(--mono-font);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-strip-value {
    font-family: var(--mono-font);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Layout Grid */
.data-ledger-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ledger-grid-two {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
}

@media (max-width: 1100px) {
    .ledger-grid-two {
        grid-template-columns: 1fr;
    }
    .data-ledger-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Sections */
.ledger-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-dev);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-family: var(--mono-font);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.header-info-tag {
    font-family: var(--mono-font);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Developer Spreadsheet Table */
.table-wrapper {
    overflow-x: auto;
    max-height: 480px;
}

.developer-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono-font);
    font-size: 0.8rem;
    text-align: left;
}

.developer-table th, 
.developer-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.developer-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color-strong);
}

.developer-table tbody tr {
    transition: background 0.15s ease;
    cursor: pointer;
}

.developer-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.008);
}

.developer-table tbody tr:hover {
    background: var(--bg-surface-hover);
}

/* Active Highlight status column */
.developer-table tbody tr.active-row {
    background: rgba(6, 182, 212, 0.05) !important;
}

.num-col {
    text-align: right;
}

/* Loading & Empty States */
.loading-state, 
.empty-state {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--mono-font);
    font-size: 0.85rem;
}

/* Badges */
.badge-dev {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.68rem;
    font-weight: 500;
    border-radius: 3px;
    border: 1px solid transparent;
}

.badge-dev.live {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-dev.registered {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    border-color: rgba(245, 158, 11, 0.2);
}

/* Key Columns */
.key-cell {
    color: var(--accent-cyan);
    font-weight: 500;
}

.val-cell {
    color: var(--text-primary);
}

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

/* Inspector Drawer (Sleek overlay at the bottom) */
.inspection-drawer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    max-height: 400px;
    background: rgba(18, 24, 32, 0.95);
    border: 1px solid var(--border-color-strong);
    border-radius: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.inspection-drawer.hidden {
    display: none !important;
}

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

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.drawer-title {
    font-family: var(--mono-font);
    font-size: 0.72rem;
    color: var(--accent-purple);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.drawer-close-btn:hover {
    color: var(--text-primary);
}

.drawer-content {
    padding: 14px;
    overflow-y: auto;
    font-family: var(--mono-font);
    font-size: 0.75rem;
    line-height: 1.5;
}

.drawer-content h3 {
    font-family: var(--heading-font);
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.drawer-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.drawer-meta-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.meta-label {
    color: var(--text-muted);
}

.meta-val {
    color: var(--accent-cyan);
    word-break: break-all;
}

.json-block {
    background: rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 8px;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}