
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont,
    "Hiragino Sans", sans-serif;
  background: #f4f7f5;
  color: #263b32;
}

header {
  background: #234c3c;
  color: white;
  padding: 24px 6%;
}

header h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 2px;
}

header p {
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 0;
}

main {
  max-width: 1100px;
  margin: auto;
  padding: 30px 20px;
}

.welcome {
  margin-bottom: 24px;
}

.welcome h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.progress-box {
  background: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid #dce7df;
}

.progress-box h3 {
  margin-top: 0;
}

#progress-text {
  font-size: 32px;
  color: #528c79;
}

progress {
  display: block;
  width: 100%;
  height: 18px;
  margin-top: 12px;
  accent-color: #528c79;
}

#search {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccd8cf;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 16px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

button {
  border: 1px solid #528c79;
  background: white;
  color: #234c3c;
  border-radius: 20px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
}

button.active {
  background: #234c3c;
  color: white;
}

#manual-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.manual-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  border: 1px solid #dce7df;
}

.manual-card h3 {
  font-size: 18px;
}

.manual-card p {
  font-size: 14px;
  line-height: 1.7;
  color: #65766c;
}

.category {
  font-size: 12px;
  color: #528c79;
  font-weight: bold;
}

.manual-card label {
  display: block;
  margin-top: 20px;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: #528c79;
}

footer {
  text-align: center;
  padding: 24px;
  color: #738078;
  font-size: 12px;
}

@media (max-width: 800px) {
  #manual-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  #manual-list {
    grid-template-columns: 1fr;
  }
}

/* ログアウトボタン */
header {
  position: relative;
}

#logout-button {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 10px 20px;
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

#logout-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
  #logout-button {
    position: static;
    margin-top: 12px;
  }
}
/* ユーザープロフィール */

#user-info.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    letter-spacing: normal;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#user-name {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

#user-affiliation {
    font-size: 13px;
    color: #d0e0d7;
}

#user-role {
    display: inline-block;
    background: #ddede3;
    color: #21483b;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
}/* 管理者メニュー */
#admin-menu {
    background: #ffffff;
    border: 1px solid #d5e2da;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

#admin-menu h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #21483b;
    font-size: 20px;
}

#admin-menu p {
    color: #718078;
    font-size: 14px;
    margin-bottom: 20px;
}

#admin-menu button {
    background: #f3f7f5;
    border: 1px solid #d5e2da;
    border-radius: 12px;
    padding: 20px 12px;
    margin: 5px;
    width: calc(33.333% - 14px);
    color: #21483b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

#admin-menu button:hover {
    background: #e1eee6;
    border-color: #518c79;
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    #admin-menu button {
        width: calc(50% - 14px);
        font-size: 13px;
    }
}/* 企業登録フォーム */

#organization-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#organization-form label {
  font-weight: bold;
  font-size: 14px;
}

#organization-name {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid #cddbd3;
  border-radius: 8px;
  font-size: 16px;
}

#organization-form button {
  background: #21483b;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 15px;
  cursor: pointer;
  align-self: flex-start;
}

#organization-form button:hover {
  background: #356653;
}

#organization-message {
  font-size: 14px;
  margin: 0;
}/* 新規店舗登録フォーム */

#store-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#store-form label {
  font-size: 14px;
  font-weight: bold;
}

#store-form input,
#store-form select {
  width: 100%;
  padding: 14px;
  border: 1px solid #cddbd2;
  border-radius: 8px;
  background: #ffffff;
  font-size: 16px;
  box-sizing: border-box;
}

#store-form button {
  align-self: flex-start;
  background: #214839;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 15px 24px;
  cursor: pointer;
}

#store-form button:hover:not(:disabled) {
  background: #326451;
}

#store-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#store-message {
  font-size: 14px;
  margin: 0;
}

/* =========================
   スタッフ管理画面
========================= */

.staff-page .card {
    background: #ffffff;
    border: 1px solid #cddbd2;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.staff-page .card h3 {
    margin-top: 0;
    color: #214839;
}

.staff-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

#staff-count,
#active-staff-count {
    font-size: 36px;
    font-weight: bold;
    color: #498775;
    margin: 12px 0 0;
}

#staff-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#staff-list > div {
    background: #f2f6f3;
    border: 1px solid #dce6df;
    border-radius: 12px;
    padding: 20px;
}

#staff-list h3,
#staff-list h4 {
    margin: 0 0 10px;
    color: #214839;
}

#staff-list p {
    margin: 8px 0;
}

.staff-page .back-link {
    display: inline-block;
    color: #498775;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
}

.staff-page .back-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .staff-page .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .staff-page .card {
        padding: 18px;
    }
}/* スタッフ招待フォーム */

#invite-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

#invite-form label {
    font-size: 14px;
    font-weight: bold;
}

#invite-form input,
#invite-form select {
    width: 100%;
    padding: 14px;
    border: 1px solid #cddbd2;
    border-radius: 8px;
    background: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
}

#invite-form button {
    align-self: flex-start;
    background: #214839;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 15px 24px;
    margin-top: 12px;
    font-size: 15px;
    cursor: pointer;
}

#invite-form button:hover:not(:disabled) {
    background: #326451;
}

#invite-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#invite-message {
    font-size: 14px;
    margin: 0;
}