:root {
  --ink: #1f2a24;
  --muted: #647268;
  --paper: #f6f4ed;
  --surface: #fffef9;
  --line: #dbe1d8;
  --forest: #244d3a;
  --forest-soft: #e6efe9;
  --sun: #e7aa43;
  --danger: #9a3f35;
  --shadow: 0 18px 50px rgba(31, 42, 36, .09);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 100% 0, #edf3e8, transparent 34rem), var(--paper); font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .75rem 1rem; background: #fff; border: 2px solid var(--forest); }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 74px; padding: 0 clamp(1rem, 4vw, 3rem); display: flex; align-items: center; gap: 2rem; border-bottom: 1px solid rgba(36,77,58,.12); background: rgba(255,254,249,.9); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 13rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px 12px 18px 12px; color: white; background: var(--forest); font-family: serif; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: .1rem; color: var(--muted); font-size: .72rem; letter-spacing: .08em; }
nav { display: flex; align-self: stretch; gap: .25rem; }
nav a { display: grid; place-items: center; padding: 0 1rem; text-decoration: none; border-bottom: 3px solid transparent; }
nav a:hover, nav a:focus-visible { border-color: var(--sun); }
.account-menu { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .88rem; }
.link-button { padding: 0; border: 0; color: var(--forest); background: none; text-decoration: underline; cursor: pointer; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) 0 5rem; }
.hero-panel { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding: clamp(1.5rem, 4vw, 3.25rem); color: white; background: linear-gradient(135deg, #173c2d, #315f47 70%, #47745b); border-radius: 28px 28px 72px 28px; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 .5rem; color: #d9e8dc; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.5rem); line-height: 1.14; letter-spacing: -.03em; }
.hero-panel p:last-child { max-width: 42rem; margin-bottom: 0; color: #e8f0ea; }
.status-card { flex: 0 0 auto; padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .82rem; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .45rem; border-radius: 50%; background: #91d19e; box-shadow: 0 0 0 .25rem rgba(145,209,158,.15); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.action-card, .info-card { min-height: 210px; padding: 1.75rem; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 30px rgba(31,42,36,.04); }
.action-card { position: relative; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.action-card:hover, .action-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); outline: 3px solid rgba(231,170,67,.35); }
.action-card span { display: inline-block; padding: .3rem .65rem; border-radius: 999px; color: var(--forest); background: var(--forest-soft); font-size: .75rem; font-weight: 700; }
.action-card h2, .info-card h2 { margin: 1.35rem 0 .65rem; font-size: 1.25rem; }
.action-card p, .info-card li { color: var(--muted); line-height: 1.75; }
.message-stack { width: min(1180px, calc(100% - 2rem)); margin: 1rem auto 0; }
.message { padding: .85rem 1rem; border-radius: 12px; background: var(--forest-soft); }
.message.error { color: var(--danger); background: #f8e8e5; }
.form-shell { width: min(760px, 100%); margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.form-shell h1 { color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.field { margin-top: 1.2rem; }
.field label { display: block; margin-bottom: .45rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; padding: .8rem .9rem; border: 1px solid #b8c3ba; border-radius: 10px; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(231,170,67,.35); border-color: var(--forest); }
.helptext { color: var(--muted); font-size: .8rem; }
.errorlist { color: var(--danger); }
.button { display: inline-flex; align-items: center; justify-content: center; margin-top: 1.5rem; padding: .8rem 1.2rem; border: 0; border-radius: 10px; color: #fff; background: var(--forest); font-weight: 700; cursor: pointer; }
.button.secondary { color: var(--forest); background: var(--forest-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 999px; background: var(--forest-soft); font-size: .75rem; }
.badge.waiting { color: #78510d; background: #fff0cb; }
.badge.alert { color: var(--danger); background: #f8e8e5; }
.auth-layout { min-height: calc(100vh - 160px); display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, .7fr); align-items: center; gap: clamp(2rem, 8vw, 7rem); }
.auth-intro { padding: clamp(1rem, 4vw, 3rem); }
.auth-intro h1 { max-width: 13ch; color: var(--forest); }
.auth-intro > p:not(.eyebrow) { max-width: 38rem; color: var(--muted); line-height: 1.9; }
.eyebrow.dark { color: var(--forest); }
.employee-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 1.2rem; color: var(--forest); font-weight: 700; }
.auth-card h2 { margin-top: 0; }
.compact-form { margin-top: clamp(1rem, 7vh, 5rem); }
.compact-form > p { color: var(--muted); line-height: 1.8; }
.security-note { margin: 1.3rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.error-summary { padding: .8rem 1rem; border-left: 4px solid var(--danger); border-radius: 8px; color: var(--danger); background: #f8e8e5; }
.dev-panel { margin-top: 1.5rem; padding: 1rem; border: 1px dashed #afbbaf; border-radius: 14px; background: #f4f7f2; }
.dev-panel p { margin: .35rem 0 .75rem; color: var(--muted); font-size: .8rem; }
.dev-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dev-actions .button { min-height: 42px; margin: 0; padding: .55rem .75rem; font-size: .78rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.page-heading h1 { color: var(--ink); font-size: clamp(2rem, 4vw, 3.25rem); }
.page-heading > p { max-width: 34rem; color: var(--muted); line-height: 1.7; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .82em; overflow-wrap: anywhere; }
.empty-state { padding: 2.5rem; color: var(--muted); text-align: center; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.detail-card h2 { margin-top: 0; font-size: 1.05rem; }
.detail-card dl { margin: 0; }
.detail-card dt { margin-top: .8rem; color: var(--muted); font-size: .78rem; }
.detail-card dd { margin: .2rem 0 0; line-height: 1.6; }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; padding-block: .75rem; }
  nav { order: 3; width: 100%; min-height: 42px; }
  .account-menu { font-size: .78rem; }
  .hero-panel { align-items: flex-start; flex-direction: column; border-radius: 24px 24px 48px 24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; gap: 1rem; }
  .auth-intro { padding: .5rem; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
