/* EagleIV Digital Twin Styles */

/* Layout */
.dt-container {
    display: flex;
    height: calc(100vh - 50px);
    overflow: hidden;
}

/* Left Sidebar */
.dt-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dt-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.dt-sidebar-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.dt-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Patient Selector */
.dt-patient-select {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.dt-patient-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dt-patient-btn {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dt-patient-btn:hover {
    border-color: #ccc;
    color: #333;
}

.dt-patient-btn.active {
    background: #e8f5f3;
    border-color: #00bfa5;
    color: #00bfa5;
    font-weight: 600;
}

/* Playback Controls */
.dt-playback {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.dt-playback-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.dt-ctrl-btn {
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.dt-ctrl-btn:hover {
    background: #e8f5f3;
    border-color: #00bfa5;
}

.dt-ctrl-btn.playing {
    background: #00bfa5;
    border-color: #00bfa5;
    color: white;
}

.dt-speed-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.dt-speed-label {
    font-size: 11px;
    color: #999;
}

.dt-speed-select {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: white;
    cursor: pointer;
}

.dt-time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-family: monospace;
    color: #666;
}

.dt-time-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
}

.dt-time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00bfa5;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.dt-time-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00bfa5;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Workflow Steps */
.dt-steps-section {
    flex: 1;
    padding: 16px 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dt-step-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dt-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.dt-step-item:hover {
    background: #f5f5f5;
}

.dt-step-item.completed {
    color: #333;
}

.dt-step-item.active {
    background: #e8f5f3;
    color: #00897b;
    font-weight: 600;
}

.dt-step-item.flagged {
    color: #d32f2f;
}

.dt-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
}

.dt-step-item.completed .dt-step-dot {
    background: #00bfa5;
}

.dt-step-item.active .dt-step-dot {
    background: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.dt-step-item.flagged .dt-step-dot {
    background: #d32f2f;
}

.dt-step-time {
    font-family: monospace;
    font-size: 10px;
    color: #bbb;
    margin-left: auto;
    flex-shrink: 0;
}

/* Robot Toggle */
.dt-robot-section {
    padding: 12px 20px;
    border-top: 1px solid #e0e0e0;
}

.dt-robot-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.dt-robot-toggle:hover {
    border-color: #ccc;
    background: #eee;
}

.dt-robot-toggle.active {
    background: #e8f5f3;
    border-color: #00bfa5;
    color: #00897b;
    font-weight: 600;
}

.dt-robot-toggle-icon {
    font-size: 18px;
    transition: all 0.3s;
}

.dt-robot-toggle.active .dt-robot-toggle-icon {
    color: #00bfa5;
}

/* Camera Section */
.dt-camera-section {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.dt-camera-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.dt-cam-btn {
    padding: 6px 10px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.dt-cam-btn:hover {
    border-color: #ccc;
}

.dt-cam-btn.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: white;
    font-weight: 600;
}

/* Center Viewport */
.dt-viewport-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    padding: 16px;
    min-width: 0;
}

.dt-viewport {
    flex: 1;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.dt-viewport canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.dt-viewport-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.92);
    transition: opacity 0.5s;
    z-index: 10;
}

.dt-viewport-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.dt-loading-icon {
    font-size: 48px;
    color: #00bfa5;
    margin-bottom: 16px;
    animation: dt-spin 3s linear infinite;
}

@keyframes dt-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dt-loading-text {
    font-size: 22px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.dt-loading-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* Viewport Bottom Bar */
.dt-viewport-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
}

.dt-bar-left, .dt-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dt-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dt-badge-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.dt-scene-info {
    font-size: 12px;
    color: #666;
}

.dt-render-mode {
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

.dt-fps {
    font-size: 11px;
    color: #00bfa5;
    font-family: monospace;
    font-weight: 600;
}

/* Right Panel */
.dt-detection-panel {
    width: 280px;
    background: white;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dt-detection-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.dt-detection-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.dt-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Object List */
.dt-object-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dt-object-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
}

.dt-object-item.dt-obj-active {
    background: #e8f5f3;
    border-left: 3px solid #00bfa5;
}

.dt-object-item.dt-obj-warning {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
}

.dt-obj-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00bfa5;
    flex-shrink: 0;
}

.dt-object-item.dt-obj-warning .dt-obj-dot {
    background: #ffc107;
}

.dt-obj-name {
    color: #333;
    flex: 1;
}

.dt-obj-conf {
    font-size: 10px;
    color: #999;
    font-family: monospace;
}

.dt-scanning {
    opacity: 0.5;
}

/* Compliance */
.dt-compliance-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e0e0e0;
}

.dt-compliance-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.dt-score-value {
    font-size: 28px;
    font-weight: 700;
    color: #00bfa5;
}

.dt-score-label {
    font-size: 12px;
    color: #999;
}

.dt-compliance-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dt-comp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
}

.dt-comp-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.dt-comp-pass .dt-comp-icon {
    color: #2e7d32;
}

.dt-comp-fail .dt-comp-icon {
    color: #d32f2f;
}

.dt-comp-pending .dt-comp-icon {
    color: #999;
}

/* AI Insight */
.dt-insight {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    padding: 12px 14px;
    background: rgba(0, 191, 165, 0.06);
    border-radius: 8px;
    border-left: 3px solid #00bfa5;
}

.dt-insight.dt-insight-warning {
    background: rgba(255, 193, 7, 0.08);
    border-left-color: #ffc107;
}

.dt-insight p {
    margin: 0;
}

/* NVIDIA Badge */
.dt-nvidia-badge {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.dt-nvidia-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.dt-nvidia-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.dt-nvidia-name {
    font-size: 13px;
    font-weight: 600;
    color: #76b900;
}

.dt-nvidia-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}
