@charset "utf-8";

:root {
    --primary-orange: #ED8B36; /* 画像に近いオレンジ */
    --bg-color: #F9F9F9;
    --text-color: #333;
    --border-color: #CCC;
    --link-blue: #00BFFF; /* Backボタンの色 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body {
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

/* スマホ/タブレット画面のコンテナ */
.app-container {
    width: 100%;
    max-width: 480px; /* タブレットサイズまで許容 */
    background-color: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
}

/* 画面の表示・非表示制御 */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    padding-bottom: 20px;
}

.screen.active {
    display: flex;
}

/* --- 共通ヘッダー --- */
.header {
    background-color: var(--primary-orange);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    height: 60px;
}

.header-title {
    flex-grow: 1;
    text-align: center;
}

.back-btn {
    color: var(--link-blue);
    cursor: pointer;
    font-size: 1rem;
    font-weight: normal;
    text-decoration: none;
    position: absolute; /* タイトルを中央維持するため */
    left: 15px;
}

/* --- ログイン画面 (Screen 1) --- */
#screen-login {
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-logo {
    background-color: var(--primary-orange);
    color: white;
    width: 180px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 60px;
}

.input-group {
    width: 100%;
    margin-bottom: 25px;
}

.input-underline {
    width: 100%;
    border: none;
    border-bottom: 1px solid #999;
    padding: 10px 5px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.input-underline:focus {
    border-bottom: 2px solid var(--primary-orange);
}

.checkbox-group {
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.checkbox-group input {
    margin-right: 8px;
    transform: scale(1.2);
}

.btn-orange {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-orange:hover {
    opacity: 0.9;
}

/* --- メニュー画面 (Screen 2) --- */
.menu-top-logo {
    background-color: var(--primary-orange);
    color: white;
    width: 140px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin: 30px auto;
}

.user-info {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 40px;
}

.menu-btn {
    background-color: white;
    border: 2px solid var(--primary-orange);
    border-radius: 10px;
    padding: 15px;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menu-btn i {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* --- 履歴画面 (Screen 3) --- */
.history-list {
    list-style: none;
    font-size: 0.8rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.h-date { width: 30%; }
.h-name { width: 60%; }
.h-id { width: 10%; text-align: right; }

/* --- プロフィール画面 (Screen 4) --- */
.profile-form {
    padding: 30px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-label {
    width: 100px;
    font-weight: bold;
    color: #333;
}

/* 必須マーク */
.required::after {
    content: "*";
    margin-left: 4px;
}

.form-input-box {
    flex-grow: 1;
    padding: 6px;
    border: 1px solid #999;
    font-size: 1rem;
    width: 100%; /* モバイル最適化 */
}

/* 姓・名のように分割されている行の調整 */
.split-row {
    display: flex;
    width: 100%;
    align-items: center;
    margin-bottom: 10px;
}

.sub-label {
    width: 40px;
    text-align: right;
    padding-right: 5px;
}

.save-btn-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.btn-save {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 50px;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
}

/* タブレット・PC向け調整 */
@media (min-width: 400px) {
    .form-input-box {
        width: auto;
    }
}
