/* CSS Reset & Variables */
:root {
    /* Light Theme Palette */
    --bg-app: #f4f6fa;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(244, 246, 250, 0.85);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --primary: #6366f1;
    --primary-light: #e0e7ff;
    --primary-hover: #4f46e5;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-hover: #059669;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-hover: #dc2626;
    
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 18px -2px rgba(50, 50, 93, 0.05), 0 2px 10px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 30px -5px rgba(0, 0, 0, 0.08), 0 8px 16px -8px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Palette Override */
body.dark-theme {
    --bg-app: #0b0f19;
    --bg-card: #151f32;
    --bg-sidebar: #111a2e;
    --bg-header: rgba(11, 15, 25, 0.85);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #22314d;
    --border-hover: #2d3f63;
    
    --primary: #818cf8;
    --primary-light: #1e293b;
    --primary-hover: #6366f1;
    
    --success: #34d399;
    --success-light: #064e3b;
    
    --warning: #fbbf24;
    --warning-light: #78350f;
    
    --danger: #f87171;
    --danger-light: #7f1d1d;
    
    --info: #38bdf8;
    --info-light: #0c4a6e;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 18px -2px rgba(0, 0, 0, 0.4), 0 2px 10px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 30px -5px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Authentication Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-app);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: var(--transition);
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.logo-icon {
    color: #ffffff;
    width: 32px;
    height: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: var(--bg-card);
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(1px);
}

.error-msg {
    color: var(--danger);
    background-color: var(--danger-light);
    font-size: 13px;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    text-align: left;
    border-left: 3px solid var(--danger);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
    animation: pulseGlow 2s infinite ease-in-out;
}

.sidebar-header span {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 24px 0 12px 12px;
}

.nav-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    margin-bottom: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    width: 18px;
    height: 18px;
}

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

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    right: 14px;
}

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot.offline {
    background-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.status-dot.unconfigured {
    background-color: var(--text-muted);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-app);
    padding: 12px;
    border-radius: var(--radius-lg);
    position: relative;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar i {
    width: 18px;
    height: 18px;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.user-info .username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

.logout-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.logout-icon:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Topbar Styling */
.topbar {
    height: 70px;
    background-color: var(--bg-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    z-index: 90;
    transition: var(--transition);
}

.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-right: 12px;
}

.sync-indicator i {
    width: 14px;
    height: 14px;
}

.sync-indicator i.spinning {
    animation: spin 1s infinite linear;
}

.btn-icon {
    width: 38px;
    height: 38px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

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

.btn-icon i {
    width: 18px;
    height: 18px;
}

/* Content Body */
.content-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background-color: var(--bg-app);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

.stat-icon.purple { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.green { background-color: var(--success-light); color: var(--success); }
.stat-icon.orange { background-color: var(--warning-light); color: var(--warning); }
.stat-icon.blue { background-color: var(--info-light); color: var(--info); }

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

/* Section Titles */
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 16px 0;
    letter-spacing: -0.3px;
}

/* VPS List / Server Cards */
.vps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.vps-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.vps-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

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

.vps-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.vps-card-header .badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge.online { background-color: var(--success-light); color: var(--success); }
.badge.offline { background-color: var(--danger-light); color: var(--danger); }
.badge.unconfigured { background-color: var(--border-color); color: var(--text-secondary); }

.vps-card-body {
    padding: 20px 24px;
}

.vps-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
}

.vps-info-row:last-child {
    margin-bottom: 0;
}

.vps-info-row .label {
    color: var(--text-secondary);
}

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

.health-bar-container {
    margin-top: 18px;
}

.health-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.health-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.health-bar-fill {
    height: 100%;
    background-color: var(--success);
    transition: width 0.5s ease;
}

.health-bar-fill.warning { background-color: var(--warning); }
.health-bar-fill.danger { background-color: var(--danger); }

/* Alert Table / Container */
.alert-containers-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: var(--bg-app);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px 24px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.data-table tbody tr:hover td {
    background-color: rgba(99, 102, 241, 0.02);
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

/* Instance Detail Page Layout */
.instance-details-header {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.info-meta h2 {
    font-size: 22px;
    font-weight: 700;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
}

.info-meta .badge {
    display: inline-block;
    vertical-align: middle;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.info-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 20px;
    vertical-align: middle;
}

.info-meta .meta-item i {
    width: 16px;
    height: 16px;
}

.host-server-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.host-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.host-header i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.host-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.host-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.host-item {
    display: flex;
    flex-direction: column;
}

.host-item .label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.host-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
}

/* Projects Accordions */
.project-accordion {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.project-accordion-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    transition: var(--transition);
}

.project-accordion-header:hover {
    background-color: rgba(99, 102, 241, 0.01);
}

.project-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-title-group i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

.project-title-group h3 {
    font-size: 15px;
    font-weight: 700;
}

.project-stats-pills {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.pill.healthy { background-color: var(--success-light); color: var(--success); }
.pill.unhealthy { background-color: var(--danger-light); color: var(--danger); }
.pill.stopped { background-color: var(--border-color); color: var(--text-secondary); }

.project-accordion-content {
    border-top: 1px solid var(--border-color);
    padding: 24px;
    display: none;
    background-color: rgba(248, 250, 252, 0.3);
}

body.dark-theme .project-accordion-content {
    background-color: rgba(17, 24, 39, 0.1);
}

.project-accordion.expanded .project-accordion-content {
    display: block;
}

.project-accordion.expanded .chevron {
    transform: rotate(180deg);
}

.chevron {
    transition: var(--transition);
}

/* Resources subgrids */
.resources-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resources-section-title:first-child {
    margin-top: 0;
}

.resources-section-title i {
    width: 14px;
    height: 14px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.resource-grid:last-child {
    margin-bottom: 0;
}

.resource-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.resource-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.resource-name-box {
    display: flex;
    flex-direction: column;
    max-width: 75%;
}

.resource-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.resource-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.resource-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.resource-status-badge.healthy { background-color: var(--success-light); color: var(--success); }
.resource-status-badge.unhealthy { background-color: var(--danger-light); color: var(--danger); }
.resource-status-badge.stopped { background-color: var(--border-color); color: var(--text-secondary); }
.resource-status-badge.unknown { background-color: var(--warning-light); color: var(--warning); }

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}

.resource-domain {
    font-size: 11.5px;
    color: var(--primary);
    text-decoration: none;
    max-width: 60%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.resource-domain:hover {
    text-decoration: underline;
}

.btn-secondary {
    padding: 6px 12px;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary i {
    width: 14px;
    height: 14px;
}

.btn-small {
    padding: 4px 10px;
    font-size: 11.5px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 960px;
    height: 80vh;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-icon {
    color: var(--primary);
}

.modal-title-group h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-input {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow: hidden;
    background-color: #0b0f19;
}

.log-search-bar {
    position: relative;
    margin-bottom: 14px;
}

.log-search-bar input {
    width: 100%;
    background-color: #151f32;
    border: 1px solid #22314d;
    padding: 8px 12px 8px 36px;
    border-radius: var(--radius-sm);
    color: #e2e8f0;
    font-size: 13px;
    font-family: var(--font-sans);
}

.log-search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.log-search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 16px;
    height: 16px;
}

.log-terminal {
    flex: 1;
    overflow: auto;
    background-color: #040811;
    border: 1px solid #1e293b;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 0;
}

.log-terminal code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #f1f5f9;
    line-height: 1.5;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autoscroll-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.autoscroll-toggle input {
    cursor: pointer;
}

.text-small {
    font-size: 11px;
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: slideInRight 0.3s ease;
    transition: var(--transition);
}

.toast.error {
    background-color: var(--danger);
}

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

.toast.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Utilities / Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@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 pulseGlow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.4)); }
    50% { opacity: 0.7; filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.8)); }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

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