:root {
    --base-white: #FFFFFF;
    --main-teal: #6DD2CD;
    --accent-orange: #F2984E;
    --support-black: #1F1F1F;
    --light-gray: #f5f7fa;
    --border-gray: #dee2e6;
    --footer-height: 48px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Meiryo', sans-serif;
    min-height: 100vh;
    background-color: var(--light-gray);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.environment-label {
    width: auto;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #ebebeb;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    position: absolute;
    left: 24px;
    top: 20px;
    transform: none;
    z-index: 0;
    pointer-events: none;
}

#ai002_root {
    width: min(100%, 450px);
    min-height: calc(100vh - var(--footer-height) - 40px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-card {
    background-color: var(--base-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 48px 40px;
    border: 2px solid var(--border-gray);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--main-teal);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--support-black);
    margin-bottom: 8px;
}

.form-control {
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--main-teal);
    box-shadow: 0 0 0 0.2rem rgba(109, 210, 205, 0.25);
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background-color: var(--main-teal);
    color: var(--support-black);
    transition: all 0.3s;
    margin-top: 24px;
}

.btn-login:hover {
    background-color: #5bc2bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 210, 205, 0.3);
}

.help-link {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-gray);
}

.help-link a {
    color: var(--support-black);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.help-link a:hover {
    color: #6c757d;
    text-decoration: underline;
}

.help-link i {
    font-size: 16px;
}

@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px;
    }

    .logo-title {
        font-size: 28px;
    }
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.page-footer {
    position: static;
    width: 100%;
    min-height: var(--footer-height);
    padding: 8px 0 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* CSP対応: インラインスタイル外部化 */
#loginid {
    max-width: 360px;
}
