/* ============================================
   VibeControl Custom Styles
   Theme: "Elegant Slate" - Dark Slate, Purple, Muted Blue, Soft Teal
   ============================================ */

:root {
    /* Color Palette */
    --color-bg-base: #1e1e24;       /* Darkest Slate Background */
    --color-bg-surface: #2b2b36;    /* Card/Surface Background */
    --color-bg-surface-hover: #32323f;
    
    --color-primary: #5b2a86;       /* Medium Purple */
    --color-primary-dark: #360568;  /* Deep Purple */
    --color-secondary: #7785ac;     /* Muted Blue/Purple */
    --color-accent: #9ac6c5;        /* Soft Teal/Cyan */
    
    --color-text: #f0f0f5;          /* Primary Text */
    --color-text-muted: #9494a8;    /* Muted Text */
    
    --color-success: #4caf50;
    --color-warning: #ff9800;
    --color-danger: #e57373;
    
    --color-border: #3e3e4a;        /* Subtle Borders */
    
    /* Layout */
    --border-radius: 12px;
    --transition-speed: 0.25s;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Global Reset & Base */
body {
    background-color: var(--color-bg-base);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(91, 42, 134, 0.08), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(154, 198, 197, 0.05), transparent 40%);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

code {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1em 0.3em;
    border-radius: 4px;
}

/* Navbar */
.navbar {
    background: rgba(30, 30, 36, 0.95);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-height: 100px;
}

.navbar .container-fluid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    grid-column: 2;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all var(--transition-speed);
}

.nav-actions {
    grid-column: 3;
    justify-self: end;
}

.brand-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 0 20px rgba(154, 198, 197, 0.5));
}

.brand-text {
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Breadcrumb */
.breadcrumb-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
}

.breadcrumb-item {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    color: var(--color-text);
    font-weight: 600;
}

.context-toggle {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.context-toggle:hover {
    background: var(--color-bg-surface-hover);
    border-color: var(--color-secondary);
}

.context-header-card {
    background: linear-gradient(135deg, rgba(91, 42, 134, 0.2), rgba(30, 30, 36, 0.6));
    border: 1px solid rgba(154, 198, 197, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    transition: transform var(--transition-speed);
}

.context-header-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 6px 16px rgba(154, 198, 197, 0.15);
}

/* Main Container */
.main-container {
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 0; /* Bootstrap override */
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(65, 161, 155, 0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
    z-index: 1;
}

.menu-card:hover::before {
    left: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 188, 212, 0.1), transparent);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Menu Cards */
.menu-card {
    cursor: pointer;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-card:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg);
    border-color: var(--color-accent);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(154, 198, 197, 0.2);
}

.menu-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--color-secondary);
    transition: all 0.4s ease;
}

.menu-icon-img {
    height: 2.5rem;
    width: auto;
    transition: all 0.4s ease;
    filter: sepia(1) saturate(5) hue-rotate(200deg) brightness(0.8); /* Match color-secondary roughly */
}

.menu-card:hover .menu-icon-img {
    transform: scale(1.2) rotate(-5deg);
    filter: sepia(1) saturate(5) hue-rotate(140deg) brightness(1.1); /* Match color-accent roughly */
}

.menu-card:hover .menu-icon {
    color: var(--color-accent);
    transform: scale(1.2) rotate(-5deg);
}

.menu-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.menu-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(91, 42, 134, 0.4);
}

.btn-secondary {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-bg-surface-hover);
    border-color: var(--color-secondary);
    color: var(--color-text);
}

.btn-outline-secondary {
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--color-bg-surface);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

.btn-outline-primary {
    border: 1px solid var(--color-primary);
    color: var(--color-primary); /* Changed to primary */
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Status Elements */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator.online {
    background-color: var(--color-success);
    box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
    animation: pulse-green 2s infinite;
}

.status-indicator.offline {
    background-color: var(--color-danger);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.status-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.status-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Lists */
.list-group-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    margin-bottom: -1px;
}

.list-group-item:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Project History */
.project-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item {
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.project-item:hover {
    background-color: var(--color-bg-surface-hover);
    border-left-color: var(--color-primary);
    transform: translateX(2px);
}

.project-logo-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.project-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.project-path {
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.min-w-0 {
    min-width: 0;
}

/* Agent Files List */
.agent-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-file-item {
    cursor: pointer;
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
    padding: 0.75rem 1rem;
    position: relative;
    overflow: hidden;
}

.agent-file-item:hover {
    background-color: var(--color-bg-surface-hover);
    border-left-color: var(--color-accent);
    transform: translateX(2px);
}

.agent-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(154, 198, 197, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.file-icon-emoji {
    font-size: 1.4rem;
}

.file-path-wrapper {
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.file-dir {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.file-name {
    color: var(--color-accent);
    font-weight: 600;
}

.cli-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(2, 6, 23, 0.15));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cli-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Tech Stack Items */
.tech-item {
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
}

.tech-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tech-item h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--color-accent) !important;
}

.tech-item p {
    font-weight: 500;
    margin: 0;
    color: var(--color-text);
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 600;
    border-radius: 6px;
}

.badge-context-local {
    background: rgba(154, 198, 197, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(154, 198, 197, 0.3);
}

.badge-context-global {
    background: rgba(119, 133, 172, 0.15);
    color: var(--color-secondary);
    border: 1px solid rgba(119, 133, 172, 0.3);
}

.badge-cli {
    background: rgba(91, 42, 134, 0.2);
    color: #ceb2ea;
    border: 1px solid rgba(91, 42, 134, 0.4);
}

/* Forms */
.form-control, .form-select {
    background-color: var(--color-bg-base);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    background-color: var(--color-bg-base);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(91, 42, 134, 0.25);
    color: var(--color-text);
}

.form-label {
    color: var(--color-text-muted);
}

/* Terminal / Logs */
.terminal {
    background: #15151a;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #d0d0d0;
    max-height: 500px;
    overflow-y: auto;
}

/* Wizard */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.wizard-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.wizard-step.active .wizard-step-number {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.wizard-step-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.wizard-step.active .wizard-step-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* Tables */
.table {
    color: var(--color-text);
    border-color: var(--color-border);
}

.table thead th {
    background-color: rgba(0,0,0,0.2);
    border-bottom-width: 2px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.table td {
    border-color: var(--color-border);
}

.table-hover tbody tr:hover {
    color: var(--color-text);
    background-color: var(--color-bg-surface-hover);
}

/* Danger Zones */
.danger-card .card-body {
    background: rgba(229, 115, 115, 0.05);
}

.text-danger {
    color: var(--color-danger) !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    font-weight: 600;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.bg-light {
    background-color: var(--color-bg-surface) !important;
}

.rule-card {
    background: var(--color-bg-surface);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--color-border) !important;
}

.rule-card:hover {
    border-color: var(--color-accent) !important;
    background: var(--color-bg-surface-hover);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 10px rgba(154, 198, 197, 0.1);
}

.rule-card.active {
    border-color: var(--color-accent) !important;
    background: rgba(154, 198, 197, 0.12) !important;
    box-shadow: 0 0 20px rgba(154, 198, 197, 0.2);
    border-left: 5px solid var(--color-accent) !important;
    transform: translateX(4px);
}

.rule-icon {
    font-size: 1.2rem;
    opacity: 0.7;
}

.path-badge {
    background: rgba(154, 198, 197, 0.1);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.0rem;
    font-weight: 500;
    border: 1px solid rgba(154, 198, 197, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02em;
}

.agent-file-button {
    border-width: 1px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.agent-file-button:hover {
    background: rgba(91, 42, 134, 0.1);
    transform: translateX(5px);
}

.agent-file-button .file-name {
    color: var(--color-accent);
}

.agent-file-button:hover .file-name {
    color: #fff;
}

/* Toggle Icon Animation */
.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

/* Agent Files Tree Enhanced Styling */
.agent-files-tree {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-file-tree-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.agent-file-tree-item:hover {
    background: var(--color-bg-surface-hover);
    border-left-color: var(--color-accent);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agent-file-tree-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(154, 198, 197, 0.1);
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.agent-file-tree-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.agent-file-tree-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-accent);
}

.agent-file-tree-path {
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-file-tree-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
    background: rgba(91, 42, 134, 0.2);
    color: #ceb2ea;
    border: 1px solid rgba(91, 42, 134, 0.3);
    flex-shrink: 0;
}

/* Empty state for agent files */
.agent-files-empty {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
}

.agent-files-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* File Summary Grid for Agent Files */
.file-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.file-summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.file-summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-summary-icon.dir-icon {
    background: linear-gradient(135deg, rgba(119, 133, 172, 0.3), rgba(91, 42, 134, 0.2));
    border: 1px solid rgba(119, 133, 172, 0.3);
}

.file-summary-icon.dir-icon::before {
    content: '';
    width: 16px;
    height: 12px;
    background: var(--color-secondary);
    border-radius: 1px 4px 3px 3px;
    position: relative;
}

.file-summary-icon.dir-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 2px 2px 0 0;
    margin-top: -14px;
    margin-left: -8px;
}

.file-summary-icon.file-icon {
    background: linear-gradient(135deg, rgba(154, 198, 197, 0.2), rgba(154, 198, 197, 0.1));
    border: 1px solid rgba(154, 198, 197, 0.3);
}

.file-summary-icon.file-icon::before {
    content: '';
    width: 12px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 2px;
    opacity: 0.8;
}

.file-summary-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.125rem;
}

.file-summary-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-item .file-summary-name {
    color: var(--color-secondary);
}

.file-item .file-summary-name {
    color: var(--color-accent);
}

.file-summary-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.file-summary-overflow {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Agent Edit Cards Improved */
.agent-edit-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.25s ease;
}

.agent-edit-card:hover {
    border-color: rgba(154, 198, 197, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.agent-edit-card .card-header {
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
}

.agent-edit-card .card-body {
    padding: 1.25rem;
}

/* Modal Styling for Dark Theme */
.modal-content {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
}

.modal-header {
    background-color: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.modal-title {
    color: var(--color-text);
}

.modal-body {
    background-color: var(--color-bg-surface);
    color: var(--color-text);
}

.modal-footer {
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Form Check / Switch Styling for Dark Theme */
.form-check-label {
    color: var(--color-text);
}

.form-check-input {
    background-color: var(--color-bg-base);
    border-color: var(--color-border);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(91, 42, 134, 0.25);
}

.form-switch .form-check-input {
    background-color: var(--color-bg-base);
    border-color: var(--color-border);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239494a8'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Form Helper Text */
.form-text {
    color: var(--color-text-muted);
}

.form-text.text-muted {
    color: var(--color-text-muted) !important;
}

.form-text.text-warning {
    color: var(--color-warning) !important;
}

/* Disabled Form Controls */
.form-control:disabled,
.form-control[disabled],
.form-control[readonly],
textarea.form-control:disabled,
input.form-control:disabled {
    background-color: var(--color-bg-base) !important;
    color: var(--color-text-muted) !important;
    border-color: var(--color-border) !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Horizontal Rules in modals */
.modal-body hr {
    border-color: var(--color-border);
    opacity: 0.5;
}

/* Section Headers in forms */
.modal-body h6.text-muted {
    color: var(--color-text-muted) !important;
}

/* --- New Visual Enhancements --- */

/* Gradient Text for Hero */
.text-gradient {
    background: linear-gradient(135deg, #a77bf3 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(91, 42, 134, 0.3);
}

/* Improved Install Command Block */
.install-cmd-box {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.install-cmd-box:hover {
    border-color: var(--color-secondary);
    background: rgba(0, 0, 0, 0.4) !important;
}

.install-cmd-box pre {
    margin: 0;
    white-space: pre-wrap;       /* CSS3 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--color-accent);
    padding-right: 3rem; /* Space for the copy button */
}

.install-cmd-box .btn-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text-muted);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.install-cmd-box .btn-copy:hover {
    background: var(--color-primary);
    color: white;
}