:root {
    --bg-base: #05070a;
    --bg-surface: #0a0e16;
    --bg-surface-elevated: #111722;
    --bg-glass: rgba(10, 14, 22, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 229, 255, 0.4);
    
    --accent-cyan: #00e5ff;
    --accent-cyan-rgb: 0, 229, 255;
    --accent-green: #00f5a0;
    --accent-amber: #ffb300;
    --accent-orange: #ff7700;
    --accent-crimson: #ff2a55;
    --accent-purple: #a855f7;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-card: 0 10px 32px rgba(0, 0, 0, 0.55);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-heading);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

.tech-glow {
    position: fixed;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    opacity: 0.12;
}

.glow-top-left {
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--accent-cyan), transparent);
}

.glow-bottom-right {
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, var(--accent-crimson), transparent);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.app-layout {
    position: relative;
    z-index: 1;
    max-width: 1520px;
    margin: 0 auto;
    padding: 24px 32px 64px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Nav */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-radar {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.4);
    border-radius: 50%;
}

.radar-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    animation: ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.6;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.radar-icon {
    width: 26px;
    height: 26px;
    color: var(--accent-cyan);
}

.brand-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-badge-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1.5px;
    line-height: 1;
}

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

.brand-edition {
    color: #ffb300;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-left: 4px;
}

.badge-mining {
    background: rgba(255, 179, 0, 0.15);
    border: 1px solid rgba(255, 179, 0, 0.5);
    color: #ffb300;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.badge-autonomous {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(0, 245, 160, 0.08);
    border: 1px solid rgba(0, 245, 160, 0.3);
    border-radius: 50px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-text {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-green);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-toggle, .btn-icon-only, .btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover, .btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-toggle.active {
    background: rgba(var(--accent-cyan-rgb), 0.12);
    color: var(--accent-cyan);
    border-color: rgba(var(--accent-cyan-rgb), 0.4);
    box-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.2);
}

.btn-danger-outline:hover {
    background: rgba(255, 42, 85, 0.12);
    color: var(--accent-crimson);
    border-color: rgba(255, 42, 85, 0.4);
}

/* KPI Ribbon */
.kpi-ribbon {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.kpi-card.danger-card {
    border-color: rgba(255, 42, 85, 0.3);
    background: linear-gradient(135deg, rgba(255, 42, 85, 0.06), var(--bg-surface));
}

.kpi-card.warning-card {
    border-color: rgba(255, 179, 0, 0.3);
}

.kpi-card.score-card {
    border-color: rgba(0, 245, 160, 0.3);
}

.kpi-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.icon-crimson { border-color: rgba(255, 42, 85, 0.4); background: rgba(255, 42, 85, 0.12); }
.icon-amber { border-color: rgba(255, 179, 0, 0.4); background: rgba(255, 179, 0, 0.12); }
.icon-orange { border-color: rgba(255, 119, 0, 0.4); background: rgba(255, 119, 0, 0.12); }
.icon-purple { border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.12); }
.icon-green { border-color: rgba(0, 245, 160, 0.4); background: rgba(0, 245, 160, 0.12); }

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    font-family: var(--font-mono);
}

.pulse-text { color: var(--accent-crimson); }
.highlight-green { color: var(--accent-green); }

.kpi-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Simulation Bar */
.simulation-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.sim-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.btn-sim {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.sim-red { background: rgba(255, 42, 85, 0.12); color: #ff476f; border-color: rgba(255, 42, 85, 0.35); }
.sim-red:hover { background: rgba(255, 42, 85, 0.25); box-shadow: 0 0 12px rgba(255, 42, 85, 0.4); }

.sim-yellow { background: rgba(255, 179, 0, 0.12); color: #ffb300; border-color: rgba(255, 179, 0, 0.35); }
.sim-yellow:hover { background: rgba(255, 179, 0, 0.25); box-shadow: 0 0 12px rgba(255, 179, 0, 0.4); }

.sim-orange { background: rgba(255, 119, 0, 0.12); color: #ff851b; border-color: rgba(255, 119, 0, 0.35); }
.sim-orange:hover { background: rgba(255, 119, 0, 0.25); }

.sim-smoke { background: rgba(255, 90, 0, 0.12); color: #ffaa55; border-color: rgba(255, 90, 0, 0.35); }

.sim-purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; border-color: rgba(168, 85, 247, 0.35); }
.sim-purple:hover { background: rgba(168, 85, 247, 0.25); }

.sim-blue { background: rgba(0, 229, 255, 0.12); color: #00e5ff; border-color: rgba(0, 229, 255, 0.35); }
.sim-blue:hover { background: rgba(0, 229, 255, 0.25); }

/* Interactive Map Section */
.map-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.map-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-pin-pulse {
    width: 12px;
    height: 12px;
    background: var(--accent-crimson);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-crimson);
    animation: blink 1.5s infinite;
}

.map-title {
    font-size: 16px;
    font-weight: 800;
}

.map-subtitle {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
}

.map-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action-map {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-map:hover {
    background: rgba(var(--accent-cyan-rgb), 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.mining-map-container {
    width: 100%;
    height: 380px;
    background: #040609;
}

/* Leaflet Dark Custom Overrides */
.leaflet-popup-content-wrapper {
    background: #0c1017 !important;
    color: #f8fafc !important;
    border: 1px solid #00e5ff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8) !important;
}
.leaflet-popup-tip {
    background: #0c1017 !important;
}

/* Toolbar & Filters */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius-md);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    gap: 10px;
    width: 420px;
}

.search-box:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(var(--accent-cyan-rgb), 0.2);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 14px;
    width: 100%;
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.category-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.pill.active {
    background: var(--accent-cyan);
    color: #000;
    font-weight: 700;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(var(--accent-cyan-rgb), 0.4);
}

/* Gallery Header */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.gallery-title {
    font-size: 19px;
    font-weight: 700;
}

.gallery-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
}

.endpoint-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.info-tag {
    color: var(--text-secondary);
}

.endpoint-info code {
    font-family: var(--font-mono);
    color: var(--accent-green);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.copy-btn:hover {
    color: var(--accent-cyan);
}

/* Detections Grid */
.detections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
}

.detection-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.detection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 18px rgba(var(--accent-cyan-rgb), 0.15);
}

.detection-card.critical-border { border-left: 4px solid var(--accent-crimson); }
.detection-card.hazard-border { border-left: 4px solid var(--accent-amber); }
.detection-card.warning-border { border-left: 4px solid var(--accent-orange); }

.card-media {
    position: relative;
    width: 100%;
    height: 220px;
    background: #020406;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detection-card:hover .card-media img {
    transform: scale(1.03);
}

.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.badge-top-label {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-microsleep { border-color: var(--accent-crimson); color: var(--accent-crimson); }
.badge-hazard { border-color: var(--accent-amber); color: var(--accent-amber); }
.badge-cigarette { border-color: var(--accent-orange); color: var(--accent-orange); }
.badge-cellphone { border-color: var(--accent-purple); color: var(--accent-purple); }
.badge-yawn { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.badge-confidence {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-device-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.device-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-mono);
}

.card-timestamp {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.tag-item.primary {
    border-color: rgba(var(--accent-cyan-rgb), 0.3);
    color: var(--accent-cyan);
    background: rgba(var(--accent-cyan-rgb), 0.06);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    font-size: 12px;
}

.btn-card-action {
    color: var(--accent-cyan);
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-card-action:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    background: var(--bg-surface);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    text-align: center;
}

.empty-radar {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 24px;
}

.radar-circle-1 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.25);
}

.radar-circle-2 {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.4);
}

.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0% 100%;
    background: linear-gradient(45deg, rgba(var(--accent-cyan-rgb), 0.5), transparent 70%);
    border-radius: 100% 0 0 0;
    animation: rotateSweep 3s linear infinite;
}

@keyframes rotateSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-crimson), #ff476f);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 42, 85, 0.4);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(255, 42, 85, 0.7);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
}

.modal-subtitle {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-cyan);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow-y: auto;
    padding: 24px;
    gap: 24px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-wrapper img {
    width: 100%;
    display: block;
}

.bbox-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.modal-meta-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.meta-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.objects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    border-left: 3px solid var(--accent-cyan);
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meta-item {
    background: var(--bg-surface-elevated);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
}

.meta-item-label {
    font-size: 11px;
    color: var(--text-muted);
}

.meta-item-value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 2px;
}

.json-code {
    background: #020305;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    color: #00f5a0;
    overflow-x: auto;
    max-height: 180px;
    border: 1px solid var(--border-color);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface-elevated);
    border-left: 4px solid var(--accent-crimson);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1200px) {
    .kpi-ribbon { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .app-layout { padding: 16px; }
    .top-nav { flex-direction: column; align-items: flex-start; gap: 16px; }
    .kpi-ribbon { grid-template-columns: 1fr; }
    .modal-body { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
}
