.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    /* background: #f0f2f5; */
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 720px;
    position: relative; /* オーバーレイ用 */
}

.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block; margin-bottom: 5px; font-weight: bold;
}

/* ボタンとスピナー */
button {
    width: 100%;
    padding: 12px;
    background: #d33c44; /* CakePHP色 */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    font-size: 16px;
}

button#submitBtn {
    /* Milligramの余計な設定をリセット */
    padding: 0 !important;
    line-height: 1 !important;

    /* 高さを決めて、中身を真ん中に */
    height: 44px; /* お好みの高さで */
    display: flex !important;
    justify-content: center; /* 左右中央 */
    align-items: center;     /* 上下中央 */

    width: 100%;
    background-color: #d33c44;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

/* 文字自体の位置がズレないように */
.btn-text {
    display: block;
    margin: 0;
    padding: 0;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 50%; top: 50%;
    margin-left: -10px; margin-top: -10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ローディング状態のスタイル */
/* 完全に消すのではなく、ローディング中だけ消す */
button.loading .btn-text {
    display: none; /* visibility: hidden より確実です */
}

button.loading .spinner {
    display: block;
}

/* スピナーがないときは絶対に出さない */
button:not(.loading) .spinner {
    display: none;
}

/* 半透明オーバーレイ */
.overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
    z-index: 10;
}
.overlay.active { display: block; }
