/* Page header */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 12px; margin: 0 0 6px 0; }
.page-header h1 i { color: #6366f1; }
.page-subtitle { color: #64748b; font-size: 14px; margin: 0; }

/* Version Control Tab Styles */
.vcs-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vcs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.vcs-header-actions {
    display: flex;
    gap: 10px;
}

.vcs-list-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.vcs-list-header {
    display: grid;
    grid-template-columns: 20% 25% 15% 15% 15% 10%;
    padding: 15px;
    background-color: #f7f9fc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
}

.vcs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vcs-item {
    display: grid;
    grid-template-columns: 20% 25% 15% 15% 15% 10%;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
    align-items: center;
}

.vcs-item:hover {
    background-color: #f8fafc;
}

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

.vcs-name {
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcs-type-icon {
    color: #4a5568;
    font-size: 16px;
}

.vcs-repo {
    color: #4a6baf;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcs-repo a {
    color: inherit;
    text-decoration: none;
}

.vcs-repo a:hover {
    text-decoration: underline;
}

.vcs-branch {
    font-family: monospace;
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #475569;
    display: inline-block;
    font-size: 12px;
}

.vcs-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.vcs-status-badge.connected {
    background-color: #d1fae5;
    color: #065f46;
}

.vcs-status-badge.disconnected {
    background-color: #f3f4f6;
    color: #4b5563;
}

.vcs-status-badge.error {
    background-color: #fee2e2;
    color: #991b1b;
}

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

.vcs-last-sync {
    font-size: 13px;
    color: #718096;
}

.vcs-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.vcs-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #718096;
}

.vcs-action:hover {
    background-color: #edf2f7;
    color: #2d3748;
}

.vcs-action.commit {
    color: #10b981;
}

.vcs-action.commit:hover {
    background-color: #ecfdf5;
    color: #059669;
}

.vcs-action.update {
    color: #3b82f6;
}

.vcs-action.update:hover {
    background-color: #eff6ff;
    color: #2563eb;
}

.vcs-action.delete {
    color: #ef4444;
}

.vcs-action.delete:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

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

.modal.open {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 24px;
    border-radius: 10px;
    width: 1200px;
    max-width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-sm {
    width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #334155;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-helper {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #6366f1;
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
}

.btn-outline {
    background-color: white;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
}

.empty-icon {
    width: 60px;
    height: 60px;
    background-color: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: #94a3b8;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Loading */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Logs Container */
.vcs-logs-container {
    background: #1a202c;
    color: #48bb78;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    border: 1px solid #2d3748;
    margin-top: 10px;
}

.vcs-logs-container pre {
    margin: 0;
    font-family: inherit;
}

/* History Button */
.vcs-action.history {
    color: #8b5cf6;
}

.vcs-action.history:hover {
    background-color: #f5f3ff;
    color: #7c3aed;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table thead {
    background: #f7f9fc;
}

.history-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.history-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}

.history-table tbody tr:hover {
    background-color: #f8fafc;
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-revision {
    font-family: monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: #6366f1;
    display: inline-block;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-author {
    font-weight: 500;
    color: #475569;
}

.history-date {
    color: #718096;
    font-size: 12px;
    white-space: nowrap;
}

.history-message {
    color: #1e293b;
    word-break: break-word;
    max-width: 400px;
}

.history-detail-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    color: #64748b;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.history-detail-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.history-file-action {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-file-action.added,
.history-file-action.A {
    background: #dcfce7;
    color: #166534;
}

.history-file-action.modified,
.history-file-action.M {
    background: #fef3c7;
    color: #92400e;
}

.history-file-action.deleted,
.history-file-action.D {
    background: #fee2e2;
    color: #991b1b;
}

.history-file-action.replaced,
.history-file-action.R {
    background: #e0e7ff;
    color: #3730a3;
}

.history-file-path {
    font-family: monospace;
    font-size: 13px;
    color: #334155;
    word-break: break-all;
}

.history-revert-btn {
    background: none;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    color: #d97706;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.history-revert-btn:hover {
    background: #fffbeb;
    color: #b45309;
    border-color: #f59e0b;
}

/* Responsive */
@media (max-width: 1024px) {
    .vcs-list-header,
    .vcs-item {
        grid-template-columns: 25% 30% 15% 15% 15%;
    }
    .vcs-branch {
        display: none;
    }
}

@media (max-width: 768px) {
    .vcs-list-header {
        display: none;
    }
    
    .vcs-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .vcs-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
        border-top: 1px solid #f1f5f9;
        padding-top: 10px;
    }
}