/* ==========================================================================
   DIP Lab Custom Stylesheet - Premium Dark Theme
   ========================================================================== */

:root {
    --bg-darker: #070b13;
    --bg-dark: #0f1626;
    --bg-panel: rgba(22, 33, 54, 0.7);
    --bg-panel-hover: rgba(28, 42, 69, 0.85);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-active: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    /* Neon Accent Colors */
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f97316;
    --accent-red: #ef4444;

    /* Glow Shadows */
    --shadow-indigo: 0 0 25px rgba(99, 102, 241, 0.25);
    --shadow-violet: 0 0 25px rgba(139, 92, 246, 0.25);
    --shadow-pink: 0 0 25px rgba(236, 72, 153, 0.25);
    --shadow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
    --shadow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
    --shadow-green: 0 0 25px rgba(16, 185, 129, 0.25);
    --shadow-orange: 0 0 25px rgba(249, 115, 22, 0.25);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Core Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: var(--accent-cyan);
    font-size: 0.9em;
    border: 1px solid var(--border-glass);
}

a {
    color: var(--accent-indigo);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* Glassmorphic Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent-indigo);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.nav-logo .highlight {
    color: var(--accent-cyan);
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    border-bottom: 2px solid var(--accent-indigo);
    border-radius: 8px 8px 0 0;
}

.btn-lab {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-primary) !important;
}

.btn-lab:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.btn-login {
    background: var(--accent-indigo);
    color: #fff !important;
    box-shadow: var(--shadow-indigo);
}

.btn-login:hover {
    background: var(--accent-violet);
    box-shadow: var(--shadow-violet);
}

.btn-logout {
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red) !important;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 7rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(rgba(15, 22, 38, 0.72), rgba(7, 11, 19, 0.96)), 
                url('../images/chalkboard_bg.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid var(--border-glass);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.04), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.badge-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 1.25rem;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

.hero h1 {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

/* Feature Grid Cards */
.feature-list {
    padding: 4rem 0 6rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.section-header .subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.card:hover {
    transform: translateY(-5px);
    background: var(--bg-panel-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    display: inline-flex;
}

.card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.2px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* Card custom glow categories */
.card-glow-indigo:hover::before { background: var(--accent-indigo); }
.card-glow-indigo:hover { box-shadow: var(--shadow-indigo); }
.card-glow-indigo .card-icon { color: var(--accent-indigo); }

.card-glow-violet:hover::before { background: var(--accent-violet); }
.card-glow-violet:hover { box-shadow: var(--shadow-violet); }
.card-glow-violet .card-icon { color: var(--accent-violet); }

.card-glow-pink:hover::before { background: var(--accent-pink); }
.card-glow-pink:hover { box-shadow: var(--shadow-pink); }
.card-glow-pink .card-icon { color: var(--accent-pink); }

.card-glow-blue:hover::before { background: var(--accent-blue); }
.card-glow-blue:hover { box-shadow: var(--shadow-blue); }
.card-glow-blue .card-icon { color: var(--accent-blue); }

.card-glow-cyan:hover::before { background: var(--accent-cyan); }
.card-glow-cyan:hover { box-shadow: var(--shadow-cyan); }
.card-glow-cyan .card-icon { color: var(--accent-cyan); }

.card-glow-green:hover::before { background: var(--accent-green); }
.card-glow-green:hover { box-shadow: var(--shadow-green); }
.card-glow-green .card-icon { color: var(--accent-green); }

.card-glow-orange:hover::before { background: var(--accent-orange); }
.card-glow-orange:hover { box-shadow: var(--shadow-orange); }
.card-glow-orange .card-icon { color: var(--accent-orange); }

/* Call to action card */
.call-to-action {
    margin-top: 4rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 100px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15), transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.call-to-action h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.call-to-action p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.call-to-action .btn {
    position: relative;
    z-index: 1;
}

/* Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--accent-indigo);
    color: #fff;
    box-shadow: var(--shadow-indigo);
}

.btn-primary:hover {
    background: var(--accent-violet);
    box-shadow: var(--shadow-violet);
}

.btn-primary:disabled {
    background: #1e293b;
    color: #64748b;
    border: 1px solid var(--border-glass);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-glass-active);
}

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

.btn-block {
    width: 100%;
}

/* Login Wrapper */
.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    position: relative;
}

.login-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    pointer-events: none;
}

.login-container {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-indigo);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 2rem;
}

.credentials-hint {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.hint-title {
    color: #22d3ee;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.hint-row {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.back-link {
    text-align: center;
    font-size: 0.9rem;
}

/* Lab Workspace Layout */
.lab-wrapper {
    flex: 1;
    display: flex;
    min-height: calc(100vh - 70px - 60px); /* Fill space between navbar and footer */
}

/* Sidebar Tab navigation */
.lab-sidebar {
    width: 280px;
    background: rgba(9, 13, 22, 0.5);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.sidebar-header h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    padding-left: 0.75rem;
    font-weight: 700;
}

.module-tabs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.tab-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border-left: 3px solid var(--accent-indigo);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

/* Main Laboratory Workspace Workspace */
.lab-workspace {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--bg-darker);
    overflow-y: auto;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    height: 100%;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 22, 38, 0.4);
}

.panel-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

/* Active Module Badge */
.active-module-badge {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* Upload zone */
.upload-zone-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-zone-wrapper label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.upload-zone {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-cyan);
    background-color: rgba(6, 182, 212, 0.04);
}

.upload-icon {
    font-size: 2.2rem;
    color: var(--accent-indigo);
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-3px);
    color: var(--accent-cyan);
}

.upload-text {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-text span {
    color: var(--accent-cyan);
    text-decoration: underline;
}

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

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Dual Upload Grid for Registration */
.dual-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.upload-zone.small {
    padding: 1.25rem 0.75rem;
}

.upload-zone.small .upload-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.upload-zone.small .upload-text {
    font-size: 0.8rem;
}

.upload-zone.has-image {
    border-style: solid;
    border-color: var(--accent-green);
    background-color: rgba(16, 185, 129, 0.03);
}

.upload-zone.has-image .upload-icon {
    color: var(--accent-green);
}

/* Parameters Form fields */
.parameters-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: -0.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.range-val {
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

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

.form-instruction-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Styled Inputs */
select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

select:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Styled Range Sliders */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-indigo);
    box-shadow: 0 0 8px var(--accent-indigo);
    cursor: pointer;
    transition: var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-cyan);
    transform: scale(1.15);
}

/* Preview viewports */
.preview-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-preview-mode {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.btn-preview-mode.active {
    border-color: var(--accent-indigo);
    color: var(--accent-cyan);
}

/* Viewport structure */
.preview-container {
    flex: 1;
    display: flex;
    gap: 1rem;
    min-height: 450px;
    position: relative;
}

.preview-container.side-by-side {
    flex-direction: row;
}

.preview-container.overlay {
    /* Hide normal side-by-side display */
}

.preview-container.overlay .preview-box {
    display: none !important;
}

.preview-box {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.box-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}

.img-preview {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 4px;
}

/* Drawing Canvas for Inpaint Mask */
.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#paint-canvas {
    max-width: 100%;
    max-height: 480px;
    cursor: crosshair;
    pointer-events: auto; /* enable drawing when active */
    display: none;
}

/* Spinner Overlay */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 22, 38, 0.85);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Metrics and opacity overlay */
.metrics-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

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

.m-val {
    color: var(--accent-green);
    font-weight: 700;
}

.overlay-opacity-ctrl {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-glass);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.overlay-opacity-ctrl label {
    white-space: nowrap;
}

.overlay-opacity-ctrl input {
    flex: 1;
}

/* Image comparison Overlay slider */
.overlay-slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
}

#slider-before-img {
    z-index: 1;
}

.resize-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Initial width */
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

#slider-after-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
}

/* Slider Handle styling */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--accent-cyan);
    cursor: ew-resize;
    z-index: 3;
}

.handle-line {
    width: 100%;
    height: 100%;
}

.handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

/* Footer styling */
.footer {
    border-top: 1px solid var(--border-glass);
    background-color: var(--bg-darker);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* Helper utilities */
.hidden {
    display: none !important;
}

/* Responsive adjust */
@media (max-width: 992px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    
    .lab-wrapper {
        flex-direction: column;
    }
    
    .lab-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }
    
    .module-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .tab-item {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple burger menu should be added, but we keep links in simple layout */
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .preview-container.side-by-side {
        flex-direction: column;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Card Code Collapsible */
.card-code-toggle {
    margin-top: 1.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glass);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-muted);
}

.card-code-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-indigo);
    color: var(--text-primary);
}

.toggle-arrow {
    transition: var(--transition-fast);
}

.card-code-toggle.active .toggle-arrow {
    transform: rotate(180deg);
    color: var(--accent-cyan);
}

.card-code-toggle.active {
    color: var(--text-primary);
    border-style: solid;
    border-color: var(--border-glass-active);
}

.card-code-container {
    margin-top: 1rem;
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    overflow: hidden;
    display: none;
}

.card-code-container.show {
    display: block;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.code-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-glass);
}

.code-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 0.6rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

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

.code-tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.code-block {
    display: none;
    padding: 1rem;
    max-height: 260px;
    overflow-y: auto;
    text-align: left;
}

.code-block.active {
    display: block;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    background: transparent;
    border: none;
    padding: 0;
    display: block;
    white-space: pre;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
}

/* Histograms Equalization Layout */
.histograms-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.histogram-box {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    position: relative;
    padding: 2.25rem 1rem 1rem;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hist-img-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hist-preview {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    border-radius: 6px;
}

/* Image Reconstruction grid & sinogram styles */
.reconstruction-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-height: 550px;
}

.sinogram-panel {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    position: relative;
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.reconstruction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.recon-box {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    position: relative;
    padding: 2.25rem 1rem 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.recon-preview-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recon-preview-box img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 4px;
}

/* Checkbox alignment layout */
.checkbox-field {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
}

.checkbox-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-indigo);
    cursor: pointer;
}

.checkbox-field label {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Registration overlay clone absolute centering */
#registration-blend-ref-clone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    z-index: 1;
}

#result-img {
    z-index: 2;
}

.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   Admin Dashboard Styles
   ========================================================================= */
.admin-wrapper {
    position: relative;
    padding: 3rem 0;
    min-height: 80vh;
    overflow: hidden;
}

.admin-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.admin-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-indigo);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.metric-icon {
    font-size: 2.2rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-top: 0.25rem;
}

/* Admin Grid Layout */
.admin-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
}

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

.admin-panel {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

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

.panel-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-header h2 i {
    color: var(--accent-cyan);
}

/* User Table */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.admin-table th {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border-glass);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.email-cell {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: #ffffff;
}

.btn-edit-user {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-edit-user:hover {
    background: var(--accent-cyan);
    color: #0b0f19;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.btn-delete-user {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.btn-delete-user:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Stats Styling */
.stats-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item {
    margin-bottom: 1.25rem;
}

.stat-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-count {
    color: #ffffff;
    font-weight: 600;
}

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

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan) 0%, var(--accent-indigo) 100%);
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.stat-bar-fill.accent-indigo {
    background: linear-gradient(90deg, var(--accent-indigo) 0%, #d946ef 100%);
}

.no-data {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem 0;
}

/* Tabs for logs */
.log-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.log-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.log-tab-btn:hover {
    color: #ffffff;
}

.log-tab-btn.active {
    background-color: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-indigo);
}

.log-content-tab {
    display: none;
}

.log-content-tab.active {
    display: block;
}

.module-tag {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: #121824;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2.25rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

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

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: var(--accent-cyan);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

/* Dataset Image Selector CSS */
.btn-dataset {
    margin-top: 10px;
    z-index: 10;
    position: relative;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dataset:hover {
    background: var(--accent-cyan);
    color: #0c101b;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.btn-dataset-small {
    margin-top: 8px;
    z-index: 10;
    position: relative;
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-dataset-small:hover {
    background: var(--accent-cyan);
    color: #0c101b;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.dataset-card {
    background: #182030;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 160px;
}

.dataset-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.15);
    background: #1d273a;
}

.dataset-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.dataset-card:hover img {
    transform: scale(1.05);
}

.dataset-grid::-webkit-scrollbar {
    width: 6px;
}

.dataset-grid::-webkit-scrollbar-track {
    background: #0c101b;
    border-radius: 10px;
}

.dataset-grid::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}

.dataset-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ==========================================================================
   Manual Alignment & Fusion D-Pad Styles
   ========================================================================== */
.manual-alignment-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.25s ease;
}

.manual-align-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.manual-align-header label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
}

.manual-status-pills {
    display: flex;
    gap: 0.35rem;
}

.status-pill {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 4px;
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
    color: #cbd5e1;
}

.status-pill strong {
    color: var(--accent-cyan);
}

.dpad-wrapper {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.dpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    grid-template-rows: repeat(3, 44px);
    gap: 6px;
    justify-content: center;
}

.btn-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #182235;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    padding: 0;
}

.btn-dpad i {
    font-size: 0.85rem;
    line-height: 1;
}

.btn-dpad span {
    font-size: 0.55rem;
    margin-top: 2px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1;
}

.btn-dpad:hover {
    background: #1e293b;
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.2);
}

.btn-dpad:hover span {
    color: var(--accent-cyan);
}

.btn-dpad:active {
    transform: translateY(1px);
    background: var(--accent-cyan);
    color: #0c101b;
}

.btn-dpad:active span {
    color: #0c101b;
}

.btn-dpad-rot {
    border-color: rgba(245, 158, 11, 0.3);
}

.btn-dpad-rot i {
    color: #fbbf24;
}

.btn-dpad-rot:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-dpad-reset {
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-dpad-reset i {
    color: #f87171;
}

.btn-dpad-reset:hover {
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-dpad-zoom {
    border-color: rgba(56, 189, 248, 0.3);
}

.btn-dpad-zoom i {
    color: #38bdf8;
}

.btn-dpad-zoom:hover {
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.shear-control-bar {
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.6rem 0;
}

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

.shear-header label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0;
}

.shear-btn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.btn-shear {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #131d2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0.35rem 0.2rem;
    transition: all 0.15s ease;
    user-select: none;
}

.btn-shear i {
    font-size: 0.75rem;
    color: #a78bfa;
}

.btn-shear span {
    font-size: 0.55rem;
    margin-top: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-shear:hover {
    background: #1e293b;
    border-color: #a78bfa;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(167, 139, 250, 0.25);
}

.btn-shear:hover span {
    color: #a78bfa;
}

.btn-shear:active {
    transform: translateY(1px);
    background: #a78bfa;
    color: #0c101b;
}

.btn-shear:active span {
    color: #0c101b;
}

.dpad-empty {
    visibility: hidden;
}

.manual-controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.form-field-compact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.form-field-compact label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.form-field-compact select {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
    background: #0f172a;
    border: 1px solid var(--border-glass);
    color: #ffffff;
}

.form-field-compact input[type="range"] {
    width: 100%;
    margin-top: 0.35rem;
}

.btn-fusion-action {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-fusion-action:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-fusion-action:active {
    transform: translateY(0);
}

/* ========================================================
   Frequency Domain Multi-Stage Interactive Pipeline Styles
   ======================================================== */

.freq-step-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
}

.freq-step-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.1);
}

.freq-step-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.freq-step-badge {
    background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.freq-step-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-freq-action {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-freq-action:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    transform: translateY(-1px);
}

.btn-freq-action:active {
    transform: translateY(0);
}

/* Frequency Viewport Workspace */
.frequency-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.freq-pipeline-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
}

.freq-pipeline-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.freq-status-indicator {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.freq-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.freq-grid-row {
    grid-template-columns: repeat(2, 1fr);
}

.freq-grid-single {
    grid-template-columns: 1fr;
}

.freq-box {
    background-color: rgba(10, 15, 29, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    position: relative;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease;
}

.freq-box:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.freq-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.freq-box-header .box-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.freq-domain-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.freq-domain-tag.spatial {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.freq-domain-tag.frequency {
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.freq-domain-tag.filter {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.freq-domain-tag.filtered {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.4);
}

.freq-domain-tag.result {
    background: rgba(236, 72, 153, 0.18);
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.4);
}

.freq-preview-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #060913;
    border-radius: 8px;
    overflow: hidden;
    min-height: 220px;
}

.freq-preview-large {
    min-height: 320px;
}

.freq-preview-box img {
    width: 100%;
    height: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.freq-preview-large img {
    max-height: 360px;
}

.freq-box-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1.5rem;
    text-align: center;
}

.freq-box-placeholder i {
    font-size: 2.2rem;
    opacity: 0.4;
    color: #38bdf8;
}

.freq-metrics-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.85rem;
    padding: 0.65rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-size: 0.85rem;
}

.freq-metric-title {
    font-weight: 600;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.freq-metric-item {
    color: var(--text-muted);
}

.freq-metric-item b {
    color: #ffffff;
    font-weight: 700;
    margin-left: 0.2rem;
}

@media (max-width: 900px) {
    .freq-grid-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   Look-Up Table (LUT) Interactive Curve Styles
   ======================================================== */
.lut-curve-card {
    margin-top: 1rem;
    background: rgba(10, 15, 30, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.lut-curve-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.lut-curve-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lut-canvas-wrapper {
    width: 100%;
    background: #050811;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

#lut-curve-canvas {
    width: 100%;
    max-width: 256px;
    height: 150px;
    display: block;
}

.lut-gradient-bar {
    width: 100%;
    height: 8px;
    margin-top: 6px;
    border-radius: 4px;
    background: linear-gradient(to right, #000000 0%, #ffffff 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lut-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 2px;
}

/* ========================================================
   Look-Up Table (LUT) Medical Window/Level Range Info
   ======================================================== */
.lut-window-range-info {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
}

.lut-range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.range-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 500;
}

.range-tag.dark {
    background: rgba(15, 23, 42, 0.9);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.range-tag.center {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.range-tag.bright {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.range-tag b {
    color: #38bdf8;
    font-weight: 700;
}
.range-tag.bright b {
    color: #ffffff;
}
.range-tag.dark b {
    color: #cbd5e1;
}

/* ========================================================
   Co-founder of DIP-Lab Section (Landing Page)
   ======================================================== */
.cofounder-section {
    margin-top: 5rem;
    margin-bottom: 2rem;
}

.cofounder-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(10, 15, 30, 0.92));
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cofounder-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.55);
}

.cofounder-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.cofounder-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    margin-left: auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cofounder-card-link:hover .cofounder-external-link {
    background: rgba(56, 189, 248, 0.24);
    transform: translateX(2px);
}

.cofounder-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(99, 102, 241, 0.08) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.cofounder-avatar-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
}

.cofounder-avatar-ring {
    width: 190px;
    height: 220px;
    padding: 4px;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8, #6366f1, #22d3ee);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

.cofounder-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
    display: block;
    background: #0f172a;
}

.cofounder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    letter-spacing: 0.02em;
}

.cofounder-info {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cofounder-name {
    font-size: 1.65rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
    line-height: 1.25;
    background: linear-gradient(90deg, #ffffff 0%, #bae6fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cofounder-role {
    font-size: 0.98rem;
    font-weight: 600;
    color: #38bdf8;
    margin: 0;
}

.cofounder-affiliations {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.affiliation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.55;
}

.affiliation-item i {
    color: #38bdf8;
    margin-top: 0.25rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.cofounder-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.cofounder-tags .tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .cofounder-card {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
        gap: 1.5rem;
    }

    .affiliation-item {
        text-align: left;
    }

    .cofounder-tags {
        justify-content: center;
    }
}

/* ========================================================
   Code Lessons Hub (/lessons.html) & Interactive Modal
   ======================================================== */
.lessons-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.lessons-hero {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.65));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 18px;
}

.lessons-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.lessons-hero h1 {
    font-size: 2rem;
    margin: 0.4rem 0 0.5rem;
    color: #f8fafc;
}

.lessons-hero p {
    color: #94a3b8;
    margin: 0;
    max-width: 680px;
}

.lessons-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 999px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.lang-toggle-btn .lang-opt.active {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.lang-toggle-btn .lang-sep {
    opacity: 0.4;
}

.lessons-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.lessons-sidebar {
    position: sticky;
    top: 84px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.1rem;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.lessons-search-box {
    position: relative;
    margin-bottom: 1rem;
}

.lessons-search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.85rem;
}

.lessons-search-box input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.2rem;
    background: rgba(5, 8, 17, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.85rem;
    outline: none;
}

.lessons-search-box input:focus {
    border-color: #38bdf8;
}

.lessons-nav-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.6rem;
    padding-left: 0.4rem;
}

.lessons-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.lessons-nav-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.86rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.lessons-nav-item:hover .lessons-nav-link {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.lessons-nav-item.active .lessons-nav-link {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    font-weight: 600;
}

.nav-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #64748b;
}

.lessons-subnav {
    list-style: none;
    padding: 0.25rem 0 0.4rem 1.8rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lessons-subnav a {
    font-size: 0.78rem;
    color: #94a3b8;
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-left: 2px solid rgba(56, 189, 248, 0.25);
    display: block;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.lessons-subnav a:hover {
    color: #38bdf8;
    border-left-color: #38bdf8;
}

.lessons-empty-search {
    font-size: 0.85rem;
    color: #64748b;
    padding: 1rem 0.5rem;
    text-align: center;
}

.lessons-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lesson-module-header {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.75rem;
}

.lesson-mod-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.lesson-mod-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.08);
}

.btn-try-lab, .btn-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-try-lab {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    color: #ffffff;
}

.btn-try-lab:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-modal-link {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #e2e8f0;
}

.btn-modal-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lesson-module-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.lesson-mod-summary {
    color: #cbd5e1;
    margin: 0 0 1.1rem;
    line-height: 1.6;
}

.lesson-topic-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.pills-label {
    font-size: 0.78rem;
    color: #64748b;
    margin-right: 0.25rem;
}

.topic-jump-pill {
    font-size: 0.78rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.topic-jump-pill:hover {
    background: rgba(56, 189, 248, 0.22);
}

.lesson-topic-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.topic-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
}

.topic-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #f8fafc;
}

.topic-desc {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.topic-formula-box {
    background: rgba(5, 8, 17, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 3px solid #6366f1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.formula-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #818cf8;
}

.topic-formula-box code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: #e2e8f0;
    word-break: break-word;
}

.topic-params-section h4 {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.params-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.params-table th {
    background: rgba(5, 8, 17, 0.75);
    color: #94a3b8;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.params-table td {
    padding: 0.55rem 0.8rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.params-table tr:last-child td {
    border-bottom: none;
}

.params-table td code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.topic-code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.lesson-code-panel {
    background: #050811;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lesson-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.85rem;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.btn-copy-code {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #cbd5e1;
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy-code:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.btn-copy-code.copied {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    color: #34d399;
}

.lesson-code-panel pre {
    margin: 0;
    padding: 0.9rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #e2e8f0;
}

/* Syntax Highlighting Tokens */
.tok-comment { color: #64748b; font-style: italic; }
.tok-string { color: #34d399; }
.tok-kw { color: #c084fc; font-weight: 600; }
.tok-lib { color: #38bdf8; }

.lesson-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #f8fafc;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pager-btn:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.pager-btn.next {
    text-align: right;
    margin-left: auto;
}

.pager-btn small {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}

.pager-btn span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Interactive Code Lesson Modal (index.html) */
.lesson-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.lesson-modal {
    width: min(1180px, 96vw);
    height: min(86vh, 840px);
    background: #0b1120;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lesson-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

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

.modal-title-group h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #f8fafc;
}

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

.modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #f87171;
}

.lesson-modal-body {
    flex: 1;
    display: grid;
    grid-template-columns: 270px 1fr;
    overflow: hidden;
}

.modal-topics-sidebar {
    background: rgba(10, 15, 30, 0.85);
    border-right: 1px solid var(--border-glass);
    padding: 1rem;
    overflow-y: auto;
}

.modal-sidebar-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.65rem;
    padding-left: 0.35rem;
}

.modal-topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.modal-topic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    font-size: 0.84rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.modal-topic-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal-topic-item.active {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    font-weight: 600;
}

.tp-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 1px;
}

.modal-topic-detail {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-topic-head h3 {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    color: #f8fafc;
}

.modal-topic-head p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

@media (max-width: 960px) {
    .lessons-layout {
        grid-template-columns: 1fr;
    }
    .lessons-sidebar {
        position: static;
        max-height: none;
    }
    .topic-code-grid {
        grid-template-columns: 1fr;
    }
    .lesson-modal-body {
        grid-template-columns: 1fr;
    }
    .modal-topics-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        max-height: 170px;
    }
}

/* ========================================================
   Global Save Image Toolbar (Processing Lab Preview)
   ======================================================== */
.global-save-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-right: 0.5rem;
    padding: 0.25rem 0.45rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 10px;
}

.save-select {
    background: rgba(5, 8, 17, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    max-width: 175px;
}

.save-select:focus {
    border-color: #34d399;
}

.save-select.save-fmt {
    max-width: 75px;
    font-family: 'JetBrains Mono', monospace;
}

.btn-save-result {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.34rem 0.75rem;
    background: linear-gradient(135deg, #059669, #10b981);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.btn-save-result:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* ========================================================
   Hero Live Platform Statistics Bar (Landing Page)
   ======================================================== */
.hero-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.4rem;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    min-width: 195px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.55);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-icon.users {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.stat-icon.logins {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.modules {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.15;
}

.stat-label {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 2px;
}

/* ========================================================
   Legal, Privacy Policy & About / Contact Pages
   ======================================================== */
.legal-page {
    padding: 2.5rem 0 4.5rem;
}

.legal-container {
    max-width: 920px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legal-header {
    text-align: center;
    padding: 1.5rem 1rem 0.5rem;
}

.legal-header h1 {
    font-size: 2.2rem;
    color: #f8fafc;
    margin: 0.5rem 0;
}

.legal-header p {
    color: #94a3b8;
    margin: 0;
}

.legal-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.legal-card h2 {
    font-size: 1.25rem;
    color: #f8fafc;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.legal-card h2 i {
    color: #38bdf8;
}

.legal-card p {
    color: #cbd5e1;
    line-height: 1.7;
    margin: 0 0 0.85rem;
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: #cbd5e1;
    line-height: 1.65;
}

.legal-list strong {
    color: #f8fafc;
}

.legal-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
}

.legal-link:hover {
    text-decoration: underline;
}

.about-founder-grid {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.about-founder-details {
    flex: 1;
    min-width: 260px;
}

.about-founder-details h3 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #f8fafc;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #38bdf8;
}

/* ========================================================
   Scientific Workstation Refinements (Disciplined Palette)
   ======================================================== */
.grid-3 {
    counter-reset: mod-counter;
}

.grid-3 .card {
    position: relative;
    counter-increment: mod-counter;
    border-radius: 10px;
    background: #0d1322;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.grid-3 .card::after {
    content: counter(mod-counter, decimal-leading-zero);
    position: absolute;
    top: 1.35rem;
    right: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.05em;
}

.grid-3 .card:hover {
    transform: none;
    background: #10182b;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.grid-3 .card:hover::before {
    background: #38bdf8;
}

.grid-3 .card .card-icon {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Workstation Panel & Pixel Inspector Bar */
.panel {
    border-radius: 10px !important;
    background: #0d1322 !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: none !important;
}

.controls-panel .panel-header h2 {
    white-space: nowrap;
    font-size: 1rem;
}

.pixel-inspector-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.85rem;
    margin-bottom: 0.85rem;
    background: #070b14;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.inspector-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #38bdf8;
    font-weight: 600;
    white-space: nowrap;
}

.inspector-readout {
    font-family: 'JetBrains Mono', monospace;
    color: #cbd5e1;
    font-size: 0.76rem;
}

.img-preview {
    cursor: crosshair;
}

.nav-logo-img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.about-brand-logo {
    max-width: 340px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 1.25rem;
    display: block;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ========================================================
   Laboratory Case Studies Carousel (Landing Page)
   ======================================================== */
.case-study-section {
    margin-top: 2rem;
    margin-bottom: 3.5rem;
}

.case-carousel {
    background: #0d1322;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    overflow: hidden;
    padding: 1.25rem;
}

.case-carousel-viewport {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.case-slide-stage {
    position: relative;
    width: 100%;
    background: #060913;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 520px;
}

.case-slide-img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    transition: opacity 0.35s ease;
}

.case-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}

.case-nav-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
}

.case-nav-btn.prev { left: 14px; }
.case-nav-btn.next { right: 14px; }

.case-slide-caption {
    padding: 0.25rem 0.4rem 0;
}

.case-caption-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
    gap: 0.75rem;
}

.case-module-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.22rem 0.65rem;
    border-radius: 6px;
}

.case-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #64748b;
}

.case-slide-caption h3 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: #f8fafc;
}

.case-slide-caption p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.94rem;
    line-height: 1.55;
}

.case-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.1rem;
    flex-wrap: wrap;
}

.case-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: none;
    background: rgba(148, 163, 184, 0.3);
    cursor: pointer;
    padding: 0;
    transition: width 0.25s ease, background 0.25s ease;
}

.case-dot.active {
    width: 26px;
    background: #38bdf8;
}

/* ========================================================
   Code Lessons Docs Polish (Compact Header, Dark Scrollbar, KaTeX, Preview)
   ======================================================== */
.lessons-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 0 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    flex-wrap: wrap;
}

.docs-kicker {
    display: block;
    font-family: 'JetBrains Mono', 'Noto Sans Thai', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #38bdf8;
    margin-bottom: 0.25rem;
}

.lessons-topbar-left h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
}

.lessons-sidebar {
    background: #0d1322;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.lessons-sidebar::-webkit-scrollbar {
    width: 5px;
}

.lessons-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.lessons-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

.lessons-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

.lesson-module-header,
.lesson-topic-card {
    background: #0d1322;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
}

.lesson-preview-figure {
    margin-top: 0.75rem;
    background: #060913;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    padding: 0.75rem;
}

.lesson-preview-figure .figure-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lesson-preview-figure img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.katex-formula {
    color: #e2e8f0;
    overflow-x: auto;
    padding: 0.15rem 0;
}

.katex-formula .katex-display {
    margin: 0.25rem 0;
}

.legal-list.compact-modules {
    font-size: 0.86rem;
    line-height: 1.5;
    gap: 0.35rem;
    list-style: none;
    padding-left: 0.25rem;
}

.legal-list.compact-modules li {
    padding: 0.3rem 0.65rem;
    border-left: 2px solid rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 0 6px 6px 0;
}

.legal-list.compact-modules strong {
    color: #38bdf8;
    font-weight: 600;
}













