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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #faf7f2;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 680px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    margin-top: 20px;
}

label:first-of-type {
    margin-top: 0;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #666;
    background: #fff;
}

textarea {
    min-height: 160px;
    resize: vertical;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 4px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin-top: 0;
    cursor: pointer;
}

input[type="radio"] {
    accent-color: #333;
}

button, .btn {
    display: inline-block;
    padding: 12px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 28px;
}

button:hover, .btn:hover {
    background: #333;
}

.btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background: #f5f5f5;
}

.btn-success {
    background: #2d7d46;
}

.btn-success:hover {
    background: #236835;
}

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0ede8;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #1a1a1a;
}

.failed-list {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 13px;
    color: #9a3412;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 247, 242, 0.9);
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-text {
    margin-top: 16px;
    font-size: 15px;
    color: #666;
}
