:root {
    --primary-color: #0a0e17;
    --secondary-color: #00d2ff;
    --accent-color: #3a7bd5;
    --bg-color: #0a0e17;
    --bg-gradient: radial-gradient(circle at top, #1e293b 0%, #0a0e17 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --success: #22c55e;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --bg-surface: rgba(255, 255, 255, 0.05);
    --bg-surface-soft: rgba(255, 255, 255, 0.02);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

nav {
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: 100%;
}

thead tr {
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-brand img {
    mix-blend-mode: screen;
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color);
}

.container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -1px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    transition: all 0.2s;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

option {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: inherit;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
}

.type-epic { color: #a855f7; border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.1); }
.type-bug { color: #ef4444; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.1); }
.type-story { color: #22c55e; border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }
.type-request { color: #3b82f6; border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.1); }
.type-test_plan { color: #eab308; border-color: rgba(234, 179, 8, 0.4); background: rgba(234, 179, 8, 0.1); }
.type-test_case { color: #f97316; border-color: rgba(249, 115, 22, 0.4); background: rgba(249, 115, 22, 0.1); }
.type-test_run { color: #06b6d4; border-color: rgba(6, 182, 212, 0.4); background: rgba(6, 182, 212, 0.1); }

.status-open {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.status-planned {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    color: #1e293b;
}

.status-estimated {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.status-agreed {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.status-in_progress {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #fb923c;
}

.status-done, .status-resolved, .status-completed, .status-passed {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.status-cancelled, .status-skipped {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.5);
    color: #9ca3af;
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* Explicit styles for select elements to ensure backgrounds show when collapsed */
select.status-open { background-color: #1e3a8a !important; color: #60a5fa !important; border-color: #2563eb !important; }
select.status-planned { background-color: #f8fafc !important; color: #1e293b !important; border-color: #cbd5e1 !important; }
select.status-estimated { background-color: #78350f !important; color: #fbbf24 !important; border-color: #b45309 !important; }
select.status-agreed { background-color: #064e3b !important; color: #34d399 !important; border-color: #059669 !important; }
select.status-in_progress { background-color: #7c2d12 !important; color: #fb923c !important; border-color: #ea580c !important; }
select.status-passed, select.status-done, select.status-resolved { background-color: #065f46 !important; color: #4ade80 !important; border-color: #059669 !important; }
select.status-failed { background-color: #7f1d1d !important; color: #f87171 !important; border-color: #dc2626 !important; }
select.status-cancelled, select.status-skipped { background-color: #374151 !important; color: #9ca3af !important; border-color: #4b5563 !important; }

/* Type dropdown styles */
select.type-epic { background-color: #581c87 !important; color: #a855f7 !important; border-color: #7e22ce !important; }
select.type-bug { background-color: #7f1d1d !important; color: #ef4444 !important; border-color: #dc2626 !important; }
select.type-story { background-color: #064e3b !important; color: #22c55e !important; border-color: #16a34a !important; }
select.type-request { background-color: #1e3a8a !important; color: #3b82f6 !important; border-color: #2563eb !important; }

/* Dropdown option styles */
select option {
    background-color: #1a1d21;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

select option.status-open { background-color: #1e3a8a; color: #60a5fa; }
select option.status-planned { background-color: #f8fafc; color: #1e293b; }
select option.status-estimated { background-color: #78350f; color: #fbbf24; }
select option.status-agreed { background-color: #064e3b; color: #34d399; }
select option.status-in_progress { background-color: #7c2d12; color: #fb923c; }
select option.status-passed, select option.status-done, select option.status-resolved { background-color: #065f46; color: #4ade80; }
select option.status-failed { background-color: #7f1d1d; color: #f87171; }
select option.status-cancelled, select option.status-skipped { background-color: #374151; color: #9ca3af; }

/* Type option styles */
select option.type-epic { background-color: #581c87; color: #a855f7; }
select option.type-bug { background-color: #7f1d1d; color: #ef4444; }
select option.type-story { background-color: #064e3b; color: #22c55e; }
select option.type-request { background-color: #1e3a8a; color: #3b82f6; }
select option.type-test_plan { background-color: #713f12; color: #eab308; }
select option.type-test_case { background-color: #7c2d12; color: #f97316; }
select option.type-test_run { background-color: #164e63; color: #06b6d4; }

.request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.comment {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-color);
}

.comment-author {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.comment-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.epic-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.task-list {
    margin-top: 1rem;
    padding-left: 1rem;
}

.task-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.markdown-body {
    line-height: 1.6;
    color: var(--text-primary);
    font-family: inherit;
}

.markdown-body p {
    margin-bottom: 0.5rem;
}

.markdown-body p:last-child {
    margin-bottom: 0;
}

.markdown-body strong {
    font-weight: 600;
}

.markdown-body em {
    font-style: italic;
}

.markdown-body code {
    background: var(--bg-surface);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
}

.markdown-body pre {
    background: var(--bg-surface);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-body p,
.markdown-body li,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    background: transparent !important;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-surface-soft) !important;
}

.mermaid {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    overflow: hidden;
}

.mermaid svg {
    max-width: 100% !important;
    height: auto !important;
    max-height: 500px;
}