:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #242938;
    --bg-hover: #2d3340;
    --border-color: #2d3340;
    --border-accent: #3d4454;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3bc;
    --text-muted: #6c7080;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
}

/* Light Theme */
body.light-theme {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-hover: #e9ecef;
    --border-color: #dee2e6;
    --border-accent: #ced4da;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
}

/* Compact Mode */
body.compact-mode .card {
    border-radius: 8px;
}

body.compact-mode .card-header {
    padding: 0.875rem 1.25rem;
    font-size: 14px;
}

body.compact-mode .card-body {
    padding: 1rem;
}

body.compact-mode .table th,
body.compact-mode .table td {
    padding: 0.625rem 1rem;
    font-size: 13px;
}

body.compact-mode .nav-link {
    padding: 0.5rem 0.875rem !important;
    font-size: 13px;
}

body.compact-mode .btn {
    padding: 0.625rem 1.25rem;
    font-size: 13px;
}

body.compact-mode .btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 12px;
}

body.compact-mode .progress-item {
    margin-bottom: 1rem;
}

body.compact-mode .setting-item {
    padding: 1rem;
}

body.compact-mode .settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.1); }
}

.login-box {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 32px;
}

.login-box h2 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-box p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
    height: auto !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    color: var(--text-secondary);
    cursor: pointer;
}

.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid;
    position: absolute;
    top: 10px;
    left: 0;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
    color: #fca5a5;
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
}

/* Dashboard */
.dashboard-wrapper {
    min-height: 100vh;
    background: var(--bg-primary);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 99999;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand a:hover {
    color: var(--text-primary) !important;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.625rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.col-lg-8, .col-lg-4, .col-md-6, .col-md-5, .col-md-3, .col-md-2, .col-12 {
    min-width: 0;
}

.col-lg-8 {
    flex: 0 0 calc(66.666% - 0.75rem);
}

.col-lg-4 {
    flex: 0 0 calc(33.333% - 0.75rem);
}

.col-md-6 {
    flex: 0 0 calc(50% - 0.75rem);
}

.col-12 {
    flex: 0 0 100%;
}

.col-md-5 {
    flex: 0 0 calc(41.666% - 0.75rem);
}

.col-md-3 {
    flex: 0 0 calc(25% - 0.75rem);
}

.col-md-2 {
    flex: 0 0 calc(16.666% - 0.75rem);
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2563eb 100%);
    color: white;
    border: none;
}

.card-header.bg-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    color: white;
    border: none;
}

.card-body {
    padding: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--bg-tertiary);
}

.table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.2);
    color: #fff;
}

.badge.bg-secondary {
    background: rgba(107, 114, 128, 0.2);
    color: #fff;
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
}

code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: var(--accent-blue);
}

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

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

.btn-outline-primary:hover {
    background: var(--accent-blue);
    color: white;
}

/* Progress bars */
.progress-item {
    margin-bottom: 1.25rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-header span {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-header .fw-bold {
    color: var(--text-primary);
    font-weight: 600;
}

.progress {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    font-size: 6px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    transition: width 0.3s;
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--accent-yellow) 0%, #d97706 100%);
}

.progress-bar.bg-info {
    background: linear-gradient(90deg, var(--accent-blue) 0%, #0ea5e9 100%);
}

/* Console */
.console-output {
    background: #0d1117;
    color: #c9d1d9;
    padding: 1.25rem;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.log-line {
    padding: 0.25rem 0;
    line-height: 1.6;
}

.log-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Process Header */
.process-header {
    padding: 1.5rem 0;
}

.process-title {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.process-title i {
    font-size: 24px;
}

/* Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 1.5rem;
    background: var(--bg-secondary);
    list-style: none;
    overflow-x: auto;
}

.nav-tabs li {
    display: inline-block;
}

.nav-tabs .nav-link {
    padding: 1rem 1.25rem !important;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
}

.nav-tabs .nav-link {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}


.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--accent-blue);
    background-color: transparent !important;
    border-bottom-color: var(--accent-blue);
}

.tab-content {
    padding: 1.5rem 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* File Manager */
.file-tree {
    max-height: 500px;
    overflow-y: auto;
}

.file-item {
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 14px;
}

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

.file-item i {
    font-size: 18px;
}

.file-children {
    display: none;
    margin-left: 1.5rem;
    margin-top: 0.25rem;
}

/* Columnar folder browser */
.folder-columns {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.folder-column {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.folder-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.folder-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.folder-item.active {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.folder-item i {
    font-size: 18px;
}

.folder-column::-webkit-scrollbar,
.folder-columns::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.folder-column::-webkit-scrollbar-thumb,
.folder-columns::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 999px;
}

.env-editor .list-group-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.env-editor .list-group-item strong {
    color: var(--accent-blue);
}

/* Buttons */
.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

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

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

.btn-warning {
    background: var(--accent-yellow);
    color: white;
}

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

.btn-info {
    background: var(--accent-blue);
    color: white;
}

.btn-info:hover {
    background: var(--accent-blue-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

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

.modal.show {
    display: flex;
}

.modal-dialog {
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}

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

.modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-body {
    padding: 1.5rem;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

/* Input groups */
.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-control {
    flex: 1;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', monospace;
}

select.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

/* Utility */
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .col-lg-8, .col-lg-4 {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .navbar .container-fluid {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .col-md-6, .col-md-5, .col-md-3, .col-md-2 {
        flex: 0 0 100%;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.w-auto {
    width: auto !important
}

.gap-0 {
    gap: 0 !important;
}

.form-control:disabled, .form-control[readonly] {
    background-color: #30333d;
}

.form-control:focus {
    color: var(--text-primary)
}
.table thead th {
    border-bottom: none !important;
}

.align-items-normal {
    align-items: normal;
}

.user-select-none {
    user-select: none !important;
}

a:hover {
    color: inherit !important
}

.spinner-border {
    margin-right: 10px;
}

.search-container {
    display: flex;
    gap: 1rem;
}

@media (max-width: 1199px) {
    .gap-0 {
        gap: 2rem !important
    }
}

.table-bordered td, .table-bordered th {
    border: 1px solid var(--border-color) !important;
}

.table td, .table th {
    border-top: 1px solid var(--border-color) !important;
}


/* Drag and Drop Overlay */
.drag-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drag-overlay.active {
    display: block;
    opacity: 1;
}

.drag-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
}

/* Upload Status */
.upload-status {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    background: var(--bg-darker);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

.upload-status.success {
    background: #28a745;
    color: white;
}

.upload-status.error {
    background: #dc3545;
    color: white;
}


.modal-backdrop {
    visibility: hidden;
    display: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 40px));
    width: auto;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 420px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: fit-content;
}

.toast.show {
    display: flex !important;
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    max-width: 90%;
}

.toast-content i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    max-width: 100%;
    word-wrap: break-word;
}

.toast-close, .toast-undo {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.toast-close:hover, .toast-undo:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toast-undo {
    color: var(--accent-blue);
    font-weight: 600;
}

.toast-success {
    border-left-color: var(--accent-green);
}

.toast-success .toast-content i {
    color: var(--accent-green);
}

.toast-error {
    border-left-color: var(--accent-red);
}

.toast-error .toast-content i {
    color: var(--accent-red);
}

.toast-warning {
    border-left-color: var(--accent-yellow);
}

.toast-warning .toast-content i {
    color: var(--accent-yellow);
}

.toast-info {
    border-left-color: var(--accent-blue);
}

.toast-info .toast-content i {
    color: var(--accent-blue);
}

/* Notification Center */
.notification-bell {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent-red);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    display: none;
}

.notification-center {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
}

.notification-center.show {
    right: 0;
}

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

.notification-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.notification-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border-left: 4px solid;
    display: flex;
    gap: 12px;
    transition: all 0.2s;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item i {
    font-size: 20px;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
    max-width: 90%;
}

.notification-message {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    max-width: 100%;
    word-wrap: break-word;
}

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.notification-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.notification-delete:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-delete:active {
    transform: scale(0.95);
}

.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notification-success {
    border-left-color: var(--accent-green);
}

.notification-success i {
    color: var(--accent-green);
}

.notification-error {
    border-left-color: var(--accent-red);
}

.notification-error i {
    color: var(--accent-red);
}

.notification-warning {
    border-left-color: var(--accent-yellow);
}

.notification-warning i {
    color: var(--accent-yellow);
}

.notification-info {
    border-left-color: var(--accent-blue);
}

.notification-info i {
    color: var(--accent-blue);
}

/* Sticky Table Headers */
.table-sticky-header {
    position: sticky;
    top: 70px;
    z-index: 10;
    background: var(--bg-secondary);
}

.table-sticky-header thead {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    z-index: 10;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-button {
    height: 38px;
    width: 100px;
}

.skeleton-card {
    padding: 20px;
}

/* Progress Bar */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.progress-overlay.show {
    opacity: 1;
    visibility: visible;
}

.progress-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px;
    min-width: 400px;
    border: 1px solid var(--border-color);
}

.progress-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width 0.3s;
    border-radius: 4px;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* Better Spinner */
.spinner-enhanced {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

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

.spinner-dots {
    display: flex;
    gap: 8px;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: spinner-bounce 1.4s infinite ease-in-out both;
}

.spinner-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes spinner-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .navbar-nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 60px);
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar-nav.show {
        left: 0;
    }

    .toast-container {
        right: 10px;
        left: 10px;
        max-width: calc(100vw - 20px);
        width: auto;
    }
    
    .toast {
        max-width: 100%;
        padding: 12px;
        font-size: 13px;
    }
    
    .toast-message {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .toast-content i {
        font-size: 18px;
    }

    .notification-center {
        width: 100%;
        right: -100%;
    }

    .nav-link {
        padding: 12px 16px !important;
        border-radius: 8px;
        margin-bottom: 4px;
    }

    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .btn-sm {
        min-height: 38px;
        padding: 8px 16px;
    }

    /* Swipeable console */
    .console-output {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}

/* Bulk operations progress overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.progress-overlay.show {
    display: flex;
}

.progress-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    min-width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
}

.progress-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .progress-content {
        min-width: 300px;
        padding: 20px;
    }

    .progress-title {
        font-size: 1rem;
    }

    .progress-bar-container {
        height: 24px;
    }

    .progress-text {
        font-size: 0.9rem;
    }
}

/* Confirmation Dialog */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirmation-overlay.show {
    opacity: 1;
}

.confirmation-dialog {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    min-width: 320px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
}

.confirmation-message {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirmation-actions .btn {
    min-width: 100px;
}

.btn-group>.btn {
    flex: none
}

/* ==================== Mobile Responsive Styles ==================== */

/* Tablets and smaller screens */
@media (max-width: 992px) {
    .container-fluid {
        padding: 15px;
    }

    .card {
        margin-bottom: 20px;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    /* Navigation improvements */
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar-nav .nav-link i {
        margin-right: 8px;
        width: 20px;
        display: inline-block;
    }

    /* Container adjustments */
    .container-fluid {
        padding: 10px;
    }

    /* Card adjustments */
    .card {
        margin-bottom: 15px;
    }

    .card-header {
        padding: 12px 15px;
        font-size: 1rem;
    }

    .card-body {
        padding: 15px;
    }

    /* Table improvements - horizontal scroll */
    .table-responsive {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    /* Process table specific */
    .processes-table th:first-child,
    .processes-table td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-primary);
        z-index: 1;
    }

    /* Button adjustments */
    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .btn-group > .btn {
        margin-bottom: 5px;
    }

    /* Form improvements */
    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        font-size: 1rem; /* Prevents zoom on iOS */
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .modal-content {
        border-radius: 8px;
    }

    /* Terminal adjustments */
    #terminal {
        height: 400px;
        font-size: 0.85rem;
    }

    .command-input-group {
        flex-wrap: nowrap;
    }

    .command-input-group input {
        font-size: 0.9rem;
    }

    /* File manager adjustments */
    .file-manager-table th,
    .file-manager-table td {
        padding: 8px 5px;
    }

    .file-manager-table .file-name {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Activity log adjustments */
    .activity-filters {
        flex-direction: column;
    }

    .activity-filters .form-group {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Stats cards - stack vertically */
    .stats-row {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
        margin-bottom: 15px;
    }

    /* Badge adjustments */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.6em;
    }

    /* Pagination adjustments */
    .pagination {
        flex-wrap: wrap;
        font-size: 0.9rem;
    }

    .pagination .page-link {
        padding: 0.4rem 0.7rem;
    }

    /* Hide less important columns on mobile */
    .table .hide-mobile {
        display: none;
    }

    /* Alert adjustments */
    .alert {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    /* Dropdown adjustments */
    .dropdown-menu {
        font-size: 0.9rem;
    }

    /* Settings page adjustments */
    .settings-section {
        padding: 15px;
    }

    /* Process details adjustments */
    .process-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Small mobile phones */
@media (max-width: 576px) {
    /* Further reduce sizes */
    .navbar-brand {
        font-size: 1rem;
    }

    .card-header {
        font-size: 0.95rem;
        padding: 10px 12px;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 8px 5px;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Stack action buttons vertically */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .action-buttons .btn {
        width: 100%;
    }

    /* Terminal adjustments */
    #terminal {
        height: 300px;
        font-size: 0.8rem;
    }

    /* Reduce modal padding */
    .modal-body {
        padding: 15px;
    }

    /* File manager - hide size column */
    .file-manager-table .file-size {
        display: none;
    }

    /* Pagination - show only nearby pages */
    .pagination .page-item:not(.active):not(.disabled) {
        display: none;
    }

    .pagination .page-item.active,
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: inline-block;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .table td,
    .table th {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .nav-link:hover,
    .table tr:hover {
        transform: none;
    }

    /* Add active state for touch feedback */
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .nav-link:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #terminal {
        height: 250px;
    }

    .modal-dialog {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
}

/* ==================== Command Autocomplete Styles ==================== */
.command-autocomplete {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.2s ease;
}

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

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--accent-primary);
    color: white;
}

.autocomplete-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.autocomplete-item-text {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
}

.autocomplete-item-description {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: auto;
}

.autocomplete-category {
    padding: 6px 15px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-empty {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile adjustments for autocomplete */
@media (max-width: 768px) {
    .command-autocomplete {
        max-height: 200px;
        font-size: 0.85rem;
    }

    .autocomplete-item {
        padding: 8px 12px;
    }

    .autocomplete-item-description {
        display: none;
    }
}