.form-label { margin-bottom: 7px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.form-control, .form-select { min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius); background-color: #fbfcfa; color: var(--ink); font-size: 14px; box-shadow: none !important; }
textarea.form-control { min-height: 100px; padding-top: 12px; }
.form-control:focus, .form-select:focus { border-color: #9fada6; background: white; box-shadow: 0 0 0 4px rgba(23,35,31,.05) !important; }
.invite-code-input { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }

.input-money { position: relative; }
.input-money input { padding-right: 56px; font: 700 20px "DM Sans", sans-serif; font-variant-numeric: tabular-nums; }
.input-money span { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 800; }

.search-box { width: min(430px, 100%); height: 46px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: white; transition: border .2s, box-shadow .2s; }
.search-box:focus-within { border-color: #a9b7af; box-shadow: 0 0 0 4px rgba(23,35,31,.05); }
.search-box svg { color: var(--muted); width: 17px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 47px; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }

.split-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 4px;
    border-radius: var(--radius);
    background: #eef1ec;
    border: 1px solid var(--line);
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.split-tabs-glider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 4);
    background: #ffffff;
    border-radius: calc(var(--radius) - 3px);
    box-shadow: 0 2px 8px rgba(18, 30, 24, 0.1), 0 1px 2px rgba(18, 30, 24, 0.04);
    transform: translateX(calc(100% * var(--tab-index, 0)));
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}
.split-tab {
    min-height: 42px;
    border: 0;
    border-radius: calc(var(--radius) - 3px);
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.split-tab:hover:not(.active) { color: var(--ink); }
.split-tab:active { transform: scale(0.97); }
.split-tab.active { color: var(--ink); font-weight: 700; }
.participant-list {
    margin-top: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #ffffff;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.participant-row {
    min-height: 58px;
    padding: 9px 14px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 130px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.15s ease;
}
.participant-row:last-child { border: 0; }
.participant-row:hover { background-color: #fafbf9; }
.participant-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.participant-row label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; cursor: pointer; }
.share-input {
    min-height: 38px;
    text-align: right;
    border-radius: var(--radius-sm);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.split-mode-equal .participant-row .share-input {
    opacity: 0.32;
    background-color: var(--surface-2);
    border-color: transparent;
    cursor: default;
}
.split-mode-exact .participant-row .share-input,
.split-mode-percentage .participant-row .share-input {
    opacity: 1;
    background-color: #ffffff;
    border-color: var(--line);
}
.split-mode-exact .participant-row .share-input:focus,
.split-mode-percentage .participant-row .share-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(217, 108, 79, 0.12) !important;
}

.form-shell { max-width: 980px; margin: 0 auto; }
.form-card { min-width: 0; padding: 26px; }
.section-title { margin: 0 0 4px; font: 700 18px "DM Sans", sans-serif; }
.section-help { margin: 0 0 23px; color: var(--muted); font-size: 13px; }
.form-aside { position: sticky; top: 96px; min-width: 0; }
.panel.summary-card { padding: 22px; background: var(--ink); color: white; }
.summary-card .focus-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius); color: white; background: rgba(255,255,255,.12); }
.summary-card h3 { font: 700 16px "DM Sans", sans-serif; }
.summary-card p { color: #b8c3bd; font-size: 12px; line-height: 1.55; }
.summary-line { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
.summary-line span:first-child { color: #aebbb4; }
.submit-wide { width: 100%; margin-top: 16px; }

@media (max-width: 991.98px) {
    .form-aside { position: static; }
}

@media (max-width: 767.98px) {
    .search-box { width: 100%; }
    .form-card { padding: 20px 16px; }
    .split-tabs {
        grid-template-columns: repeat(4, 1fr);
        padding: 3px;
        gap: 0;
    }
    .split-tabs-glider {
        top: 3px;
        bottom: 3px;
        left: 3px;
        width: calc((100% - 6px) / 4);
    }
    .split-tab {
        min-height: 38px;
        font-size: 11px;
        padding: 0 4px;
        white-space: nowrap;
    }
    .participant-row {
        grid-template-columns: auto minmax(0, 1fr) 100px;
        gap: 8px;
        padding: 8px 10px;
    }
    .participant-row .share-input {
        min-height: 34px;
        font-size: 13px;
    }
}
