@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #57246f;
    --primary-dark: #2f123f;
    --primary-soft: rgba(87, 36, 111, 0.11);
    --primary-hover: #74358e;

    --text: #162033;
    --muted: #667085;
    --border: rgba(226, 232, 240, 0.95);

    --card: rgba(255, 255, 255, 0.92);
    --card-section: rgba(255, 255, 255, 0.74);

    --danger: #dc2626;
    --danger-bg: #fff6f6;

    --warning-bg: rgba(255, 248, 232, 0.94);
    --warning-border: #f0d99d;
    --warning-text: #765319;

    --shadow: 0 24px 70px rgba(24, 16, 42, 0.28);
    --shadow-soft: 0 14px 34px rgba(24, 16, 42, 0.14);

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 13px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background-color: #2f123f;
    background-image:
        linear-gradient(180deg, rgba(40, 20, 58, 0.45), rgba(40, 20, 58, 0.80)),
        url('./blueberries.jpg');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 18px 10px 34px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.22), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(238, 207, 142, 0.16), transparent 30%),
        rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.page-wrapper {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 22px;
    margin-bottom: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(55, 21, 77, 0.92), rgba(106, 53, 129, 0.68));
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.23), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 230, 160, 0.18), transparent 32%);
    pointer-events: none;
}

.hero-top,
.hero-content {
    position: relative;
    z-index: 1;
}

.hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.logo-panel {
    width: 160px;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.logo-panel img {
    display: block;
    max-width: 100%;
    max-height: 54px;
    object-fit: contain;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.17);
    border: 1px solid rgba(255, 255, 255, 0.27);
    color: rgba(255, 255, 255, 0.96);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.hero-pill .material-icons-extended {
    font-size: 18px;
}

.hero-kicker {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(31px, 7vw, 46px);
    line-height: 1.02;
    letter-spacing: -1.2px;
    font-weight: 900;
}

.hero-content p {
    max-width: 620px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.55;
}

.form-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.form-header {
    padding: 26px 24px 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(247, 241, 250, 0.92));
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.form-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.form-tag .material-icons-extended {
    font-size: 16px;
}

.form-header h2 {
    margin: 0 0 8px;
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.6px;
}

.form-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

form {
    padding: 24px;
}

.form-section {
    padding: 20px;
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
    background: var(--card-section);
    border: 1px solid rgba(226, 232, 240, 0.82);
}

.section-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.section-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 22px;
}

.section-title h3 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
}

.section-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.form-group {
    position: relative;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #223047;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}

label .material-icons-extended {
    color: var(--primary);
    font-size: 18px;
    flex: 0 0 auto;
}

label strong {
    color: var(--danger);
    font-weight: 900;
}

input,
select {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--primary-hover);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(87, 36, 111, 0.14);
}

input[readonly] {
    background: rgba(245, 239, 248, 0.98);
    color: var(--primary-dark);
    font-weight: 900;
    cursor: not-allowed;
}

input.invalid,
select.invalid {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.validation-message {
    display: none;
    margin-top: 7px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

.validation-message.show {
    display: block;
}

.hidden {
    display: none !important;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-grid.one-column {
    grid-template-columns: 1fr;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 56px;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

.option-card:hover {
    transform: translateY(-1px);
    border-color: rgba(116, 53, 142, 0.42);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 22px rgba(24, 16, 42, 0.10);
}

.option-card.checked {
    border-color: rgba(116, 53, 142, 0.88);
    background: rgba(244, 235, 248, 0.98);
    box-shadow: 0 10px 22px rgba(24, 16, 42, 0.10);
}

.option-card input {
    width: 18px;
    height: 18px;
    min-height: auto;
    padding: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.option-card span {
    color: var(--text);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
}

.group-error {
    display: none;
    margin-top: 8px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
}

.group-error.show {
    display: block;
}

.note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0 18px;
    padding: 14px 15px;
    border-radius: 17px;
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 650;
}

.note .material-icons-extended {
    color: #9d721d;
    font-size: 19px;
    flex: 0 0 auto;
}

.submit-button {
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 16px 34px rgba(87, 36, 111, 0.34);
    font-family: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.submit-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 20px 42px rgba(87, 36, 111, 0.40);
}

.submit-button:active {
    transform: translateY(0);
}

.flatpickr-calendar {
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.swal2-popup {
    border-radius: 22px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.swal2-confirm {
    border-radius: 12px !important;
    background: var(--primary) !important;
}

@media (max-width: 720px) {
    body {
        padding: 10px 8px 22px;
        background-image:
            linear-gradient(180deg, rgba(40, 20, 58, 0.44), rgba(40, 20, 58, 0.80)),
            url('./blueberries.jpg');
        background-attachment: scroll;
    }

    .page-wrapper {
        max-width: 100%;
    }

    .hero-card {
        padding: 18px;
        border-radius: 24px;
    }

    .hero-top {
        gap: 10px;
    }

    .logo-panel {
        width: 132px;
        min-height: 56px;
    }

    .hero-pill {
        font-size: 11px;
        padding: 8px 10px;
        white-space: normal;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 31px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .form-card {
        border-radius: 24px;
    }

    .form-header,
    form {
        padding-left: 18px;
        padding-right: 18px;
    }

    .form-section {
        padding: 17px;
    }

    .form-grid,
    .option-grid {
        grid-template-columns: 1fr;
    }

    input,
    select {
        min-height: 52px;
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    body {
        padding-left: 7px;
        padding-right: 7px;
    }

    .hero-card {
        padding: 16px;
        border-radius: 22px;
    }

    .logo-panel {
        width: 116px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 13.5px;
    }

    .form-header,
    form {
        padding-left: 15px;
        padding-right: 15px;
    }

    .form-section {
        padding: 15px;
    }

    .section-title h3 {
        font-size: 16.5px;
    }

    label {
        font-size: 12.8px;
    }

    .option-card {
        padding: 12px;
    }
}