/* Project Manager - Custom Styles */
/* Prefer Bootstrap 5 utilities before adding custom CSS here. */

/* Clickable grid rows */
.cursor-pointer { cursor: pointer; }
.cursor-pointer:hover { background-color: #f8fafc; }

/* ── CSS Custom Properties ── */
:root {
    --bs-primary: #1565d8;
    --bs-body-bg: #f8f9fa;
    --bs-border-radius: 0.75rem;
    --category-critical: #1565d8;
    --category-future: #7c3aed;
    --category-nice: #64748b;
    --status-done: #16a34a;
    --status-progress: #2563eb;
    --status-blocked: #dc2626;
    --status-notstarted: #94a3b8;
    --status-review: #d97706;
}

body {
    background: var(--bs-body-bg);
}

/* ── Navbar ── */
.navbar {
    background: #0f172a !important;
    height: 56px;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ── Sidebar ── */
.sidebar {
    background: #0f172a;
    min-height: 100vh;
    padding: 0.75rem;
    position: fixed;
    width: 240px;
    top: 56px;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: 0.6rem;
    color: #475569;
    padding: 0.5rem 0.75rem 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-nav .nav-link {
    color: #94a3b8;
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav .nav-link:hover {
    background: #1e293b;
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: #1565d8;
    color: #fff;
}

.sidebar-nav .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* ── Company Selector ── */
.company-selector {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.company-selector:hover {
    background: #253348;
}

.company-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Project Items in Sidebar ── */
.project-item {
    color: #94a3b8;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem 0.35rem 2.25rem;
    border-radius: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-item:hover {
    background: #1e293b;
    color: #cbd5e1;
}

.project-item.active {
    background: #1e3a5f;
    color: #93c5fd;
}

.project-type-icon {
    font-size: 0.7rem;
}

.project-type-badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    margin-left: auto;
}

.project-type-badge.roadmap {
    background: #1e3a5f;
    color: #93c5fd;
}

.project-type-badge.standard {
    background: #1e293b;
    color: #94a3b8;
}

/* ── Main Content ── */
.main-content {
    margin-left: 240px;
    margin-top: 56px;
    padding: 1.5rem 2rem;
}

/* ── KPI Cards ── */
.kpi-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.kpi-card .kpi-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* ── Category Sections ── */
.category-section {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.category-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.category-header:hover {
    background: #f1f5f9;
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.category-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.category-count {
    font-size: 0.78rem;
    color: #94a3b8;
}

.progress-mini {
    width: 100px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-mini-bar {
    height: 100%;
    border-radius: 3px;
}

/* ── Feature Rows ── */
.feature-row {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.feature-row:hover {
    background: #f8fafc;
    color: inherit;
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.feature-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: #1e293b;
}

.feature-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ── Status Badges ── */
.status-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.status-done {
    background: #dcfce7;
    color: #166534;
}

.status-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

.status-notstarted {
    background: #f1f5f9;
    color: #64748b;
}

.status-review {
    background: #fef3c7;
    color: #92400e;
}

/* ── Tag Badges ── */
.tag-badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.tag-quoted {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.tag-blocker {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ── Avatars ── */
.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
}

.avatar.assigned {
    background: #dbeafe;
    color: #1e40af;
}

.task-progress-text {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* ── Search Bar ── */
.search-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.85rem;
}

/* ── Filter & Action Buttons ── */
.filter-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
}

.filter-btn:hover {
    background: #f1f5f9;
}

.filter-btn.active {
    background: #1565d8;
    color: #fff;
    border-color: #1565d8;
}

.add-btn {
    background: #1565d8;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.add-btn:hover {
    background: #1255b8;
}

/* ── Detail Page ── */
.detail-header {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.breadcrumb-nav {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
}

.breadcrumb-nav a {
    color: #1565d8;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.detail-meta {
    font-size: 0.82rem;
    color: #64748b;
}

.detail-meta img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin: 0.25rem 0;
    cursor: pointer;
    object-fit: cover;
}

.detail-meta img:hover {
    opacity: 0.8;
}

.detail-meta p {
    margin: 0 0 0.25rem 0;
}

.detail-meta p:last-child {
    margin-bottom: 0;
}

.ai-improve-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    cursor: pointer;
    color: #7c3aed;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ai-improve-btn:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}

.ai-improve-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-improve-btn .spinner-border {
    width: 0.7rem;
    height: 0.7rem;
    border-width: 0.1em;
}

.section-toggle {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.section-toggle:hover h6 {
    color: #1565d8;
}

.editable-field {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: background 0.15s ease;
}

.editable-field:hover {
    background: #f1f5f9;
}

.detail-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.detail-card h6 {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
}

/* ── Task Items ── */
.task-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.task-check {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.task-check.done {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.task-name {
    font-size: 0.82rem;
    color: #1e293b;
    flex: 1;
}

.task-name.done {
    text-decoration: line-through;
    color: #94a3b8;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.78rem;
    color: #94a3b8;
}

.info-value {
    font-size: 0.78rem;
    color: #1e293b;
    font-weight: 500;
}

.note-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.65rem;
    font-size: 0.82rem;
    color: #475569;
    min-height: 60px;
}

/* ── Time Tracking ── */
.time-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
}

.time-entry:last-child {
    border-bottom: none;
}

.time-hours {
    font-weight: 700;
    color: #1e293b;
    min-width: 45px;
}

.time-note {
    color: #64748b;
    flex: 1;
}

.time-date {
    color: #94a3b8;
    font-size: 0.72rem;
}

.timer-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Active timer row highlight */
.task-item.timer-active,
.std-task-row.timer-active,
.feature-row.timer-active {
    background: #eff6ff;
}

/* Navbar active timer indicator */
.navbar-timer-indicator {
    background: #1e293b;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.5rem;
}

.navbar-timer-indicator .recording-dot {
    color: #f44336;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.timer-btn.running {
    background: #dc2626;
}

.timer-btn:hover {
    opacity: 0.9;
}

.timer-display {
    font-family: 'Cascadia Code', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.03em;
}

.timer-display.running {
    color: #dc2626;
}

/* ── Standard Project Task Rows ── */
.std-task-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.std-task-row:hover {
    background: #f8fafc;
}

.std-task-row:last-child {
    border-bottom: none;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Company Cards ── */
.company-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.company-card-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Sidebar Divider ── */
.sidebar hr {
    border-color: #334155;
    margin: 0.5rem 0;
}

/* ── User Selector in Navbar ── */
.user-selector {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    color: #e2e8f0;
    font-size: 0.78rem;
    cursor: pointer;
}

.user-selector:focus {
    outline: 2px solid #1565d8;
    outline-offset: 2px;
}

/* ── Company Selector Dropdown ── */
.company-dropdown {
    position: relative;
}

.company-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    z-index: 200;
    padding: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.company-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.4rem;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.company-dropdown-item:hover {
    background: #334155;
    color: #e2e8f0;
}

.company-dropdown-item.active {
    background: #1565d8;
    color: #fff;
}

/* ── Blazor Error UI ── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Punch List ── */
.punch-section {
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.punch-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.punch-header-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.punch-count {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    background: #fee2e2;
    color: #991b1b;
}

.punch-count.resolved {
    background: #dcfce7;
    color: #166534;
}

.punch-item {
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

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

.punch-item:hover {
    background: #fafafa;
}

.punch-item-header {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.punch-check {
    width: 20px;
    height: 20px;
    border: 2px solid #fca5a5;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 1px;
}

.punch-check.fixed {
    border-color: #fbbf24;
    background: #fef3c7;
}

.punch-check.fixed::after {
    content: '~';
    font-size: 0.7rem;
    font-weight: 700;
    color: #d97706;
}

.punch-check.verified {
    border-color: #16a34a;
    background: #16a34a;
}

.punch-text {
    font-size: 0.85rem;
    color: #1e293b;
    flex: 1;
    line-height: 1.4;
}

.punch-text img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 6px;
    margin: 0.4rem 0;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    transition: opacity 0.15s ease;
}

.punch-text img:hover {
    opacity: 0.8;
}

/* Lightbox overlay */
.punch-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.punch-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
    border: none;
    cursor: default;
}

.punch-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.8;
}

.punch-lightbox-close:hover {
    opacity: 1;
}

.punch-text p {
    margin: 0 0 0.25rem 0;
}

.punch-text p:last-child {
    margin-bottom: 0;
}

.punch-text.resolved {
    color: #94a3b8;
    text-decoration: line-through;
}

.punch-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.3rem;
    padding-left: 1.7rem;
}

.punch-meta .author {
    color: #1e293b;
    font-weight: 500;
}

.punch-reply {
    margin-left: 1.7rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 3px solid #dbeafe;
    font-size: 0.8rem;
    color: #475569;
}

.punch-reply .reply-author {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.72rem;
}

.punch-priority {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #f1f5f9;
    color: #64748b;
}

.punch-add-form {
    padding: 0.85rem 1.15rem;
    background: #fefce8;
    border-top: 1px solid #fde68a;
}

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}

.filter-tab:hover {
    color: #1e293b;
}

.filter-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.filter-tab .count {
    font-size: 0.62rem;
    background: #fee2e2;
    color: #991b1b;
    padding: 0.1rem 0.35rem;
    border-radius: 1rem;
    margin-left: 0.3rem;
}

.filter-tab.active-done {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.filter-tab.active-done .count {
    background: #dcfce7;
    color: #166534;
}

/* ── File Attachments ── */
.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
}

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

.attachment-icon {
    font-size: 1.2rem;
    color: #64748b;
    flex-shrink: 0;
}

.attachment-name {
    color: #1565d8;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.attachment-name:hover {
    text-decoration: underline;
}

.attachment-meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

/* ── Prompt Builder Pipeline ── */
.pipeline {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.pipeline-step {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #e2e8f0;
    position: relative;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.2s;
}

.pipeline-step:last-child {
    border-right: none;
}

.pipeline-step.active {
    background: #eff6ff;
    color: #1565d8;
    font-weight: 600;
}

.pipeline-step.done {
    background: #f0fdf4;
    color: #16a34a;
}

.pipeline-step .step-num {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 0.3rem;
}

.pipeline-step.active .step-num {
    background: #1565d8;
    color: #fff;
}

.pipeline-step.done .step-num {
    background: #16a34a;
    color: #fff;
}

.pipeline-step:not(.active):not(.done) .step-num {
    background: #e2e8f0;
    color: #94a3b8;
}

/* ── Prompt Editor ── */
.prompt-editor {
    background: #0f172a;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Cascadia Code', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 200px;
    width: 100%;
    border: none;
    resize: vertical;
}

/* ── Context Chips ── */
.context-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

.context-chip:hover {
    background: #e2e8f0;
}

.context-chip.included {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.context-chip .remove {
    font-size: 0.6rem;
    color: #94a3b8;
    cursor: pointer;
}

.context-chip .remove:hover {
    color: #dc2626;
}

/* ── AI Suggestion ── */
.ai-suggestion {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.82rem;
    color: #92400e;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

/* ── Plan Steps ── */
.plan-step {
    padding: 0.6rem 0.75rem;
    border-left: 2px solid #e2e8f0;
    margin-left: 0.75rem;
    position: relative;
    cursor: pointer;
}

.plan-step:hover {
    background: #f8fafc;
    border-radius: 0 0.4rem 0.4rem 0;
}

.plan-step::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
}

.plan-step.current::before {
    background: #1565d8;
}

.plan-step.completed::before {
    background: #16a34a;
}

.plan-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.plan-step-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.plan-step-files {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 4px;
}

.plan-step-files code {
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.68rem;
    color: #475569;
}

/* ── Execution Panel ── */
.exec-panel {
    background: #0f172a;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Cascadia Code', 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.exec-panel .exec-success {
    color: #4ade80;
}

.exec-panel .exec-info {
    color: #60a5fa;
}

.exec-panel .exec-warning {
    color: #fbbf24;
}

.exec-panel .exec-file {
    color: #c4b5fd;
}

.exec-panel .exec-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #e2e8f0;
    animation: exec-blink 1s infinite;
}

@keyframes exec-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Mode Buttons ── */
.mode-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    flex: 1;
}

.mode-btn:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.mode-btn.selected {
    border-color: #1565d8;
    background: #eff6ff;
}

.mode-btn-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.mode-btn-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* ── Template Card ── */
.template-card-add {
    border-style: dashed;
    cursor: pointer;
}

.template-card-add:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}
