/* Modern CSS Variables for theming */
:root {
    --primary-color: #0066cc;
    --secondary-color: #4a90e2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --bg-color: #ffffff;
    --muted-color: #6c757d;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 6px;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.8" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="0.6" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="70" r="0.7" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
}

.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.header p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* Main layout - consolidated single definition */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Card component - consolidated single definition */
.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 2rem;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    color: white;
    padding: 2rem;
    position: relative;
    border-bottom: none;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
}

.card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card body - clean styling without !important mess */
.card-body {
    padding: 2rem;
    background: white;
    color: #212529; /* Dark text for white background */
}

/* Ensure headings, labels, and form containers are dark on white card backgrounds */
.card-body h1,
.card-body h2, 
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6,
.card-body label,
.card-body .mb-1,
.card-body .mb-2,
.card-body .mt-1,
.card-body .mt-2 {
    color: #212529;
}

/* Floating Status Notifications */
.floating-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border: none;
}

.floating-notification.show {
    transform: translateX(0);
}

.floating-notification.success {
    background-color: #10b981;
    color: white;
}

.floating-notification.error {
    background-color: #ef4444;
    color: white;
}

.floating-notification.info {
    background-color: #3b82f6;
    color: white;
}

/* Legacy status for compatibility */
.status {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.status.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.status.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Status enhancement */
#repoStatus {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    margin: 0.25rem;
}

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

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

.btn-primary:hover {
    background-color: #0056b3;
}

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

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

.btn-secondary {
    background-color: #495057;
    color: white;
    border: 1px solid #495057;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Form elements */
input[type="text"], input[type="file"], select, textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #212529; /* Force dark text for readability on white input backgrounds */
    background-color: white;
}

/* Text selection in form elements */
input[type="text"]::selection, input[type="email"]::selection, textarea::selection {
    background-color: #0066cc;
    color: white;
}

input[type="file"] {
    padding: 0.25rem;
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: var(--font-mono);
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* File manager */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 1rem;
    background-color: #fafbfc;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.drop-zone-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-input-label {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.file-input-label:hover {
    text-decoration: none;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-list-header h3 {
    margin: 0;
}

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

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: var(--light-color);
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--muted-color);
}

.file-item .file-actions {
    flex-shrink: 0;
}

.file-item .file-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0 0.125rem;
}

/* Progress bar */
.upload-progress {
    margin-top: 1rem;
}

.progress-bar {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 20px;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(90deg, var(--success-color), #20c997);
    height: 100%;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    text-align: center;
    color: var(--muted-color);
}

/* Repository info */
.repo-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.repo-stat {
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa; /* Light gray background */
    border-radius: var(--border-radius);
}

.repo-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0066cc;
}

.repo-stat-label {
    font-size: 0.8rem;
    color: #495057;
    margin-top: 0.25rem;
}

/* Repository statistics colors - clean without !important */
/* Dark mode disabled - using consistent light theme */

/* Branch management */
.branch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.branch-item.current {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
}

.branch-name {
    font-weight: 500;
}

.branch-hash {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted-color);
}

/* File Explorer */
.file-explorer {
    min-height: 400px;
}

.explorer-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.explorer-tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-color);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.explorer-tab:hover {
    background-color: #f5f5f5;
    color: #212529;
}

.explorer-tab.active {
    color: #0066cc !important;
    border-bottom-color: #0066cc;
    background-color: #f0f8ff;
    font-weight: 600;
}

.explorer-view {
    display: none;
}

.explorer-view.active {
    display: block;
}

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

.view-header h4 {
    margin: 0;
}

.view-header .file-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-header select {
    min-width: 200px;
    margin-bottom: 0;
}

/* Modern File Explorer */
.file-tree {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
    position: relative;
    min-height: 28px;
}

.tree-item:hover {
    background-color: #e3f2fd;
}

.tree-item.selected {
    background-color: var(--primary-color);
    color: white;
}

.tree-item.directory {
    font-weight: 500;
}

.tree-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tree-toggle {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--muted-color);
    border-radius: 2px;
}

.tree-toggle:hover {
    background-color: rgba(0,0,0,0.1);
}

.tree-name {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-meta {
    font-size: 0.75rem;
    color: var(--muted-color);
    margin-left: 1rem;
}

.tree-children {
    margin-left: 1.5rem;
    border-left: 1px solid #e0e0e0;
    padding-left: 0.5rem;
}

.tree-children.collapsed {
    display: none;
}

.file-actions-modern {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.tree-item:hover .file-actions-modern {
    opacity: 1;
}

.action-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* Unstage button specific styling */
.action-btn.unstage {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.action-btn.unstage:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: scale(1.05);
}

/* Unstage all button styling */
#unstageAllButton {
    color: #dc2626;
    border-color: #fca5a5;
}

#unstageAllButton:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Loading state for unstaging */
.action-btn.unstaging {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Delete button specific styling */
.action-btn.delete {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Delete button warning state */
.action-btn.delete:active {
    background: #fecaca;
    transform: scale(0.95);
}

/* Loading state for deletion */
.action-btn.deleting {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
    background: #fee2e2;
    border-color: #ef4444;
}

/* Danger button styling */
.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger:active {
    background: #fecaca;
    transform: translateY(0);
}

/* === Repository Analytics Styles === */
.analytics-overview {
    margin-bottom: 2rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-card {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.analytics-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.analytics-info {
    flex: 1;
}

.analytics-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.analytics-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.analytics-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.analytics-section h4 {
    background: var(--light-color);
    margin: 0;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.object-breakdown,
.efficiency-metrics {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.object-type,
.efficiency-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.object-type:last-child,
.efficiency-metric:last-child {
    border-bottom: none;
}

.object-type-label,
.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.object-type-value,
.metric-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
}

.file-type-analysis {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.file-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.file-type-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-type-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    font-family: var(--font-mono);
}

.file-type-count {
    color: var(--text-primary);
    font-weight: 600;
}

.file-type-size {
    color: var(--text-secondary);
}

.file-type-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.file-type-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s ease;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* === Time Travel Controls Styles === */
.time-travel-controls {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.time-travel-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.warning-icon {
    font-size: 1.2rem;
    color: #d97706;
}

.warning-text {
    flex: 1;
    color: #92400e;
    font-weight: 500;
    min-width: 200px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Checkout status styling */
#checkoutStatusItem .status-value {
    color: #d97706;
    font-weight: 700;
}

/* Warning button styles */
.btn-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.btn-warning:hover {
    background: #fde68a;
    border-color: #d97706;
    color: #78350f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-warning:active {
    background: #fcd34d;
    transform: translateY(0);
}

/* === Merge Operations Styles === */
.merge-controls {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.merge-setup {
    margin-bottom: 1.5rem;
}

.merge-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.merge-status {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.merge-info h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.merge-summary {
    background: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    border-left: 4px solid var(--primary-color);
}

.merge-conflicts {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--border-radius);
    border-left: 4px solid #ef4444;
}

.merge-conflicts h4 {
    margin: 0 0 1rem 0;
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
}

.conflict-list {
    margin-bottom: 1rem;
}

.conflict-item {
    background: white;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #fca5a5;
}

.conflict-file {
    font-family: var(--font-mono);
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.25rem;
}

.conflict-type {
    font-size: 0.875rem;
    color: #92400e;
    font-style: italic;
}

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

.merge-success {
    background: #f0f9ff;
    border-color: #60a5fa;
    border-left-color: #3b82f6;
}

.merge-success h4 {
    color: #1d4ed8;
}

/* Merge target input styling */
#mergeTargetBranch {
    background: var(--light-color);
    color: var(--text-secondary);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--muted-color);
    font-style: italic;
}

/* File type icons */
.icon-folder { color: #ffa726; }
.icon-file { color: #42a5f5; }
.icon-image { color: #66bb6a; }
.icon-code { color: #ab47bc; }
.icon-text { color: #5c6bc0; }
.icon-archive { color: #ff7043; }

/* Search and filter */
.file-search {
    margin-bottom: 1rem;
    position: relative;
}

.file-search input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    background: white;
    box-sizing: border-box;
}

.file-search .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-color);
    pointer-events: none;
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--muted-color) !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.d-none { display: none; }
.d-block { display: block; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .card {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .card-header {
        padding: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .header {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        margin: 0.25rem;
    }
    
    .file-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .file-item .file-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

/* === Progress Indicator === */
#progressIndicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success-color);
    font-weight: 500;
    min-width: 250px;
    animation: slideInRight 0.3s ease-out;
}

#progressIndicator .status {
    background: transparent !important;
    color: white !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.progress-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* === Repository Status Panel === */
.status-overview {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

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

.status-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.status-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.status-section-title {
    background-color: var(--light-color);
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.status-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-file-list {
    padding: 1rem;
    min-height: 2rem;
}

/* Repository Summary Styles */
.repo-summary-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-label {
    font-weight: 500;
    color: var(--text-primary);
}

.summary-value {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.status-file-list .empty-state {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.status-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.status-file-name {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 0.875rem;
}

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

.status-file-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-file-action:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.status-file-action.danger:hover {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

/* === Modal Styles === */
/* Media container styles for file viewer */
.media-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.media-info {
    margin: 0;
    padding: 0.5rem;
    background-color: var(--light-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

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

.modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-color);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
}

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

/* File content viewer specific styles */
.file-content {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 1rem;
    margin: 0;
}

.file-content.binary {
    text-align: center;
    padding: 2rem;
    color: var(--muted-color);
    font-style: italic;
}

.file-info {
    background: var(--light-color);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.file-info-item {
    display: inline-block;
    margin-right: 1rem;
    color: var(--muted-color);
}

.file-info-value {
    font-weight: 600;
    color: var(--text-color);
}

/* === Diff Viewer Styles === */
.modal-large .modal-content {
    max-width: 95%;
    max-height: 95vh;
    width: 95%;
}

.diff-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    flex-wrap: wrap;
    align-items: end;
}

.diff-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.diff-control-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.diff-control-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.diff-summary {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.diff-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.diff-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.diff-stat.added .diff-stat-value {
    color: #22c55e;
}

.diff-stat.removed .diff-stat-value {
    color: #ef4444;
}

.diff-stat-label {
    font-size: 0.875rem;
    color: var(--muted-color);
    text-transform: lowercase;
}

.diff-content {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 60vh;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.4;
}

.diff-file {
    border-bottom: 1px solid var(--border-color);
}

.diff-file:last-child {
    border-bottom: none;
}

.diff-file-header {
    background: var(--light-color);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.diff-file-content {
    padding: 0;
}

.diff-line {
    display: flex;
    padding: 0;
    margin: 0;
}

.diff-line-numbers {
    background: #f1f3f4;
    color: #666;
    padding: 0 0.5rem;
    min-width: 100px;
    text-align: right;
    font-size: 0.8rem;
    user-select: none;
    border-right: 1px solid var(--border-color);
    display: flex;
}

.diff-line-number {
    width: 50%;
    padding: 0 0.25rem;
}

.diff-line-content {
    flex: 1;
    padding: 0 1rem;
    white-space: pre;
    overflow-x: auto;
}

.diff-line.addition {
    background-color: #f0f9ff;
    border-left: 3px solid #22c55e;
}

.diff-line.addition .diff-line-content {
    background-color: #dcfce7;
}

.diff-line.deletion {
    background-color: #fef2f2;
    border-left: 3px solid #ef4444;
}

.diff-line.deletion .diff-line-content {
    background-color: #fecaca;
}

.diff-line.context {
    background-color: transparent;
}

.diff-binary {
    padding: 2rem;
    text-align: center;
    color: var(--muted-color);
    font-style: italic;
    background: var(--light-color);
}

/* === Enhanced Commit Log Styles === */
.commit-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.commit-log-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.commit-log-controls select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.commit-history {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
}

.commit-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.commit-item:hover {
    background-color: var(--light-color);
}

.commit-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.commit-hash {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.commit-message {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.commit-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.commit-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.commit-date {
    color: var(--text-secondary);
}

.commit-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

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

.commit-stat.additions {
    color: #22c55e;
}

.commit-stat.deletions {
    color: #ef4444;
}

.commit-pagination {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

/* === Commit Details Modal Styles === */
.commit-details-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.commit-detail-section {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.commit-detail-section h4 {
    background: var(--light-color);
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.commit-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

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

.commit-info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.commit-info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
    word-break: break-all;
}

.commit-message-content {
    padding: 1rem;
    background: var(--bg-color);
    color: var(--text-primary);
    white-space: pre-wrap;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 1rem;
}

.commit-files-list {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.commit-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.commit-file-name {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.commit-file-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.commit-file-status-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.commit-file-status-indicator.added {
    background: #dcfce7;
    color: #15803d;
}

.commit-file-status-indicator.modified {
    background: #fef3c7;
    color: #d97706;
}

.commit-file-status-indicator.deleted {
    background: #fecaca;
    color: #dc2626;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark mode support */
/* Dark mode disabled to maintain consistent color scheme
   All elements use the light theme variables for proper readability */