/* --- 全体のスタイル --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 15px;
    font-size: 18px; /* 文字を大きく */
}

/* --- フォームのスタイル --- */
.form-container {
    max-width: 800px;
    margin: 2em auto;
    background-color: #ffffff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- クレジット表記 --- */
.credit-title {
    text-align: left;
    font-size: 0.8em;
    color: #777;
    margin-bottom: 5px;
}

/* --- 見出しのスタイル --- */
h1 {
    color: #003366; /* 御社の青色 */
    text-align: center;
    border-bottom: 3px solid #003366;
    padding-bottom: 10px;
    font-size: 1.8em; /* 見出しを大きく */
    margin-top: 0;
}

/* --- ウェルカムメッセージ --- */
#welcome-message {
    text-align: right;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 1.5em;
    font-weight: bold;
}

/* --- 各入力セクションのスタイル --- */
.form-section {
    margin-bottom: 2em;
    border: 1px solid #e0e0e0;
    padding: 1.5em;
    border-radius: 8px;
}

.form-section h2 {
    font-size: 1.3em;
    color: #003366;
    margin-top: 0;
    border-left: 5px solid #003366;
    padding-left: 10px;
}

/* --- ラベル（説明）のスタイル --- */
label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color: #555;
}

.required::after {
    content: '必須';
    color: #fff;
    background-color: #d9534f;
    padding: 2px 6px;
    font-size: 0.7em;
    margin-left: 8px;
    border-radius: 3px;
    font-weight: normal;
}

.note {
    font-size: 0.8em;
    font-weight: normal;
    color: #777;
    margin-bottom: 10px;
}

/* --- 入力欄のスタイル --- */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 15px; /* タップしやすく */
    font-size: 1.1em; /* 入力文字も大きく */
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: #003366;
    outline: none;
}

textarea {
    height: 150px;
    resize: vertical;
}

/* エラー時のスタイル */
.input-error {
    border-color: #d9534f !important;
    box-shadow: 0 0 5px rgba(217, 83, 79, 0.5);
}
.group-error {
    border: 2px solid #d9534f !important;
    border-radius: 8px;
}

/* --- アイコン付き入力欄のスタイル --- */
.input-with-icon {
    position: relative;
}
.input-with-icon input {
    padding-right: 60px; /* アイコンのためのスペース */
}
.qr-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5em; /* カメラマークを大きく */
    cursor: pointer;
    color: #5cb85c;
    line-height: 1;
}

/* --- チェックボックスとラジオボタン --- */
.choice-group {
    padding: 5px;
    border: 2px solid transparent; /* エラー表示用の枠 */
    transition: border-color 0.3s;
}
.choice-group label {
    font-weight: normal;
    display: block;
    margin-bottom: 12px;
    padding: 15px; /* タップしやすく */
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
}
.choice-group input {
    margin-right: 12px;
    transform: scale(1.5); /* チェックボックスを大きく */
    vertical-align: middle;
}

/* --- ボタンのスタイル --- */
.btn {
    display: block;
    width: 100%;
    padding: 18px; /* ボタンを大きく */
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: #003366;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn:hover {
    background-color: #002244;
}
.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* --- 通知メッセージのスタイル --- */
#status, #login-status {
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 1.1em;
    display: none;
}
.success { background-color: #dff0d8; color: #3c763d; }
.error { background-color: #f2dede; color: #a94442; }
.loading { background-color: #d9edf7; color: #31708f; }

/* --- QRコードリーダーのモーダルスタイル --- */
#qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#qr-reader {
    width: 90vw;
    max-width: 500px;
    border: 2px solid white;
}

#qr-close-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
