/* Compact layout */
.prompt-layout {
    display: grid;
    grid-template-columns: 180px 1fr 280px;
    gap: 0.75rem;
    height: calc(100vh - 120px);
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    overflow-y: auto;
}
.sidebar-section {
    margin-bottom: 1rem;
}
.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}
.nav-item {
    display: block;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.nav-item:hover {
    background: #e9ecef;
    color: #212529;
}
.nav-item.active {
    background: #fff;
    font-weight: 600;
    border-left-color: currentColor;
}
.nav-step {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #6c757d;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding-left: 0.25rem;
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 0.5rem;
}
.tab {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.tab:hover { color: #212529; }
.tab.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

/* Tab content */
.tab-content {
    display: none;
    flex-grow: 1;
    overflow: hidden;
}
.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Prompt viewer */
.prompt-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.75rem;
}
.prompt-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}
.prompt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
}
.prompt-card-header:hover { background: #e9ecef; }
.prompt-card-title {
    font-weight: 600;
    font-size: 0.85rem;
}
.prompt-card-source {
    font-size: 0.7rem;
    color: #6c757d;
}
.prompt-card-body {
    padding: 0;
    display: none;
}
.prompt-card.expanded .prompt-card-body { display: block; }
.prompt-card-body pre {
    margin: 0;
    padding: 0.75rem;
    background: #1e1e1e;
    color: #d4d4d4;
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-x: auto;
    max-height: 400px;
}

/* Read-only badge */
.read-only-badge {
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Settings panel */
.settings-panel {
    padding: 0.75rem;
    overflow-y: auto;
}
.setting-group {
    margin-bottom: 1rem;
}
.setting-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}
.setting-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
}
.setting-label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.setting-description {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}
.setting-input {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}
.setting-input:focus {
    outline: none;
    border-color: #0d6efd;
}

/* Reference panel */
.reference-panel {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    overflow-y: auto;
}
.reference-section {
    margin-bottom: 1rem;
}
.reference-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}
.info-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}
.info-label {
    font-size: 0.7rem;
    color: #6c757d;
}
.info-value {
    font-size: 0.8rem;
    font-weight: 500;
}
.algo-stage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.8rem;
}
.algo-stage i { color: #10b981; }
.test-link {
    display: block;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #212529;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.test-link:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

/* Status indicator */
.status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 0.75rem;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-saved { background: #10b981; }
.status-modified { background: #f59e0b; }
