/* Shared public/single-page primitives for login and registration pages. */

.login-container,
.single-page-container {
    position: relative;
    width: 95%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.back {
    background-color: #D9EA9A;
}

.single-page-container-wide {
    max-width: 700px;
}

.home-link {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-link:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.home-link i,
.icon {
    color: #0093E9;
}

.login-container .card,
.single-page-container .card,
.registration-page .card {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

.card.card-info {
    border-top: 3px solid #17a2b8;
}

.login-container .card-header,
.single-page-container .card-header,
.registration-page .card-header,
.card-header-register {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    border: none;
    padding: 1.5rem;
    color: #fff;
}

.login-container .card-header h3,
.single-page-container .card-header h3,
.registration-page .card-header h3,
.card-header-register h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.input-field {
    border: 1px solid #ced4da;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    position: relative;
    margin-bottom: 0.5rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, background .15s ease-in-out;
    background: #f8f9fa;
}

.input-field:focus-within {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: #fff;
}

.input-field:hover {
    background: #fff;
}

.input-field input,
.input-field select,
.input-field textarea {
    border: none;
    outline: none;
    width: 100%;
    box-shadow: none;
    text-align: center;
    padding: 0.5rem 0;
    background: transparent !important;
    font-family: 'Vazirmatn' !important;
    font-size: 1.05rem !important;
}

.input-field .icon {
    font-size: 1.1rem;
    padding: 0.4rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-label {
    display: block;
    text-align: right;
    font-weight: 500;
    color: #2c3e50;
    font-family: 'Vazirmatn';
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-right: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
    padding-right: 0.5rem;
    min-height: 20px;
}

.hint-text {
    text-align: right;
}

.toggle-password {
    cursor: pointer;
    position: absolute;
    left: 10px;
    color: dimgray;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn {
    background: none;
    border: none;
    color: #0093E9;
    cursor: pointer;
    font-size: 1.25rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.refresh-btn:hover {
    transform: rotate(180deg);
    background-color: rgba(0, 147, 233, 0.1);
}

.captcha-section,
.loginGuide-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
}

.captcha-wrapper img {
    width: clamp(340px, 72vw, 480px);
    max-width: calc(100% - 56px);
    height: auto;
    object-fit: contain;
    flex: 1 1 auto;
    min-width: 0;
}

.captcha-input {
    width: min(100%, 320px);
    margin: 0 auto;
}

.captcha-input input {
    text-align: center !important;
    direction: ltr !important;
    width: 100%;
}

.office-section {
    margin: 1rem 0;
}

.office-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.button-section {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.app-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
}

.app-section img {
    width: clamp(80px, 15vw, 120px);
    height: auto;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    min-height: 54px;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 600;
    line-height: 1.5;
}

.baraneh-btn-icon {
    font-size: 1.05em;
    line-height: 1;
}

.btn-info {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.public-plate {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    flex-wrap: nowrap;
}

.public-plate input,
.public-plate select {
    min-width: 0;
    height: 40px;
    text-align: center !important;
    direction: ltr;
}

.public-plate input {
    flex: 1 1 58px;
}

.public-plate select {
    flex: 1.2 1 72px;
}

.password-requirements,
.password-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: right;
}

.password-requirements li {
    list-style: none;
    margin-bottom: 0.25rem;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.invalid {
    color: #dc3545;
}

.password-requirements li.valid::before {
    content: "✓ ";
}

.password-requirements li.invalid::before {
    content: "✗ ";
}

.alert-custom {
    border-radius: 10px;
    line-height: 1.9;
}

.section-title {
    font-weight: 700;
    color: #2c3e50;
    margin: 1.5rem 0 1rem;
}

#timer {
    text-align: center;
    margin-top: 15px;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 25px;
}

#timer.timer-active {
    color: #0093E9;
}

.public-plate-label {
    margin-bottom: 0.5rem;
    display: block;
    color: #2c3e50;
    font-weight: 500;
}

.pelakie {
    background: url("../Images/plak.png") 0 0/contain no-repeat;
    background-position: center;
    background-size: contain;
    display: flex;
    max-width: 332px;
}

.hr {
    align-items: center;
    color: #868686;
    display: flex;
    font-size: 12px;
    line-height: 1;
    margin-bottom: 6px;
    margin-top: 16px;
    text-align: center;
}

.hr::before,
.hr::after {
    background-color: #d5d5d5;
    content: '';
    flex: 1;
    height: 1px;
}

.hr::before {
    margin-left: 0.5rem;
}

.hr::after {
    margin-right: 0.5rem;
}

.baraneh-ui-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(1px);
    padding: 1rem;
}

.baraneh-ui-loading-overlay[aria-hidden="false"] {
    display: flex;
}

.baraneh-ui-is-loading {
    cursor: wait;
}

.baraneh-ui-loading-box {
    min-width: min(280px, 90vw);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 1.5rem;
    text-align: center;
}

.baraneh-ui-loading-text {
    margin-top: 0.75rem;
    color: #2c3e50;
    font-weight: 500;
}

.baraneh-ui-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: right;
    line-height: 1.9;
}

.baraneh-ui-message-icon {
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

input,
select,
textarea {
    font-family: 'Vazirmatn' !important;
}

@media (max-width: 768px) {
    .login-container,
    .single-page-container {
        width: 100%;
        min-width: 280px;
        padding: 1rem;
    }

    .login-container .card,
    .single-page-container .card,
    .registration-page .card {
        border-radius: 10px;
        margin: 0 0.5rem;
    }

    .login-container .card-body,
    .single-page-container .card-body,
    .registration-page .card-body {
        padding: 1.5rem 1rem;
    }

    .input-field {
        min-height: 50px;
    }

    .input-field input,
    .input-field select,
    .input-field textarea,
    .form-control {
        font-size: 16px !important;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn,
    .button-section .btn {
        width: 100%;
        min-height: 56px;
        margin-bottom: 0.75rem;
    }

    .captcha-section,
    .loginGuide-section {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
    }
}

@media (max-width: 390px) {
    .captcha-wrapper {
        gap: 0.5rem;
        padding-left: 0;
        padding-right: 0;
    }

    .captcha-wrapper img {
        width: min(calc(100% - 48px), 350px);
        max-width: calc(100% - 48px);
    }

    .public-plate {
        gap: 0.25rem;
    }

    .public-plate input,
    .public-plate select {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}
