/* -------------------------------------------------------------
 * Terranova Stylesheet — Spatial GUI & Governance Design System
 * Built on Vanilla CSS for maximum flexibility and rich aesthetics.
 * ------------------------------------------------------------- */

/* 1. Design System Tokens */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --border-color: #374151;
    --border-hover: #4b5563;
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.15);
    --accent-indigo: #6366f1;
    
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.1);
    
    /* Layout */
    --header-height: 70px;
    --left-dock-width: 320px;
    --right-dock-width: 400px;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --backdrop-blur: blur(12px);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1.1 High-Contrast Readable Light Theme Variables */
body.light-theme {
    --bg-primary: #f8fafc; /* clean off-white (slate-50) */
    --bg-secondary: #ffffff; /* pure white for cards and docks */
    --bg-tertiary: #f1f5f9; /* warm gray for input backgrounds (slate-100) */
    --border-color: #cbd5e1; /* soft gray borders (slate-300) */
    --border-hover: #94a3b8; /* active/hover borders (slate-400) */
    
    --text-primary: #0f172a; /* deep slate-900 for high-contrast reading */
    --text-secondary: #475569; /* slate-600 subtext */
    --text-muted: #64748b; /* slate-500 captions */
    
    --accent-blue: #1d4ed8; /* darker blue for light backgrounds (blue-700) */
    --accent-blue-glow: rgba(29, 78, 216, 0.08);
    --accent-indigo: #4f46e5;
    
    --color-success: #047857; /* green-700 */
    --color-success-bg: rgba(4, 120, 87, 0.06);
    --color-danger: #b91c1c; /* red-700 */
    --color-danger-bg: rgba(185, 28, 28, 0.06);
    
    --glass-bg: rgba(255, 255, 255, 0.85); /* transparent light glass */
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: rgba(15, 23, 42, 0.04);
}

/* Light Theme Component Overrides for Absolute Readability */
body.light-theme .document-viewer {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

body.light-theme .document-meta {
    background-color: #f1f5f9;
    border-bottom-color: #cbd5e1;
    color: var(--text-secondary);
}

body.light-theme .document-body {
    color: #0f172a;
}

body.light-theme .obj-amendment-box {
    background-color: #f1f5f9;
    color: #334155;
    border-left-color: var(--accent-indigo);
}

body.light-theme .modal-footer {
    background-color: #f1f5f9;
    border-top-color: #cbd5e1;
}

body.light-theme .search-dropdown {
    background-color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body.light-theme .search-dropdown-item:hover {
    background-color: #f1f5f9;
}

body.light-theme .level-item {
    background-color: rgba(0, 0, 0, 0.015);
}

body.light-theme .level-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .level-item.active {
    background-color: rgba(29, 78, 216, 0.06);
    border-color: rgba(29, 78, 216, 0.2);
}

body.light-theme .profile-card-mock {
    background-color: #f8fafc;
}

body.light-theme .consensus-voting-panel {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

body.light-theme .speaker-queue-box {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

body.light-theme .speaker-item {
    background-color: #f8fafc;
}

body.light-theme .speaker-item.active {
    background-color: rgba(29, 78, 216, 0.06);
    border-color: rgba(29, 78, 216, 0.2);
}


/* 2. Global Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* 3. Main Layout Structure */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.app-header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    backdrop-filter: var(--backdrop-blur);
}

.main-content {
    flex: 1;
    display: flex;
    height: calc(100vh - var(--header-height));
    position: relative;
}

/* 4. Header Components */
.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 30%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--accent-blue);
    -webkit-text-fill-color: initial;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 280px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

#spatial-search {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

#spatial-search:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 200;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.search-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-item-scope {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-center {
    display: flex;
    justify-content: center;
    width: 40%;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    background-color: rgba(31, 41, 55, 0.4);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
}

.breadcrumb-item {
    font-weight: 500;
    color: var(--text-secondary);
}

.breadcrumb-item:last-child {
    color: var(--accent-blue);
    font-weight: 600;
}

.separator {
    margin: 0 10px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 30%;
    justify-content: flex-end;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-success);
    position: relative;
    overflow: hidden;
}

@keyframes spin-glow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.user-badge.zk-verified::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 60%, rgba(16, 185, 129, 0.8) 100%);
    animation: spin-glow 3s linear infinite;
    z-index: 0;
}

.user-badge.zk-verified::after {
    content: '';
    position: absolute;
    inset: 1px;
    background-color: var(--bg-secondary);
    border-radius: 19px;
    z-index: 1;
}

.user-badge i,
.user-badge span {
    position: relative;
    z-index: 2;
}

@keyframes pulse-shine {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.user-badge.verified-pulse {
    animation: pulse-shine 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-verified-icon {
    font-size: 0.95rem;
}

/* 5. Left Dock (Spatial Selector & Layers) */
.left-dock {
    width: var(--left-dock-width);
    border-right: 1px solid var(--glass-border);
    background-color: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 10;
    overflow-y: auto;
}

.dock-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-blue);
    padding-left: 10px;
}

.level-selector-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.level-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: transparent;
    transition: var(--transition-fast);
}

.level-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.level-item.active {
    background-color: var(--accent-blue-glow);
    border-color: rgba(59, 130, 246, 0.3);
}

.level-item.active::before {
    background-color: var(--accent-blue);
}

.level-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    margin-right: 14px;
    transition: var(--transition-fast);
}

.level-item.active .level-bullet {
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.level-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.level-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.level-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: var(--transition-fast);
}

.level-item.active .level-value {
    color: #93c5fd;
}

.level-scale {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Layer Overlays Switch Box */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.overlay-icon {
    width: 16px;
    font-size: 0.95rem;
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--color-success); }
.text-purple { color: #8b5cf6; }

/* The slider switch */
.switch-container input {
    display: none;
}

.slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    background-color: var(--bg-tertiary);
    border-radius: 34px;
    transition: var(--transition-fast);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition-fast);
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Privacy Indicator Panel */
.privacy-card {
    background-color: rgba(239, 68, 68, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.privacy-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-danger);
    margin-bottom: 8px;
}

.privacy-card-header h3 {
    font-size: 0.95rem;
}

.privacy-icon {
    font-size: 1.1rem;
}

.privacy-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.privacy-control {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

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

.privacy-value {
    font-weight: 600;
    color: var(--text-primary);
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    background: var(--bg-tertiary);
    height: 4px;
    border-radius: 2px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-danger);
    cursor: pointer;
    transition: var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 6. Center Canvas (The Map Simulator) */
.center-canvas-container {
    flex: 1;
    position: relative;
    background-color: var(--bg-primary);
}

#map-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#map-canvas:active {
    cursor: grabbing;
}

/* Map controls overlays */
.floating-controls {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.btn-floating {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px var(--glass-shadow);
    transition: all var(--transition-fast);
    transform: translate3d(0,0,0);
}

.btn-floating:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px rgba(255,255,255,0.05);
}

.zoom-banner {
    position: absolute;
    top: 24px;
    left: 24px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 6px var(--glass-shadow);
    z-index: 20;
}

.geofence-hud {
    position: absolute;
    top: 24px;
    right: 24px;
    background-color: var(--glass-bg);
    border: 1px solid var(--accent-blue);
    backdrop-filter: var(--backdrop-blur);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 4px 12px var(--glass-shadow), 0 0 10px var(--accent-blue-glow);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s ease-out;
}

.geofence-icon {
    color: var(--accent-blue);
}

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

.consensus-banner {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    height: 40px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    z-index: 20;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consensus-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.3) 100%);
    border-right: 2px solid var(--color-success);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.consensus-banner-text {
    position: relative;
    z-index: 21;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 7. Right Dock (Constitution & Town Halls) */
.right-dock {
    width: var(--right-dock-width);
    border-left: 1px solid var(--glass-border);
    background-color: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    background-color: var(--bg-tertiary);
}

.tab-btn {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    transform: translate3d(0,0,0);
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.01);
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px rgba(255,255,255,0.05);
}
.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    background-color: var(--bg-secondary);
}
.badge {
    background-color: var(--accent-blue);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 24px;
}

.tab-content.active {
    display: flex;
}

/* Proposal Header & Viewer */
.proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.tag-proposal {
    background-color: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.proposal-scope {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.proposal-title {
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.document-viewer {
    background-color: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(31, 41, 55, 0.3);
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.document-body {
    padding: 18px;
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.edit-area {
    width: 100%;
    height: 120px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 10px;
    resize: vertical;
}

.edit-area:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.edit-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Consensus Gauge */
.consensus-voting-panel {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.consensus-metrics {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.metric-circle-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
}

.metric-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.metric-labels {
    flex: 1;
}

.metric-labels h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.consensus-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.vote-counts {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.v-agree { color: var(--color-success); }
.v-object { color: var(--color-danger); }

.vote-actions {
    display: flex;
    gap: 12px;
}

/* 8. Constructive Objections Board */
.objections-dock-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}
.sub-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.objections-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.objection-item {
    background-color: rgba(239, 68, 68, 0.02);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.objection-item.resolved {
    background-color: rgba(16, 185, 129, 0.02);
    border-color: rgba(16, 185, 129, 0.15);
}

.obj-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 8px;
}

.obj-author {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.obj-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
}

.obj-tag-active {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.obj-tag-resolved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.obj-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}

.obj-amendment-box {
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--accent-indigo);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.825rem;
    font-family: 'Merriweather', serif;
    font-style: italic;
    color: #cbd5e1;
    overflow-wrap: break-word;
    word-break: break-word;
}

.obj-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 9. Audio Stream & Speakers Queue */
.stream-player-mock {
    position: relative;
    width: 100%;
    height: 180px;
    background-color: #030712;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.stream-badge-live {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--color-danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    z-index: 5;
    animation: pulse-live 1.5s infinite;
}

.stream-visualizer {
    width: 100%;
    height: 100%;
}

.stream-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.9) 0%, rgba(3, 7, 18, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.speaker-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.speaker-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.speaker-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.stream-controls {
    display: flex;
    gap: 8px;
}

.btn-stream-ctrl {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-stream-ctrl:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-stream-ctrl.active {
    background-color: var(--color-danger);
}

.townhall-meta {
    margin-top: 14px;
}

.townhall-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.stats-row {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stats-row span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speaker-queue-box {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.queue-header h5 {
    font-size: 0.9rem;
    font-weight: 600;
}

.speaker-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.speaker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
}

.speaker-item.active {
    background-color: var(--accent-blue-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.speaker-avatar {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.speaker-item.active .speaker-avatar {
    color: var(--accent-blue);
}

.speaker-item .speaker-name {
    flex: 1;
}

.speaker-timer {
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 600;
    color: var(--accent-blue);
}

.speaker-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.speaker-item.active .speaker-status {
    color: var(--color-success);
}

/* 10. Buttons & Utility UI Elements */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    transform: translate3d(0,0,0);
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}
.btn-primary:hover {
    background-color: #2563eb;
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px var(--accent-blue-glow);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px rgba(255,255,255,0.05);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
}
.btn-success:hover {
    background-color: #059669;
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px var(--color-success-bg);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px var(--color-danger-bg);
}

.btn-tiny {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
}

.flex-1 { flex: 1; }

/* 11. Objection Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform var(--transition-smooth);
    overflow: hidden;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

blockquote {
    border-left: 3px solid var(--accent-indigo);
    padding: 10px 16px;
    background-color: rgba(99, 102, 241, 0.05);
    border-radius: 0 6px 6px 0;
}

.quote-text {
    font-family: 'Merriweather', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-alert {
    display: flex;
    gap: 12px;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #93c5fd;
}

.info-alert i {
    font-size: 1.05rem;
    margin-top: 2px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(17, 24, 39, 0.4);
}

/* Animations */
@keyframes pulse-live {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        opacity: 0.9;
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Settings Modal Adjustments */
.modal-wide {
    max-width: 680px;
    width: 95%;
}

.settings-layout {
    display: flex;
    flex-direction: column; /* Stacked vertically on PC (tabs at top, content below) */
    gap: 20px;
    padding: 0 20px;
    min-height: 380px;
}

.settings-sidebar {
    width: 100%;
    display: flex;
    flex-direction: row; /* Side-by-side horizontal row on PC */
    gap: 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-top: 16px; /* Spacing above tab buttons on PC and mobile */
    padding-right: 0;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.settings-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.settings-tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.settings-tab-btn.active {
    color: var(--accent-blue);
    background-color: var(--accent-blue-glow);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.settings-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.settings-panel.active {
    display: flex;
}

/* Profile Card Widget inside Settings */
.profile-card-mock {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.profile-avatar-big {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent-blue-glow);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.profile-meta-big {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.profile-meta-big h4 {
    font-size: 1rem;
    font-weight: 600;
}

/* Standardized Form Inputs for Settings Panel */
.form-input {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue-glow);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-select:focus {
    border-color: var(--accent-blue);
}

/* Responsive adjustment for settings layout inside media query */
@media (max-width: 580px) {
    .settings-layout {
        flex-direction: column;
        gap: 16px;
    }
    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-top: 16px; /* Padding above the profile and app settings buttons on mobile */
        padding-right: 0;
        padding-bottom: 12px;
        overflow-x: auto;
    }
    .settings-tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .stream-reactions-panel {
        display: none !important;
    }
    .stream-overlay {
        padding: 10px !important;
    }
}

/* 12. Mobile Bottom Navigation & Responsive Queries */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 60px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    backdrop-filter: var(--backdrop-blur);
}

.mobile-nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 8px;
    flex: 1;
}

.mobile-nav-btn i {
    font-size: 1.15rem;
}

.mobile-nav-btn:hover {
    color: var(--text-primary);
}

.mobile-nav-btn.active {
    color: var(--accent-blue);
    font-weight: 600;
}

@media (max-width: 768px) {
    .app-header {
        padding: 0 16px;
    }
    
    .header-left {
        width: auto;
    }
    
    .search-container {
        display: none; /* Hide search bar to keep it lightweight */
    }
    
    .header-right {
        width: auto;
        flex: 1;
    }
    
    .user-badge span {
        display: none; /* Hide verified text, show icon to save space */
    }
    
    .user-badge {
        padding: 6px 10px;
    }

    .main-content {
        height: calc(100vh - var(--header-height) - 60px);
        position: relative;
        overflow: hidden;
    }

    /* Map is always visible in the background */
    .center-canvas-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        display: block !important;
        z-index: 1;
    }

    /* Convert Left & Right docks to sliding bottom sheets */
    .left-dock, .right-dock {
        position: fixed;
        left: 0;
        bottom: 60px; /* Sits right above the bottom nav */
        width: 100% !important;
        height: 55vh !important;
        max-height: 480px;
        background-color: var(--bg-secondary);
        border: none !important;
        border-top: 1px solid var(--glass-border) !important;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
        z-index: 99;
        transform: translateY(calc(100% + 60px)); /* Hidden below screen */
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important; /* Layout active, hidden via transform */
        padding: 20px;
        overflow-y: auto;
    }

    /* Active bottom sheet drawer state */
    .left-dock.mobile-open,
    .right-dock.mobile-open {
        transform: translateY(0); /* Slide up into view */
    }

    /* Floating controls placed at top left so drawers don't cover them */
    .floating-controls {
        bottom: auto;
        top: 68px;
        left: 16px;
        z-index: 10;
        gap: 6px;
    }

    .btn-floating {
        width: 36px;
        height: 36px;
    }

    /* Hide redundant zoom banner and header separator on mobile */
    .zoom-banner {
        display: none !important;
    }

    /* Float consensus banner at the top so it remains visible above drawers */
    .consensus-banner {
        position: absolute;
        top: 16px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 440px;
        height: 36px;
        z-index: 10;
    }
    
    .consensus-banner-text {
        font-size: 0.75rem;
    }

    .mobile-nav {
        display: flex;
    }

    .modal-card {
        width: 95%;
        max-height: 85vh;
    }

    /* Convert toolkit drawer to a sliding bottom sheet on mobile */
    .toolkit-drawer {
        position: fixed !important;
        left: 0 !important;
        bottom: 60px !important; /* Sits right above the bottom nav */
        width: 100% !important;
        height: 55vh !important;
        max-height: 480px !important;
        border: none !important;
        border-top: 1px solid var(--glass-border) !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6) !important;
        z-index: 99 !important;
        transform: translateY(calc(100% + 60px)) !important; /* Hidden below screen */
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        top: auto !important;
    }

    .toolkit-drawer.active {
        display: flex !important;
        transform: translateY(0) !important; /* Slide up into view */
    }
}

/* -------------------------------------------------------------
 * 13. Phase 2 Features Design Styling (Git Diff, Reactions, ZK Proof)
 * ------------------------------------------------------------- */

/* Git version history and Diff colors */
.git-history-container {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 14px;
    max-height: 160px;
    overflow-y: auto;
}

.git-tree-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.git-commit {
    position: relative;
    cursor: pointer;
    transition: var(--transition-fast);
}

.git-commit .commit-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid var(--bg-primary);
    transition: var(--transition-fast);
}

.git-commit:hover .commit-details .commit-version {
    color: var(--accent-blue);
}

.git-commit.active .commit-dot {
    background-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.git-commit.active .commit-details .commit-version {
    color: var(--accent-blue);
}

.commit-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.commit-version {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.commit-msg {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Diff highlights */
.diff-addition {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    text-decoration: none;
    padding: 1px 3px;
    border-radius: 3px;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.4);
}

.diff-deletion {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    text-decoration: line-through;
    padding: 1px 3px;
    border-radius: 3px;
    border-bottom: 1px dashed rgba(239, 68, 68, 0.4);
}

/* Stream reactions overlay */
.stream-right-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stream-reactions-panel {
    display: flex;
    gap: 4px;
    background-color: rgba(0,0,0,0.4);
    padding: 4px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-reaction {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.btn-reaction:hover {
    transform: scale(1.3);
}

.reactions-emitter {
    position: absolute;
    right: 24px;
    bottom: 50px;
    width: 80px;
    height: 160px;
    pointer-events: none;
    z-index: 15;
    overflow: hidden;
}

.floating-emoji {
    position: absolute;
    bottom: 0;
    right: 30px;
    font-size: 1.5rem;
    animation: float-up 1.8s ease-out forwards;
    pointer-events: none;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(0.6) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-130px) scale(1.1) rotate(15deg);
        opacity: 0;
    }
}

/* ZK Proof Portal Layout styling */
.zk-wizard-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 10px;
}

.zk-steps-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 8px;
    margin-top: 16px;
}

.zk-steps-tracker::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.zk-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.zk-step .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.zk-step.active .step-num {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

.zk-step.completed .step-num {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.zk-step .step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.zk-step.active .step-label {
    color: var(--accent-blue);
}

.zk-step.completed .step-label {
    color: var(--color-success);
}

.zk-content-panels {
    min-height: 240px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    margin-bottom: 20px;
}

.zk-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.zk-panel.active {
    display: flex;
}

.zk-panel h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.zk-description {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Biometric Scan Device Mock */
.scan-sensor-mock {
    position: relative;
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background-color: var(--bg-primary);
    border: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-fast);
}

.scan-sensor-mock:hover {
    border-color: var(--accent-blue);
    background-color: rgba(59, 130, 246, 0.02);
}

.sensor-scanner-laser {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(239,68,68,0) 0%, #ef4444 50%, rgba(239,68,68,0) 100%);
    box-shadow: 0 0 8px #ef4444;
    animation: laser-scan 2s infinite ease-in-out;
}

@keyframes laser-scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.sensor-icon-wrapper {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.sensor-status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Keypair generator display */
.keypair-box {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keypair-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.key-type {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.key-code {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--accent-indigo);
    background-color: rgba(99, 102, 241, 0.05);
    padding: 8px 12px;
    border-radius: 4px;
    word-break: break-all;
}

/* Terminal cryptographic prover logs */
.terminal-proving-box {
    background-color: #030712;
    border: 1px solid #1f2937;
    border-radius: 8px;
    font-family: monospace;
    overflow: hidden;
}

.terminal-header {
    background-color: #111827;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #1f2937;
}

.term-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4b5563;
}

.term-dot:nth-child(1) { background-color: #ef4444; }
.term-dot:nth-child(2) { background-color: #f59e0b; }
.term-dot:nth-child(3) { background-color: #10b981; }

.term-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.terminal-body {
    padding: 12px;
    height: 110px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #10b981;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Light theme overrides for terminal log */
body.light-theme .terminal-proving-box {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

body.light-theme .terminal-header {
    background-color: var(--bg-secondary) !important;
    border-bottom-color: var(--border-color) !important;
}

body.light-theme .terminal-body {
    color: var(--text-primary) !important;
}

body.light-theme .term-line {
    color: var(--text-primary) !important;
}

/* ZK success screen */
.verification-success-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.success-checkmark {
    font-size: 3rem;
    color: var(--color-success);
    animation: pop-checkmark 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-checkmark {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.verification-success-badge h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.proof-hash {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    background-color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.zk-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Light Theme overrides for ZK Modal and Terminal */
body.light-theme .zk-content-panels {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

body.light-theme .scan-sensor-mock {
    background-color: #f8fafc;
}

body.light-theme .keypair-box {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

body.light-theme .proof-hash {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Expanded Theater Mode Overlay */
.theater-card {
    display: flex;
    width: 90vw;
    height: 85vh;
    max-width: 1200px;
    background: rgba(11, 15, 25, 0.85); 
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.theater-screen-container {
    flex: 1;
    position: relative;
    background-color: #030712;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.theater-visualizer {
    width: 100%;
    height: 100%;
}

.theater-badge-live {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--color-danger);
    color: white;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    z-index: 5;
    letter-spacing: 0.05em;
    animation: pulse-live 1.5s infinite;
}

.theater-badge-time {
    position: absolute;
    top: 20px;
    left: 135px;
    background-color: rgba(0, 0, 0, 0.65);
    color: rgba(255, 255, 255, 0.85);
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
    backdrop-filter: blur(4px);
}

.theater-reactions-emitter {
    position: absolute;
    right: 24px;
    bottom: 80px;
    width: 100px;
    height: 250px;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.theater-screen-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 12;
}

.theater-speaker-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theater-speaker-info .speaker-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.theater-speaker-info .speaker-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.theater-controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.theater-reactions {
    display: flex;
    gap: 8px;
}

.btn-theater-react {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-theater-react:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.2);
}

.theater-stream-controls {
    display: flex;
    gap: 8px;
}

.theater-sidebar {
    width: 340px;
    border-left: 1px solid var(--border-color);
    background-color: rgba(17, 24, 39, 0.5);
    display: flex;
    flex-direction: column;
}

/* Sidebar mobile tab switcher */
.theater-sidebar-tabs {
    display: none;
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
}

body.light-theme .theater-sidebar-tabs {
    background-color: rgba(0, 0, 0, 0.03);
}

.theater-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.theater-tab-btn:hover {
    color: var(--text-primary);
}

.theater-tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.theater-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.theater-sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.theater-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theater-sidebar-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.theater-sidebar-buttons .btn {
    width: 100%;
    margin-top: 0 !important;
    border-radius: 30px;
}

.theater-section h5 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-logs-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}

.chat-bubble,
.chat-log-item {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.chat-log-item.user-message,
.chat-bubble.user-message {
    background-color: var(--accent-blue-glow);
    border-left: 3px solid var(--accent-blue);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-right: 6px;
}

.chat-user {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 6px;
}

/* Light Theme overrides for chat bubbles */
body.light-theme .chat-bubble,
body.light-theme .chat-log-item {
    background-color: #f1f5f9 !important; /* clean light slate-100 */
    border-color: #e2e8f0 !important;
    color: #0f172a !important; /* high-contrast dark text */
}

body.light-theme .chat-log-item.user-message,
body.light-theme .chat-bubble.user-message {
    background-color: #e0f2fe !important; /* soft sky-blue */
    border-left: 3px solid #0284c7 !important;
    color: #0369a1 !important;
}

body.light-theme .chat-time {
    color: #64748b !important;
}

body.light-theme .chat-user {
    color: #0f172a !important;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.chat-input-bar input {
    flex: 1;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}

.chat-input-bar input:focus {
    border-color: var(--accent-blue);
}

/* Light Theme tweaks for Theater Mode */
body.light-theme .theater-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-color);
}
body.light-theme .theater-sidebar {
    background-color: rgba(248, 250, 252, 0.7);
    border-left-color: var(--border-color);
}

/* Responsive constraints for theater mode */
@media (max-width: 900px) {
    .theater-card {
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .theater-sidebar {
        width: 100%;
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 48vh;
    }
    .theater-sidebar-tabs {
        display: flex;
    }
    
    /* Toggle active layouts */
    .theater-sidebar.show-chat #theater-queue-section {
        display: none !important;
    }
    .theater-sidebar.show-queue #theater-chat-section {
        display: none !important;
    }
    
    .theater-sidebar.show-chat #theater-chat-section {
        display: flex !important;
        flex: 1;
        height: calc(48vh - 110px);
        min-height: 0;
    }
    .theater-sidebar.show-queue #theater-queue-section {
        display: flex !important;
        flex: 1;
        height: calc(48vh - 110px);
        min-height: 0;
        overflow-y: auto;
    }
    .chat-logs-container {
        flex: 1;
        max-height: none;
    }
}
/* -------------------------------------------------------------
 * Phase 3: Offline Action Toolkits & QR Attendance Verification
 * ------------------------------------------------------------- */
.toolkit-drawer {
    display: none;
    position: absolute;
    left: var(--left-dock-width);
    top: 0;
    width: 350px;
    height: 100%;
    background-color: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border-right: 1px solid var(--glass-border);
    z-index: 50;
    flex-direction: column;
    box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.3);
}

.toolkit-drawer.active {
    display: flex;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.drawer-header h2 {
    font-size: 1.1rem;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.toolkit-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-fast);
    transform: translate3d(0,0,0);
}
.toolkit-card:hover {
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 4px 12px rgba(255,255,255,0.05);
}

.toolkit-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
}

.toolkit-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.camera-mockup {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.camera-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.glass-qr-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-qr {
    font-size: 8rem;
    color: var(--accent-blue);
    margin-bottom: 16px;
}

.secure-ticker {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-success);
    background-color: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.scanner-loop-animation {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.verification-status {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.verified-badge {
    color: var(--color-success);
    margin-bottom: 16px;
}

.verified-badge i {
    font-size: 4rem;
    margin-bottom: 12px;
}

/* Unity Metrics Segmented Tab Switcher */
.metrics-switcher {
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 4px;
    display: flex;
    gap: 4px;
    margin: 16px;
}
.metrics-switcher .btn {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.metrics-switcher .btn.active {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.1);
}
.metrics-switcher .btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary);
}

/* Unity Metrics Panel */
.glassmorphic-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.glassmorphic-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate3d(0,0,0);
}
.glassmorphic-card:hover {
    transform: scale(1.02) translate3d(0,0,0);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 12px rgba(255,255,255,0.05);
}
.metric-card h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}
.metric-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}
.metric-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.metric-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.plus-anim {
    animation: floatUp 1.5s ease-out forwards;
}

/* Progress Ring Overrides */
.progress-ring circle:first-child {
    stroke: rgba(255, 255, 255, 0.1) !important;
}

/* Light Theme Overrides for Absolute High-Contrast Metrics */
body.light-theme .metrics-switcher {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}
body.light-theme .metrics-switcher .btn {
    color: var(--text-secondary);
}
body.light-theme .metrics-switcher .btn.active {
    background: var(--bg-secondary) !important;
    color: var(--accent-blue) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.light-theme .metrics-switcher .btn:hover:not(.active) {
    background: rgba(15, 23, 42, 0.04) !important;
    color: var(--text-primary);
}

body.light-theme .glassmorphic-panel {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
body.light-theme .glassmorphic-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
body.light-theme .progress-ring circle:first-child {
    stroke: #e2e8f0 !important; /* clean slate-200 background ring */
}
body.light-theme .metric-desc {
    color: var(--text-secondary);
}

@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 1; transform: translateY(-5px); }
    80% { opacity: 1; transform: translateY(-15px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Governance Telemetry Card Values */
.telemetry-value {
    position: relative;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-top: 4px;
    display: block;
}

/* Civic Tech API Documentation Styles */
.api-endpoint {
    margin-bottom: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.api-endpoint h5 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
}

.api-method {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.api-method.GET {
    background-color: var(--accent-blue-glow);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.api-endpoint p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.api-endpoint dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
}

.api-endpoint dt {
    font-weight: 600;
    color: var(--text-primary);
}

.api-endpoint dd {
    color: var(--text-secondary);
}

.api-endpoint code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent-indigo);
}

.glassmorphic-terminal {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    background: #ff5f56;
}
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; margin-right: 12px; }

.term-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex: 1;
}

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

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

.json-mockup {
    margin: 0;
    padding: 16px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow-x: auto;
}

/* WCAG AAA Active Tab Outline */
.settings-tab-btn:focus-visible,
#btn-tab-api:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* High contrast tag for developer documentation */
.tag-dev-docs {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Spatial Toast Alerts styling */
.spatial-toast {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    width: 300px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spatial-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.spatial-toast.hide {
    transform: translateY(-20px);
    opacity: 0;
}

.spatial-toast-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.spatial-toast-content {
    flex: 1;
}

.spatial-toast-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.spatial-toast-body {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toast types */
.spatial-toast-info .spatial-toast-icon { color: var(--accent-blue); }
.spatial-toast-success .spatial-toast-icon { color: var(--color-success); }
.spatial-toast-warning .spatial-toast-icon { color: var(--color-warning); }
.spatial-toast-danger .spatial-toast-icon { color: var(--color-danger); }

/* Light Mode overrides for Spatial Toast Alerts */
body.light-theme .spatial-toast {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12) !important;
}

body.light-theme .spatial-toast-title {
    color: #0f172a !important;
}

body.light-theme .spatial-toast-body {
    color: #475569 !important;
}

