:root {
    --uap-red: #ff4f43;
    --uap-red-deep: #e35a3a;
    --uap-bg: #eef0f2;
    --uap-card: #f7f7f8;
    --uap-border: #bfc6ce;
    --uap-text: #242529;
    --uap-muted: #5d6269;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background: url("/PHOTO/Background.png") center/cover no-repeat;
}

.container {
    width: min(760px, 100%);
    min-height: 470px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 10px;
    padding: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 55px rgba(33, 39, 45, 0.16);
    overflow: hidden;
}

.login-section,
.logo-section {
    min-height: 470px;
    position: relative;
}

.login-section {
    background: var(--uap-card);
    padding: 18px 20px 18px;
    display: flex;
    flex-direction: column;
}

.login-header {
    max-width: 420px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--uap-red-deep);
    font-size: clamp(1.45rem, 2vw, 1.95rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 6px rgba(227, 90, 58, 0.18);
}

.login-header p {
    font-size: 0.74rem;
    line-height: 1.45;
    color: #34383d;
}

.login-illustration {
    position: absolute;
    right: 22px;
    top: 84px;
    width: 58px;
    opacity: 0.72;
}

.login-illustration-img {
    width: 100%;
    display: block;
    filter: grayscale(1) contrast(0.8);
}

.modern-form {
    width: min(100%, 238px);
    margin: 12px 0 0 24px;
}

.modern-form h1 {
    color: var(--uap-text);
    font-size: clamp(1.7rem, 2.4vw, 2.3rem);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 12px;
    letter-spacing: -0.045em;
}

.error-text {
    margin-bottom: 16px;
    color: #b42318;
    font-size: 0.95rem;
    font-weight: 600;
}

.field-label {
    margin-bottom: 5px;
    color: #26282d;
    font-size: 0.76rem;
    font-weight: 500;
}

.field-container {
    position: relative;
    margin-bottom: 12px;
}

.field-container input {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 34px;
    border: 2px solid var(--uap-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--uap-text);
    font-size: 0.76rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-container input:focus {
    border-color: #9da6b0;
    box-shadow: 0 0 0 4px rgba(191, 198, 206, 0.18);
}

.field-container label {
    position: absolute;
    left: 34px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8289;
    font-size: 0.76rem;
    pointer-events: none;
}

.field-container input:focus + label,
.field-container input:not(:placeholder-shown) + label {
    opacity: 0;
}

.field-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ba3ad;
    font-size: 0.8rem;
    line-height: 1;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

button {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

button:active {
    transform: scale(0.985);
}

.btn-log,
.btn-guest {
    width: 100%;
    height: 34px;
    border-radius: 9px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-log {
    border: 1px solid rgba(255, 110, 90, 0.8);
    color: #fff7f2;
    background: linear-gradient(180deg, #ff5d3a, #ff4e32);
    box-shadow: 0 10px 18px rgba(255, 94, 67, 0.16);
}

.btn-guest {
    background: transparent;
    color: #bb705c;
    border: 2px solid #bd9a8f;
}

.sign-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    color: #7e8287;
    font-size: 0.7rem;
}

.sign-divider::before,
.sign-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d8d9dc;
}

.logo-section {
    background: linear-gradient(180deg, #ff4d46, #ff4f56);
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: white;
    overflow: hidden;
}

.logo-img {
    width: 66px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 10px 16px rgba(112, 37, 24, 0.25));
}

.group-name {
    max-width: 340px;
    text-align: center;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.credo-box {
    width: 100%;
    max-width: 350px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.credo-box h3 {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.credo-text {
    flex: 1;
    min-height: 0;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    font-size: 0.72rem;
    line-height: 1.48;
    color: rgba(255, 255, 255, 0.96);
}

.credo-text p {
    margin-bottom: 12px;
}

.credo-text::-webkit-scrollbar {
    width: 5px;
}

.credo-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.credo-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.42);
    border-radius: 999px;
}

.guest-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(13, 17, 23, 0.62);
}

.modal-content {
    width: min(100%, 420px);
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 24px 44px rgba(13, 17, 23, 0.25);
}

.modal-content h3 {
    margin-bottom: 18px;
    font-size: 1.45rem;
    color: var(--uap-text);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group label {
    color: #3b4047;
    font-weight: 600;
}

.input-group input {
    height: 50px;
    border-radius: 12px;
    border: 1px solid #d0d5db;
    padding: 12px 14px;
    font-size: 1rem;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.btn-secondary,
.btn-primary {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
}

.btn-secondary {
    background: #edf1f4;
    color: #28313d;
}

.btn-primary {
    background: linear-gradient(180deg, #ff5d3a, #ff4e32);
    color: white;
}

@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 16px 12px;
        background: url("/PHOTO/Background.png") center/cover no-repeat;
    }

    .container {
        grid-template-columns: 1fr;
        width: min(420px, 100%);
        min-height: auto;
        border-radius: 24px;
    }

    .login-section,
    .logo-section {
        min-height: auto;
    }

    .login-section {
        padding: 20px 18px 18px;
    }

    .login-header {
        margin-bottom: 18px;
    }

    .login-illustration {
        top: 70px;
        right: 18px;
        width: 52px;
    }

    .modern-form {
        width: 100%;
        max-width: 240px;
        margin: 12px auto 0;
    }

    .modern-form h1 {
        font-size: 1.9rem;
        margin-bottom: 12px;
    }

    .field-label {
        font-size: 0.74rem;
    }

    .field-container input {
        height: 38px;
        font-size: 0.78rem;
    }

    .btn-log,
    .btn-guest {
        height: 36px;
        font-size: 0.7rem;
    }

    .logo-section {
        padding: 18px 14px 16px;
    }

    .group-name {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .credo-box {
        max-width: none;
        min-height: 180px;
    }

    .credo-text {
        max-height: 140px;
        font-size: 0.6rem;
        line-height: 1.3;
    }
}
