:root {
    --bg-color: #2a0a12;
    /* Deep Burgundy/Rose */
    --sidebar-bg: #4c0519;
    /* Rose-950/Mixed */
    --card-bg: rgba(76, 5, 25, 0.6);
    --text-primary: #fff1f2;
    /* Rose-50 */
    --text-secondary: #fda4af;
    /* Rose-300 */
    --accent-color: #f43f5e;
    /* Rose-500 */
    --accent-hover: #e11d48;
    /* Rose-600 */
    --success-color: #10b981;
    /* Emerald-500 */
    --danger-color: #ef4444;
    /* Red-500 */
    --border-color: #881337;
    /* Rose-900 */
    --glass-border: rgba(255, 200, 200, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(340, 60%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(330, 60%, 20%, 1) 0, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Prevents body scroll, relies on children scrolling */
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.nav-links li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.nav-links li.active {
    background-color: rgba(244, 63, 94, 0.2);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    /* Hint for Easter Egg */
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), #881337);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

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

.user-info .name {
    font-size: 0.875rem;
    font-weight: 500;
}

.user-info .role {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.project-name {
    font-weight: 500;
    color: var(--text-primary);
}

.separator {
    margin: 0 0.5rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    transition: transform 0.1s, background-color 0.2s, box-shadow 0.2s;
}

button:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

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

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ticket Container & Sections */
.ticket-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 4rem;
}

.glass-panel {
    background-color: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Ticket Specifics */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ticket-id {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.ticket-status-badge {
    background-color: rgba(244, 63, 94, 0.15);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.ticket-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #fca5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.meta-item .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-item .value {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.high-priority {
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(244, 63, 94, 0.4);
}

.avatar-small {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #881337, #4c0519);
    border-radius: 50%;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-tag {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Description */
.ticket-description h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.ticket-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.checklist {
    list-style: none;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.checklist input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 4px;
}

/* Actions */
.ticket-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    position: relative;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 0.75rem 2rem;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.6);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Sections: Retrospective & Roadmap */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
    font-size: 1.25rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.badge.success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge.warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Kanban Styles (Retro) */
.kanban-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.column h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kanban-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: transform 0.2s;
}

.kanban-card:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.card-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.card-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

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

.metrics-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metrics-list li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Roadmap Styles */
.roadmap-timeline {
    position: relative;
    padding-left: 2rem;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2.9rem;
    width: 30px;
    height: 30px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 2;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.timeline-content h4 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

/* OKR Styles */
.okr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.okr-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.okr-card h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background-color: var(--success-color);
}

.okr-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Comments */
.comments-section h3 {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.comment {
    display: flex;
    gap: 1rem;
}

.comment-content {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    flex-grow: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.comment-content p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.4);
}

.modal-content h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-actions {
    margin-top: 2rem;
}

#close-modal {
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: auto;
        /* Restore scroll on body for mobile */
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .logo {
        margin-bottom: 0;
        font-size: 1rem;
        white-space: nowrap;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile */
    }

    .user-profile {
        padding-top: 0;
        border-top: none;
    }

    .user-info {
        display: none;
        /* Hide name text to save space */
    }

    .main-content {
        padding: 1rem;
        overflow-y: visible;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .actions {
        width: 100%;
        justify-content: space-between;
    }

    .ticket-container {
        gap: 1.5rem;
        padding-bottom: 6rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

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

    .ticket-title {
        font-size: 1.75rem;
    }

    .ticket-meta {
        gap: 1rem;
        flex-direction: column;
    }

    .meta-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 0.5rem;
    }

    .ticket-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .ticket-actions button {
        width: 100%;
        text-align: center;
    }

    .kanban-columns {
        grid-template-columns: 1fr;
    }

    .roadmap-timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -2.35rem;
        width: 24px;
        height: 24px;
    }

    .okr-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}