
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Design tokens
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    --color-primary:      #274530;
    --color-primary-dark: #1b3223;
    --color-primary-bg:   #eef3ef;
    --color-accent:       #f59e0b;
    --color-danger:       #ef4444;
    --color-muted:        #6b7280;
    --color-bg:           #f3f4f6;
    --color-card:         #ffffff;
    --color-card-alt:     #f9fafb;
    --color-border:       #e5e7eb;
    --color-text:         #111827;
    --color-text-sub:     #4b5563;
    --radius:             6px;
    --radius-lg:          8px;
    --shadow:             0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.07);
    font-family: 'Yu Gothic', 'YuGothic', '游ゴシック', 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Meiryo', 'メイリオ', sans-serif;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Reset / Base
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
    font-family: inherit;
    background: var(--color-bg);
    margin: 0;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Header
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
header {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 20px;
    box-shadow: 0 2px 0 rgba(0,0,0,.14);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Main content
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
main {
    max-width: 1100px;
    width: 100%;
    margin: 20px auto 80px;
    padding: 0 16px;
    flex: 1 0 auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Footer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-footer {
    background: var(--color-primary-dark);
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    font-size: 9px;
    letter-spacing: .08em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Card
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Buttons
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: opacity .15s ease, transform .1s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.button-primary,
button.button-primary,
button.start {
    background: var(--color-primary);
    color: #fff;
}

.button-secondary,
button.end {
    background: var(--color-card);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.button-danger,
.side-menu__logout,
.staff-header__logout {
    background: var(--color-danger);
    color: #fff;
}

button:not(:disabled):active,
.button:not(:disabled):active { transform: scale(.97); opacity: .92; }
button:not(:disabled):hover,
.button:not(:disabled):hover { opacity: .86; }
button:disabled,
button[disabled] { opacity: .38; cursor: not-allowed; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Messages
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.message-error   { background: #fef2f2; color: #b91c1c; border-color: #ef4444; }
.message-success { background: #f0fdf4; color: #15803d; border-color: #22c55e; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Tables
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
table { width: 100%; border-collapse: collapse; background: var(--color-card); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--color-border); text-align: left; font-size: 14px; }
th { background: var(--color-card-alt); font-weight: 600; font-size: 13px; color: var(--color-text-sub); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Links & text
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
a { color: var(--color-primary); text-decoration: none; }
a:hover { opacity: .8; }
.text-muted { color: var(--color-muted); font-size: 13px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Form elements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
label {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-sub);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="month"],
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: var(--color-text);
    margin-top: 6px;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(39,69,48,.1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Staff header
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.staff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-right: 52px; /* hamburger スペース確保 */
}
.staff-header__body { flex: 1 1 auto; min-width: 0; }
.staff-header__title { margin: 0; font-size: 17px; font-weight: 700; }
.staff-header__description,
.staff-header__email { margin: 2px 0 0; font-size: 12px; opacity: .8; }
.staff-header__meta { margin-left: auto; }
.staff-header__meta p { margin: 0; font-size: 12px; opacity: .8; text-align: right; }
.staff-header__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.staff-header__actions .button { padding: 8px 14px; font-size: 13px; border-radius: 10px; }

@media (max-width: 480px) {
    .staff-header__email { display: none; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Admin header
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.admin-header {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 0 rgba(0,0,0,.14);
}
.admin-header__title  { margin: 0; font-size: 17px; font-weight: 700; }
.admin-header__subtitle { margin: 2px 0 0; font-size: 12px; opacity: .8; }
.admin-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-header__actions .button { text-decoration: none; }

@media (max-width: 640px) {
    .admin-header { flex-direction: column; align-items: flex-start; }
    .admin-header__actions { width: 100%; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Hamburger
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hamburger {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 1000;
    background: var(--color-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 9px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 99px; transition: transform .25s, opacity .25s, background .25s; }
.hamburger.active { background: rgba(0,0,0,.08); }
.hamburger.active span { background: #333; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Menu overlay
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 998; }
.menu-overlay.active { display: block; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Side menu
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 82vw);
    height: 100%;
    background: #fff;
    z-index: 999;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    padding: 72px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    border-top-left-radius: 22px;
    border-bottom-left-radius: 22px;
}
.side-menu.active { right: 0; }
.side-menu__logo { display: block; width: 130px; margin: 0 auto 4px; }
.side-menu__links { display: flex; flex-direction: column; gap: 2px; margin-top: 30px; }
.side-menu__link,
.side-menu__logout {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background .15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.side-menu__link { color: var(--color-text); background: transparent; }
.side-menu__link:hover { background: var(--color-bg); opacity: 1; }
.side-menu__link.is-active { background: var(--color-primary-bg); color: var(--color-primary); }
.side-menu__logout { margin-top: auto; background: #fef2f2; color: #b91c1c; justify-content: center; }
.side-menu__logout:hover { background: #fee2e2; opacity: 1; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Utilities
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: var(--color-primary-bg); color: var(--color-primary); font-size: 12px; font-weight: 600; }
.button-container { margin-top: 20px; text-align: center; }
.back-button { display: inline-flex; padding: 12px 28px; background: var(--color-primary); color: #fff; font-weight: 600; border-radius: 99px; font-size: 14px; transition: opacity .15s; touch-action: manipulation; text-decoration: none; }
.back-button:hover { opacity: .86; }
