/* --- Animated Login Page (Dog Character) --- */
/* Adapted for Pochta Admin Theme */

.page-login .main-content {
    background: #e2e8f0 !important;
}

/* Container - Centered in the page-login main area */
/* Container - Centered in the page-login main area */
.login-container {
    position: relative;
    width: 380px;
    max-width: 100%;
    height: auto;
    min-height: 400px;
    padding-bottom: 40px;
}

/* ... existing character styles ... */
/* (The user's character edits are preserved in lines 14-262 which are not being replaced here, assuming we target correctly) */

/* --- Form Styles (Adapted to Pochta Blue) --- */
.login-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: -35px;
    /* Pull card up to meet paws */
}

.login-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 50px 30px 30px 30px;
    /* Extra top padding for paws */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.login-box label {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

.login-box .phas {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

/* Use Admin CSS Variables for inputs */
.login-box input.form-control {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 48px !important;
    /* Space for icon */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

.login-box input.form-control:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px var(--color-brand-soft);
    outline: none;
}

.input-password-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted-on-dark);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
}

.password-toggle-btn:hover {
    background: #f1f5f9;
    color: var(--color-brand);
}

.login-action-btn {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Use admin.css .btn-primary */
    background: var(--color-brand);
    color: white;
    border: none;
    cursor: pointer;
    /* Remove manual shadow to inherit properly if desired, or keep to match design */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

.login-action-btn:hover {
    background: var(--color-brand-dark);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.login-action-btn:active {
    transform: translateY(0);
}

/* --- Mobile / Small Screen Adjustments --- */
@media (max-width: 420px) {
    .login-container {
        width: 100%;
        min-height: auto;
        padding-left: 20px;
        padding-right: 20px;
        transform: scale(0.9);
        /* Slight scale down to fit paws */
        transform-origin: top center;
    }

    .login-box {
        padding: 50px 20px 24px 20px;
    }
}

/* --- Dog Character SVG Styles --- */
.ear {
    position: absolute;
    top: -110px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #243946;
}

.ear.ear--left {
    left: -135px;
}

.ear.ear--right {
    right: -135px;
}

.face {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    height: 150px;
    margin: 80px auto 10px;
    --rotate-head: 0deg;
    transform: rotate(var(--rotate-head));
    transition: transform 0.2s;
    transform-origin: center 20px;
    top: -10px;
    padding-bottom: 21px;
    margin-bottom: 30px;
}

.eye {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: #243946;
}

.eye.eye--left {
    margin-right: 40px;
}

.eye.eye--right {
    margin-left: 40px;
}

.eye .glow {
    position: relative;
    top: 3px;
    right: -12px;
    width: 12px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
    transform: rotate(38deg);
}

.nose {
    position: relative;
    top: 30px;
    transform: scale(1.1);
}

.nose .glow {
    position: absolute;
    top: 3px;
    left: 32%;
    width: 15px;
    height: 8px;
    border-radius: 50%;
    background-color: #476375;
}

.mouth {
    position: relative;
    margin-top: 45px;
}

svg.smile {
    position: absolute;
    left: -28px;
    top: -19px;
    transform: scaleX(1.1);
    stroke: #243946;
}

.mouth-hole {
    position: absolute;
    top: 0;
    left: -50%;
    width: 60px;
    height: 15px;
    border-radius: 50%/100% 100% 0% 0;
    transform: rotate(180deg);
    background-color: #243946;
    z-index: -1;
}

.tongue {
    position: relative;
    top: 5px;
    width: 30px;
    height: 20px;
    background-color: #ffd7dd;
    transform-origin: top;
    transform: rotateX(60deg);
}

.tongue.breath {
    animation: breath 0.3s infinite linear;
}

.tongue-top {
    position: absolute;
    bottom: -15px;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background-color: #ffd7dd;
}

.line {
    position: absolute;
    top: 0;
    width: 30px;
    height: 5px;
    background-color: #fcb7bf;
}

.median {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 25px;
    border-radius: 5px;
    background-color: #fcb7bf;
}

.hands {
    position: relative;
    /* FIX: Center the coordinate system for hands */
    width: 0;
    margin: 0 auto;
    z-index: 20;
    /* Paws on top */
}

.hands .hand {
    position: absolute;
    top: -35px;
    /* FIX: Moved hands higher */
    display: flex;
    transition: transform 0.5s ease-in-out;
    z-index: 1;
}

.hands .hand--left {
    left: -85px;
}

.hands .hand--left.hide {
    transform: translate(2px, -155px) rotate(-160deg);
}

.hands .hand--left.peek {
    transform: translate(0px, -120px) rotate(-160deg);
}

.hands .hand--right {
    left: 30px;
}

.hands .hand--right.hide {
    transform: translate(-6px, -155px) rotate(160deg);
}

.hands .hand--right.peek {
    transform: translate(-4px, -120px) rotate(160deg);
}

.hands .finger {
    position: relative;
    z-index: 0;
}

.hands .finger .bone {
    width: 20px;
    height: 30px;
    border: 2px solid #243946;
    border-bottom: none;
    border-top: none;
    background-color: #e2e8f0;
}

.hands .finger .nail {
    position: absolute;
    left: 0;
    top: 10px;
    width: 20px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #243946;
    background-color: #e2e8f0;
    z-index: -1;
}

.hands .finger:nth-child(1),
.hands .finger:nth-child(3) {
    left: 4px;
    z-index: 1;
}

.hands .finger:nth-child(1) .bone,
.hands .finger:nth-child(3) .bone {
    height: 10px;
}

.hands .finger:nth-child(3) {
    left: -4px;
}

.hands .finger:nth-child(2) {
    top: -5px;
    z-index: 2;
}

.hands .finger:nth-child(1) .nail,
.hands .finger:nth-child(3) .nail {
    top: 0px;
}

/* Animation Keyframes */
@keyframes breath {

    0%,
    100% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(60deg);
    }
}

/* --- Form Styles (Adapted to Pochta Blue) --- */
/* --- Form Styles (Adapted to Pochta Blue) --- */
.login-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: -35px;
    /* Pull card up to meet paws */
}

.login-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 50px 30px 30px 30px;
    /* Extra top padding for paws */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.login-box label {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

.login-box .phas {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

/* Use Admin CSS Variables for inputs */
.login-box input.form-control {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 48px !important;
    /* Space for icon */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
}

.login-box input.form-control:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px var(--color-brand-soft);
    outline: none;
}

.input-password-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted-on-dark);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
}

.password-toggle-btn:hover {
    background: #f1f5f9;
    color: var(--color-brand);
}

/* Button Refinement: Rely on btn-primary but ensure full width & sizing matches login */
.login-action-btn {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Background logic is handled by .btn-primary in admin.css, do not override unless needed */
    /* Remove custom background/shadow to let admin.css dictate variables, or keep to enforce precise look */
    /* We keep shadow adjustments to match 'premium' feel of login card */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ensure hover state matches admin.css or enhances it */
.login-action-btn:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    /* Enhanced shadow for 'wow' factor */
    transform: translateY(-1px);
}

.login-action-btn:active {
    transform: translateY(0);
}

/* --- Mobile / Small Screen Adjustments --- */
@media (max-width: 480px) {
    .login-container {
        width: 100%;
        min-height: auto;
        padding-left: 20px;
        padding-right: 20px;
        transform: scale(0.85);
        /* Proper scaling for small screens */
        transform-origin: top center;
        margin-top: -20px;
        /* Pull up slightly */
    }

    .login-box {
        padding: 50px 20px 24px 20px;
    }
}