body {
    font-family: 'Poppins2';
    font-display: swap;
}

.control {
    user-select: none;
    font-family: arial;
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 5px;
    padding-top: 3px;
    cursor: pointer;
    font-size: 16px;
}

.control input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.control_indicator {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background: #e6e6e6;
    border: 0px solid #000000;
    border-radius: 0px;
}

.control:hover input~.control_indicator,
.control input:focus~.control_indicator {
    background: #cccccc;
}

.control input:checked~.control_indicator {
    background: rgb(42, 107, 192);
}

.control input:disabled~.control_indicator {
    background: #e6e6e6;
    opacity: 3;
    pointer-events: none;
}

.control_indicator:after {
    box-sizing: unset;
    content: '';
    position: absolute;
    display: none;
}

.control input:checked~.control_indicator:after {
    display: block;
}

.control-checkbox .control_indicator:after {
    left: 8px;
    top: 4px;
    width: 3px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.control-checkbox input:disabled~.control_indicator:after {
    border-color: #7b7b7b;
}

.control-checkbox .control_indicator::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 4.5rem;
    height: 4.5rem;
    margin-left: -1.3rem;
    margin-top: -1.3rem;
    background: #2aa1c0;
    border-radius: 3rem;
    opacity: 0.6;
    z-index: 99999;
    transform: scale(0);
}

/* Data input - zawsze widoczna wartość */
#data {
    position: relative;
    color-scheme: dark;
}

#data::-webkit-datetime-edit {
    opacity: 1;
}

#data::-webkit-datetime-edit-fields-wrapper {
    color: #f1f1f1;
}

#data::-webkit-datetime-edit-text {
    color: #888;
}

#data::-webkit-datetime-edit-month-field,
#data::-webkit-datetime-edit-day-field,
#data::-webkit-datetime-edit-year-field {
    color: #f1f1f1;
}

#data:invalid::-webkit-datetime-edit-fields-wrapper {
    color: #888;
}

#gender-t {
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 17px;
    color: #4d4d4d;
    width: 270px;
    max-width: 85%;
    margin: 20px auto 0 auto;
}

#gender-bb {
    width: 270px;
    margin: 10px auto 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins2';
    font-display: swap;
    height: auto;
    font-size: 16px;
    max-width: 85%;
    cursor: pointer;
    color: #f1f1f1;
}

#gender-m {
    width: 50%;
    height: 40px;
    background-color: #1e84be;
    text-align: center;
    line-height: 40px;
    border-radius: 10px 0 0 10px;
}

#gender-k {
    width: 50%;
    height: 40px;
    background-color: #222222;
    text-align: center;
    line-height: 40px;
    border-radius: 0px 10px 10px 0;
}



.pass-icon-input {
    padding: 15px 20px 15px 20px;
    background-color: transparent;
    border: 1px solid #222222;
    margin-bottom: 10px;
    border-radius: 15px;
    height: 25px;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 20px;
    color: rgb(241, 241, 241);
    max-width: 85%;
    user-select: none;

    padding-left: 42px;
    background-image: url('https://romasolutions.pl/logo/svg/lock-solid.svg');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 18px 18px;
    width: 318px;
}



#rid-inf-reg-bb {
    font-family: 'Poppins2';
    font-display: swap;
    width: calc(100% - 40px);
    border: 1px solid #424242;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 30px;
}

#rid-inf-reg-tit {
    font-size: 20px;
    text-align: center;
    color: #8a8a8a;
    margin-bottom: 10px;
}

#rid-inf-reg-op {
    font-size: 16px;
    color: #999999;
}




.login-button {
    position: relative;
    width: 100%;
    height: 44px;
    background-color: #0f9af7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 40px;
    overflow: hidden;
}

.login-button:hover {
    background-color: #0891ec;
}

.login-button:active {
    transform: scale(0.98);
}

.login-button:disabled {
    background-color: #0782e7;
    cursor: not-allowed;
    opacity: 0.7;
}

.button-text {
    display: inline-block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.button-text.hiding {
    transform: translateY(-20px);
    opacity: 0;
}

.dots-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.dots-loader.showing {
    transform: translate(-50%, 0);
    opacity: 1;
}

.dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: inline-block;
}

.dot:nth-child(1) {
    animation: jumpingDot 1.2s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation: jumpingDot 1.2s ease-in-out 0.2s infinite;
}

.dot:nth-child(3) {
    animation: jumpingDot 1.2s ease-in-out 0.4s infinite;
}

@keyframes jumpingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 1;
    animation: pulse 1s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.success-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    position: relative;
}

.checkmark:before,
.checkmark:after {
    content: '';
    position: absolute;
    background-color: white;
    border-radius: 2px;
}

.checkmark:before {
    width: 8px;
    height: 3px;
    left: 2px;
    top: 12px;
    transform: rotate(45deg);
}

.checkmark:after {
    width: 15px;
    height: 3px;
    left: 5px;
    top: 10px;
    transform: rotate(-45deg);
    transform-origin: left center;
}

.error-message {
    color: #ed4245;
    font-size: 14px;
    margin-top: 16px;
    display: none;
    text-align: center;
    animation: fadeInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#forget-pass {
    text-align: right;
    position: absolute;
    right: 0;
}

#logowanie_formularz {
    max-width: calc(100% - 30px);
    position: relative;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    color: #b9bbbe;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.input-group:focus-within label {
    color: #72b0da;
}

.input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    background-color: #202225;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #72bdda;
    outline: none;
    box-shadow: 0 0 0 2px rgba(114, 185, 218, 0.3);
}

.form-rej-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-top-box {
    width: 260px;
    margin: 50px auto 0 auto;
    user-select: none;
}

#login-left {
    border-radius: 15px 0px 0px 15px;
    background-color: #2194d8;
}

#login-right {
    border-radius: 0px 15px 15px 0px;
}

.login-top {
    width: 130px;
    height: 45px;
    background-color: #222222;
    float: left;
    line-height: 45px;
    font-family: 'Poppins2';
    font-display: swap;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s ease;
}

#forget-pass {
    color: #2194d8;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 13px;
    cursor: pointer;
    margin-left: 230px;
    margin-top: 2px;
    margin-bottom: 5px;
    min-width: 140px;
    user-select: none;
}

#dziekuje-rejestracja-form {
    width: 345px;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 22px;
    border: 3px solid #202020;
    border-radius: 15px;
    margin: 20px auto 30px auto;
    padding: 20px 40px;
}




.zle {
    width: 450px;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 22px;
    border: 3px solid #ff2a2a;
    border-radius: 15px;
    margin: 20px auto 50px auto;
    padding: 20px 40px;
}

#zlehaslo-form {
    width: 345px;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 22px;
    border: 3px solid #ff2a2a;
    border-radius: 15px;
    margin: 20px auto 30px auto;
    padding: 20px 40px;
}


#zleid-form {
    width: 345px;
    font-family: 'Poppins2';
    font-display: swap;
    font-size: 22px;
    border: 3px solid #ff2a2a;
    border-radius: 15px;
    margin: 0px auto 150px auto;
    padding: 20px 40px;
}


#zaloguj-title-text2 {
    user-select: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 23px;
    text-align: center;
    margin-bottom: 35px;
    max-width: 100%;
}

@media only screen and (max-width: 392px) {
    #zaloguj-title-text2 {
        font-size: 21px;
    }
}

@media only screen and (max-width: 360px) {
    #zaloguj-title-text2 {
        font-size: 20px;
    }
}

@media only screen and (max-width: 345px) {
    #zaloguj-title-text2 {
        font-size: 18px;
    }
}

/* ============================================
   ULEPSZONE STYLE FORMULARZA REJESTRACJI
   ============================================ */

/* Grupa formularza */
.form-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Labele */
.form-label {
    display: block;
    color: #b0b0b0;
    font-family: 'Poppins2', sans-serif;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    text-align: left;
}

.form-label .required {
    color: #ff6b6b;
    margin-left: 2px;
}

.form-group:focus-within .form-label {
    color: #2194d8;
}

/* Label zmienia kolor w zależności od stanu inputa */
.form-group:has(.form-input.valid) .form-label {
    color: #4caf50;
}

.form-group:has(.form-input.invalid) .form-label {
    color: #ff6b6b;
}

/* Inputy formularza */
.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    color: #f1f1f1;
    font-family: 'Poppins2', sans-serif;
    font-size: 16px;
    transition: all 0.25s ease;
    outline: none;
}

.form-input::placeholder {
    color: #666;
}

.form-input:focus {
    border-color: #2194d8;
    box-shadow: 0 0 0 3px rgba(33, 148, 216, 0.15);
}

.form-input:hover:not(:focus) {
    border-color: #444;
}

/* Stan poprawny */
.form-input.valid {
    border-color: #4caf50;
}

.form-input.valid:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* Stan błędny */
.form-input.invalid {
    border-color: #ff6b6b;
}

.form-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Komunikat błędu */
.form-error {
    display: none;
    align-items: center;
    gap: 6px;
    color: #ff6b6b;
    font-family: 'Poppins2', sans-serif;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 2px;
    animation: slideDown 0.25s ease;
}

.form-error.show {
    display: flex;
}

.form-error i {
    font-size: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ikona sukcesu */
.form-success {
    position: absolute;
    right: 14px;
    top: 42px;
    color: #4caf50;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s ease;
    pointer-events: none;
}

.form-success.show {
    opacity: 1;
    transform: scale(1);
}

/* Podpowiedź pod polem */
.form-hint {
    color: #777;
    font-family: 'Poppins2', sans-serif;
    font-size: 12px;
    margin-top: 6px;
    padding-left: 2px;
}

/* ============================================
   WSKAŹNIK SIŁY HASŁA
   ============================================ */

.password-strength-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.password-strength-bar {
    flex: 1;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.password-strength-fill.weak {
    width: 33%;
    background: linear-gradient(90deg, #ff6b6b, #ff8a8a);
}

.password-strength-fill.medium {
    width: 66%;
    background: linear-gradient(90deg, #ffa726, #ffcc80);
}

.password-strength-fill.strong {
    width: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
}

.password-strength-text {
    font-family: 'Poppins2', sans-serif;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}

.password-strength-text.weak {
    color: #ff6b6b;
}

.password-strength-text.medium {
    color: #ffa726;
}

.password-strength-text.strong {
    color: #4caf50;
}

/* ============================================
   GRUPA IMIĘ + NAZWISKO
   ============================================ */

.form-row {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 20px auto;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ============================================
   SEKCJE FORMULARZA
   ============================================ */

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    color: #888;
    font-family: 'Poppins2', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   POLE DATY - ULEPSZONE DLA MOBILE
   ============================================ */

.form-input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 50px;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    filter: invert(1);
    padding: 4px;
    transition: opacity 0.2s;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ============================================
   PRZYCISK REJESTRACJI - ULEPSONY
   ============================================ */

#rejestracja.submit {
    width: 100%;
    max-width: 360px;
    height: 52px;
    background-color: #2194d8;
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins2', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 30px auto 0 auto;
    display: block;
}

#rejestracja.submit:hover {
    background-color: #1a7ab8;
}

#rejestracja.submit:active {
    background-color: #156a9e;
}

#rejestracja.submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

@media only screen and (max-width: 768px) {

    .form-group,
    .form-row {
        max-width: 100%;
    }

    .form-input {
        font-size: 16px;
        /* Zapobiega auto-zoom na iOS */
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    #rejestracja.submit {
        max-width: 100%;
        height: 56px;
    }

    .pass-icon-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    #gender-bb {
        max-width: 100%;
        width: 100%;
    }

    #gender-t {
        max-width: 100%;
        width: 100%;
    }
}

@media only screen and (max-width: 400px) {
    .form-label {
        font-size: 12px;
    }

    .form-error {
        font-size: 12px;
    }

    .form-hint {
        font-size: 11px;
    }
}

/* ============================================
   ROMA ID INPUT Z SUFIKSEM
   ============================================ */

.romaid-input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 2px solid #333;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.romaid-input-wrapper:focus-within {
    border-color: #2194d8;
    box-shadow: 0 0 0 3px rgba(33, 148, 216, 0.15);
}

.romaid-input-wrapper:has(.form-input.valid) {
    border-color: #4caf50;
}

.romaid-input-wrapper:has(.form-input.invalid) {
    border-color: #ff6b6b;
}

.romaid-input-wrapper .form-input {
    border: none;
    border-radius: 8px 0 0 8px;
    flex: 1;
    padding-right: 8px;
    box-shadow: none;
    background: transparent;
}

.romaid-input-wrapper .form-input:focus {
    border: none;
    box-shadow: none;
}

.romaid-suffix {
    display: flex;
    align-items: center;
    padding: 0 14px 0 0;
    background: transparent;
    border: none;
    color: #888;
    font-family: 'Poppins2', sans-serif;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    white-space: nowrap;
}

.romaid-input-wrapper:has(.form-input.valid) .romaid-suffix {
    color: #4caf50;
}

/* Ikona sukcesu dla Roma ID - pozycja przed sufiksem */
.romaid-input-wrapper+.form-hint+.form-success {
    right: 110px;
}

/* ============================================
   CZYSTE STYLE - MINIMALISTYCZNE
   ============================================ */

/* Sekcje formularza - proste */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    color: #888;
    font-family: 'Poppins2', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

/* Checkboxy - lepsze wyrównanie */
.reg-check {
    max-width: 360px;
    margin: 0 auto 12px auto;
}

.control {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
}

.control_indicator {
    border-radius: 4px;
    transition: all 0.2s ease;
}

.control:hover .control_indicator {
    background: #d0d0d0;
}
