/* ═══════════════════════════════════════════
   CFG Panel — Design System
   Dark theme, glassmorphism, premium feel
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #5a5a7a;
    --accent-blue: #667eea;
    --accent-purple: #764ba2;
    --accent-green: #34d399;
    --accent-red: #f87171;
    --accent-orange: #fbbf24;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    background-image: radial-gradient(circle at top right, rgba(102, 126, 234, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at bottom left, rgba(118, 75, 162, 0.05) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ─── Icons (Lucide) ─── */
[data-lucide] {
    vertical-align: middle;
    width: 1.15em;
    height: 1.15em;
    stroke-width: 2.2;
}

.action-icon [data-lucide] {
    width: 2.5rem;
    height: 2.5rem;
    stroke-width: 1.8;
    color: var(--accent-blue);
}

.server-icon [data-lucide] {
    width: 1.8rem;
    height: 1.8rem;
    stroke-width: 1.5;
}

/* ─── Login Page ─── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1040 50%, var(--bg-primary) 100%);
}

.login-container { width: 100%; max-width: 420px; padding: 2rem; }

.login-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(20px);
}

.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ─── Forms ─── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group input::placeholder { color: var(--text-muted); }

.form-info {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.form-info code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent-blue);
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: #fff;
}
.btn-accent:hover {
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover { box-shadow: 0 4px 20px rgba(248, 113, 113, 0.3); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.btn-danger-ghost:hover { color: var(--accent-red); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }

.btn-icon {
    width: 32px; height: 32px;
    padding: 0; justify-content: center;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    border: none; cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.btn-icon:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.btn-icon.danger:hover { color: var(--accent-red); background: rgba(248,113,113,0.1); }

/* ─── Alert ─── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
}

/* ─── Header ─── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 0.75rem; }
.header-left h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo { font-size: 1.5rem; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }

/* ─── Main ─── */
.main { max-width: 1100px; margin: 0 auto; padding: 2rem; }

/* ─── Action Grid ─── */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.action-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.15);
}
.action-icon { font-size: 2.25rem; margin-bottom: 1rem; }
.action-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.action-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.25rem; }

/* ─── Section ─── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.15rem; font-weight: 600; }

/* ─── Sites List ─── */
.sites-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.site-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.site-item:last-child { border-bottom: none; }
.site-item:hover { background: rgba(255,255,255,0.02); }

.site-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.site-info .domain {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-info .path {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-badges { display: flex; gap: 0.4rem; margin: 0 0.75rem; flex-shrink: 0; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-ssl {
    background: rgba(52, 211, 153, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.badge-active {
    background: rgba(102, 126, 234, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(102, 126, 234, 0.2);
}
.badge-inactive {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.site-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ─── Modals ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    animation: modalIn 0.2s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-header h2 { font-size: 1.15rem; }
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 1.4rem; border-radius: 6px;
    transition: all var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.delete-warning {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ─── Toasts ─── */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    max-width: 400px;
}
.toast-success {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: var(--accent-green);
}
.toast-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--accent-red);
}

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

/* ─── Tabs ─── */
.header-center { display: flex; align-items: center; }

.tabs { display: flex; gap: 0.25rem; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 0.2rem; }
.tab {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-blue);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Type Picker ─── */
.type-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.type-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.type-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}
.type-option.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--accent-blue);
}
.type-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.type-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── Server Grid ─── */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.server-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.server-title-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.server-icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}
.server-name {
    font-weight: 600;
    font-size: 1.05rem;
}
.server-status {
    display: flex;
    gap: 0.5rem;
}

.server-info {
    flex: 1;
    margin-bottom: 1.5rem;
}
.srv-path {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.server-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0.5rem;
    border-radius: 8px;
}
.action-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.action-btn.start:hover { color: var(--accent-green); background: rgba(52, 211, 153, 0.1); }
.action-btn.stop:hover { color: var(--accent-red); background: rgba(248, 113, 113, 0.1); }
.action-btn.restart:hover { color: var(--accent-orange); background: rgba(251, 191, 36, 0.1); }
.action-icon-lg { font-size: 1.2rem; }

/* ─── Type Picker ─── */
.type-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.type-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}
.type-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}
.type-option.selected {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--accent-blue);
}
.type-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.type-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── Server Grid ─── */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition);
}
.server-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.server-title-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.server-icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}
.server-name {
    font-weight: 600;
    font-size: 1.05rem;
}
.server-status {
    display: flex;
    gap: 0.5rem;
}

.server-info {
    flex: 1;
    margin-bottom: 1.5rem;
}
.srv-path {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.server-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0.5rem;
    border-radius: 8px;
}
.action-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.action-btn.start:hover { color: var(--accent-green); background: rgba(52, 211, 153, 0.1); }
.action-btn.stop:hover { color: var(--accent-red); background: rgba(248, 113, 113, 0.1); }
.action-btn.restart:hover { color: var(--accent-orange); background: rgba(251, 191, 36, 0.1); }
.action-icon-lg { font-size: 1.2rem; }

/* ─── Server Detail & File Manager ─── */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.detail-title-area {
    display: flex;
    align-items: center;
}
.detail-actions {
    display: flex;
    gap: 0.5rem;
}

.detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.d-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition);
}
.d-tab:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.d-tab.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
.d-tab-content { display: none; }
.d-tab-content.active { display: block; }

.console-wrapper {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.console-header {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.fm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}
.fm-path { display: flex; align-items: center; }
.fm-actions { display: flex; gap: 0.5rem; }

.fm-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
}
.fm-table {
    width: 100%;
    border-collapse: collapse;
}
.fm-table th, .fm-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fm-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}
.fm-table tr:hover td { background: rgba(255,255,255,0.02); }
.fm-table td.actions { text-align: right; }

.fm-editor {
    width: 100%;
    height: 500px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}
.fm-editor:focus { border-color: var(--accent-blue); background: rgba(0,0,0,0.5); }

/* ─── Server Badges ─── */
.badge-running {
    background: rgba(52, 211, 153, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.badge-stopped {
    background: rgba(248, 113, 113, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}
.badge-enabled {
    background: rgba(102, 126, 234, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* ─── Server Info ─── */
.srv-command {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.srv-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ─── Logs Modal ─── */
.modal-wide { max-width: 800px; }

.logs-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
}

.logs-output {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

.action-card-wide { grid-column: 1 / -1; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .header { padding: 1rem; flex-direction: column; gap: 1rem; }
    .header-left, .header-right { width: 100%; justify-content: space-between; }
    .header-center { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.2rem; }
    .tabs { display: flex; flex-wrap: nowrap; width: max-content; }
    
    .main { padding: 1rem; }
    
    .action-grid, .server-grid { grid-template-columns: 1fr; }
    
    .site-item { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .site-badges { margin: 0; flex-wrap: wrap; }
    .site-actions { width: 100%; display: flex; justify-content: flex-end; }
    
    .modal { padding: 1.5rem; max-width: 95vw; }
    .modal-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .modal-actions .btn + .btn { margin-top: 0.5rem; }
    
    .logs-container { max-height: 250px; }
    
    /* Servers Responsive */
    .server-card { padding: 1rem; }
    .server-actions-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .action-btn { padding: 0.75rem; background: rgba(255,255,255,0.03); }
    
    /* Server Detail Responsive */
    .detail-header { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem; }
    .detail-actions { width: 100%; flex-wrap: wrap; }
    .detail-actions .btn { flex: 1; }
    
    .detail-tabs { display: flex; width: 100%; }
    .d-tab { flex: 1; text-align: center; padding: 0.75rem 0.5rem; font-size: 0.85rem; }
    
    .fm-toolbar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .fm-toolbar .btn { justify-content: center; }
    
    .fm-table { display: block; overflow-x: auto; white-space: nowrap; }
    .fm-editor { height: 350px; padding: 1rem; }
}
