* {
    box-sizing: border-box;
}

:root {
    --page-bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e6e6e6;
    --border-strong: #dcdcdc;
    --text-main: #1f2937;
    --text-soft: #6b7280;
    --primary: #4f7cff;
    --primary-hover: #3f6ae6;
    --success-bg: #edf8f0;
    --success-text: #1f7a3f;
    --error-bg: #fff1f1;
    --error-text: #b42318;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top right, rgba(79, 124, 255, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #f5f6f8 40%, #eef2f7 100%);
}

.header-bar {
    background: white;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    flex: 1;
    text-align: center;
}

.back-btn {
    border: none;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.back-btn:hover {
    background: #e5e7eb;
}

.header-actions {
    display: flex;
    align-items: center;
}

.header-link {
    text-decoration: none;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 16px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}

.secondary-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.center-root {
    width: min(760px, calc(100% - 32px));
    margin: 36px auto 42px;
    display: grid;
    gap: 18px;
    flex: 1;
}

.card {
    background: white;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.intro-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.intro-text {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.form-row {
    margin-bottom: 18px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

input,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.5;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

.status-message {
    display: none;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.status-message.is-visible {
    display: block;
}

.status-message.is-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(31, 122, 63, 0.18);
}

.status-message.is-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid rgba(180, 35, 24, 0.15);
}

.action-row {
    display: flex;
    justify-content: flex-end;
}

.primary-btn {
    border: none;
    border-radius: 8px;
    padding: 11px 18px;
    min-width: 190px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.primary-btn:disabled {
    cursor: wait;
    opacity: 0.75;
}

.footer-bar {
    background: white;
    border-top: 1px solid var(--border);
    padding: 18px 0 24px;
}

.footer-content {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-text,
.footer-note,
.footer-status {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}

.footer-link {
    color: var(--primary-hover);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-note,
.footer-status {
    width: 100%;
    font-size: 13px;
    color: var(--text-soft);
}

.footer-status {
    min-height: 1.25rem;
}

.footer-status.is-visible {
    color: #3257c9;
}

@media (max-width: 700px) {
    .header-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        min-height: 70px;
        box-sizing: border-box;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    .back-btn {
        position: static;
    }

    .header-title {
        font-size: 16px;
        text-align: center;
    }

    .center-root {
        width: calc(100% - 24px);
        margin-top: 88px;
        margin-bottom: 28px;
    }

    .card {
        padding: 18px;
        border-radius: 10px;
    }

    .card h2 {
        font-size: 18px;
    }

    .secondary-btn {
        padding: 10px 12px;
        font-size: 13px;
    }

    input,
    textarea {
        font-size: 16px;
    }

    .action-row {
        justify-content: stretch;
    }

    .primary-btn {
        width: 100%;
    }

    .footer-content {
        width: calc(100% - 24px);
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 12px;
    }
}
