:root {
    --bg-main: #0f111a;
    --bg-sidebar: #161925;
    --bg-card: #1c1f2e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --purple: #a855f7;
    --blue: #3b82f6;
    
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.brand {
    padding: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    padding: 20px 0;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background-color: rgba(255,255,255,0.03);
    border-right: 3px solid var(--primary-color);
}

.nav-item.active i {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.topbar {
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(22, 25, 37, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.project-selector select {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    min-width: 250px;
}

.user-profile img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
}

.dashboard-content {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Status Banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.status-banner.safe {
    background-color: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-icon {
    font-size: 2rem;
    color: var(--success-color);
}

.status-text h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.status-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.action-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.15);
}

.action-card.primary-action {
    background: linear-gradient(145deg, var(--bg-card), #222638);
    position: relative;
    overflow: hidden;
}

.action-card.primary-action::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--purple));
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    background-color: rgba(255,255,255,0.05);
}

.card-icon.blue { color: var(--blue); background-color: rgba(59, 130, 246, 0.1); }
.card-icon.purple { color: var(--purple); background-color: rgba(168, 85, 247, 0.1); }
.card-icon.gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    color: white;
}

.action-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.action-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    border: none;
}

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

.btn-outline:hover {
    background-color: rgba(255,255,255,0.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Changes Section */
.recent-changes-section {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 40px;
}

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

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.badge {
    background-color: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.changes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.change-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.change-type {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.change-item.modified .change-type { background-color: rgba(59, 130, 246, 0.2); color: var(--blue); }
.change-item.added .change-type { background-color: var(--success-bg); color: var(--success-color); }
.change-item.deleted .change-type { background-color: var(--danger-bg); color: var(--danger-color); }

.file-path {
    font-family: monospace;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Terminal */
.terminal-section {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
}

.terminal-header {
    background-color: #1a1a1a;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
    border-bottom: 1px solid #333;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.close { background-color: #ff5f56; }
.dot.minimize { background-color: #ffbd2e; }
.dot.maximize { background-color: #27c93f; }

.terminal-body {
    padding: 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    height: 200px;
    overflow-y: auto;
    color: #a0aec0;
}

.log-line {
    margin-bottom: 5px;
}

.log-line.info { color: #63b3ed; }
.log-line.success { color: #68d391; }
.log-line.error { color: #fc8181; }

/* History Section */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.history-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    animation: fadeIn 0.4s ease;
}
.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.history-details {
    margin-top: 5px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--success-color);
}
.history-details p { margin: 4px 0; }

/* 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.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; animation: fadeInModal 0.3s ease; }

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--bg-card);
    z-index: 10;
}

.modal-header h2 { font-size: 1.25rem; font-weight: 600; }
.close-modal { font-size: 1.5rem; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.close-modal:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
}
.form-section:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 10px; }
.form-section h3 { margin-bottom: 20px; color: var(--primary-color); font-size: 1rem; }

.form-group { margin-bottom: 16px; width: 100%; flex: 1; text-align: left; }
.form-group-row { display: flex; gap: 16px; width: 100%; flex-wrap: wrap; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.form-group input {
    width: 100%;
    padding: 12px 14px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--primary-color); background-color: rgba(0,0,0,0.4); }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(0,0,0,0.2);
    position: sticky;
    bottom: 0;
}
.modal-footer .btn { width: auto; min-width: 120px; }

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.file-list-container {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}
.file-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}
.file-checkbox-item:last-child { border-bottom: none; }
.file-checkbox-item input[type="checkbox"] {
    width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-color);
}
.file-checkbox-item label {
    cursor: pointer; font-family: 'Consolas', monospace; color: var(--text-primary); font-size: 0.9rem; word-break: break-all;
}

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