/* Eleven - Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --panel-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.config-status {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.config-status span {
    opacity: 0.9;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background-color 0.2s, border-color 0.2s;
}

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

/* Content Layout */
.content {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr;
    gap: 1rem;
    padding: 1rem;
    min-height: 600px;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: var(--bg-color);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.panel-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

textarea,
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

textarea {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', monospace;
}

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

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.preset-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preset-selector label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.preset-selector select {
    width: auto;
    min-width: 200px;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.response-actions {
    display: flex;
    gap: 0.5rem;
}

/* Variables */
#variables-container {
    margin-bottom: 1.5rem;
}

.variable-item {
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.variable-name {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    min-width: 140px;
}

.variable-value {
    flex: 1;
}

.variable-value input {
    width: 100%;
    padding: 0.375rem;
    font-size: 0.75rem;
}

.variable-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Variable Character Count */
.variable-char-count {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    padding: 0.25rem 0.4rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.char-count-small {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.char-count-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.char-count-large {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.add-variable-form {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.add-variable-form h3 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.small-input {
    width: 140px;
}

.flex-input {
    flex: 1;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.sql-loader-section {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.sql-loader-section h3 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.sql-loader-section .form-row {
    margin-bottom: 0.5rem;
}

.sql-loader-section input[type="text"] {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
}

/* Response */
.status-box {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

.status-box.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    display: block;
}

.status-box.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    display: block;
}

.metadata-box {
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.metadata-box h3 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.metadata-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.metadata-header h3 {
    margin-bottom: 0;
}

.btn-icon-copy {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-icon-copy:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

#metadata-content {
    font-size: 0.813rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.metadata-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    align-items: flex-start;
}

.metadata-key {
    font-weight: 600;
    color: var(--text-secondary);
}

.assistant-role-text {
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    line-height: 1.5;
}

.response-content h3 {
    font-size: 0.875rem;
    margin-bottom: 0;
    color: var(--text-secondary);
}

.response-content .metadata-header {
    margin-bottom: 0.75rem;
}

.output-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.375rem;
    min-height: 300px;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
}

/* History */
.history-panel {
    background: var(--panel-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin: 0 1rem 1rem;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}

.history-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.history-item {
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    font-size: 0.813rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
}

.history-time {
    color: var(--text-secondary);
}

.history-prompt {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-model {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--text-secondary);
}

.history-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.history-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.history-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.history-time-badge {
    color: var(--text-secondary);
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

/* Empty Message */
.empty-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .content {
        grid-template-columns: 1fr;
    }

    .panel {
        min-height: 400px;
    }
}

/* ============================================================================
   Git Integration Styles
   ============================================================================ */

.git-panel {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0;
}

.git-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.git-panel-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0369a1;
    margin: 0;
}

/* Status Badge */
.status-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.connected {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid #10b981;
}

.status-badge.disconnected {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
    border: 1px solid #9ca3af;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid #ef4444;
}

/* Git Selectors */
.git-selectors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.git-selector-row {
    display: flex;
    gap: 0.5rem;
}

.git-select {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: white;
}

.git-select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* File Browser */
.file-tree {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #64748b;
}

#file-tree-contents {
    padding: 0.25rem 0;
}

.file-tree-item {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.8rem;
}

.file-tree-item:hover {
    background: #f1f5f9;
}

.file-tree-item.dir {
    font-weight: 500;
}

.file-icon {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

/* Loaded File Info */
.loaded-file-info {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loaded-file-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #334155;
}

.loaded-file-icon {
    font-size: 1rem;
}

.file-change-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: #f59e0b;
    font-weight: 500;
}

.change-dot {
    width: 6px;
    height: 6px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Git Actions */
.git-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.git-actions .btn {
    flex: 1;
    justify-content: center;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

/* Workflow Status */
.workflow-status {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    flex: 1;
}

.workflow-step .step-icon {
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.workflow-step .step-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

.workflow-step.pending {
    background: #f1f5f9;
    color: #94a3b8;
}

.workflow-step.active {
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px #3b82f6;
}

.workflow-step.completed {
    background: #dcfce7;
    color: #15803d;
}

/* PR Status Info */
.pr-status-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.8rem;
}

.pr-status-info a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.pr-status-info a:hover {
    text-decoration: underline;
}

/* CI Status */
.ci-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

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

.ci-status.success {
    background: #dcfce7;
    color: #15803d;
}

.ci-status.failure,
.ci-status.error {
    background: #fee2e2;
    color: #b91c1c;
}

/* Branch Status Display */
.git-branch-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.branch-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}

.branch-icon {
    font-size: 1rem;
}

#current-branch-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    border-radius: 0.25rem;
}

#current-branch-display.feature-branch {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.btn-delete-branch {
    background: transparent;
    color: #dc2626;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.btn-delete-branch:hover {
    opacity: 1;
    background: #fee2e2;
}

.btn-delete-branch:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.develop-sync-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #059669;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.sync-icon {
    font-size: 0.875rem;
}

.ci-history-section {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.ci-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.375rem;
}

.ci-refresh-timer {
    font-weight: 400;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.develop-ci-jobs {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.develop-ci-job {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.develop-ci-job:hover {
    opacity: 0.85;
}

.develop-ci-job.running {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.develop-ci-job.success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.develop-ci-job.failure {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.develop-ci-job .job-main {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.develop-ci-job .job-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.develop-ci-job .job-content {
    flex: 1;
    min-width: 0;
}

.develop-ci-job .job-workflow {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 0.125rem;
}

.develop-ci-job .job-title {
    line-height: 1.3;
    word-break: break-word;
}

.develop-ci-job .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.65rem;
    opacity: 0.7;
}

.develop-ci-job .job-sha {
    font-family: monospace;
    font-weight: 500;
}

.develop-ci-job .job-branch {
    font-weight: 500;
}

.develop-ci-job .job-duration {
    font-weight: 500;
}

.develop-ci-job .spinner-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================================
   Diff Modal
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.diff-modal-content {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Diff Summary */
.diff-summary {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.diff-summary-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.diff-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.diff-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.diff-stat.additions {
    color: #059669;
}

.diff-stat.deletions {
    color: #dc2626;
}

.diff-stat.commits {
    color: var(--primary-color);
}

/* Diff Files */
.diff-files {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diff-file {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.diff-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.diff-file-name {
    font-weight: 500;
    color: var(--text-color);
}

.diff-file-stats {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.diff-file-stats .add {
    color: #059669;
}

.diff-file-stats .del {
    color: #dc2626;
}

.diff-patch {
    padding: 0;
    margin: 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    background: #fafafa;
}

.diff-line {
    padding: 0.1rem 0.75rem;
    white-space: pre;
}

.diff-line.add {
    background: #dcfce7;
    color: #166534;
}

.diff-line.del {
    background: #fee2e2;
    color: #991b1b;
}

.diff-line.context {
    color: #64748b;
}

.diff-line.header {
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 500;
}

/* No changes message */
.no-changes {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-changes-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
