/* Custom Premium Design System for AAGC Monitor */

:root {
    /* Color Tokens (Tailored HSL & Sleek Dark Mode) */
    --bg-base: #080c14;
    --bg-surface: rgba(16, 22, 38, 0.6);
    --bg-surface-opaque: #0c1220;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(59, 130, 246, 0.2);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Status Colors */
    --status-not-started: #475569;
    --status-not-started-bg: rgba(71, 85, 105, 0.15);
    
    --status-manufactured: #c084fc;
    --status-manufactured-bg: rgba(192, 132, 252, 0.15);
    
    --status-delivered: #f59e0b;
    --status-delivered-bg: rgba(245, 158, 11, 0.15);
    
    --status-in-progress: #00d2ff;
    --status-in-progress-bg: rgba(0, 210, 255, 0.15);
    
    --status-completed: #00f5a0;
    --status-completed-bg: rgba(0, 245, 160, 0.15);
    
    --status-issue: #ff3860;
    --status-issue-bg: rgba(255, 56, 96, 0.15);
    
    /* Layout Tokens */
    --sidebar-width: 320px;
    --card-radius: 16px;
    --glass-blur: 16px;
}

/* Light Theme Overrides */
body.light-mode {
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-opaque: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-glow: rgba(14, 165, 233, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --status-not-started: #94a3b8;
    --status-not-started-bg: rgba(148, 163, 184, 0.1);
}

/* Base resets & typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Glassmorphism utility card */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-color-glow);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.1);
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface-opaque);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--status-in-progress);
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.4));
}

.sidebar-logo h2 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Select Styling */
.custom-select-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select-wrapper select:focus {
    border-color: var(--status-in-progress);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

select option {
    background-color: #0c1220;
    color: #f8fafc;
}

body.light-mode select option {
    background-color: #ffffff;
    color: #0f172a;
}

/* Side navigation buttons */
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

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

.nav-btn.active {
    background: rgba(0, 210, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.25);
    color: var(--status-in-progress);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.05);
}

/* Health / Progress boxes */
.progress-box {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.health-pulse {
    width: 8px;
    height: 8px;
    background: var(--status-completed);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--status-completed);
    animation: pulse 1.8s infinite;
}

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

.project-overall-bar .bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--status-in-progress), var(--status-completed));
    border-radius: 4px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 245, 160, 0.4);
}

/* Sidebar Footer & Toggle */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.theme-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.switch-handle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f1f5f9;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease;
}

body.light-mode .toggle-switch {
    background: var(--status-in-progress);
}

body.light-mode .switch-handle {
    left: 22px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Main Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.breadcrumbs span {
    color: var(--status-in-progress);
    font-weight: 600;
}

.mode-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 225, 129, 0.2);
    background: rgba(16, 225, 129, 0.05);
    color: var(--status-completed);
}

.read-only-mode {
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    background: rgba(239, 68, 68, 0.05) !important;
    color: #ef4444 !important;
}

.badge-icon {
    width: 14px;
    height: 14px;
}

/* KPI Cards Layout */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.kpi-card {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.progress-color { color: var(--status-in-progress); }
.installed-bg { background: var(--status-completed-bg); color: var(--status-completed); }
.manufactured-bg { background: var(--status-manufactured-bg); color: var(--status-manufactured); }
.delivered-bg { background: var(--status-delivered-bg); color: var(--status-delivered); }
.progress-bg { background: var(--status-in-progress-bg); color: var(--status-in-progress); }
.issue-bg { background: var(--status-issue-bg); color: var(--status-issue); }

.completed-text { color: var(--status-completed); }
.manufactured-text { color: var(--status-manufactured); }
.delivered-text { color: var(--status-delivered); }
.progress-text { color: var(--status-in-progress); }
.issue-text { color: var(--status-issue); }

/* Dashboard layout grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    flex: 1;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Facade Section */
.facade-section {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.title-with-subtitle h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.title-with-subtitle p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Legend items */
.status-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-not-started { background: var(--status-not-started); }
.status-manufactured { background: var(--status-manufactured); box-shadow: 0 0 6px var(--status-manufactured); }
.status-delivered { background: var(--status-delivered); box-shadow: 0 0 6px var(--status-delivered); }
.status-in-progress { background: var(--status-in-progress); box-shadow: 0 0 6px var(--status-in-progress); }
.status-completed { background: var(--status-completed); box-shadow: 0 0 6px var(--status-completed); }
.status-issue { background: var(--status-issue); box-shadow: 0 0 6px var(--status-issue); }

/* Scrollable Elevation container */
.facade-grid-scroll-container {
    flex: 1;
    overflow: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* The actual building facade elevation grid */
.facade-elevation-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: max-content;
    min-width: 100%;
}

/* Floor layout row */
.facade-floor-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floor-label {
    width: 48px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
}

.floor-panels {
    display: flex;
    flex: 1;
    gap: 4px;
}

/* Panel Tile style */
.panel-tile {
    flex: 1;
    min-width: 20px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Color codes for panel tile status */
.panel-tile[data-status="0"] {
    background: var(--status-not-started-bg);
    border-color: rgba(255, 255, 255, 0.05);
}
.panel-tile[data-status="1"] {
    background: var(--status-manufactured-bg);
    border-color: rgba(192, 132, 252, 0.4);
    box-shadow: inset 0 0 4px rgba(192, 132, 252, 0.2);
}
.panel-tile[data-status="2"] {
    background: var(--status-delivered-bg);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: inset 0 0 4px rgba(245, 158, 11, 0.2);
}
.panel-tile[data-status="3"] {
    background: var(--status-in-progress-bg);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: inset 0 0 4px rgba(0, 210, 255, 0.2);
}
.panel-tile[data-status="4"] {
    background: var(--status-completed-bg);
    border-color: rgba(0, 245, 160, 0.4);
    box-shadow: inset 0 0 4px rgba(0, 245, 160, 0.2);
}
.panel-tile[data-status="5"] {
    background: var(--status-issue-bg);
    border-color: rgba(255, 56, 96, 0.5);
    box-shadow: inset 0 0 4px rgba(255, 56, 96, 0.2);
    animation: blink 2.5s infinite;
}

.panel-tile:hover {
    transform: scale(1.08) translateY(-1px);
    z-index: 2;
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.panel-tile.selected {
    border-color: #fff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
    z-index: 3;
}

/* Side Panel (Right Hand charts and logs) */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.chart-section {
    padding: 1.5rem;
}

.chart-section h3, .log-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
}

.log-section {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.log-container {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.25rem;
    max-height: 320px;
}

/* Log Item styling */
.log-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
}

.log-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.log-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.log-details {
    flex: 1;
}

.log-time {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.log-details strong {
    color: var(--text-primary);
}

/* Modal Drawer for Editing Panels */
.inspector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inspector-overlay.open {
    display: block;
    opacity: 1;
}

.inspector-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    z-index: 101;
    border-radius: 0;
    border-left: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.inspector-drawer.open {
    right: 0;
}

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

.drawer-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.drawer-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    flex: 1;
}

.panel-details-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-val {
    color: var(--text-primary);
    font-weight: 600;
}

.drawer-action-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

/* Status selection grid in drawer */
.status-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.status-opt-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-opt-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.status-opt-btn.active[data-status="0"] { background: var(--status-not-started-bg); border-color: var(--status-not-started); color: var(--text-primary); font-weight: 600; }
.status-opt-btn.active[data-status="1"] { background: var(--status-manufactured-bg); border-color: var(--status-manufactured); color: var(--status-manufactured); font-weight: 600; }
.status-opt-btn.active[data-status="2"] { background: var(--status-delivered-bg); border-color: var(--status-delivered); color: var(--status-delivered); font-weight: 600; }
.status-opt-btn.active[data-status="3"] { background: var(--status-in-progress-bg); border-color: var(--status-in-progress); color: var(--status-in-progress); font-weight: 600; }
.status-opt-btn.active[data-status="4"] { background: var(--status-completed-bg); border-color: var(--status-completed); color: var(--status-completed); font-weight: 600; }
.status-opt-btn.active[data-status="5"] { background: var(--status-issue-bg); border-color: var(--status-issue); color: var(--status-issue); font-weight: 600; }

.status-opt-btn .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.note-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    display: none;
}

.note-section label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.note-section textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    outline: none;
    resize: none;
    height: 70px;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
}

.note-section textarea:focus {
    border-color: var(--status-issue);
}

.apply-btn {
    width: 100%;
    padding: 0.9rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--status-in-progress), #0284c7);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 245, 160, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 245, 160, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 245, 160, 0);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; border-color: rgba(255, 56, 96, 0.6); }
    50% { opacity: 0.6; border-color: rgba(255, 56, 96, 0.15); }
}

/* QR Scanner Modal Styles */
.scan-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.08);
    color: #c084fc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scan-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}

.qr-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 440px;
    max-height: 90vh;
    z-index: 201;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qr-modal.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.scanner-view-container {
    width: 100%;
    height: 240px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-simulated-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    z-index: 5;
}

.scanner-placeholder-icon {
    width: 48px;
    height: 48px;
    color: #a855f7;
    animation: pulse-purple 2s infinite;
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff3860, transparent);
    top: 0;
    left: 0;
    z-index: 10;
    animation: scan-line 3s linear infinite;
    display: none;
}

.qr-modal.open .scanner-laser {
    display: block;
}

.scanner-guide {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    z-index: 8;
    pointer-events: none;
}

.scanner-control-section {
    display: flex;
    flex-direction: column;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    width: 100%;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider::before {
    margin-right: .5em;
}

.divider::after {
    margin-left: .5em;
}

.sim-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.sim-input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-with-button {
    display: flex;
    width: 100%;
}

.input-with-button input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    outline: none;
    font-size: 0.85rem;
    transition: border-color 0.3s ease;
}

.input-with-button input:focus {
    border-color: var(--status-in-progress);
}

/* Animations */
@keyframes scan-line {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

@keyframes pulse-purple {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5)); }
}

/* Disabled option buttons styling for role restrictions */
.status-opt-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(85%);
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-muted) !important;
}

.status-opt-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    transform: none;
    box-shadow: none;
}
