/* MCP Dashboard Styles */

:root {
    --primary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f3f4f6;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    color: var(--dark);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

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

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

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

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Server Cards */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.server-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.server-name {
    font-size: 18px;
    font-weight: 600;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-running {
    background: #d1fae5;
    color: #065f46;
}

.status-stopped {
    background: #fee2e2;
    color: #991b1b;
}

.status-error {
    background: #fef3c7;
    color: #92400e;
}

.server-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    color: #6b7280;
    font-size: 14px;
}

.info-value {
    font-weight: 500;
    font-size: 14px;
}

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

/* Logs Section */
.logs-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 20px;
}

.section-header select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.logs-container {
    background: #1f2937;
    color: #f3f4f6;
    padding: 15px;
    border-radius: 6px;
    height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.logs-placeholder {
    color: #9ca3af;
    text-align: center;
    padding: 20px;
}

.log-line {
    padding: 2px 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Metrics Section */
.metrics-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.metrics-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.metric-card {
    background: var(--light);
    padding: 15px;
    border-radius: 6px;
}

.metric-name {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.metric-unit {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

/* Scrollbar */
.logs-container::-webkit-scrollbar {
    width: 8px;
}

.logs-container::-webkit-scrollbar-track {
    background: #374151;
}

.logs-container::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Login overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 360px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.login-box h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 14px;
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 10px;
    min-height: 18px;
}

/* Logout button */
.btn-logout {
    background: transparent;
    color: #6b7280;
    border: 1px solid var(--border);
}

.btn-logout:hover {
    background: #fee2e2;
    color: var(--danger);
    border-color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .servers-grid {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
