@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600&family=Source+Sans+Pro:wght@400;500;600&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #2c2c2c;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    background: #186058;
    color: #fff;
    padding: 40px 24px 28px;
    text-align: center;
}
.site-header h1 {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.site-header p { font-size: 1rem; color: #f0f0f0; margin-top: 6px; }

/* ── Nav ── */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.site-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    transition: background 0.2s;
}
.site-nav a:hover, .site-nav a.active { background: #3a8078; border-color: #3a8078; }

/* ── Container ── */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

/* ── Card (KB update form) ── */
.card {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 28px 24px;
}

/* ── Form shared ── */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #2c2c2c;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    color: #2c2c2c;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
input:focus, select:focus { outline: none; border-color: #186058; }
input::placeholder { color: #999; }
small { display: block; margin-top: 4px; color: #666; font-size: 0.8rem; }

/* ── Checkbox row ── */
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #00d084; cursor: pointer; }
.checkbox-row span { font-size: 0.95rem; }

/* ── Divider ── */
.or-divider { text-align: center; font-size: 0.8rem; color: #999; margin: 4px 0 8px; font-style: italic; }

/* ── Buttons ── */
button[type="submit"] {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 4px;
    background: #186058;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
button[type="submit"]:hover:not(:disabled) { background: #3a8078; }
button[type="submit"]:disabled { background: #999; cursor: not-allowed; }

.btn {
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-family: inherit;
}
.btn-primary  { background: #186058; color: #fff; border: none; }
.btn-primary:hover  { background: #3a8078; }
.btn-secondary { background: transparent; color: #186058; border: 1px solid #186058; }
.btn-secondary:hover { background: #f0faf7; }

/* ── Status (shared) ── */
#status, .status {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
}
#status { display: none; }
.status { display: block; }

#status.success, .status.success { background: #e8f5e9; border: 1px solid #00d084; color: #1b5e20; }
#status.error,   .status.error   { background: #fdecea; border: 1px solid #e53935; color: #7f0000; }
#status.info,    .status.loading { background: #f0faf7; border: 1px solid #00d084; color: #186058; }

.status-icon { font-size: 1.6rem; text-align: center; margin-bottom: 8px; }
.status-message { text-align: center; font-size: 1rem; font-weight: 500; }
.status-detail  { text-align: center; color: #666; margin-top: 6px; font-size: 0.875rem; }

/* ── Result ── */
.result {
    margin-top: 24px;
    padding: 20px;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #00d084;
}
.result h3  { margin-bottom: 12px; color: #186058; font-family: 'Crimson Text', Georgia, serif; font-size: 1.3rem; }
.result-actions { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

#result-preview {
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    font-size: 0.82rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c2c2c;
}

/* ── Spinner ── */
.spinner {
    display: inline-block; width: 13px; height: 13px;
    border: 2px solid #b2dfdb; border-top-color: #186058;
    border-radius: 50%; animation: spin .7s linear infinite;
    vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
footer {
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #666;
    font-size: 0.82rem;
    padding: 24px 0 32px;
    margin-top: 24px;
}
footer a { color: #186058; text-decoration: none; }
footer a:hover { text-decoration: underline; }

