/* Server Info Watchdog Admin UI Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus: #2563eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    background: var(--input-bg);
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Threshold Grid */
.threshold-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.threshold-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.threshold-item .threshold-label {
    font-weight: 500;
    min-width: 180px;
}

.threshold-item .current-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 100px;
}

.threshold-item .current-number {
    font-weight: 600;
    font-size: 0.875rem;
}

.threshold-item .current-number.status-ok {
    color: var(--success-color);
}

.threshold-item .current-number.status-warning {
    color: var(--warning-color);
}

.threshold-item .current-number.status-error {
    color: var(--error-color);
}

.threshold-item input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.threshold-item .input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.threshold-item .input-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 50px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

/* Actions Card */
.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Status Messages */
.status {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status.success {
    background-color: #dcfce7;
    color: var(--success-color);
    border: 1px solid #86efac;
}

.status.error {
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid #fca5a5;
}

.status.warning {
    background-color: #fef3c7;
    color: var(--warning-color);
    border: 1px solid #fcd34d;
}

.error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .threshold-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .threshold-item .threshold-label {
        margin-bottom: 0.25rem;
    }

    .threshold-item .current-value {
        margin-bottom: 0.25rem;
    }

    .threshold-item .input-group {
        margin-bottom: 0.25rem;
    }
}
