/* Scan3D Studio - Professional Design System */
:root {
    --bg-base: #0a0d14;
    --bg-surface: #121722;
    --bg-surface-elevated: #1a2232;
    --bg-surface-hover: #222c40;
    
    --border-subtle: #1e2638;
    --border-strong: #2d3850;
    --border-focus: #3b82f6;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.35);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.35);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.12);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
    --shadow-elevated: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-strong);
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Accessibility Focus Outline */
:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* App Wrapper */
.app-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100vh;
}

/* Top Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(18, 23, 34, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--primary-glow);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.engine-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #93c5fd;
    white-space: nowrap;
}

.connection-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.connection-pill:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    flex-shrink: 0;
}

.status-indicator.connected {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse-dot 2.5s infinite;
}

.status-indicator.disconnected {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.chevron-icon {
    opacity: 0.6;
    transition: transform 0.2s;
}

/* Settings Drawer */
.settings-drawer {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-elevated);
    animation: slideDown 0.22s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.drawer-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    line-height: 1;
}

.btn-icon:hover {
    color: var(--text-main);
    background: var(--bg-surface-elevated);
}

.server-config-form label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
    background: var(--bg-base);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.server-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.meta-tag {
    font-size: 0.78rem;
    background: var(--bg-surface-elevated);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.meta-tag .tag-label {
    color: var(--text-dim);
    margin-right: 0.25rem;
}

/* Alert Banner */
.alert-container {
    animation: fadeIn 0.2s ease-out;
}

.alert-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    color: #fde68a;
    font-size: 0.88rem;
}

.alert-box.alert-error {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: #fca5a5;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
}

.alert-dismiss {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.2rem;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* Step Stepper Navigation */
.step-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    gap: 0.85rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.step-item.active {
    color: var(--text-main);
}

.step-item.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 12px var(--primary-glow);
}

.step-item.done {
    color: var(--success);
}

.step-item.done .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-divider {
    flex: 1;
    max-width: 48px;
    height: 1px;
    background: var(--border-subtle);
}

/* Views Container */
.view-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropzone Card */
.drop-card {
    background: var(--bg-surface);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.drop-card:hover, .drop-card.dragover {
    border-color: var(--primary);
    background: rgba(30, 41, 62, 0.6);
    box-shadow: 0 0 35px var(--primary-glow);
    transform: translateY(-2px);
}

.drop-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.camera-lens-animation {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lens-ring {
    position: absolute;
    border-radius: 50%;
}

.lens-ring.outer {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.lens-ring.middle {
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(59, 130, 246, 0.4);
    animation: spin 18s linear infinite;
}

.lens-ring.core {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
    border: 1px solid var(--border-strong);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.drop-heading {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.drop-subtext {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.drop-badges {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.pill-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-muted);
}

.drop-select-btn {
    pointer-events: none; /* Allows the entire card click to trigger input */
}

/* Gallery & Thumbnails Section */
.gallery-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.gallery-counter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.counter-badge {
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.counter-meta {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

/* Thumbnails Grid */
.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
}

/* Custom Scrollbar */
.thumbnails-grid::-webkit-scrollbar {
    width: 6px;
}
.thumbnails-grid::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
.thumbnails-grid::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

.thumb-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.thumb-card:hover {
    transform: scale(1.04);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fca5a5;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.85;
}

.thumb-delete-btn:hover {
    background: var(--danger);
    color: white;
    opacity: 1;
    transform: scale(1.1);
}

/* Thumbnail Warning Badges (Stage 9) */
.thumb-warn-badge {
    position: absolute;
    bottom: 3px;
    left: 3px;
    right: 3px;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 8.5px;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    line-height: 1.2;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.thumb-warn-res {
    background: rgba(245, 158, 11, 0.92);
    color: #18181b;
}

.thumb-warn-tiny {
    background: rgba(239, 68, 68, 0.92);
    color: white;
}

.thumb-warn-dup {
    background: rgba(59, 130, 246, 0.92);
    color: white;
}

/* Photo Capture Guide & Coverage Guidance (Stage 10) */
.capture-guide-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.25s ease-out;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.guide-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.guide-subtitle {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 1px;
}

.guide-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.guide-toggle-chevron {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.guide-toggle-chevron.collapsed {
    transform: rotate(180deg);
}

.guide-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    transition: opacity 0.2s ease;
}

.guide-body.collapsed {
    display: none;
}

/* 1. 4 Temel Çekim Kuralı Grid */
.guide-rules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.guide-rule-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: var(--transition);
}

.guide-rule-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.rule-icon-box {
    font-size: 1.35rem;
    line-height: 1;
}

.rule-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.rule-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* 2. Görsel Anlatım: 360°, Seviyeler & Örtüşme */
.guide-visual-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.guide-visual-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
}

.visual-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    width: 100%;
}

.visual-card-caption {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-top: auto;
}

.guide-pill-info {
    font-size: 0.68rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-top: 0.2rem;
}

/* 360° Orbit Animasyonu */
.orbit-container-mini {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem auto;
}

.orbit-center-object {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.orbit-obj-label {
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #60a5fa;
    margin-top: 1px;
}

.orbit-ring {
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 1.5px dashed rgba(59, 130, 246, 0.45);
    animation: orbitSpin 14s linear infinite;
}

.orbit-satellite {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sat-1 { top: -8px; left: calc(50% - 8px); }
.sat-2 { top: calc(50% - 8px); right: -8px; }
.sat-3 { bottom: -8px; left: calc(50% - 8px); }
.sat-4 { top: calc(50% - 8px); left: -8px; }

.sat-dot {
    display: none;
}

.sat-text {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    font-size: 0.55rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

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

/* Angles Diagram */
.angles-diagram {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}

.angle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    background: rgba(18, 23, 34, 0.5);
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.angle-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.angle-badge.top {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.angle-badge.mid {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.angle-badge.bot {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.angle-desc {
    font-size: 0.68rem;
    color: var(--text-dim);
    line-height: 1.25;
}

/* Overlap Diagram */
.overlap-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 74px;
    margin: 0.35rem 0;
}

.overlap-box {
    width: 72px;
    height: 58px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    background: rgba(30, 41, 59, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    position: absolute;
}

.overlap-box.frame-1 {
    left: calc(50% - 64px);
}

.overlap-box.frame-2 {
    right: calc(50% - 64px);
}

.frame-tag {
    font-size: 0.6rem;
    color: var(--text-dim);
    font-weight: 600;
}

.overlap-zone {
    position: absolute;
    z-index: 2;
    width: 52px;
    height: 50px;
    background: rgba(59, 130, 246, 0.28);
    border: 1.5px dashed #60a5fa;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.overlap-pct {
    font-size: 0.74rem;
    font-weight: 800;
    color: #93c5fd;
}

.overlap-sub {
    font-size: 0.52rem;
    color: #bfdbfe;
    font-weight: 600;
    text-transform: uppercase;
}

/* 3. Tips Grid */
.guide-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.guide-tip-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tip-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}

.tip-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-left: 0;
}

.tip-list li {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    position: relative;
    padding-left: 0.9rem;
}

.tip-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

.light-dos-donts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.light-do, .light-dont {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.do-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dont-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.transparency-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.6rem;
    font-size: 0.7rem;
    color: #93c5fd;
    line-height: 1.35;
    margin-top: auto;
}

.transparency-note .note-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* 4. Checklist Container */
.guide-checklist-container {
    background: rgba(18, 23, 34, 0.7);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.checklist-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.checklist-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.checklist-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.55rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
}

.checklist-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: var(--bg-surface-hover);
}

.checklist-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.checklist-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.checklist-input:checked + .checklist-box {
    background: var(--primary);
    border-color: var(--primary);
}

.checklist-input:checked + .checklist-box::after {
    content: "✓";
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.checklist-input:checked ~ .checklist-label {
    color: #f1f5f9;
}

.checklist-input:focus-visible + .checklist-box {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.checklist-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .orbit-ring,
    .live-dot,
    .orb-icon.rotating,
    .orb-outer-glow,
    .progress-fill {
        animation: none !important;
    }
    .capture-guide-panel,
    .guide-rule-card,
    .guide-toggle-chevron {
        transition: none !important;
        animation: none !important;
    }
}

/* Pre-Scan Quality & Readiness Check Panel (Stage 9) */
.pre-scan-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.25s ease-out;
}

.pre-scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pre-scan-title-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.pre-scan-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.pre-scan-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.readiness-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transition: var(--transition);
}

.readiness-badge.badge-ready {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.readiness-badge.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.readiness-badge.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.pre-scan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.check-tile {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: var(--transition);
}

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

.check-tile-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 500;
}

.check-tile-status {
    font-size: 0.75rem;
    font-weight: 800;
}

.check-tile-status.status-ok {
    color: #6ee7b7;
}

.check-tile-status.status-warn {
    color: #fde047;
}

.check-tile-status.status-err {
    color: #fca5a5;
}

.check-tile-val {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.check-tile-hint {
    font-size: 0.68rem;
    color: var(--text-dim);
    line-height: 1.3;
}

.pre-scan-notices {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #fde047;
}

.pre-scan-notice-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* Bottom Action Bar */
.bottom-action-bar {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-lg {
    padding: 0.95rem 2.2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--primary-glow);
}

.btn-glow {
    position: relative;
}

.btn-glow:not(:disabled)::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
    animation: glow-pulse 3s infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-surface-hover);
    border-color: var(--border-focus);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 4px 16px var(--success-glow);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--success-glow);
}

.btn-download-pulse {
    animation: downloadPulse 3s infinite;
}

@keyframes downloadPulse {
    0%, 100% { box-shadow: 0 4px 16px var(--success-glow); }
    50% { box-shadow: 0 6px 28px rgba(16, 185, 129, 0.6); }
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.btn-outline-danger:hover:not(:disabled) {
    background: var(--danger-bg);
    color: white;
}

/* Processing Card (Stage 11 Professional Operations Screen) */
.processing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-elevated);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.processing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.25rem;
}

.proc-header-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.proc-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.proc-header-category {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: block;
}

.proc-header-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin: 0;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

.proc-centerpiece {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 1.25rem;
}

.orb-container {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.orb-outer-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(16, 185, 129, 0.15) 60%, transparent 80%);
    filter: blur(12px);
    animation: orbPulse 4s ease-in-out infinite;
}

.orb-core {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(59, 130, 246, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.orb-icon.rotating {
    animation: spin 10s linear infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

.progress-number-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
}

.progress-big-number {
    font-size: 3.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.progress-percent-symbol {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--primary);
}

.processing-stage-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.processing-subtext {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.stage-detailed-hint {
    font-size: 0.78rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.45rem 1rem;
    margin-bottom: 1.25rem;
    max-width: 520px;
    line-height: 1.35;
    text-align: center;
}

/* Linear Progress Bar */
.progress-track {
    width: 100%;
    max-width: 520px;
    height: 10px;
    background: var(--bg-surface-elevated);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--border-subtle);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #10b981);
    background-size: 200% 100%;
    border-radius: 999px;
    transition: width 0.4s ease-out;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Operations Metadata Row */
.processing-meta-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 720px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-job-box {
    min-width: 180px;
}

.job-id-copy-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-copy-id {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-id:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #ffffff;
}

.meta-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.meta-code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary);
}

.meta-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.meta-timer {
    font-family: var(--font-mono);
    color: #6ee7b7;
    font-weight: 700;
}

/* 5-Stage Professional Processing Timeline */
.stage-timeline-container {
    width: 100%;
    max-width: 720px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.timeline-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-engine-pill {
    font-size: 0.68rem;
    color: #93c5fd;
    font-family: var(--font-mono);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.stage-timeline-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.step-marker-col {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.step-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--bg-base);
    border: 1.5px solid var(--border-strong);
    color: var(--text-dim);
    z-index: 2;
    transition: var(--transition);
    flex-shrink: 0;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-subtle);
    margin-left: 0.25rem;
    transition: background 0.3s ease;
}

.step-content {
    display: flex;
    flex-direction: column;
}

.step-code {
    font-size: 0.62rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    opacity: 0.7;
    margin-bottom: 2px;
}

.step-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-dim);
    line-height: 1.25;
}

.step-desc {
    font-size: 0.68rem;
    color: var(--text-dim);
    line-height: 1.25;
    margin-top: 2px;
}

/* Timeline State Variants */
.timeline-step.active .step-marker {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.timeline-step.active .step-title {
    color: var(--text-main);
    font-weight: 700;
}

.timeline-step.active .step-desc {
    color: #93c5fd;
    font-weight: 600;
}

.timeline-step.done .step-marker {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.timeline-step.done .step-connector {
    background: var(--success);
}

.timeline-step.done .step-desc {
    color: var(--text-muted);
}

.timeline-step.error .step-marker {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Cancel Action & Confirmation Area */
.cancel-action-row {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.cancel-confirm-box {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: fadeIn 0.2s ease-out;
    max-width: 480px;
}

.cancel-confirm-text {
    font-size: 0.78rem;
    color: #fca5a5;
    line-height: 1.35;
    text-align: center;
}

.cancel-confirm-buttons {
    display: flex;
    gap: 0.6rem;
}


/* Completion Card */
.completion-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-elevated);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.success-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.success-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 0 30px var(--success-glow);
    margin-bottom: 0.5rem;
}

.completion-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.completion-subtext {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Primary Download Box */
.primary-download-box {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(18, 23, 34, 0.9) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.download-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.file-format-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.download-filename {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-main);
}

.download-filesize {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Secondary Downloads Row */
.secondary-downloads-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 480px;
    justify-content: center;
}

.secondary-downloads-row .btn {
    flex: 1;
}

.download-feedback {
    font-size: 0.88rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: #6ee7b7;
}

/* Stage 8: Model Analysis & Quality Report Card */
.analysis-card {
    width: 100%;
    max-width: 640px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    position: relative;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.analysis-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.analysis-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.analysis-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.analysis-overall-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.analysis-overall-badge.badge-neutral {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.analysis-overall-badge.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.analysis-overall-badge.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.analysis-overall-badge.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.analysis-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.analysis-subheading {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.subheading-with-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-tag {
    font-size: 0.7rem;
    color: var(--text-dim);
    background: var(--bg-surface-elevated);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.geom-score-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-sm);
}

.geom-score-val-group {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.geom-score-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    font-family: var(--font-mono);
}

.geom-score-max {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 600;
}

.geom-score-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.hallucination-warning-box {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem 0.9rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #fde047;
    line-height: 1.4;
}

.analysis-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.stat-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.bbox-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.bbox-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bbox-label {
    font-size: 0.7rem;
    color: #93c5fd;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bbox-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.surface-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.surface-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.surface-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.surface-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.pill-badge .pill-dot {
    font-size: 0.65rem;
    line-height: 1;
}

.pill-badge.pill-neutral {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.pill-badge.pill-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pill-badge.pill-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pill-badge.pill-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.surface-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.surface-card-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.surface-card-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--text-dim);
}

.quality-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.check-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.check-item.check-pass .check-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}

.check-item.check-warn .check-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #fde047;
    border-color: rgba(245, 158, 11, 0.4);
}

.check-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.check-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.8rem;
}

.check-meta {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Legacy support styles */
.metrics-card {
    display: none;
}

/* Restart Action */
.restart-row {
    margin-top: 0.5rem;
}

/* Error State Card */
.error-state-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-elevated);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.error-state-icon {
    font-size: 3rem;
}

.error-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.error-state-desc {
    font-size: 0.95rem;
    color: #fca5a5;
    max-width: 480px;
    line-height: 1.6;
}

.error-action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* 3D Model Interactive Viewer */
.viewer-section {
    width: 100%;
    max-width: 640px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
    position: relative;
    display: flex;
    flex-direction: column;
}

.viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(14, 18, 27, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
}

.viewer-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.viewer-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #93c5fd;
    letter-spacing: 0.02em;
}

.viewer-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.viewer-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #bfdbfe;
}

.viewer-meta-badge .meta-sep {
    opacity: 0.4;
    font-size: 0.65rem;
}

.viewer-controls-group {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}

.viewer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.32rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}

.viewer-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
    border-color: var(--border-focus);
}

.viewer-btn:active {
    transform: scale(0.97);
}

.viewer-btn.active {
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Secondary Camera Presets Ribbon */
.viewer-camera-ribbon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(10, 13, 20, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    scrollbar-width: none;
}

.viewer-camera-ribbon::-webkit-scrollbar {
    display: none;
}

.camera-ribbon-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.camera-ribbon-btns {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.cam-preset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cam-preset-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-main);
    border-color: rgba(59, 130, 246, 0.4);
}

.cam-preset-btn.active {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border-color: var(--primary);
    font-weight: 600;
}

.viewer-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    background: radial-gradient(circle at 50% 45%, #182235 0%, #0c1018 100%);
    overflow: hidden;
    cursor: grab;
}

.viewer-canvas-wrapper:active {
    cursor: grabbing;
}

.viewer-canvas-container {
    width: 100%;
    height: 100%;
    display: block;
}

.viewer-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    outline: none;
}

/* Real HUD Info Overlay (Top-Left) */
.viewer-hud-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 13, 20, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    pointer-events: none;
    z-index: 5;
    font-size: 0.72rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hud-label {
    color: var(--text-dim);
    font-weight: 500;
}

.hud-val {
    color: #e2e8f0;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.viewer-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    background: rgba(12, 16, 24, 0.85);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.viewer-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.viewer-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.viewer-loading-title {
    font-size: 0.88rem;
    color: #93c5fd;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.viewer-loading-subtext {
    font-size: 0.76rem;
    color: var(--text-dim);
}

.viewer-error-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    background: rgba(12, 16, 24, 0.92);
    z-index: 10;
    color: #fca5a5;
    padding: 1.5rem;
    text-align: center;
}

.viewer-error-icon {
    font-size: 2rem;
}

.viewer-error-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fca5a5;
}

.viewer-error-text {
    font-size: 0.84rem;
    color: #fca5a5;
}

.viewer-hint-bar {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.8rem;
    background: rgba(10, 13, 20, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--text-dim);
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;
}

/* Fullscreen Styling */
.viewer-section:fullscreen,
.viewer-section:-webkit-full-screen,
.viewer-section.viewer-fullscreen-fallback {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.viewer-section:fullscreen .viewer-canvas-wrapper,
.viewer-section:-webkit-full-screen .viewer-canvas-wrapper,
.viewer-section.viewer-fullscreen-fallback .viewer-canvas-wrapper {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
}

.hint-item kbd {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: inherit;
    color: var(--text-muted);
    font-weight: 600;
}

.hint-sep {
    opacity: 0.4;
}

/* Responsive Breakpoints (Phone & Tablet) */
@media (max-width: 640px) {
    .app-wrapper {
        padding: 0.6rem 0.6rem 2rem 0.6rem;
        gap: 0.85rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .navbar {
        padding: 0.55rem 0.75rem;
        gap: 0.5rem;
    }
    
    .brand {
        gap: 0.5rem;
        min-width: 0;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

    .brand-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .brand-title {
        font-size: 0.95rem;
        white-space: nowrap;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .engine-badge {
        display: none; /* Conserve navbar space on tiny screens */
    }

    .connection-pill {
        padding: 0.35rem 0.6rem;
        font-size: 0.76rem;
        gap: 0.35rem;
    }
    
    .step-stepper {
        padding: 0.45rem 0.6rem;
        gap: 0.3rem;
        justify-content: space-between;
    }

    .step-item {
        gap: 0.3rem;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.68rem;
    }
    
    .step-name {
        font-size: 0.72rem;
    }

    .step-divider {
        min-width: 8px;
        max-width: 20px;
    }
    
    .drop-card {
        padding: 1.75rem 0.85rem;
    }

    .camera-lens-animation {
        width: 64px;
        height: 64px;
        margin-bottom: 0.5rem;
    }

    .lens-ring.outer {
        width: 64px;
        height: 64px;
    }

    .lens-ring.middle {
        width: 48px;
        height: 48px;
    }

    .lens-ring.core {
        width: 36px;
        height: 36px;
    }

    .lens-ring.core svg {
        width: 22px;
        height: 22px;
    }
    
    .drop-heading {
        font-size: 1.05rem;
        line-height: 1.3;
    }
    
    .drop-subtext {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .drop-badges {
        gap: 0.35rem;
        margin-bottom: 1rem;
    }

    .pill-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.55rem;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 0.45rem;
        max-height: 260px;
    }
    
    .btn-lg {
        width: 100%;
        padding: 0.85rem 1.5rem;
    }
    
    .bottom-action-bar {
        width: 100%;
    }
    
    .processing-card, .completion-card, .error-state-card {
        padding: 1.5rem 0.85rem;
    }

    .processing-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .processing-meta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem;
        width: 100%;
    }

    .meta-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .meta-job-box {
        min-width: auto;
    }

    .stage-timeline-container {
        padding: 1rem 0.75rem;
    }

    .stage-timeline-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .timeline-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
        text-align: left;
    }

    .step-marker-col {
        width: auto;
    }

    .step-connector {
        display: none;
    }
    
    .progress-big-number {
        font-size: 3rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .capture-guide-panel {
        padding: 1rem 0.85rem;
        gap: 0.85rem;
    }

    .guide-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .guide-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .guide-rules-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .guide-visual-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .guide-tips-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .checklist-items-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .pre-scan-panel {
        padding: 1rem 0.85rem;
        gap: 0.85rem;
    }

    .pre-scan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pre-scan-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .check-tile {
        padding: 0.6rem 0.65rem;
    }

    .check-tile-val {
        font-size: 0.95rem;
    }

    .analysis-card {
        padding: 1.1rem 0.85rem;
        gap: 1rem;
    }
    
    .analysis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .analysis-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .bbox-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .bbox-card {
        padding: 0.5rem;
    }
    
    .bbox-value {
        font-size: 0.92rem;
    }
    
    .surface-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    
    .surface-card {
        padding: 0.85rem;
    }
    
    .secondary-downloads-row {
        flex-direction: column;
    }

    .viewer-canvas-wrapper {
        height: 320px;
    }
    
    .viewer-hint-bar {
        display: none;
    }
    
    .viewer-toolbar {
        padding: 0.5rem 0.65rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    
    .viewer-title-group {
        justify-content: space-between;
        width: 100%;
    }

    .viewer-title-badge {
        font-size: 0.75rem;
    }

    .viewer-meta-badge {
        font-size: 0.68rem;
        padding: 0.12rem 0.45rem;
    }
    
    .viewer-controls-group {
        width: 100%;
        justify-content: flex-start;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .viewer-btn {
        padding: 0.28rem 0.45rem;
        font-size: 0.70rem;
        gap: 0.25rem;
    }

    .viewer-camera-ribbon {
        padding: 0.3rem 0.6rem;
    }

    .cam-preset-btn {
        padding: 0.18rem 0.45rem;
        font-size: 0.68rem;
    }

    .viewer-hud-overlay {
        top: 8px;
        left: 8px;
        padding: 0.3rem 0.5rem;
        font-size: 0.68rem;
    }
}

/* Tablet & Medium Breakpoint (Stage 10 & 11) */
@media (max-width: 860px) and (min-width: 641px) {
    .guide-rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .guide-visual-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .checklist-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stage-timeline-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.35rem;
    }
    .timeline-step .step-title {
        font-size: 0.68rem;
    }
    .timeline-step .step-desc {
        font-size: 0.62rem;
    }
}

/* ==========================================
   17. LOCAL SCAN HISTORY & MODEL MANAGEMENT (Stage 12)
   ========================================== */

.nav-history-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.nav-history-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    transform: translateY(-1px);
}

.btn-history-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.history-card-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.history-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
}

.history-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-category {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: block;
}

.history-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}

.history-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    margin-top: 2px;
}

.history-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.history-count-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    font-family: var(--font-mono);
}

/* History State Boxes (Loading, Error, Empty) */
.history-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1.5rem;
    text-align: center;
    background: var(--bg-surface-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    gap: 1rem;
    width: 100%;
}

.history-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.history-state-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.history-state-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0;
    line-height: 1.45;
}

.history-empty-icon {
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.history-error-icon {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

/* History Grid & Model Cards */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.history-item-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    text-align: left;
    position: relative;
}

.history-item-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.item-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-thumb-badge {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-title-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.item-id-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.item-job-id {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.btn-copy-id-mini {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.btn-copy-id-mini:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
}

.item-date {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.item-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-status-pill.completed {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.item-status-pill.failed {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.item-status-pill.processing {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}
.item-status-pill.cancelled {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

.item-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* 4-Cell Specs Grid */
.item-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
}

.spec-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.spec-label {
    font-size: 0.66rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.spec-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

/* Card Actions */
.item-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-view-model {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-view-model:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.item-downloads-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-download-mini {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-download-mini:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-strong);
    color: #ffffff;
}

.btn-delete-job {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
}

.btn-delete-job:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}
.btn-delete-job:disabled,
.btn-delete-job:disabled:hover {
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
    color: var(--text-dim);
}

/* History Responsive Adjustments */
@media (max-width: 640px) {
    .history-card-container {
        padding: 1.25rem 0.85rem;
    }
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .history-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .history-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .item-job-id {
        max-width: 110px;
    }
    .item-actions-row {
        flex-direction: row;
        align-items: center;
        gap: 0.4rem;
    }
    .btn-view-model {
        flex: 1;
        justify-content: center;
    }
}

/* Stage 14: Connection Loss & Reconnect Banner */
.connection-loss-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
    0%, 100% { border-color: rgba(239, 68, 68, 0.4); box-shadow: 0 0 15px rgba(239, 68, 68, 0.1); }
    50% { border-color: rgba(239, 68, 68, 0.7); box-shadow: 0 0 25px rgba(239, 68, 68, 0.25); }
}

.conn-loss-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.conn-loss-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.conn-loss-text-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.conn-loss-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fca5a5;
}

.conn-loss-detail {
    font-size: 0.75rem;
    color: var(--text-dim);
}

@media (max-width: 640px) {
    .connection-loss-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }
    .connection-loss-banner button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   STAGE 15A — MOBİL BAĞLANTI, QR KOD VE ANA MENÜ NAVİGASYONU
   ========================================================================== */

/* Navbar Buttons & Quick Nav */
.nav-menu-btn,
.nav-action-btn,
.nav-connect-btn,
.nav-storage-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-height: 38px;
}

.nav-menu-btn:hover,
.nav-action-btn:hover,
.nav-connect-btn:hover,
.nav-storage-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--text-main);
}

.nav-menu-btn.active,
.nav-action-btn.active,
.nav-connect-btn.active,
.nav-storage-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: #93c5fd;
}

/* View Header Navigation Strip */
.view-nav-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.view-nav-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-nav-step-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.nav-back-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
    min-height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    transition: all 0.15s ease;
}

.nav-back-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.proc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* MAIN MENU VIEW */
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.menu-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.menu-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.menu-app-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.menu-connection-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    background: rgba(18, 23, 34, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-dim);
}

.menu-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-hero-subtext {
    font-size: 0.92rem;
    color: var(--text-dim);
    max-width: 620px;
    line-height: 1.5;
}

/* Active Job Status Card in Main Menu */
.menu-active-job-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.25), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    animation: fadeIn 0.3s ease;
}

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

.active-job-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.active-job-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 10px #3b82f6;
    animation: pulse 1.5s infinite;
}

.active-job-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.active-job-stage-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    color: #93c5fd;
}

.active-job-progress-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.active-job-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.active-job-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.active-job-percent {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.active-job-notice {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0;
}

.active-job-actions {
    display: flex;
    justify-content: flex-end;
}

/* Menu Grid & Navigation Cards */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.menu-card {
    background: rgba(18, 23, 34, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.menu-card:hover,
.menu-card:focus-visible {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(59, 130, 246, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.menu-card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.menu-card-icon-box.new-scan {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.menu-card-icon-box.connect-phone {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.menu-card-icon-box.history {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.menu-card-icon-box.guide {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.menu-card-icon-box.storage {
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.menu-card-content {
    flex: 1;
    min-width: 0;
}

.menu-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.menu-card-pill {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-weight: 600;
    white-space: nowrap;
}

.menu-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.2rem 0;
}

.menu-card-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.4;
}

.menu-card-arrow {
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.menu-card:hover .menu-card-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

/* Browser Guidance Card */
.menu-browser-card,
.mobile-browser-card {
    background: rgba(18, 23, 34, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.browser-info-header,
.mobile-browser-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 240px;
}

.browser-icon,
.mobile-browser-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.browser-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.15rem 0;
}

.browser-desc,
.mobile-browser-text p {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.4;
}

.mobile-browser-text strong {
    font-size: 0.88rem;
    color: var(--text-main);
}

/* CONNECTION VIEW (Mac'e Bağlan) */
.connection-screen-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.connection-status-card {
    background: rgba(18, 23, 34, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.conn-status-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.conn-status-texts {
    display: flex;
    flex-direction: column;
}

.conn-status-headline {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.conn-status-subtext {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* QR Connection Box */
.qr-connection-box {
    background: linear-gradient(135deg, rgba(18, 23, 34, 0.95), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.qr-box-header {
    margin-bottom: 1.25rem;
}

.qr-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}

.qr-box-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.25rem 0;
}

.qr-box-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

.qr-display-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.qr-code-container {
    width: 210px;
    height: 210px;
    background: white;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-container svg {
    width: 100% !important;
    height: 100% !important;
}

.server-url-display-box {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.url-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-align: left;
}

.url-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.url-text {
    font-family: var(--font-mono, monospace);
    font-size: 0.92rem;
    color: #93c5fd;
    word-break: break-all;
    text-align: left;
}

/* Manual Connection Card */
.manual-connection-card {
    background: rgba(18, 23, 34, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.manual-conn-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.2rem 0;
}

.manual-conn-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 0 0 0.85rem 0;
}

.manual-input-row {
    display: flex;
    gap: 0.5rem;
}

.manual-conn-input {
    flex: 1;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: var(--font-mono, monospace);
    outline: none;
    transition: border-color 0.15s ease;
    min-height: 44px;
}

.manual-conn-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.manual-feedback-msg {
    margin-top: 0.65rem;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

.manual-feedback-msg.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.manual-feedback-msg.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* RESPONSIVE DESIGN (390x844 Mobile, 820x1180 Tablet, 1280x800 Desktop) */

/* Desktop Header (> 920px) */
@media (min-width: 921px) {
    .app-wrapper {
        max-width: 1040px;
    }
    .navbar {
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
    }
    .nav-actions {
        gap: 0.45rem;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    .nav-menu-btn,
    .nav-action-btn,
    .nav-connect-btn,
    .nav-storage-btn,
    .nav-history-btn {
        padding: 0.38rem 0.65rem;
        font-size: 0.78rem;
        gap: 0.35rem;
        min-height: 36px;
    }
    .engine-badge {
        padding: 0.35rem 0.65rem;
        font-size: 0.73rem;
    }
    .connection-pill {
        padding: 0.38rem 0.75rem;
        font-size: 0.78rem;
        min-height: 36px;
    }
}

/* Tablet Header (601px - 920px) */
@media (max-width: 920px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-wrap: wrap;
        gap: 0.65rem;
        padding: 0.75rem 1rem;
    }

    .nav-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .nav-menu-btn,
    .nav-action-btn,
    .nav-connect-btn,
    .nav-storage-btn,
    .nav-history-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
        gap: 0.3rem;
        flex: 1 1 auto;
        justify-content: center;
        min-height: 38px;
    }

    .engine-badge {
        display: none;
    }

    .connection-pill {
        padding: 0.35rem 0.6rem;
        flex: 0 0 auto;
        min-height: 38px;
    }
}

@media (max-width: 600px) {
    .app-wrapper {
        padding: 0.6rem 0.6rem 2rem 0.6rem;
        gap: 0.85rem;
    }

    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.65rem 0.6rem;
    }

    .navbar .brand {
        justify-content: flex-start;
        gap: 0.6rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

    .brand-icon svg {
        width: 18px;
        height: 18px;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .brand-subtitle {
        display: none;
    }

    .nav-actions {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
        gap: 0.25rem;
        width: 100%;
        justify-content: stretch;
        box-sizing: border-box;
    }

    .nav-menu-btn,
    .nav-action-btn,
    .nav-history-btn,
    .nav-connect-btn,
    .nav-storage-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 0.35rem 0.15rem;
        min-width: 0;
        min-height: 44px;
        border-radius: var(--radius-sm);
        box-sizing: border-box;
    }

    .nav-menu-btn svg,
    .nav-action-btn svg,
    .nav-history-btn svg,
    .nav-connect-btn svg,
    .nav-storage-btn svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
    }

    .nav-menu-btn span,
    .nav-action-btn span,
    .nav-history-btn span,
    .nav-connect-btn span,
    .nav-storage-btn span {
        display: inline-block;
        font-size: 0.63rem;
        line-height: 1.1;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        text-align: center;
    }

    .engine-badge {
        display: none;
    }

    .connection-pill {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        padding: 0 0.5rem;
        min-height: 44px;
        min-width: 38px;
        border-radius: var(--radius-sm);
        box-sizing: border-box;
    }

    .connection-pill .connection-label {
        display: none;
    }

    .menu-hero-card {
        padding: 1.25rem;
    }

    .menu-hero-title {
        font-size: 1.5rem;
    }

    .qr-connection-box {
        padding: 1.25rem;
    }

    .qr-code-container {
        width: 190px;
        height: 190px;
    }

    .manual-input-row {
        flex-direction: column;
    }

    .manual-input-row button {
        width: 100%;
        min-height: 44px;
    }

    .menu-browser-card,
    .mobile-browser-card {
        flex-direction: column;
        align-items: stretch;
    }

    .browser-actions,
    .mobile-browser-actions {
        width: 100%;
    }

    .browser-actions button,
    .mobile-browser-actions button {
        width: 100%;
        min-height: 44px;
    }

    .view-nav-strip {
        gap: 0.35rem;
    }

    .view-nav-strip button {
        min-height: 42px;
        padding: 0.4rem 0.65rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   STAGE 15B — DEPOLAMA YÖNETİMİ, FOTOĞRAF TEMİZLEME VE GÜVENLİ MODEL SİLME
   ========================================================================== */

.storage-screen-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

/* Storage Hero Card */
.storage-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-glass);
}

.storage-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.storage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.storage-refresh-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.storage-last-sync {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.storage-hero-headline-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.storage-hero-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.storage-hero-stat-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.storage-hero-main-stat {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin: 0;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #ffffff 40%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.storage-hero-job-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
}

/* Detailed Metrics Dashboard Grid */
.storage-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.storage-metric-card {
    background: rgba(18, 23, 34, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: all 0.2s ease;
}

.storage-metric-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(24, 31, 46, 0.9);
}

.storage-metric-card.highlight-cleanable {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(18, 23, 34, 0.9));
}

.metric-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.metric-icon-box.photos {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.metric-icon-box.models {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.metric-icon-box.cleanable {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.metric-icon-box.mac-disk {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.metric-data-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.metric-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.metric-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cleanable Action Banner */
.storage-action-banner {
    background: rgba(18, 23, 34, 0.75);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-banner-text {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-width: 260px;
}

.action-banner-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.action-banner-content strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.action-banner-content p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.4;
}

.action-banner-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.bulk-select-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

.bulk-select-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #10b981;
    cursor: pointer;
}

/* Storage Jobs Section */
.storage-jobs-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.storage-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.storage-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.storage-section-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.storage-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Storage Job Card */
.storage-job-card {
    background: rgba(18, 23, 34, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: all 0.15s ease;
}

.storage-job-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(24, 31, 46, 0.9);
}

.storage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.storage-card-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.job-clean-chk-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #10b981;
    cursor: pointer;
}

.job-clean-chk-placeholder {
    width: 17px;
    height: 17px;
}

.storage-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.storage-card-id-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.storage-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.storage-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.storage-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.storage-status-pill.completed {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.storage-status-pill.failed {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.storage-status-pill.processing {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}
.storage-status-pill.cancelled {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

/* Storage Breakdown Grid */
.storage-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    background: rgba(10, 14, 23, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.breakdown-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.breakdown-val-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.breakdown-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.breakdown-val.text-muted {
    color: var(--text-muted);
}

.breakdown-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.pill-badge-mini {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    font-weight: 600;
}

.pill-badge-mini.success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Total Row */
.storage-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.total-label {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.total-val {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

/* Card Action Buttons */
.storage-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-storage-view {
    min-height: 36px;
    font-size: 0.8rem;
}

.btn-storage-clean {
    min-height: 36px;
    font-size: 0.8rem;
}

.btn-storage-delete {
    min-height: 36px;
    font-size: 0.8rem;
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-storage-delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.modal-icon-badge.warning {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.modal-icon-badge.danger {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

.modal-info-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.modal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

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

.info-val {
    font-weight: 600;
    color: var(--text-main);
}

.info-val.highlight {
    color: #10b981;
    font-weight: 700;
}

.info-val.danger-text {
    color: #ef4444;
    font-weight: 700;
}

.modal-caution-note {
    font-size: 0.78rem;
    color: #fbbf24;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #000;
    font-weight: 700;
    border: none;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    font-weight: 700;
    border: none;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

/* Empty State */
.storage-empty-state {
    background: rgba(18, 23, 34, 0.6);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    text-align: center;
}

.empty-icon {
    font-size: 2.5rem;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.empty-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    max-width: 420px;
    margin: 0;
}

/* Responsive adjustments for Stage 15B */
@media (max-width: 920px) {
    .storage-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .storage-breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .storage-hero-card {
        padding: 1rem;
    }
    .storage-hero-main-stat {
        font-size: 1.75rem;
    }
    .storage-metrics-grid {
        grid-template-columns: 1fr;
    }
    .storage-breakdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .storage-card-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .storage-card-actions button {
        width: 100%;
        min-height: 42px;
    }
    .storage-action-banner {
        flex-direction: column;
        align-items: stretch;
    }
    .action-banner-controls {
        justify-content: space-between;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .menu-card,
    .nav-menu-btn,
    .nav-action-btn,
    .nav-connect-btn,
    .nav-storage-btn,
    .active-job-pulse-dot {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   STAGE 15C — TELEFON KAMERASI, CANLI ÇEKİM VE FOTOĞRAF TOPLAMA SİSTEMİ
   ========================================================================== */

/* Dropzone Action Buttons */
.drop-action-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 480px;
}

.btn-camera-hero-action,
.btn-gallery-hero-action,
.btn-video-camera-action,
.btn-video-hero-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1.4rem;
    border-radius: 14px;
    min-height: 56px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    flex: 1 1 200px;
}

.btn-camera-hero-action {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(14, 165, 233, 0.32) 100%);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2);
}

.btn-camera-hero-action:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.45) 100%);
    border-color: rgba(56, 189, 248, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-gallery-hero-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.btn-gallery-hero-action:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.btn-video-camera-action {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(168, 85, 247, 0.35) 100%);
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(236, 72, 153, 0.25);
}

.btn-video-camera-action:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.38) 0%, rgba(168, 85, 247, 0.48) 100%);
    border-color: rgba(236, 72, 153, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.35);
}

.btn-video-hero-action {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(99, 102, 241, 0.32) 100%);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.2);
}

.btn-video-hero-action:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(99, 102, 241, 0.45) 100%);
    border-color: rgba(99, 102, 241, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-action-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.btn-action-col {
    display: flex;
    flex-direction: column;
}

.btn-action-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.btn-action-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Gallery Camera Button & Thumbnail Source Badge */
.btn-gallery-camera-action {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.3) 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.btn-gallery-camera-action:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(14, 165, 233, 0.4) 100%);
}

.thumb-source-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(14, 165, 233, 0.85);
    color: #ffffff;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 4px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Live Camera View */
#viewCamera {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.camera-nav-strip {
    margin-bottom: 0;
}

.camera-title-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
}

.camera-count-badge {
    font-size: 0.82rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
}

/* Stage 15D Smart Guidance Mode Badge */
.smart-guidance-mode-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.smart-guidance-mode-badge.mode-sensor {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.btn-orientation-sensor {
    padding: 3px 8px;
    font-size: 0.72rem;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.camera-viewfinder-card {
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* STAGE 15D: Smart Capture Guidance HUD Panel */
.smart-capture-hud {
    background: rgba(10, 15, 25, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 4;
}

.smart-hud-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.smart-hud-metrics {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.smart-hud-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.smart-hud-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #38bdf8;
    text-transform: uppercase;
}

.smart-target-pill {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.smart-hud-counter-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.smart-hud-counter {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.smart-cadence-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.smart-cadence-badge.good {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.smart-cadence-badge.warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.smart-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.smart-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #10b981);
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 360° Orbit Mini-Compass Map */
.smart-orbit-container {
    width: 76px;
    height: 76px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-orbit-ring {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 1px dashed rgba(56, 189, 248, 0.35);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.orbit-center-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.orbit-center-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.orbit-center-text {
    font-size: 0.44rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1px;
    letter-spacing: 0.04em;
}

.orbit-sector-node {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.52rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.9);
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

.orbit-sector-node:hover {
    border-color: #38bdf8;
    color: #ffffff;
    transform: scale(1.1);
}

/* Exact Radial Positioning for 8 Sectors */
.orbit-sector-node.sector-1 { top: 0px; left: 50%; transform: translateX(-50%); }
.orbit-sector-node.sector-2 { top: 8px; right: 8px; }
.orbit-sector-node.sector-3 { top: 50%; right: 0px; transform: translateY(-50%); }
.orbit-sector-node.sector-4 { bottom: 8px; right: 8px; }
.orbit-sector-node.sector-5 { bottom: 0px; left: 50%; transform: translateX(-50%); }
.orbit-sector-node.sector-6 { bottom: 8px; left: 8px; }
.orbit-sector-node.sector-7 { top: 50%; left: 0px; transform: translateY(-50%); }
.orbit-sector-node.sector-8 { top: 8px; left: 8px; }

/* Sector States */
.orbit-sector-node.completed {
    background: #10b981;
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.orbit-sector-node.current {
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    font-weight: 900;
    background: rgba(56, 189, 248, 0.25);
    z-index: 2;
}

.orbit-sector-node.sector-1.current { transform: translateX(-50%) scale(1.15); }
.orbit-sector-node.sector-2.current { transform: scale(1.15); }
.orbit-sector-node.sector-3.current { transform: translateY(-50%) scale(1.15); }
.orbit-sector-node.sector-4.current { transform: scale(1.15); }
.orbit-sector-node.sector-5.current { transform: translateX(-50%) scale(1.15); }
.orbit-sector-node.sector-6.current { transform: scale(1.15); }
.orbit-sector-node.sector-7.current { transform: translateY(-50%) scale(1.15); }
.orbit-sector-node.sector-8.current { transform: scale(1.15); }

.orbit-needle-indicator {
    position: absolute;
    width: 2px;
    height: 22px;
    top: 50%;
    left: 50%;
    transform-origin: 50% 0%;
    background: linear-gradient(180deg, #38bdf8, transparent);
    pointer-events: none;
    display: none;
    transition: transform 0.15s ease-out;
}

/* Layers / Elevation Strip */
.smart-layers-strip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layers-strip-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.05em;
}

.layer-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.layer-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.layer-pill.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.layer-pill.completed {
    border-color: rgba(16, 185, 129, 0.5);
}

.layer-icon {
    font-size: 0.82rem;
    line-height: 1;
}

.layer-name {
    font-size: 0.68rem;
    font-weight: 700;
}

.layer-count-badge {
    font-size: 0.64rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.layer-pill.completed .layer-count-badge {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

/* Informational Surface Coverage Strip (Non-blocking, purely informational) */
.smart-coverage-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.coverage-strip-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.coverage-info-value {
    font-size: 0.72rem;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.coverage-info-hint {
    font-size: 0.64rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.camera-direct-scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
    animation: directModelPulse 2s infinite ease-in-out;
}

@keyframes directModelPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(56, 189, 248, 0.35); }
    50% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.65); }
}

.btn-camera-auto {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.btn-camera-auto.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.auto-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
}

.btn-camera-auto.active .auto-badge {
    background: #10b981;
    color: #0f172a;
}

/* Guidance bar enhancement */
.guidance-icon {
    font-size: 0.95rem;
    line-height: 1;
    margin-right: 4px;
}

.camera-video-wrapper {
    position: relative;
    width: 100%;
    min-height: 420px;
    max-height: 62vh;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Reticle Overlay */
.camera-reticle {
    position: absolute;
    inset: 15%;
    pointer-events: none;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reticle-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #38bdf8;
    border-style: solid;
}

.reticle-corner.top-left {
    top: -2px;
    left: -2px;
    border-width: 3px 0 0 3px;
    border-top-left-radius: 8px;
}

.reticle-corner.top-right {
    top: -2px;
    right: -2px;
    border-width: 3px 3px 0 0;
    border-top-right-radius: 8px;
}

.reticle-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 3px 3px;
    border-bottom-left-radius: 8px;
}

.reticle-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-width: 0 3px 3px 0;
    border-bottom-right-radius: 8px;
}

.reticle-center-cross {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 8px #38bdf8;
}

/* Shutter Flash Animation */
.camera-flash-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease-out;
    z-index: 5;
}

.camera-flash-overlay.flash-active {
    opacity: 0.85;
    transition: none;
}

/* Snap Feedback Pill */
.camera-last-snap-pill {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 6;
    pointer-events: none;
}

.snap-check-icon {
    font-weight: 800;
}

/* Camera Error Card */
.camera-error-card {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 22, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
    z-index: 10;
}

.camera-error-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
}

.camera-error-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fca5a5;
    margin-bottom: 0.5rem;
}

.camera-error-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    max-width: 440px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.camera-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Guidance Hint Bar */
.camera-guidance-bar {
    padding: 8px 16px;
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.camera-status-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Bottom Controls Bar */
.camera-bottom-bar {
    padding: 16px 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(8, 11, 18, 0.9);
    backdrop-filter: blur(20px);
}

.btn-camera-ctrl {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-camera-ctrl:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-camera-switch.switching svg {
    transform: rotate(180deg);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ctrl-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.btn-camera-guide {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.guide-ctrl-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.btn-camera-direct-model {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(37, 99, 235, 0.35));
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
    animation: directModelPulse 2s infinite ease-in-out;
}

.btn-camera-direct-model:hover {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.55), rgba(37, 99, 235, 0.55));
    color: #ffffff;
    border-color: #7dd3fc;
}

.direct-model-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Apple Camera Shutter Button */
.shutter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-shutter-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid rgba(255, 255, 255, 0.9);
    padding: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.camera-shutter-btn:hover {
    border-color: #ffffff;
    transform: scale(1.04);
}

.camera-shutter-btn:active {
    transform: scale(0.92);
}

.shutter-inner-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease, background 0.1s ease;
}

.camera-shutter-btn:active .shutter-inner-ring {
    transform: scale(0.88);
    background: #e2e8f0;
}

.shutter-core-circle {
    display: none;
}

/* In-Camera Capture Guide Modal */
.modal-card-guide {
    max-width: 480px;
    background: rgba(15, 20, 30, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.camera-guide-rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 1rem 0;
}

.guide-rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-rule-emoji {
    font-size: 1.35rem;
    line-height: 1.2;
}

.guide-rule-item strong {
    font-size: 0.88rem;
    color: #ffffff;
    display: block;
    margin-bottom: 2px;
}

.guide-rule-item p {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .camera-nav-strip {
        gap: 6px;
    }
    .camera-title-badge {
        display: none;
    }
    .camera-nav-strip .nav-back-menu-btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.76rem;
    }
    .drop-action-group {
        flex-direction: column;
        width: 100%;
    }
    .btn-camera-hero-action,
    .btn-gallery-hero-action,
    .btn-video-camera-action,
    .btn-video-hero-action {
        width: 100%;
        min-height: 54px;
    }
    .camera-video-wrapper {
        min-height: 380px;
        max-height: 58vh;
    }
    .camera-bottom-bar {
        padding: 12px 16px;
    }
    .camera-shutter-btn {
        width: 70px;
        height: 70px;
    }
    .smart-capture-hud {
        padding: 8px 12px;
        gap: 6px;
    }
    .smart-hud-counter {
        font-size: 0.95rem;
    }
    .smart-orbit-container {
        width: 68px;
        height: 68px;
    }
    .smart-orbit-ring {
        width: 66px;
        height: 66px;
    }
    .orbit-sector-node {
        width: 16px;
        height: 16px;
        font-size: 0.48rem;
    }
    .orbit-sector-node.sector-2 { top: 6px; right: 6px; }
    .orbit-sector-node.sector-4 { bottom: 6px; right: 6px; }
    .orbit-sector-node.sector-6 { bottom: 6px; left: 6px; }
    .orbit-sector-node.sector-8 { top: 6px; left: 6px; }
    .layer-pill {
        padding: 4px 6px;
        font-size: 0.68rem;
    }
    .smart-guidance-mode-badge {
        font-size: 0.64rem;
        padding: 2px 6px;
    }
}

/* Reduced Motion Preference for Stage 15D */
@media (prefers-reduced-motion: reduce) {
    .smart-progress-fill,
    .orbit-sector-node,
    .layer-pill,
    .orbit-needle-indicator,
    .smart-guidance-mode-badge {
        transition: none !important;
        animation: none !important;
    }
}

/* HTTPS & Self-Signed Certificate Notice */
.https-cert-notice-box {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 10px;
    text-align: left;
}

.https-cert-notice-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.cert-notice-text {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

.cert-notice-text strong {
    color: #f1f5f9;
}

.cert-notice-text em {
    color: #fbbf24;
    font-style: normal;
}



/* ===================== In-app scan recorder ===================== */
body.scan-recorder-open { overflow: hidden; }

.scan-recorder {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-main);
    font-family: var(--font-sans);
}

.scan-recorder-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.scan-recorder-top,
.scan-recorder-bottom {
    position: relative;
    z-index: 2;
    padding: 16px;
}

.scan-recorder-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: max(16px, env(safe-area-inset-top));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
}

.scan-recorder-bottom {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.scan-rec-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.scan-rec-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.scan-rec-time { margin-left: auto; }

.scan-rec-pill.pulse { animation: scanRecPulse 0.35s ease-out; }
@keyframes scanRecPulse {
    0% { transform: scale(1.12); background: rgba(16, 185, 129, 0.6); }
    100% { transform: scale(1); background: rgba(0, 0, 0, 0.45); }
}

.scan-rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
}
.scan-recorder:has(.scan-rec-record.recording) .scan-rec-dot {
    background: var(--danger);
    animation: scanRecBlink 1s infinite;
}
@keyframes scanRecBlink { 50% { opacity: 0.25; } }

.scan-recorder-reticle {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    width: min(62vw, 62vh);
    height: min(62vw, 62vh);
    transform: translate(-50%, -50%);
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    pointer-events: none;
}

.scan-recorder-hint {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 22%;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.9);
    color: #111;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
}
.scan-recorder-hint.visible { opacity: 1; }

.scan-rec-progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}
.scan-rec-progress-fill {
    height: 100%;
    width: 0;
    background: var(--success);
    transition: width 0.3s;
}

.scan-rec-status {
    margin: 12px 0 14px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    color: #fff;
    min-height: 2.8em;
}
.scan-rec-status[data-tone="warning"] { color: #fcd34d; }
.scan-rec-status[data-tone="error"] { color: #fca5a5; }
.scan-rec-status[data-tone="ok"] { color: #6ee7b7; }

.scan-rec-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.scan-rec-res {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
}

.scan-rec-record {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.scan-rec-record span {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--danger);
    transition: var(--transition);
}
.scan-rec-record.recording span {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.scan-rec-record:disabled { opacity: 0.4; cursor: not-allowed; }

.scan-rec-finish {
    justify-self: end;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--success);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.scan-rec-finish:disabled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

/* Real-size (1:1) calibration panel under the 3D viewer */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.viewer-size-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.size-panel-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    min-width: 0;
}

.size-panel-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.size-panel-dims {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-main);
}

.size-panel-source {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--warning-bg);
    color: var(--warning);
}

.size-panel-source.is-measured {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.size-panel-inputs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.size-panel-select,
.size-panel-input {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
    font-family: inherit;
}

.size-panel-input {
    width: 6.5rem;
    font-family: var(--font-mono);
}

.size-panel-select:focus-visible,
.size-panel-input:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 1px;
}

.size-panel-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.size-panel-hint {
    flex-basis: 100%;
    font-size: 0.72rem;
    color: var(--text-dim);
}
