:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #6b6b6b 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.07);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --role-curator: #4CAF50;
    --role-verifier: #2196F3;
    --role-release: #F44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    /* Deep dark base */
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow: hidden;
    /* Prevent full body scroll */
    display: flex;
    /* Critical: Enable Flexbox */
    flex-direction: column;
    /* Stack children vertically */
    width: 100%;
    height: 100vh;
    /* Fill viewport */
    margin: 0;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    opacity: 0.8;
    /* Subtle blend */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0;
    background: #0d1117;
    backdrop-filter: none;
    z-index: 1000;
    border-bottom: 1px solid #30363d;
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-option {
    cursor: pointer;
    transition: color 0.3s;
}

.lang-option.active,
.lang-option:hover {
    color: var(--text-primary);
}

.lang-switch .divider {
    opacity: 0.5;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.header-actions a {
    color: inherit;
    text-decoration: none;
}

.header-actions a:hover {
    color: var(--text-primary);
}

.header-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.header-btn:hover {
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.4);
}

.header-btn.primary {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: transparent;
}

.header-btn.primary:hover {
    background: #e0e0e0;
}

/* ... existing navbar styles ... */

/* Sub Navbar (Profile Tabs - Row 2) */
/* Sub Navbar (Profile Tabs - Row 2) */
.sub-navbar {
    position: fixed;
    top: 60px;
    /* Below the fixed 60px header */
    left: 0;
    width: 100%;
    background-color: #000000;
    border-bottom: 1px solid #30363d;
    z-index: 900;
    margin-top: 0;
    padding-top: 0;
}

.page-subnav {
    position: relative;
    top: 0;
    width: 100%;
    background-color: #000000;
    border-bottom: 1px solid #30363d;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-top: 0;
}

.sub-nav-content {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    height: 48px;
    align-items: center;
    /* Hide scrollbar for Chrome, Safari and Opera */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.sub-nav-content::-webkit-scrollbar {
    display: none;
}

.sub-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: #c9d1d9;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-bottom-color 0.2s;
    height: 100%;
    position: relative;
    top: 1px;
}

/* Pages sometimes reuse .sub-nav-item for <button> tabs; reset default button chrome. */
.sub-nav-content button.sub-nav-item {
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
}

.sub-nav-content button.sub-nav-item:focus-visible {
    outline: 2px solid #f78166;
    outline-offset: 2px;
    border-radius: 6px;
}

.sub-nav-item:hover {
    color: #c9d1d9;
    background-color: rgba(177, 186, 196, 0.12);
    border-radius: 6px 6px 0 0;
    border-bottom-color: #8b949e;
}

.sub-nav-item:hover::after {
    display: none;
}

.sub-nav-item.active {
    color: #c9d1d9;
    font-weight: 600;
    border-bottom-color: #f78166;
}

.sub-nav-item svg {
    fill: currentColor;
    color: inherit;
    opacity: 1;
}

.sub-nav-item.active svg {
    opacity: 1;
}

.counter-badge {
    background-color: rgba(110, 118, 129, 0.4);
    color: #c9d1d9;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 10px;
    line-height: 18px;
}

/* Project detail: make selected tab visually obvious */
.page-subnav .sub-nav-content {
    height: auto;
    min-height: 48px;
    padding: 6px 0;
    gap: 10px;
}

.page-subnav .sub-nav-item {
    height: 36px;
    top: 0;
    border: 1px solid #2d333b;
    border-radius: 10px;
    padding: 0 14px;
}

.page-subnav .sub-nav-item:hover {
    border-color: #8b949e;
    border-bottom-color: #8b949e;
    background: rgba(177, 186, 196, 0.12);
}

.page-subnav .sub-nav-item.active {
    color: #f0f6fc;
    border-color: #1f6feb;
    border-bottom-color: #1f6feb;
    background: rgba(31, 111, 235, 0.22);
    box-shadow: inset 0 0 0 1px rgba(31, 111, 235, 0.28);
}

.page-subnav .sub-nav-item.active .counter-badge {
    background: #1f6feb;
    color: #ffffff;
}

/* Hero (Main Scrollable Content) */
.hero {
    /* Flex item properties */
    flex: 1;
    /* Grow to fill available space */
    overflow-y: auto;
    /* Enable scroll within this element */
    overflow-x: hidden;

    /* Layout properties */
    position: relative;
    width: 100%;
    padding: 120px 0 60px;
    /* Padding for visual spacing */
    text-align: center;
    scroll-behavior: smooth;

    /* Custom Scrollbar for Webkit */
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) var(--bg-color);
}

.hero::-webkit-scrollbar {
    width: 6px;
}

.hero::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.hero::-webkit-scrollbar-thumb {
    background-color: var(--card-border);
    border-radius: 3px;
}

.hero-bg-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-image-container {
    margin-bottom: 0.5rem;
    /* Reduced from 2rem */
}

.hero-image {
    max-width: 300px;
    height: auto;
    /* Removed heavy shadow box to better suit transparent image if needed, or keeping it soft */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-5px) scale(1.02);
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 400;
    /* Regular to match Logo */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #666666 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    /* Technical font */
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    /* Technical font */
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: transparent;
    border-color: var(--card-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--text-secondary);
}

/* Philosophy Section */
/* Philosophy Content (Merged into Hero) */
.philosophy-content {
    max-width: 1000px;
    /* Increased from 800px to prevent title wrapping */
    margin: 2rem auto 0;
    /* Reduced from 6rem */
    text-align: left;
    padding-bottom: 4rem;
}

.philosophy-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    font-weight: 400;
    /* Regular to match Logo */
    margin-bottom: 1.5rem;
    /* Reduced from 3rem */
    line-height: 1.3;
    color: var(--text-primary);
    background: linear-gradient(180deg, #FFFFFF 0%, #AAAAAA 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.philosophy-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #cccccc;
    text-align: justify;
}

.philosophy-content .highlight-text {
    font-size: 1.25rem;
    /* Reduced from 1.4rem to prevent wrapping */
    font-weight: 600;
    margin: 3rem 0;
    color: #ffffff;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    word-break: keep-all;
    /* Prevent awkward breaks in Korean */
}

.philosophy-content .closing-statement {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4rem;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Footer Section */
section {
    padding: 80px 0;
    border-top: 1px solid var(--card-border);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 600;
}

/* Grids */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}


.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}


.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card .card-desc {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #888;
}

/* Workflow */
.workflow-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    min-width: 140px;
}

.step-label {
    font-weight: bold;
    color: var(--text-secondary);
}

.step-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.step-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

/* Roles & Scoring */
.role-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.role-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.role-badge.green {
    color: var(--role-curator);
    background: currentColor;
}

.role-badge.blue {
    color: var(--role-verifier);
    background: currentColor;
}

.role-badge.red {
    color: var(--role-release);
    background: currentColor;
}

.role-info {
    display: flex;
    flex-direction: column;
}

.role-info strong {
    font-size: 1.1rem;
}

.role-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-label {
    width: 140px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.score-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background: var(--text-primary);
    border-radius: 4px;
}

.score-value {
    width: 40px;
    text-align: right;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Quick Start */
.steps-list {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step-item {
    padding: 1rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0) 100%);
    border-left: 2px solid var(--card-border);
    color: var(--text-secondary);
}

.step-item:hover {
    border-left-color: var(--text-primary);
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

/* System Status */
.status-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 4px;
    border: 1px solid var(--card-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    box-shadow: 0 0 8px #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Footer */
.footer {
    /* Flex item properties */
    flex: 0 0 auto;
    /* Do not grow or shrink, stay distinct */

    position: relative;
    /* Part of the document flow */
    width: 100%;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: #000000;
    font-size: 0.8rem;
    /* Slightly larger for readability */
    color: #ffffff;
    /* Pure white for max contrast */
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8);
}

/* Footer Container Override */
.footer .container {
    max-width: 95%;
    /* Widen container for footer only */
}

.footer-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.footer-info p {
    margin-bottom: 0.3rem;
    line-height: 1.6;
    color: rgba(187, 187, 187, 0.7);
    font-weight: 500;
    letter-spacing: 0;
    word-spacing: -0.02em;
    white-space: nowrap;
    /* Critical: Force single line */
    overflow: hidden;
    text-overflow: ellipsis;
    /* Graceful degradation */
}

.footer-info .divider {
    color: #444;
    margin: 0 0.25rem;
}

.footer-copyright {
    color: #444;
    margin-top: 0.5rem;
    /* Reduced margin */
    font-size: 0.65rem;
    letter-spacing: 0;
    word-spacing: -0.02em;
}

/* Page-based Login Styles */
.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    /* Allow growth */
    overflow-y: auto;
    /* Enable body scroll */
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 100px;
    /* Spacer for Navbar */
    padding-bottom: 3rem;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    flex-direction: column;
    /* Stack header and card vertically */
    overflow: visible;
}

.header-title-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-mascot {
    width: 95px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    display: block;
    margin: 0;
}

.login-header-group {
    max-width: 480px;
    width: 100%;
    margin-bottom: 2rem;
    /* Space between header and card */
    padding-left: 0.5rem;
    /* Optical alignment */
    pointer-events: auto;
    /* Ensure header interaction if needed */
}

.login-header-group h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    /* Regular weight to match logo */
    margin: 0;
    text-transform: uppercase;
    text-align: left;
    color: var(--text-primary);
}

.login-desc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ccc;
    /* Slightly lighter than #888 for better visibility on dark bg */
    line-height: 1.4;
    margin-top: 1rem;
}

.login-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    max-width: 480px;
    width: 100%;
    padding: 1.8rem;
    box-shadow: none !important;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    pointer-events: auto;
}

/* Cleaned up styles */

.login-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    /* Standard spacing */
}

.tab-btn {
    flex: 1;
    padding: 0.8rem;
    /* Comfortable touch target */
    background: transparent;
    border: none;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
}

.login-form .input-group {
    margin-bottom: 1.25rem;
    /* Clean vertical rhythm */
}

.login-form label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    /* Clean gap */
    text-transform: uppercase;
}

.login-form input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    /* Comfortable input */
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: 0;
}

.login-form input:focus {
    border-color: #fff;
    background: #0a0a0a;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.btn-login {
    width: 100%;
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 0.8rem;
    /* Reduced padding */
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    margin-top: 0.75rem;
    /* Reduced from 1rem */
    transition: background 0.3s;
}

.btn-login:hover {
    background: #e0e0e0;
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    /* Reduced height */
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-links.bottom-text {
    margin-top: 1rem;
    /* Reduced from 2rem */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.text-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.text-link.highlight {
    color: #fff;
    font-weight: 700;
    margin-left: 0.5rem;
}

.text-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.text-link.highlight:hover {
    text-decoration: underline;
}

.auth-links .divider {
    opacity: 0.3;
}

/* Keep Modal styles for reference or potential re-use, but login-card is used on login.html */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    /* On top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--card-border);
    padding: 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    /* Reduced from 1.8rem */
    color: #fff;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.8rem;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.input-group input:focus {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
    /* Space for icon */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.login-form button {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.text-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.text-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.auth-links .divider {
    opacity: 0.3;
}

/* Signup Page Specifics */
/* Signup Page Specifics */
.checkbox-group {
    margin-bottom: 1.25rem;
    /* Match input-group spacing */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Tighter gap */
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 25px;
    /* Reduced slightly */
    cursor: pointer;
    font-size: 0.75rem;
    /* Match label size */
    color: #ccc;
    user-select: none;
    font-family: 'JetBrains Mono', monospace;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1px solid var(--text-secondary);
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--text-primary);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container .label-text {
    text-transform: uppercase;
}

/* Validation Styles */
.input-group.error input {
    border-color: #ff4444;
}

.error-message {
    display: block;
    color: #ff4444;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.checkbox-group .highlight {
    color: #58a6ff;
    text-decoration: none;
}

.checkbox-group .highlight:hover {
    text-decoration: underline;
}

/* Dashboard / Profile Page */
.dashboard-container {
    align-items: flex-start !important;
    /* Override center alignment */
    padding-top: 0 !important;
    /* Layout handles header offsets */
    max-width: 1280px !important;
    margin: 0 auto;
    padding-left: 32px;
    /* Add side padding */
    padding-right: 32px;
    width: 100%;
}

.profile-layout {
    display: flex;
    width: 100%;
    gap: 24px;
    /* Tighter GitHub-like gap */
    justify-content: center;
    /* Center content within max-width */
}

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
    }
}

/* Sidebar */
.profile-sidebar {
    width: 296px;
    flex-shrink: 0;
}

.profile-avatar-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    margin-bottom: 1rem;
}

.p-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.p-nickname {
    display: block;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-edit-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #21262d;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    color: #c9d1d9;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.2s, border-color 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    text-decoration: none;
}

.btn-edit-profile:hover {
    background-color: #30363d;
    border-color: #8b949e;
    color: #ffffff;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: var(--text-secondary);
}

.octicon {
    fill: var(--text-secondary);
}

/* Main Content */
.profile-main {
    flex: 1;
    min-width: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.link-small {
    font-size: 12px;
    color: #58a6ff;
    text-decoration: none;
}

.link-small:hover {
    text-decoration: underline;
}

.link-button {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.section-subtitle {
    margin: -0.25rem 0 1rem 0;
    color: #8b949e;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Repo Grid */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.repo-grid.layout-list {
    grid-template-columns: 1fr;
}

.repo-grid.layout-compact {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.repo-grid.layout-compact .repo-card {
    padding: 0.75rem;
}

/* Single column on smaller screens */
@media (max-width: 1000px) {
    .repo-grid {
        grid-template-columns: 1fr;
    }
}

.repo-card {
    background-color: transparent;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.repo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.repo-title {
    font-weight: 600;
    color: #58a6ff;
    text-decoration: none;
    font-size: 14px;
}

.repo-title:hover {
    text-decoration: underline;
}

.badge {
    border: 1px solid #30363d;
    border-radius: 2em;
    padding: 0 7px;
    font-size: 12px;
    color: #8b949e;
    font-weight: 500;
}

.repo-desc {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 1rem;
    flex: 1;
    /* Multiline ellipsis if needed, but flex wrap is better */
    line-height: 1.5;
}

.repo-meta {
    font-size: 12px;
    color: #8b949e;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lang-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Contributions */
.section-contributions {
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    background: #0d1117;
    /* Slight contrast bg */
    margin-bottom: 2rem;
}

.section-contributions .section-header {
    margin-bottom: 0.5rem;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    /* Weeks */
    gap: 3px;
    margin-top: 5px;
}

.day-block {
    width: 10px;
    height: 10px;
    background-color: #161b22;
    /* Empty */
    border-radius: 2px;
}

.day-block.level-1 {
    background-color: #0e4429;
}

.day-block.level-2 {
    background-color: #006d32;
}

.day-block.level-3 {
    background-color: #26a641;
}

.day-block.level-4 {
    background-color: #39d353;
}

/* Sidebar */
.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    background-color: #0d1117;
    border-right: 1px solid #30363d;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
}

.dashboard-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #21262d;
}

.sidebar-logo {
    color: #f0f6fc;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
}

.sidebar-close-btn:hover {
    color: #c9d1d9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: #161b22;
}

.sidebar-item .octicon {
    fill: #8b949e;
}

.sidebar-item.active .octicon {
    fill: #c9d1d9;
}

.sidebar-divider {
    height: 1px;
    background-color: #21262d;
    margin: 0.5rem 0;
}

.sidebar-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #8b949e;
    padding: 8px 8px;
    margin-top: 0.5rem;
}

.sidebar-repo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-repo-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
}

.sidebar-repo-list li a:hover {
    background-color: #161b22;
}

.repo-icon-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.show-more-link {
    font-size: 12px;
    color: #8b949e;
    padding: 8px;
    display: block;
    text-decoration: none;
}

.show-more-link:hover {
    color: #58a6ff;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.banner {
    background-color: #0c1c38;
    border: 1px solid #1f365d;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #c9d1d9;
    position: relative;
}

.banner .octicon {
    fill: #58a6ff;
    flex-shrink: 0;
    margin-top: 2px;
}

.banner a {
    color: #58a6ff;
    text-decoration: none;
}

.banner a:hover {
    text-decoration: underline;
}

.close-banner {
    background: none;
    border: none;
    color: #79c0ff;
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* ========================================
   Dashboard Layout Styles
   ======================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 108px;
}

.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    background: #0d1117;
    border-right: 1px solid #30363d;
    padding: 1rem;
    overflow-y: auto;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.dashboard-main {
    flex: 1;
    margin-left: 0;
    padding: 2rem;
    min-height: calc(100vh - 108px);
    overflow-y: auto;
}

.deploy-update-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    border: 1px solid #f0b429;
    background: rgba(240, 180, 41, 0.12);
    color: #f7d794;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.6rem;
}

.deploy-update-content {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.deploy-update-content strong {
    color: #ffe5a3;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.deploy-update-content span {
    color: #f7d794;
    font-size: 0.86rem;
}

.deploy-refresh-btn {
    white-space: nowrap;
}

.deploy-build-meta {
    color: #8b949e;
    font-size: 0.76rem;
    margin-bottom: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #c9d1d9;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.sidebar-item:hover {
    background-color: #161b22;
}

.sidebar-item.active {
    background-color: #21262d;
    color: #ffffff;
}

.sidebar-icon {
    display: flex;
    align-items: center;
    color: #8b949e;
}

.sidebar-icon svg {
    fill: currentColor;
}

.sidebar-item.active .sidebar-icon {
    color: #ffffff;
}

.sidebar-item .counter-badge {
    margin-left: auto;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 8px 24px;
}

.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: #8b949e;
    text-decoration: none;
    font-size: 12px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-subitem:hover {
    background-color: #161b22;
    color: #c9d1d9;
}

.sidebar-subitem.active {
    background-color: #21262d;
    color: #ffffff;
}

.sidebar-subitem-icon {
    display: flex;
    align-items: center;
    color: inherit;
}

.sidebar-subitem-icon svg {
    fill: currentColor;
}

.sidebar-toggle-mobile {
    display: none;
}

@media (max-width: 768px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
    }

    .deploy-update-banner {
        align-items: flex-start;
    }

    .sidebar-toggle-mobile {
        display: flex;
        position: fixed;
        top: 72px;
        left: 1rem;
        z-index: 99;
        background: #21262d;
        border: 1px solid #30363d;
        border-radius: 6px;
        padding: 8px;
        color: #c9d1d9;
        cursor: pointer;
    }
}

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.page-subtitle {
    color: #8b949e;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-card.highlight {
    border-color: #f78166;
}

.stat-icon {
    color: #8b949e;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.stat-label {
    font-size: 0.85rem;
    color: #8b949e;
}

.stat-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #6e7681;
    line-height: 1.4;
}

/* Section Card */
.section-card {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-card h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.section-card.highlight {
    border-color: #238636;
    background: linear-gradient(180deg, rgba(35, 134, 54, 0.1) 0%, #0d1117 100%);
}

/* Code Blocks (used in ctxpack/governance pages and setup guides) */
.code-block {
    margin: 0.75rem 0 0 0;
    background: #161b22;
    border: 1px solid #30363d;
    color: #f0f6fc;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    overflow: auto;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Setup guide helpers */
.guide-steps {
    margin: 0;
    padding-left: 1.25rem;
    color: #c9d1d9;
    font-size: 0.9rem;
    line-height: 1.55;
}

.guide-steps li {
    margin: 0.7rem 0;
}

.guide-files {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #8b949e;
    line-height: 1.5;
}

.guide-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.guide-notice {
    border: 1px solid #238636;
    background: rgba(35, 134, 54, 0.08);
    color: #3fb950;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.guide-files code,
.detail-value code,
.section-subtitle code {
    background: #21262d;
    border: 1px solid #30363d;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: #c9d1d9;
    font-size: 0.85em;
}

/* Dashboard Section */
.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-section h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #c9d1d9;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-box svg {
    color: #8b949e;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: #c9d1d9;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: #8b949e;
}

.filter-tab.active {
    background: #21262d;
    border-color: #8b949e;
    color: #ffffff;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-group select {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: #c9d1d9;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Data Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #21262d;
}

.data-table th {
    color: #8b949e;
    font-weight: 500;
    background: #0d1117;
}

.data-table td {
    color: #c9d1d9;
}

.data-table tr:hover td {
    background: rgba(177, 186, 196, 0.04);
}

.commit-row {
    cursor: pointer;
}

.commit-filters-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(140px, 1fr)) repeat(2, minmax(130px, 0.85fr)) auto;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.commit-filter-input {
    width: 100%;
    height: 34px;
    padding: 0.35rem 0.55rem;
    border: 1px solid #30363d;
    border-radius: 7px;
    background: #0d1117;
    color: #c9d1d9;
    font-size: 0.82rem;
}

.commit-filter-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.2);
}

.commit-filter-search {
    min-width: 240px;
}

.commit-table-scroll {
    max-height: 560px;
    overflow: auto;
    border: 1px solid #21262d;
    border-radius: 10px;
}

.commit-table-scroll .data-table {
    min-width: 760px;
}

.commit-table-scroll .data-table th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #0f1722;
}

.files-filter-row {
    grid-template-columns: minmax(280px, 1.4fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) auto auto;
}

.files-table-scroll {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #21262d;
    border-radius: 10px;
}

.files-table-scroll .data-table {
    min-width: 860px;
}

.files-table-scroll .data-table th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #0f1722;
}

.files-row {
    cursor: pointer;
}

.files-row td {
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.files-row:hover td {
    background: rgba(88, 166, 255, 0.08);
}

.files-row.is-selected td {
    background: linear-gradient(90deg, rgba(56, 139, 253, 0.24), rgba(56, 139, 253, 0.1));
    color: #f0f6fc;
    font-weight: 600;
    border-bottom-color: rgba(88, 166, 255, 0.35);
}

.files-row.is-selected td:first-child {
    border-left: 4px solid #58a6ff;
    padding-left: calc(1rem - 4px);
}

.files-path-cell code {
    display: inline-block;
    max-width: 640px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.files-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #c9d1d9;
    height: 34px;
    padding: 0 0.2rem;
    white-space: nowrap;
}

.files-filter-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #58a6ff;
}

.file-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.files-content-code {
    margin-top: 0.5rem;
    white-space: pre-wrap;
    max-height: 440px;
    overflow: auto;
    border: 1px solid #21262d;
    border-radius: 8px;
    background: #0d1117;
    line-height: 1.45;
}

.files-empty-content {
    border: 1px dashed #30363d;
    border-radius: 8px;
    color: #8b949e;
    padding: 0.75rem;
    background: #0f141b;
}

.files-history-table td code,
.files-pull-table td code {
    max-width: 320px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.token-health-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.16rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #30363d;
    background: #161b22;
    color: #c9d1d9;
}

.token-health-badge.valid {
    border-color: #1f6f43;
    color: #7ee787;
    background: rgba(46, 160, 67, 0.12);
}

.token-health-badge.expiring {
    border-color: #8b6e00;
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
}

.token-health-badge.expired,
.token-health-badge.invalid,
.token-health-badge.missing {
    border-color: #8b1e1e;
    color: #ffa198;
    background: rgba(248, 81, 73, 0.12);
}

.evidence-filters-bar .search-box {
    max-width: 520px;
}

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

.list-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.commit-row td {
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.commit-row:hover td {
    background: rgba(88, 166, 255, 0.08);
}

.commit-row.is-selected td {
    background: linear-gradient(90deg, rgba(56, 139, 253, 0.28), rgba(56, 139, 253, 0.16));
    color: #f0f6fc;
    font-weight: 600;
    border-bottom-color: rgba(88, 166, 255, 0.35);
}

.commit-table-scroll .commit-row.is-selected td {
    position: sticky;
    top: 43px;
    z-index: 3;
    box-shadow: 0 1px 0 rgba(88, 166, 255, 0.35);
}

.commit-row.is-selected td:first-child {
    border-left: 4px solid #58a6ff;
    padding-left: calc(1rem - 4px);
}

.commit-when-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.commit-selected-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #2ea043;
    color: #bff5cc;
    background: linear-gradient(180deg, rgba(46, 160, 67, 0.32), rgba(46, 160, 67, 0.16));
    box-shadow: 0 0 0 1px rgba(46, 160, 67, 0.18) inset;
}

.commit-selected-icon {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #2ea043;
    font-size: 0.7rem;
    line-height: 1;
    font-weight: 800;
    flex: 0 0 auto;
}

.commit-when-time {
    color: inherit;
}

.commit-details-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.commit-selected-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    border: 1px solid #2f81f7;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: rgba(56, 139, 253, 0.14);
    color: #dbeafe;
}

.commit-selected-banner strong {
    color: #ffffff;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.commit-selected-banner span {
    color: #dbeafe;
    font-size: 0.9rem;
}

.commit-selected-banner-icon {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2ea043;
    color: #ffffff;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
}

.commit-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.commit-summary-card {
    background: #11161d;
    border: 1px solid #2d333b;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    min-width: 0;
}

.commit-summary-label {
    color: #8b949e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.commit-summary-value {
    color: #f0f6fc;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
}

.commit-change-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.commit-chip {
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    border: 1px solid #30363d;
    color: #c9d1d9;
    background: #161b22;
}

.commit-chip-added {
    border-color: #1f6f43;
    color: #3fb950;
}

.commit-chip-modified {
    border-color: #8b6e00;
    color: #d29922;
}

.commit-chip-deleted {
    border-color: #8b1e1e;
    color: #f85149;
}

.commit-chip-unchanged {
    border-color: #30363d;
    color: #8b949e;
}

.commit-chip-lines {
    border-color: rgba(88, 166, 255, 0.42);
    background: rgba(56, 139, 253, 0.1);
    color: #c9d1d9;
    font-weight: 600;
}

.commit-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.8rem;
}

.commit-meta-item {
    border: 1px solid #2d333b;
    background: #11161d;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    min-width: 0;
}

.commit-meta-label {
    color: #8b949e;
    font-size: 0.78rem;
    display: block;
    margin-bottom: 0.3rem;
}

.commit-meta-value {
    color: #f0f6fc;
    font-size: 0.88rem;
    word-break: break-word;
}

.commit-files-section h4 {
    color: #f0f6fc;
    font-size: 0.9rem;
    margin: 0 0 0.6rem 0;
}

.commit-files-table td {
    vertical-align: top;
}

.commit-files-table td code {
    display: inline-block;
    max-width: 560px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.commit-change-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-transform: capitalize;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #30363d;
    padding: 0.16rem 0.55rem;
    background: #161b22;
    color: #c9d1d9;
}

.commit-change-type.added {
    border-color: #1f6f43;
    color: #7ee787;
    background: rgba(46, 160, 67, 0.12);
}

.commit-change-type.modified {
    border-color: #8b6e00;
    color: #d29922;
    background: rgba(210, 153, 34, 0.12);
}

.commit-change-type.deleted {
    border-color: #8b1e1e;
    color: #ffa198;
    background: rgba(248, 81, 73, 0.12);
}

.commit-change-type.pulled {
    border-color: #1f6feb;
    color: #79c0ff;
    background: rgba(31, 111, 235, 0.12);
}

.commit-sha-cell {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
}

.commit-sha-cell small {
    color: #8b949e;
    font-size: 0.72rem;
}

.commit-lines-cell {
    display: inline-flex;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.commit-lines-added {
    color: #3fb950;
    font-weight: 700;
}

.commit-lines-sep {
    color: #8b949e;
}

.commit-lines-removed {
    color: #f85149;
    font-weight: 700;
}

.commit-diff-details summary {
    color: #58a6ff;
    cursor: pointer;
    font-size: 0.82rem;
}

.commit-diff-details summary:hover {
    text-decoration: underline;
}

.commit-diff-hint {
    color: #8b949e;
    font-size: 0.8rem;
}

.commit-diff-toggle {
    min-width: 116px;
}

.commit-diff-row td {
    background: rgba(13, 17, 23, 0.75);
    border-bottom: 1px solid #21262d;
    padding-top: 0.35rem;
    padding-bottom: 0.7rem;
}

.commit-diff-row .commit-diff-details {
    margin-left: 0.15rem;
}

.commit-diff-code {
    margin-top: 0.5rem;
    white-space: pre-wrap;
    max-height: 360px;
    border: 1px solid #21262d;
    border-radius: 8px;
    background: #0d1117;
}

.commit-diff-line {
    display: block;
    padding: 0.04rem 0.45rem;
    border-left: 2px solid transparent;
    color: #c9d1d9;
}

.commit-diff-line.is-added {
    color: #7ee787;
    background: rgba(63, 185, 80, 0.14);
    border-left-color: #2ea043;
}

.commit-diff-line.is-removed {
    color: #ffa198;
    background: rgba(248, 81, 73, 0.14);
    border-left-color: #da3633;
}

.commit-diff-line.is-hunk {
    color: #79c0ff;
    background: rgba(56, 139, 253, 0.12);
    border-left-color: #58a6ff;
}

.commit-diff-line.is-meta {
    color: #8b949e;
}

.commit-raw-meta {
    border-top: 1px dashed #30363d;
    padding-top: 0.75rem;
}

.commit-raw-meta summary {
    color: #8b949e;
    cursor: pointer;
    font-size: 0.85rem;
}

.commit-raw-code {
    margin-top: 0.6rem;
}

@media (max-width: 1080px) {
    .commit-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .file-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .commit-filters-row {
        grid-template-columns: 1fr;
    }

    .commit-filter-search {
        min-width: 0;
    }

    .files-filter-row {
        grid-template-columns: 1fr;
    }

    .files-filter-toggle {
        height: auto;
        padding: 0;
    }

    .commit-table-scroll .data-table {
        min-width: 640px;
    }

    .files-table-scroll .data-table {
        min-width: 640px;
    }

    .project-workitems-sort select {
        min-width: 130px;
    }

    .commit-summary-grid {
        grid-template-columns: 1fr;
    }

    .commit-meta-grid {
        grid-template-columns: 1fr;
    }

    .file-meta-grid {
        grid-template-columns: 1fr;
    }

    .commit-files-table td code {
        max-width: 240px;
    }
}

.item-id,
.item-title {
    color: #58a6ff;
    text-decoration: none;
}

.item-title:hover {
    text-decoration: underline;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    background: #30363d;
    border: 1px solid #30363d;
    text-transform: capitalize;
}

.status-badge.secondary {
    color: #c9d1d9;
    background: #30363d;
    border-color: #30363d;
}

.status-badge.active {
    background: #1f6feb;
    border-color: #1f6feb;
}

.status-badge.success {
    background: #238636;
    border-color: #238636;
}

.status-badge.warning {
    color: #0d1117;
    background: #d29922;
    border-color: #d29922;
}

.status-badge.danger {
    background: #f85149;
    border-color: #f85149;
}

.status-badge.info {
    background: #58a6ff;
    border-color: #58a6ff;
}

.status-badge.large {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* Priority Badge */
.priority-badge {
    font-weight: 500;
    text-transform: capitalize;
}

/* Role Badge */
.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    text-transform: capitalize;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8b949e;
}

.activity-dot[data-type="work_item"] {
    background: #58a6ff;
}

.activity-dot[data-type="review"] {
    background: #a371f7;
}

.activity-dot[data-type="judgment"] {
    background: #238636;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-action {
    font-size: 0.85rem;
    color: #8b949e;
    text-transform: capitalize;
}

.activity-title {
    color: #c9d1d9;
}

.activity-time {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: #30363d;
    border-color: #8b949e;
    color: #ffffff;
}

.quick-action-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Org detail overview */
.overview-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px dashed rgba(88, 166, 255, 0.35);
    border-radius: 6px;
    background: rgba(88, 166, 255, 0.04);
    margin-bottom: 1.25rem;
}

.overview-flow-arrow {
    color: #8b949e;
    font-size: 0.85rem;
}

.overview-empty {
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    background: rgba(177, 186, 196, 0.04);
    margin: -0.5rem 0 1.25rem 0;
}

.overview-empty-title {
    color: #c9d1d9;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.overview-empty-body {
    color: #8b949e;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.overview-empty-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.overview-quick {
    border-top: 1px solid #21262d;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.overview-quick-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.overview-quick-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #c9d1d9;
}

.overview-quick-subtitle {
    color: #8b949e;
    font-size: 0.8rem;
}

.empty-subtitle {
    max-width: 48ch;
    margin: 0.75rem auto 1.25rem auto;
    color: #8b949e;
    font-size: 0.85rem;
    line-height: 1.5;
}

.repo-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.repo-meta.repo-meta-secondary {
    margin-top: 0.35rem;
    color: #6e7681;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #8b949e;
}

/* Form Styles */
.create-form {
    max-width: 800px;
}

.form-section {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #c9d1d9;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 0.75rem;
    color: #c9d1d9;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #58a6ff;
    outline: none;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

.form-section-subtitle {
    margin: -0.5rem 0 1rem 0;
    color: #8b949e;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-helper {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #21262d;
    border-radius: 6px;
    background: rgba(139, 148, 158, 0.06);
    color: #8b949e;
    font-size: 0.85rem;
    line-height: 1.5;
}

.form-helper strong {
    color: #c9d1d9;
    font-weight: 600;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
    background: #0d1117;
}

.input-with-prefix:focus-within {
    border-color: #58a6ff;
}

.input-prefix {
    padding: 0.75rem 0.75rem;
    color: #8b949e;
    font-size: 0.85rem;
    border-right: 1px solid #30363d;
    white-space: nowrap;
}

.input-with-prefix input {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0.75rem;
    flex: 1;
    min-width: 0;
}

.checkbox-label {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid,
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Org create page */
.org-new-callout {
    border: 1px solid #30363d;
    border-left: 4px solid #58a6ff;
    border-radius: 6px;
    background: rgba(88, 166, 255, 0.06);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.org-new-callout-title {
    color: #c9d1d9;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.org-new-callout-body {
    color: #8b949e;
    line-height: 1.5;
}

.org-new-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
    align-items: start;
}

.org-new-layout .create-form {
    max-width: none;
}

.org-new-preview {
    min-width: 0;
}

.org-preview-card {
    display: block;
    text-decoration: none;
}

.org-preview-url {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #21262d;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #8b949e;
    font-size: 0.85rem;
}

.org-preview-url-label {
    color: #c9d1d9;
    font-weight: 600;
    font-size: 0.8rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.security-callout {
    border: 1px solid rgba(210, 153, 34, 0.35);
    border-radius: 6px;
    padding: 0.9rem;
    background: rgba(210, 153, 34, 0.08);
}

.security-callout-header {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.security-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #d29922;
    font-weight: 700;
}

.security-label-sub {
    font-size: 0.8rem;
    color: #8b949e;
}

.org-new-actions .btn-prominent {
    padding: 0.7rem 1.25rem;
    box-shadow: 0 12px 30px rgba(46, 160, 67, 0.25);
}

.org-new-actions .btn-prominent:disabled {
    box-shadow: none;
}

.btn-quiet {
    background: transparent !important;
    border-color: transparent !important;
    color: #8b949e !important;
}

.btn-quiet:hover {
    background: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

@media (max-width: 960px) {
    .org-new-layout {
        grid-template-columns: 1fr;
    }
}

/* Slider Group */
.slider-group {
    margin-bottom: 1.5rem;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #c9d1d9;
    margin-bottom: 0.5rem;
}

.slider-value {
    background: #21262d;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.slider-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    background: #21262d;
    height: 6px;
    border-radius: 3px;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #58a6ff;
    cursor: pointer;
}

.slider-hint {
    display: block;
    font-size: 0.75rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

/* Template Options */
.template-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.template-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-option:hover {
    border-color: #8b949e;
}

.template-option.selected {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
}

.template-option input {
    margin-top: 0.25rem;
}

.template-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
}

.template-name {
    font-weight: 500;
    color: #c9d1d9;
}

.template-desc {
    font-size: 0.85rem;
    color: #8b949e;
}

.template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.template-info-btn {
    border: 1px solid #30363d;
    background: transparent;
    color: #8b949e;
    font-size: 0.72rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.template-info-btn:hover {
    border-color: #58a6ff;
    color: #c9d1d9;
}

.template-info {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: #0b0f14;
    border: 1px solid #1f2a36;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Radio Options */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
}

.radio-option:hover {
    border-color: #8b949e;
}

.radio-option.selected {
    border-color: #58a6ff;
}

.radio-content {
    display: flex;
    flex-direction: column;
}

.radio-title {
    font-weight: 500;
    color: #c9d1d9;
}

.radio-desc {
    font-size: 0.85rem;
    color: #8b949e;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-primary {
    background: #238636;
    color: #ffffff;
    border-color: #238636;
}

.btn-primary:hover {
    background: #2ea043;
}

.btn-secondary {
    background: #21262d;
    color: #c9d1d9;
    border-color: #30363d;
}

.btn-secondary:hover {
    background: #30363d;
    border-color: #8b949e;
}

.btn-danger {
    background: #da3633;
    color: #ffffff;
}

.btn-danger:hover {
    background: #f85149;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Link Styles */
.link-small {
    font-size: 0.85rem;
    color: #58a6ff;
    text-decoration: none;
}

.link-small:hover {
    text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #58a6ff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #30363d;
}

/* Avatar */
.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #c9d1d9;
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Meta Divider */
.meta-divider {
    color: #30363d;
}

/* Notification List */
.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #21262d;
    text-decoration: none;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background: rgba(177, 186, 196, 0.04);
}

.notification-item.unread {
    background: rgba(88, 166, 255, 0.05);
}

.notification-icon {
    color: #8b949e;
    padding-top: 0.25rem;
}

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notification-title {
    font-weight: 500;
    color: #c9d1d9;
}

.notification-message {
    font-size: 0.9rem;
    color: #8b949e;
}

.notification-time {
    font-size: 0.8rem;
    color: #8b949e;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #58a6ff;
}

.unread-badge {
    background: #58a6ff;
    color: #ffffff;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Settings Page */
.settings-layout {
    display: flex;
    gap: 2rem;
}

.settings-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: #c9d1d9;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.settings-nav-item:hover {
    background: #161b22;
}

.settings-nav-item.active {
    background: #21262d;
    color: #ffffff;
}

.settings-content {
    flex: 1;
}

.settings-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.settings-form {
    max-width: 500px;
}

.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #21262d;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-label {
    color: #c9d1d9;
    text-transform: capitalize;
}

.toggle-desc {
    color: #8b949e;
    font-size: 0.85rem;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #21262d;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #8b949e;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #238636;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.section-divider {
    height: 1px;
    background: #21262d;
    margin: 2rem 0;
}

.danger-zone {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f85149;
}

.danger-zone h3 {
    color: #f85149;
    margin-bottom: 1rem;
}

.theme-options {
    display: flex;
    gap: 1rem;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    color: #c9d1d9;
}

.theme-option.selected {
    border-color: #58a6ff;
}

@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
    }
}

/* Profile Bio */
.profile-bio {
    font-size: 0.9rem;
    color: #c9d1d9;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.stat-text {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Project detail: work item tab */
.project-workitems .section-header {
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-workitems-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.project-workitems-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #8b949e;
    font-size: 0.82rem;
}

.project-workitems-sort select {
    min-width: 170px;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #c9d1d9;
}

.project-workitems-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-workitems-item {
    margin: 0;
    width: 100%;
}

.project-workitems-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    text-decoration: none;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.project-workitems-row:hover {
    border-color: #58a6ff;
    background: #111822;
    transform: translateY(-1px);
    text-decoration: none;
}

.project-workitems-rank {
    border: 1px solid #30363d;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    min-width: 2.1rem;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #8b949e;
    background: #11161d;
    font-variant-numeric: tabular-nums;
}

.project-workitems-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.project-workitems-title {
    color: #f0f6fc;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.project-workitems-id {
    color: #8b949e;
    font-size: 0.78rem;
}

.project-workitems-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
    color: #8b949e;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.project-workitems-updated-block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    min-width: 140px;
}

.project-workitems-updated-label {
    color: #6e7681;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-workitems-updated {
    white-space: nowrap;
}

.project-settings {
    display: flex;
    flex-direction: column;
}

.project-settings .section-card h3 {
    margin-bottom: 0.75rem;
}

.project-settings-form {
    max-width: 760px;
}

.project-settings-kv {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #21262d;
}

.project-settings-kv:last-child {
    border-bottom: none;
}

.project-settings-kv span {
    color: #8b949e;
    font-size: 0.88rem;
}

.project-settings-kv strong {
    color: #f0f6fc;
    font-size: 0.92rem;
    text-align: right;
}

.project-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .project-workitems .section-header {
        align-items: flex-start;
    }

    .project-workitems-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .project-workitems-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
    }

    .project-workitems-rank {
        order: 0;
    }

    .project-workitems-main {
        order: 1;
        width: 100%;
    }

    .project-workitems-meta {
        order: 2;
        justify-content: flex-start;
        width: 100%;
    }

    .project-workitems-updated-block {
        align-items: flex-start;
        min-width: 0;
    }

    .project-settings-kv {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-settings-kv strong {
        text-align: left;
    }

    .project-settings-actions {
        justify-content: flex-start;
    }
}

/* Heatmap Placeholder */
.heatmap-placeholder {
    padding: 2rem;
    text-align: center;
    color: #8b949e;
    background: #161b22;
    border-radius: 6px;
}

/* Governance Cards */
.governance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.governance-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.governance-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.governance-card .card-icon {
    color: #8b949e;
}

.governance-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.governance-card p {
    font-size: 0.85rem;
    color: #8b949e;
    margin: 0;
}

/* Role Stats */
.governance-stats .stat-card {
    border-left: 3px solid;
}

.governance-stats .role-curator {
    border-left-color: #4CAF50;
}

.governance-stats .role-verifier {
    border-left-color: #2196F3;
}

.governance-stats .role-releaser {
    border-left-color: #F44336;
}

.stat-desc {
    font-size: 0.75rem;
    color: #8b949e;
    margin-top: 0.5rem;
}

/* Role Legend */
.role-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-desc {
    font-size: 0.8rem;
    color: #8b949e;
    margin-left: 0.5rem;
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
}

.leaderboard-entry.rank-1 {
    border-color: #f7c600;
    background: rgba(247, 198, 0, 0.05);
}

.leaderboard-entry.rank-2 {
    border-color: #c0c0c0;
}

.leaderboard-entry.rank-3 {
    border-color: #cd7f32;
}

.leaderboard-entry .rank {
    font-size: 1rem;
    font-weight: 600;
    color: #8b949e;
    width: 40px;
}

.leaderboard-entry .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.leaderboard-entry .user-name {
    font-weight: 500;
    color: #c9d1d9;
}

.leaderboard-entry .score-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-entry .score {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.leaderboard-entry .change {
    font-size: 0.8rem;
}

.leaderboard-entry .change.positive {
    color: #238636;
}

.leaderboard-entry .change.negative {
    color: #f85149;
}

.event-breakdown {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #8b949e;
}

/* Weight Badge */
.weight-badge {
    background: #238636;
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* My Score Display */
.my-score-display {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-big {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.score-big .number {
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
}

.score-big .label {
    font-size: 1rem;
    color: #8b949e;
}

.rank-info {
    font-size: 0.9rem;
    color: #8b949e;
}

/* Judgment List */
.judgment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.judgment-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.judgment-card:hover {
    border-color: #58a6ff;
}

.judgment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.judgment-id {
    font-weight: 500;
    color: #58a6ff;
}

.judgment-workitem {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.workitem-id {
    font-size: 0.85rem;
    color: #8b949e;
}

.workitem-title {
    color: #c9d1d9;
}

.judgment-result {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1rem;
    background: #161b22;
    border-radius: 6px;
}

.consensus-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.score-label {
    font-size: 0.75rem;
    color: #8b949e;
}

.model-scores {
    display: flex;
    gap: 1rem;
}

.model-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.model-name {
    font-size: 0.75rem;
    color: #8b949e;
}

.model-response {
    font-weight: 500;
}

.model-response.approve {
    color: #238636;
}

.model-response.needs_revision {
    color: #d29922;
}

.model-response.reject {
    color: #f85149;
}

.judgment-meta {
    font-size: 0.85rem;
    color: #8b949e;
}

/* =====================================================
   NEW PAGE STYLES - Governance, Ctxpack, Review, Evidence, Search, Reports
   ===================================================== */

/* Decisions Page */
.decisions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.decision-card {
    display: block;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}

.decision-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.decision-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.decision-type-icon {
    font-size: 1.25rem;
}

.decision-id {
    font-size: 0.85rem;
    color: #8b949e;
}

.decision-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #f0f6fc;
}

.decision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 1rem;
}

.decision-project {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.decision-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.approval-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 300px;
}

.approval-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: #21262d;
    border-radius: 3px;
    overflow: hidden;
}

.approval-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #238636, #3fb950);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.8rem;
    color: #8b949e;
    white-space: nowrap;
}

.decision-date {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Decision Detail Page */
.decision-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.decision-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.decision-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.decision-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.decision-title-row h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.type-badge.type-technical {
    background: rgba(56, 139, 253, 0.15);
    color: #58a6ff;
}

.type-badge.type-governance {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
}

.type-badge.type-process {
    background: rgba(57, 211, 83, 0.15);
    color: #3fb950;
}

.type-badge.type-security {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.decision-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid #30363d;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.75rem;
    color: #8b949e;
    text-transform: uppercase;
}

.meta-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Vote Section */
.vote-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vote-counts {
    display: flex;
    gap: 1.5rem;
}

.vote-count {
    font-weight: 500;
}

.vote-count.approve {
    color: #3fb950;
}

.vote-count.changes {
    color: #d29922;
}

.vote-count.reject {
    color: #f85149;
}

.vote-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.vote-progress .progress-bar.large {
    width: 200px;
    height: 8px;
}

.votes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vote-item {
    padding: 1rem;
    background: #21262d;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.vote-item.vote-approve {
    border-left-color: #3fb950;
}

.vote-item.vote-reject {
    border-left-color: #f85149;
}

.vote-item.vote-request_changes {
    border-left-color: #d29922;
}

.vote-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.vote-user {
    font-weight: 500;
}

.vote-badge {
    font-size: 0.8rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.vote-badge.approve {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.vote-badge.reject {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.vote-badge.request_changes {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.vote-time {
    font-size: 0.8rem;
    color: #8b949e;
    margin-left: auto;
}

.vote-comment {
    color: #8b949e;
    font-size: 0.95rem;
}

.vote-actions {
    display: flex;
    gap: 1rem;
}

/* Decision Sidebar */
.decision-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
}

.sidebar-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #8b949e;
    text-transform: uppercase;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.related-item:hover {
    background: #21262d;
}

.related-type {
    font-size: 1.1rem;
}

.related-info {
    display: flex;
    flex-direction: column;
}

.related-id {
    font-size: 0.8rem;
    color: #8b949e;
}

.related-title {
    font-size: 0.9rem;
    color: #f0f6fc;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-full {
    width: 100%;
}

.mini-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.timeline-entry .timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #30363d;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.timeline-info {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.timeline-date {
    font-size: 0.8rem;
    color: #8b949e;
}

.timeline-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    color: #c9d1d9;
}

.timeline-link {
    color: #58a6ff;
    text-decoration: none;
}

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

.timeline-changes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.45rem;
    padding-left: 0.75rem;
    border-left: 2px solid #21262d;
}

.timeline-change-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.timeline-change-field {
    color: #8b949e;
    font-size: 0.78rem;
}

.timeline-change-values {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    color: #c9d1d9;
    font-size: 0.82rem;
}

.timeline-change-from,
.timeline-change-to {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #11161d;
    border: 1px solid #21262d;
    border-radius: 6px;
    padding: 0.05rem 0.35rem;
    overflow-wrap: anywhere;
}

.timeline-change-arrow {
    color: #6e7681;
}

.timeline-change-more {
    margin-top: 0.2rem;
    color: #8b949e;
    font-size: 0.78rem;
}

/* Policy List */
.policy-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.policy-card {
    display: block;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.policy-card:hover {
    border-color: #58a6ff;
}

.policy-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.policy-icon {
    font-size: 1.5rem;
}

.policy-title-group {
    flex: 1;
}

.policy-title-group h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.policy-id {
    font-size: 0.8rem;
    color: #8b949e;
}

.policy-description {
    color: #8b949e;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.policy-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.policy-meta {
    display: flex;
    gap: 1rem;
}

.policy-version,
.policy-rules {
    font-size: 0.85rem;
    color: #8b949e;
}

.policy-updated {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
    color: #8b949e;
}

/* Approvals List */
.approvals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approval-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
}

.approval-card.status-pending {
    border-left: 3px solid #d29922;
}

.approval-card.status-approved {
    border-left: 3px solid #3fb950;
}

.approval-card.status-rejected {
    border-left: 3px solid #f85149;
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.approval-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.type-icon {
    font-size: 1.1rem;
}

.type-label {
    font-size: 0.8rem;
    color: #8b949e;
    text-transform: uppercase;
}

.approval-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.approval-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.detail-label {
    color: #8b949e;
    min-width: 100px;
}

.detail-value {
    color: #f0f6fc;
}

.approval-progress {
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.approver-list {
    color: #8b949e;
    font-size: 0.85rem;
}

.rejection-info {
    background: rgba(248, 81, 73, 0.1);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.rejection-label {
    font-size: 0.8rem;
    color: #f85149;
    text-transform: uppercase;
}

.rejection-reason {
    color: #f0f6fc;
    margin: 0.5rem 0;
}

.rejected-by {
    font-size: 0.8rem;
    color: #8b949e;
}

.approval-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.approval-time {
    font-size: 0.8rem;
    color: #8b949e;
}

.approval-actions {
    display: flex;
    gap: 0.5rem;
}

/* Context Packs */
.tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-option {
    border: 1px solid #30363d;
    background: #0d1117;
    color: #c9d1d9;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.tag-option.selected {
    border-color: #58a6ff;
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.08);
}

.ctxpack-container {
    display: grid;
    gap: 1rem;
}

.ctxpack-container.grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.ctxpack-container.list {
    grid-template-columns: 1fr;
}

.ctxpack-card {
    display: block;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}

.ctxpack-card:hover {
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.ctxpack-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ctxpack-icon {
    font-size: 2rem;
}

.ctxpack-title-group {
    flex: 1;
}

.ctxpack-title-group h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ctxpack-version {
    font-size: 0.8rem;
    color: #8b949e;
}

.ctxpack-description {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.ctxpack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ctxpack-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ctxpack-meta {
    display: flex;
    gap: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #8b949e;
}

.ctxpack-updated {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Ctxpack Detail */
.ctxpack-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ctxpack-icon-large {
    font-size: 4rem;
}

.ctxpack-info {
    flex: 1;
}

.ctxpack-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.ctxpack-title-row h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

.ctxpack-subtitle {
    color: #8b949e;
    margin-bottom: 1rem;
}

.ctxpack-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #8b949e;
}

.ctxpack-actions {
    display: flex;
    gap: 0.75rem;
}

.ctxpack-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.file-tree {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #21262d;
    border-radius: 4px;
}

.file-icon {
    font-size: 1rem;
}

.file-name {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: #8b949e;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.changelog-entry {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #30363d;
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.changelog-version {
    font-weight: 600;
    color: #58a6ff;
}

.changelog-date {
    font-size: 0.85rem;
    color: #8b949e;
}

.changelog-changes {
    list-style: disc;
    padding-left: 1.5rem;
    color: #8b949e;
}

.changelog-changes li {
    margin-bottom: 0.25rem;
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #21262d;
    border-radius: 4px;
    transition: background 0.2s;
}

.usage-item:hover {
    background: #30363d;
}

.usage-icon {
    font-size: 1.1rem;
}

.usage-name {
    color: #f0f6fc;
}

/* Import Page */
.import-method-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #8b949e;
    cursor: pointer;
    transition: all 0.2s;
}

.method-tab:hover {
    border-color: #58a6ff;
    color: #f0f6fc;
}

.method-tab.active {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
    color: #58a6ff;
}

.method-icon {
    font-size: 1.25rem;
}

.import-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.file-upload-area {
    position: relative;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border: 2px dashed #30363d;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.file-upload-label:hover {
    border-color: #58a6ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: #8b949e;
}

.upload-limit {
    font-size: 0.8rem;
    color: #8b949e;
    margin-top: 0.5rem;
}

.url-input-group {
    display: flex;
    gap: 0.75rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #f0f6fc;
    font-size: 0.95rem;
}

.url-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.url-examples code {
    background: #21262d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #8b949e;
}

.examples-label {
    color: #8b949e;
    margin-right: 0.5rem;
}

.registry-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.registry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #21262d;
    border-radius: 6px;
}

.registry-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.registry-info p {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 0.5rem;
}

.registry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #8b949e;
}

.preview-panel {
    background: #0d1117;
    border-color: #58a6ff;
}

.preview-content {
    margin-bottom: 1rem;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.preview-icon {
    font-size: 2rem;
}

.preview-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.preview-version {
    font-size: 0.85rem;
    color: #8b949e;
}

.preview-description {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-detail {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.preview-actions {
    display: flex;
    gap: 0.75rem;
}

/* Export Page */
.export-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.export-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.format-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #21262d;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.format-option:hover {
    border-color: #30363d;
}

.format-option.selected {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.05);
}

.format-option input {
    display: none;
}

.format-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.format-icon {
    font-size: 1.5rem;
}

.format-info {
    display: flex;
    flex-direction: column;
}

.format-name {
    font-weight: 500;
}

.format-desc {
    font-size: 0.85rem;
    color: #8b949e;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.summary-label {
    color: #8b949e;
}

.summary-value {
    color: #f0f6fc;
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #f0f6fc;
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #30363d;
}

.share-icon {
    font-size: 1rem;
}

/* Reviews */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    display: block;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.review-card:hover {
    border-color: #58a6ff;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.review-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-title-group h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority-indicator.priority-critical {
    background: #f85149;
}

.priority-indicator.priority-high {
    background: #db6d28;
}

.priority-indicator.priority-medium {
    background: #d29922;
}

.priority-indicator.priority-low {
    background: #3fb950;
}

.review-meta {
    margin-bottom: 0.75rem;
}

.workitem-link {
    font-size: 0.9rem;
    color: #58a6ff;
}

.review-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.avatar-tiny {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.review-reviewers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reviewers-label {
    font-size: 0.85rem;
    color: #8b949e;
    margin-right: 0.5rem;
}

.more-reviewers {
    font-size: 0.8rem;
    color: #8b949e;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #8b949e;
}

.ai-score {
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.ai-score.score-excellent {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.ai-score.score-good {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.ai-score.score-fair {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.ai-score.score-poor {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.review-time {
    font-size: 0.8rem;
    color: #8b949e;
}

/* Review Detail */
.review-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.review-title-section h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.review-badges {
    display: flex;
    gap: 0.5rem;
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.priority-badge.priority-critical {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.priority-badge.priority-high {
    background: rgba(219, 109, 40, 0.15);
    color: #db6d28;
}

.priority-badge.priority-medium {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.priority-badge.priority-low {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.review-description {
    color: #8b949e;
    margin-bottom: 1.5rem;
}

.reviewers-section {
    margin-bottom: 1.5rem;
}

.reviewers-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b949e;
    margin-bottom: 0.75rem;
}

.reviewers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.reviewer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #21262d;
    border-radius: 6px;
}

.reviewer-name {
    font-size: 0.9rem;
}

.reviewer-status {
    font-size: 0.8rem;
}

.reviewer-status.approved {
    color: #3fb950;
}

.reviewer-status.pending {
    color: #8b949e;
}

.reviewer-status.changes_requested {
    color: #d29922;
}

.review-actions {
    display: flex;
    gap: 0.75rem;
}

.changes-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #21262d;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.changes-summary .additions {
    color: #3fb950;
    font-weight: 500;
}

.changes-summary .deletions {
    color: #f85149;
    font-weight: 500;
}

.files-count {
    color: #8b949e;
}

.file-changes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-change-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #21262d;
    border-radius: 4px;
}

.file-type-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.file-type-badge.modified {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.file-type-badge.added {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
}

.file-type-badge.deleted {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

.file-path {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
}

.change-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.change-stats .additions {
    color: #3fb950;
}

.change-stats .deletions {
    color: #f85149;
}

/* AI Analysis Section */
.ai-analysis-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ai-summary {
    color: #8b949e;
    margin-bottom: 1rem;
}

.ai-scores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.ai-score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: #21262d;
    border-radius: 6px;
}

.ai-score-card .score-value {
    font-size: 2rem;
    font-weight: 600;
    color: #58a6ff;
}

.ai-score-card .score-label {
    font-size: 0.85rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

.analysis-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.analysis-list {
    padding-left: 1.5rem;
}

.analysis-list li {
    margin-bottom: 0.5rem;
    color: #8b949e;
}

.analysis-list.strengths li::marker {
    color: #3fb950;
}

.analysis-list.concerns li::marker {
    color: #d29922;
}

/* Evidence */
.evidence-table .evidence-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.evidence-icon {
    font-size: 1.25rem;
}

.evidence-info {
    display: flex;
    flex-direction: column;
}

.evidence-title {
    font-weight: 500;
}

.evidence-id {
    font-size: 0.8rem;
    color: #8b949e;
}

.format-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.uploaded-info {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.uploaded-by {
    color: #8b949e;
}

/* Evidence Detail */
.evidence-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.evidence-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.evidence-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.evidence-icon-large {
    font-size: 3rem;
}

.evidence-description {
    color: #8b949e;
    margin-bottom: 0.75rem;
}

.evidence-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.evidence-preview {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #8b949e;
}

.preview-placeholder .preview-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.verification-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.verification-actions {
    display: flex;
    gap: 0.75rem;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    gap: 1rem;
}

.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #30363d;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.history-action {
    text-transform: capitalize;
    font-weight: 500;
}

.history-action.action-uploaded {
    color: #58a6ff;
}

.history-action.action-review_started {
    color: #d29922;
}

.history-action.action-verified {
    color: #3fb950;
}

.history-action.action-rejected {
    color: #f85149;
}

.history-time {
    font-size: 0.8rem;
    color: #8b949e;
}

.history-by {
    font-size: 0.85rem;
    color: #8b949e;
}

.history-note {
    font-size: 0.9rem;
    color: #8b949e;
    margin-top: 0.25rem;
}

.evidence-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-link {
    color: #58a6ff;
}

.detail-hash {
    font-size: 0.75rem;
    background: #21262d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}

.metadata-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.linked-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.linked-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.linked-item:hover {
    background: #21262d;
}

.linked-icon {
    font-size: 1rem;
}

.linked-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.linked-id {
    font-size: 0.75rem;
    color: #8b949e;
}

.linked-title {
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.verified {
    background: #3fb950;
}

.status-dot.pending {
    background: #d29922;
}

.status-dot.rejected {
    background: #f85149;
}

/* Evidence Upload */
.evidence-upload-form {
    margin-top: 1rem;
}

.form-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
}

.form-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-drop-zone {
    position: relative;
}

.file-drop-zone.has-file .file-upload-label {
    display: none;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #21262d;
    border-radius: 6px;
}

.file-preview .file-icon {
    font-size: 2rem;
}

.file-preview .file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-preview .file-name {
    font-weight: 500;
}

.file-preview .file-size {
    font-size: 0.85rem;
    color: #8b949e;
}

.type-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.type-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #21262d;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.type-option:hover {
    border-color: #30363d;
}

.type-option.selected {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.05);
}

.type-option input {
    display: none;
}

.type-info {
    display: flex;
    flex-direction: column;
}

.type-desc {
    font-size: 0.8rem;
    color: #8b949e;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Search Page */
.search-form-large {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.search-input-group svg {
    margin-left: 0.5rem;
    color: #8b949e;
}

.search-input-large {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: #f0f6fc;
    font-size: 1rem;
    outline: none;
}

.search-filters {
    display: flex;
    gap: 0.75rem;
}

.search-filters select {
    padding: 0.5rem 1rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #f0f6fc;
    font-size: 0.9rem;
}

.search-results {
    margin-top: 1.5rem;
}

.result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #30363d;
    padding-bottom: 0.5rem;
}

.result-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #8b949e;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.result-tab:hover {
    color: #f0f6fc;
    background: #21262d;
}

.result-tab.active {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.result-item:hover {
    border-color: #58a6ff;
}

.result-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-id {
    font-size: 0.85rem;
    color: #8b949e;
}

.result-title {
    font-weight: 500;
    font-size: 1rem;
}

.result-description {
    font-size: 0.9rem;
    color: #8b949e;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.search-empty-state h2 {
    margin-bottom: 0.5rem;
}

.search-empty-state p {
    color: #8b949e;
    margin-bottom: 2rem;
}

.search-tips {
    background: #161b22;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: left;
}

.search-tips h3 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.search-tips ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: #8b949e;
}

.search-tips li {
    margin-bottom: 0.5rem;
}

/* Reports Page */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.report-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1.25rem;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.report-icon {
    font-size: 1.5rem;
}

.frequency-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    text-transform: capitalize;
}

.frequency-badge.info {
    background: rgba(88, 166, 255, 0.15);
    color: #58a6ff;
}

.frequency-badge.secondary {
    background: rgba(139, 148, 158, 0.15);
    color: #8b949e;
}

.frequency-badge.warning {
    background: rgba(210, 153, 34, 0.15);
    color: #d29922;
}

.report-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.report-description {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.report-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-category,
.report-format {
    font-size: 0.8rem;
    color: #8b949e;
    text-transform: capitalize;
}

.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.last-generated {
    font-size: 0.8rem;
    color: #8b949e;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

/* Custom Report */
.custom-report-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
}

.field-selector {
    margin-top: 1rem;
}

.field-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.field-actions {
    display: flex;
    gap: 0.5rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.field-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.field-option:hover {
    border-color: #58a6ff;
}

.field-option.selected {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
    color: #58a6ff;
}

.field-option input {
    display: none;
}

.preview-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-label {
    font-size: 0.75rem;
    color: #8b949e;
    text-transform: uppercase;
}

.preview-value {
    color: #f0f6fc;
}

.selected-fields-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #30363d;
}

.selected-fields-preview h4 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.field-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.field-tag {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .decision-detail-layout,
    .evidence-detail-layout,
    .export-layout,
    .form-layout,
    .custom-report-layout {
        grid-template-columns: 1fr;
    }

    .decision-sidebar,
    .evidence-sidebar,
    .export-sidebar,
    .form-sidebar {
        order: -1;
    }

    .analysis-columns {
        grid-template-columns: 1fr;
    }

    .ai-scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .import-method-tabs {
        flex-direction: column;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .ai-scores-grid {
        grid-template-columns: 1fr;
    }

    .field-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Work Item Detail */
.workitem-detail-page .workitem-header {
    margin-bottom: 1rem;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    padding: 1rem 1.1rem;
}

.workitem-detail-page .workitem-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workitem-detail-page .workitem-title-row h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.25;
}

.workitem-detail-page .workitem-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.55rem;
    color: #8b949e;
    font-size: 0.85rem;
}

.workitem-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.workitem-fact {
    display: inline-flex;
    align-items: center;
    border: 1px solid #30363d;
    border-radius: 999px;
    background: #111822;
    color: #c9d1d9;
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
}

.workitem-error-state {
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
}

.workitem-error-state h3 {
    margin-bottom: 0.4rem;
    color: #f0f6fc;
}

.workitem-error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.workitem-inline-notice {
    border: 1px solid #30363d;
    border-left: 4px solid #1f6feb;
    border-radius: 8px;
    background: rgba(31, 111, 235, 0.12);
    color: #c9d1d9;
    padding: 0.7rem 0.85rem;
    font-size: 0.86rem;
    line-height: 1.45;
}

.workitem-tab-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #21262d;
}

.workitem-tab-btn {
    appearance: none;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 999px;
    color: #8b949e;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.workitem-tab-btn:hover {
    color: #c9d1d9;
    border-color: #8b949e;
}

.workitem-tab-btn.active {
    background: rgba(31, 111, 235, 0.2);
    color: #f0f6fc;
    border-color: #1f6feb;
    font-weight: 600;
}

.workitem-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.25rem;
    align-items: start;
}

.workitem-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.workitem-detail-card,
.activity-timeline,
.ai-judgment-panel {
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    padding: 1rem 1.05rem;
}

.workitem-detail-card h3,
.activity-timeline h3,
.ai-judgment-panel h3 {
    margin: 0 0 0.75rem 0;
}

.workitem-overview-card {
    padding-bottom: 0.8rem;
}

.workitem-overview-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
}

.workitem-overview-item {
    border: 1px solid #2d333b;
    border-radius: 8px;
    background: #11161d;
    padding: 0.55rem 0.65rem;
    min-width: 0;
}

.workitem-overview-item dt {
    color: #8b949e;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 0.25rem 0;
}

.workitem-overview-item dd {
    margin: 0;
    color: #f0f6fc;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.workitem-description-body {
    color: #c9d1d9;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 160px;
}

.workitem-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.workitem-related-card {
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    padding: 0.9rem 1rem;
    min-width: 0;
}

.workitem-related-card h4 {
    margin: 0 0 0.7rem 0;
}

.workitem-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.workitem-related-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.workitem-related-stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.workitem-related-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    border: 1px solid #2d333b;
    border-radius: 6px;
    background: #11161d;
    padding: 0.55rem 0.6rem;
}

.workitem-related-item:hover {
    border-color: #58a6ff;
}

.workitem-related-main {
    color: #c9d1d9;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.workitem-related-meta {
    color: #8b949e;
    font-size: 0.76rem;
}

.workitem-related-note {
    color: #8b949e;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.workitem-related-more {
    margin-top: 0.55rem;
    color: #8b949e;
    font-size: 0.8rem;
}

.workitem-related-toggle {
    margin-top: 0.55rem;
}

.workitem-related-actions {
    flex: none;
    align-self: flex-start;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.workitem-related-editor {
    border: 1px solid #2d333b;
    border-radius: 6px;
    background: #0b0f14;
    padding: 0.6rem;
}

.workitem-related-editor textarea {
    width: 100%;
    resize: vertical;
}

.workitem-related-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.workitem-sidebar {
    position: sticky;
    top: 84px;
}

.workitem-sidebar .sidebar-section {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.workitem-sidebar .sidebar-section h4 {
    margin-bottom: 0.75rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6);
}

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

.metadata-item .label {
    color: #8b949e;
    font-size: 0.85rem;
}

.metadata-item .value {
    color: #c9d1d9;
    font-weight: 500;
    text-align: right;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-buttons .btn-block {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1080px) {
    .workitem-overview-grid {
        grid-template-columns: 1fr;
    }

    .workitem-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .workitem-content {
        grid-template-columns: 1fr;
    }

    .workitem-sidebar {
        position: static;
    }
}
