/* Modern Design System */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-soft: #eff6ff;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-dark: #334155;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --light: #f8fafc;
    --white: #ffffff;
    --sidebar-width: 280px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: var(--dark);
    line-height: 1.5;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-right: 1px solid var(--gray-light);
    z-index: 100;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 24px;
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
}

.sidebar-header p {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

.nav-menu {
    padding: 0 16px;
}

.nav-item {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

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

.nav-icon {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
}

/* Top Bar */
.top-bar {
    background: var(--white);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
}

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

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

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

/* Buttons */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--gray-dark);
    border: 1px solid transparent;
}

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

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-light);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-light);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Container Cards */
.containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.container-card {
    background: var(--light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: all 0.2s;
    border: 1px solid var(--gray-light);
}

.container-card.running {
    border-left: 4px solid var(--success);
}

.container-card.stopped {
    border-left: 4px solid var(--danger);
}

.container-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    background: var(--white);
}

.container-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.container-name span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.container-status {
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-running {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-stopped {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    border: 1px solid var(--gray-light);
}

.stat-card:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Two Column */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.two-column h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.two-column p {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 16px;
}

/* Select */
select {
    padding: 10px 14px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    width: 100%;
    color: var(--dark);
    margin-bottom: 16px;
}

select:hover {
    border-color: var(--primary);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Backup List */
.backup-list {
    max-height: 320px;
    overflow-y: auto;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--light);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all 0.2s;
    border: 1px solid var(--gray-light);
}

.backup-item:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: translateX(4px);
}

.backup-date {
    font-family: monospace;
    font-size: 12px;
    color: var(--dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.backup-size {
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
    background: var(--gray-light);
    padding: 2px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Restore Status */
.restore-status {
    margin-top: 24px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: none;
    font-size: 13px;
    font-weight: 500;
}

.restore-status.success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.restore-status.error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.restore-status.warning {
    background: rgba(245, 158, 11, 0.08);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px 0 0;
    color: var(--gray);
    font-size: 12px;
    margin-top: 40px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .two-column {
        grid-template-columns: 1fr;
    }
    .containers-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
/* ─── Add these to your existing style.css ─────────────────────────────── */

/* Restore form layout */
.restore-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding: 20px 0;
}
.form-section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gray, #6b7280);
    margin-bottom: 14px;
}

/* Radio cards */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.radio-card {
    cursor: pointer;
    flex: 1;
    min-width: 180px;
}
.radio-card input[type="radio"] { display: none; }
.radio-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--light, #f9fafb);
    transition: border-color 0.15s, background 0.15s;
}
.radio-card input:checked + .radio-body {
    border-color: var(--primary, #6366f1);
    background: #eef2ff;
}
.radio-icon { font-size: 22px; }
.radio-label { font-weight: 600; font-size: 14px; }
.radio-desc  { font-size: 12px; color: var(--gray, #6b7280); }
.radio-desc code { background: #e5e7eb; padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* Small radio cards (auth method) */
.radio-card.small .radio-body { padding: 10px 14px; gap: 8px; }
.radio-card.small .radio-label { font-size: 13px; }

/* Form controls */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--dark, #111827);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
}
.form-row {
    display: flex;
    gap: 14px;
}
.form-row .form-group { flex: 1; }

/* Buttons */
.btn-lg { padding: 14px 28px; font-size: 15px; font-weight: 600; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* Log console */
.log-console {
    background: #0f172a;
    border-radius: 10px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    max-height: 420px;
    overflow-y: auto;
    color: #e2e8f0;
}
.log-line { white-space: pre-wrap; word-break: break-all; }

/* Backup list items */
.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--light, #f9fafb);
    gap: 10px;
    flex-wrap: wrap;
}
.backup-date { font-size: 13px; font-family: monospace; word-break: break-all; }
