:root {
    --mb-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    --mb-text: #1f2937;
    --mb-muted: rgba(31, 41, 55, 0.72);
    --mb-blue: #1FB6FF;
    --mb-line: rgba(0, 0, 0, 0.07);
}

body {
    background: #f6f9fc;
    font-family: Lexend, sans-serif;
}

.register-page {
    padding: 32px 0 70px;
}

.register-wrap {
    display: flex;
    justify-content: center;
}

.register-card {
    width: min(720px, 100%);
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--mb-shadow);
    border: 1px solid var(--mb-line);
    padding: 22px;
}

.register-head {
    margin-bottom: 18px;
}

.register-logo {
    width: 220px;
    max-width: 70%;
}

.register-title {
    font-size: 20px;
    font-weight: 900;
    margin: 10px 0 4px;
    color: var(--mb-text);
}

.register-sub {
    font-size: 13px;
    font-weight: 700;
    color: var(--mb-muted);
    margin: 0;
}

/* === profile-like cards === */
.soft-card {
    border-radius: 22px;
    box-shadow: none;
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: #fff;
    overflow: visible;
    margin-top: 16px;
}

.card-block {
    padding: 18px 18px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.98), rgba(255, 255, 255, 0.96));
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-title {
    font-weight: 900;
    font-size: 18px;
    margin: 0;
    color: var(--mb-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(31, 182, 255, 0.12);
    color: #0b5d7a;
    font-size: 20px;
}

.section-sub {
    font-weight: 700;
    font-size: 13px;
    color: var(--mb-muted);
    margin-top: 6px;
}

/* === inputs like profile === */
.input-field input[type=text],
.input-field input[type=password] {
    border-radius: 14px !important;
    border: 1px solid var(--mb-line) !important;
    padding: 0 14px !important;
    height: 48px !important;
    box-sizing: border-box;
    background: rgba(246, 249, 252, 0.65) !important;
    color: var(--mb-text);
}

.input-field input::placeholder {
    color: rgba(31, 41, 55, 0.45) !important;
}

.select-wrapper input.select-dropdown {
    border-radius: 14px !important;
    border: 1px solid var(--mb-line) !important;
    padding: 0 14px !important;
    height: 48px !important;
    background: rgba(246, 249, 252, 0.65) !important;
}

.select-wrapper input.select-dropdown.invalid,
.select-wrapper.invalid input.select-dropdown {
    border-color: rgba(239, 68, 68, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* helper error nicer */
.input-field .helper-text {
    font-weight: 800;
}

.input-field .helper-text.is-visible {
    display: block;
    color: #e53935;
}

.input-field .helper-text.select-helper {
    min-height: 18px;
}

.autocomplete-content.dropdown-content {
    border-radius: 14px;
    box-shadow: var(--mb-shadow);
}

.select-dropdown.dropdown-content {
    max-height: min(420px, calc(100vh - 120px)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.autocomplete-content li > a,
.autocomplete-content li > span {
    color: var(--mb-text);
    font-weight: 700;
}

/* buttons */
.btn {
    border-radius: 14px;
    font-weight: 900;
    text-transform: none;
}

.btn.mb-blue {
    background: var(--mb-blue);
}

.w100 {
    width: 100%;
}

.register-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.under-button-text {
    font-weight: 900;
    color: rgba(31, 41, 55, 0.6);
}

/* ✅ CHECKBOXES FIX (to NIE może być flex) */
.reg-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-check {
    display: block;
    position: relative;
    padding: 14px 14px 14px 52px;
    border-radius: 16px;
    background: rgba(31, 182, 255, 0.06);
    border: 1px dashed rgba(31, 182, 255, 0.35);
    font-weight: 800;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(31, 41, 55, 0.92);
}

.reg-check input[type="checkbox"] {
    position: absolute;
    left: 14px;
    top: 16px;
    opacity: 0 !important;
    pointer-events: auto;
}

/* Materialize checkbox span hack: */
.reg-check span {
    display: block !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    height: auto !important;
    line-height: 1.35 !important;
}

/* remove default materialize pseudo misalignment */
.reg-check [type="checkbox"].filled-in + span:not(.lever):before,
.reg-check [type="checkbox"].filled-in + span:not(.lever):after {
    left: -38px !important;
    top: 0px !important;
}

/* responsive */
@media (max-width: 600px) {
    .register-card {
        padding: 16px;
    }

    .reg-check {
        padding-left: 50px;
    }
}

.input-field > label {
    left: 20px !important;


}

.input-field > label.active {
    transform: translateY(-20px) scale(0.8) !important;
    transform-origin: left top !important;
}

/* TYLKO label dla selecta */
.input-field > select + label {
    top: -10px !important;
}

/* === SHOW PASSWORD ICON === */
.pass-wrap {
    position: relative;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    top: 12px;
    cursor: pointer;
    user-select: none;
    color: rgba(31, 41, 55, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
}

.toggle-pass:hover {
    background: rgba(31, 182, 255, 0.10);
    color: rgba(31, 41, 55, 0.85);
}

.toggle-pass i {
    font-size: 20px;
}

/* zrób miejsce na ikonkę w polu */
.input-field input[type=password],
.input-field input[type=text] {
    padding-right: 44px !important;
}

/* === PASSWORD HINTS === */
.pass-hints {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pass-hints .hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 12px;
    color: rgba(31, 41, 55, 0.70);
    background: rgba(246, 249, 252, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 8px 10px;
}

.pass-hints .hint i {
    font-size: 16px;
    color: rgba(239, 68, 68, 0.9); /* czerwone X */
}

.pass-hints .hint.ok {
    color: rgba(16, 185, 129, 0.95);
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.07);
}

.pass-hints .hint.ok i {
    color: rgba(16, 185, 129, 0.95);
}

/* === CHECKBOX ERROR HIGHLIGHT === */
.reg-check.is-error {
    border: 1px solid rgba(239, 68, 68, 0.55) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.reg-check.is-error a {
    text-decoration: underline;
}

/* responsive hints */
@media (max-width: 600px) {
    .pass-hints {
        grid-template-columns: 1fr;
    }
}
