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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5; color: #1c1e21;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
}

.container { width: 100%; max-width: 440px; padding: 20px; }

.card {
    background: #fff; border-radius: 12px; padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.header h1 { font-size: 18px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px 20px; border: none; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s;
    text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: #1877f2; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #166fe5; }
.btn-outline {
    width: auto; padding: 8px 16px; background: transparent;
    border: 1px solid #dadde1; color: #65676b; font-size: 13px; margin-top: 8px;
}
.btn-outline:hover { background: #f0f2f5; }

/* ── Form ── */
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 13px; font-weight: 600; color: #65676b; margin-bottom: 6px; }

.select, .input {
    width: 100%; padding: 10px 12px; border: 1px solid #dadde1;
    border-radius: 8px; font-size: 14px; background: #fff;
}
.select:focus, .input:focus { outline: none; border-color: #1877f2; }

.date-row { display: flex; align-items: center; gap: 8px; }
.date-row .input { flex: 1; }
.sep { color: #65676b; font-size: 14px; }

.status-msg {
    margin-bottom: 16px; padding: 10px; border-radius: 8px; font-size: 13px; display: none;
}
.status-msg.error { background: #fee; color: #c41e3a; display: block; }
.status-msg.success { background: #e6f7e6; color: #1a7d1a; display: block; }

/* ── Loading ── */
.loading {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 16px; padding: 16px; background: #f7f8fa; border-radius: 8px;
    font-size: 14px; color: #65676b;
}
.spinner {
    width: 18px; height: 18px; border: 3px solid #e4e6eb;
    border-top-color: #1877f2; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result ── */
.result-box {
    margin-top: 16px; padding: 20px; text-align: center;
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
}
.result-icon { font-size: 32px; margin-bottom: 8px; }
.result-text { font-size: 15px; font-weight: 600; color: #1a7d1a; margin-bottom: 16px; }
.result-btn { margin-top: 8px; }

/* ── Error ── */
.error-box {
    margin-top: 16px; padding: 20px; text-align: center;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
}
.error-icon { font-size: 28px; margin-bottom: 8px; }
.error-msg {
    font-size: 14px; color: #c41e3a; margin-bottom: 12px;
    word-break: break-word;
}

h1 { font-size: 24px; margin-bottom: 8px; }
.subtitle { color: #65676b; margin-bottom: 24px; }
.info { margin-top: 20px; padding: 12px; background: #f7f8fa; border-radius: 8px; font-size: 13px; color: #65676b; }
.info code { background: #e4e6eb; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
