:root {
    --forest: #0f78a8;
    --mid: #2e7d32;
    --sage: #92c677;
    --sage-light: #c8e6b0;
    --sage-pale: #eef6e8;
    --ink: #0f0f0f;
    --charcoal: #1a1a1a;
    --slate: #173412;
    --mist: #f0f4ee;
    --white: #ffffff;
    --border: rgba(27, 94, 32, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cf-wrap {
    font-family: var(--font-sans, system-ui, sans-serif);
    padding: 2rem 1.5rem;
    max-width: 820px;
    margin: 0 auto;
}

.cf-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.cf-header {
    background: var(--forest);
    padding: 2rem 2rem 1.6rem;
    position: relative;
}

.cf-header-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sage) 0%, var(--sage-light) 100%);
}

.cf-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.cf-header-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--sage-light);
}

.cf-header h1 {
    font-size: 20px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 4px;
}

.cf-header p {
    font-size: 13px;
    color: rgba(200, 230, 176, 0.8);
}

.cf-body {
    padding: 2rem;
}

.sec-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 1.2rem;
}

.sec-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sec-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sage);
    flex-shrink: 0;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 560px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .cf-body {
        padding: 1.25rem;
    }
}

.field-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-box label {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-icon {
    width: 16px;
    height: 16px;
    fill: var(--mid);
    flex-shrink: 0;
}

.field-box input,
.field-box select,
.phone-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--ink);
    background: var(--mist);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.18s, background 0.18s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.field-box input::placeholder {
    color: rgba(15, 15, 15, 0.3);
}

.field-box input:focus,
.field-box select:focus,
.phone-input:focus {
    border-color: var(--mid);
    background: var(--sage-pale);
}

.field-box.has-error input,
.field-box.has-error select,
.field-box.has-error .phone-wrap {
    border-color: #c62828 !important;
}

.phone-wrap {
    display: flex;
    gap: 8px;
}

.phone-wrap select {
    width: 160px;
    flex-shrink: 0;
    background: var(--mist);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    padding: 0 10px;
    color: var(--ink);
    height: 42px;
    cursor: pointer;
}

.phone-wrap select:focus {
    border-color: var(--mid);
    background: var(--sage-pale);
}

.phone-wrap input {
    flex: 1;
}

.err-msg {
    font-size: 14px;
    color: #c62828;
    display: none;
    align-items: center;
    gap: 4px;
}

.field-box.has-error .err-msg {
    display: flex;
}

.err-icon {
    width: 12px;
    height: 12px;
    fill: #c62828;
    flex-shrink: 0;
}

.sec-gap {
    margin-top: 1.6rem;
}

.cf-divider {
    border: none;
    border-top: 1.5px solid var(--border);
    margin: 1.6rem 0;
}

.submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--forest);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 0 28px;
    height: 46px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
}

.submit-btn:hover {
    background: var(--mid);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--sage-light);
}

.form-note {
    font-size: 14px;
    color: rgba(23, 52, 18, 0.55);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-note svg {
    width: 12px;
    height: 12px;
    fill: var(--sage);
}

.success-msg {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--sage-pale);
    border: 1.5px solid var(--sage-light);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 1rem;
    font-size: 14px;
    color: var(--slate);
}

.success-msg svg {
    width: 20px;
    height: 20px;
    fill: var(--mid);
    flex-shrink: 0;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--mid);
    pointer-events: none;
}

.select-wrap select {
    padding-right: 30px;
    cursor: pointer;
}

.field-box.has-error .select-wrap select {
    border-color: #c62828;
}