/**
 * 3D Navigation Kiosk - Modern Glassmorphic Dark Architectural Theme
 * Kempegowda International Airport (BIAL) Wayfinding
 */

:root {
    --bg-main: #0c0f17;
    --bg-panel: rgba(16, 22, 34, 0.88);
    --bg-card: rgba(25, 34, 52, 0.65);
    --bg-card-hover: rgba(35, 48, 72, 0.8);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(0, 242, 254, 0.45);

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

    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --accent-start: #00e676;
    --accent-dest: #ff1744;
    --accent-gold: #ffd166;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.3);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

#app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* ==========================================================================
   Header Bar
   ========================================================================== */
#kiosk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 24px;
    background: rgba(12, 16, 26, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 50;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.brand-titles h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.map-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-start);
    background: rgba(0, 230, 118, 0.1);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 230, 118, 0.25);
}

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

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Main Content Layout (Sidebar + 3D Viewer)
   ========================================================================== */
#main-content {
    display: flex;
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Sidebar Panel */
#sidebar-panel {
    width: 380px;
    min-width: 380px;
    max-width: 380px;
    height: 100%;
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: var(--shadow-md);
}

#sidebar-panel::-webkit-scrollbar {
    width: 5px;
}
#sidebar-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
}

/* ==========================================================================
   Search & Category Chips
   ========================================================================== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.search-container input {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px 12px 40px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.search-container input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #131a29;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-item-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.search-item-actions {
    display: flex;
    gap: 6px;
}

.btn-micro {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-micro:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.search-item-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Category Chips */
.category-chips-scroll {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-chips-scroll::-webkit-scrollbar {
    height: 3px;
}

.category-chip {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #0c0f17;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

/* ==========================================================================
   Routing Card (Source/Dest Selectors)
   ========================================================================== */
.route-inputs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: border-color 0.2s ease;
}

.input-row:focus-within {
    border-color: var(--accent-primary);
}

.pin-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pin-start {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-start);
}

.pin-dest {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent-dest);
}

.select-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.select-wrapper label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.select-wrapper select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
}

.select-wrapper select option {
    background: #111726;
    color: var(--text-primary);
}

.swap-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 20px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.swap-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 0 8px;
}

.swap-btn:hover {
    background: var(--accent-primary);
    color: #000;
    transform: rotate(180deg);
}

.routing-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #0b0f19;
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
    width: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* ==========================================================================
   Calculated Route Card
   ========================================================================== */
.route-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.metric-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.highlight {
    color: var(--accent-primary);
}

/* Track Animation Control Center */
.animation-control-bar {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.08);
}

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

.anim-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.anim-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.anim-badge.live {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-start);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.anim-badge.paused {
    background: rgba(255, 209, 102, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.anim-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-anim-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #0b0f19;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.3);
}

.btn-anim-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.45);
}

.btn-anim-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-anim-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-anim-secondary.btn-follow.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.anim-speed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.speed-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.speed-segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 2px;
    gap: 2px;
}

.speed-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.speed-pill:hover {
    color: var(--text-primary);
}

.speed-pill.active {
    background: var(--accent-primary);
    color: #0b0f19;
    box-shadow: 0 1px 6px rgba(0, 242, 254, 0.4);
}

.anim-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.anim-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #00e676);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Turn by Turn */
.turn-by-turn-container h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.steps-list::-webkit-scrollbar {
    width: 4px;
}
.steps-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.direction-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 12px;
}

.direction-step.start {
    border-left: 3px solid var(--accent-start);
}

.direction-step.finish {
    border-left: 3px solid var(--accent-dest);
}

.step-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.step-content {
    flex: 1;
}

.step-instruction {
    font-weight: 600;
    color: var(--text-primary);
}

.step-detail {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Instructions card */
.instructions-card h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.tips-list li strong {
    color: var(--text-primary);
}

/* ==========================================================================
   3D Canvas Viewport
   ========================================================================== */
#viewer-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #090c14;
}

#canvas-container {
    width: 100%;
    height: 100%;
}

/* Floating 3D Camera Controls */
.floating-view-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 22, 34, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    padding: 6px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    z-index: 30;
}

.ctrl-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ctrl-btn.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.ctrl-btn.icon-only {
    padding: 8px;
}

.ctrl-divider {
    width: 1px;
    height: 18px;
    background: var(--border-subtle);
    margin: 0 2px;
}

/* Floating Legend */
.floating-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(16, 22, 34, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-header {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-badge {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Floating On-Canvas Animation Bar */
.canvas-anim-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 20, 32, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 242, 254, 0.15);
    z-index: 35;
}

.canvas-anim-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.canvas-anim-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.canvas-anim-btn.active {
    background: rgba(0, 242, 254, 0.22);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

.canvas-anim-btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #0b0f19;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.35);
}

.canvas-anim-btn.primary:hover {
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.5);
}

.canvas-ctrl-divider {
    width: 1px;
    height: 18px;
    background: var(--border-subtle);
    margin: 0 4px;
}

.canvas-speed-group {
    display: flex;
    gap: 3px;
    background: rgba(0, 0, 0, 0.35);
    padding: 2px;
    border-radius: var(--radius-full);
}

.canvas-speed-pill {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}

.canvas-speed-pill:hover {
    color: var(--text-primary);
}

.canvas-speed-pill.active {
    background: var(--accent-primary);
    color: #0b0f19;
    box-shadow: 0 1px 6px rgba(0, 242, 254, 0.4);
}

/* 3D Tooltip Overlay */
.room-tooltip {
    position: absolute;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 12px;
    min-width: 180px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 40;
    transform: translate(0, 0);
    transition: opacity 0.15s ease;
}

.tooltip-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.tooltip-actions {
    display: flex;
    gap: 6px;
}

.tooltip-btn {
    flex: 1;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tooltip-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tooltip-btn.primary {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.tooltip-btn.primary:hover {
    background: #4facfe;
}

/* ==========================================================================
   Loading Overlay & Toast
   ========================================================================== */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.kiosk-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

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

.toast-success {
    background: #0f3822;
    color: #4ade80;
    border: 1px solid #166534;
}

.toast-warning {
    background: #422006;
    color: #facc15;
    border: 1px solid #854d0e;
}

.toast-error {
    background: #450a0a;
    color: #f87171;
    border: 1px solid #991b1b;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: #141b2b;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 360px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

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

.qr-code-box {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.qr-img {
    width: 180px;
    height: 180px;
}

.qr-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: center;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
    #sidebar-panel {
        width: 320px;
        min-width: 320px;
    }
}

@media (max-width: 768px) {
    #main-content {
        flex-direction: column-reverse;
    }

    #sidebar-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 45vh;
        border-right: none;
        border-top: 1px solid var(--border-subtle);
    }

    .floating-legend {
        display: none;
    }
}
