/* --- ベーススタイル --- */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background:
        linear-gradient(
            180deg,
            #edf7fc 0%,
            #f6fafc 50%,
            #edf6fb 100%
        );
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* height から min-height に変更し、縦伸びに対応 */
    margin: 0;
    padding: 20px 0; /* 上下に少し余白 */
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.hidden { display: none !important; }
.view { width: 100%; display: flex; justify-content: center; }

.login-container, .dashboard-container {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 360px; 
    text-align: center;
}

.input-group { margin-bottom: 1rem; text-align: left; }
.input-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; font-size: 0.9rem; }
.input-group input { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }

/* ボタン共通設定 */
.btn-login, .btn-secondary {
    transition: background-color 0.3s ease;
    width: 100%; 
    padding: 10px; 
    border: none; 
    cursor: pointer; 
}

.btn-login { 
    background-color: #007bff; 
    color: white; 
    margin-top: 10px;
    font-weight: bold;
    border-radius: 4px;
}
.btn-login:hover { background-color: #0056b3; }

/* --- 新規登録導線（背景なし・一行配置） --- */
.signup-link-only {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #666;
}

.btn-signup-link {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: color 0.2s ease;
}
.btn-signup-link:hover { color: #0056b3; }
/* ---------------------------------- */

.btn-secondary {
    margin-top: 20px;
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover { background-color: #5a6268; }
/* --- 所属・学籍情報の横並びスタイル --- */
.input-row {
    display: flex;
    gap: 8px; /* 入力欄同士の間隔 */
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.input-field {
    flex: 2; /* 学科名の幅を広めにとる */
    display: flex;
    align-items: center;
}

.input-field.short {
    flex: 1; /* 年・組・番の幅は狭く均等に */
    position: relative;
}

/* 年、組、番 の文字の位置調整 */
.input-field.short input {
    padding-right: 25px; /* 単位文字（年など）と被らないように右側に余白を空ける */
    text-align: center;   /* 数字やアルファベットを中央寄せにして見やすく */
}

.input-field .unit {
    position: absolute;
    right: 8px;
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
    pointer-events: none; /* 文字の上をクリックしても入力欄が反応するようにする */
}

/* --- パスワード表示切替ボタンのスタイル --- */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px !important; /* 入力文字とボタンが被らないように右側に余白を空ける */
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    color: #666;
}

.toggle-password:hover {
    color: #007bff;
}