@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@400;500;600;700;800&display=swap');

:root{
  font-family:"M PLUS 1",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  color:#1f2937;
  background:#fffbea;
  line-height:1.5;
}
*{box-sizing:border-box}
body{
  margin:0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,241,82,.30), transparent 30%),
    radial-gradient(circle at 90% 12%, rgba(232,204,0,.10), transparent 25%),
    linear-gradient(180deg,#fffef8 0%,#fff8cf 100%);
}
a{color:#3979b9}
button,input{font:inherit}
.shell{min-height:100vh;display:grid;place-items:center;padding:24px}
.card,.panel{
  background:rgba(255,255,255,.96);
  border:1px solid #eee5a8;
  border-radius:18px;
  box-shadow:0 12px 30px rgba(91,78,24,.08);
}
.card{width:min(100%,620px);padding:28px}
.panel{padding:22px;margin-bottom:20px}
.auth-card{
  max-width:480px;
  position:relative;
  overflow:hidden;
}
.auth-card::before{
  content:"";
  display:block;
  height:6px;
  margin:-28px -28px 26px;
  background:linear-gradient(90deg,#fff9b8 0%,#fff152 52%,#e6c900 100%);
}
h1{margin:0 0 12px;font-size:28px}
h2{margin:0 0 14px;font-size:19px}
p{line-height:1.7}
.eyebrow{
  margin-bottom:6px;
  color:#64748b;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
}
.muted{color:#6b7280;font-size:13px}
.subtext{margin-top:4px;color:#6b7280;font-size:12px}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:10px 20px;
  border:1px solid #e3cc20;
  border-radius:9px;
  background:linear-gradient(180deg,#fff36a 0%,#f5df32 100%);
  color:#3f3810;
  text-decoration:none;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(217,191,35,.18);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
.button:hover{filter:brightness(.985);box-shadow:0 6px 14px rgba(217,191,35,.24)}
.button:active{transform:translateY(1px)}
.button.secondary{
  background:#fffef7;
  color:#5b5537;
  border-color:#ded8b7;
  box-shadow:none;
}
.form-stack{display:grid;gap:16px;margin-top:22px}
.form-stack label{display:grid;gap:7px;font-size:14px;font-weight:700}
input,textarea,select,button{
  font-family:"M PLUS 1",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
input,textarea,select{
  width:100%;
  min-height:46px;
  border:1.5px solid #ddcf6a;
  border-radius:7px;
  background:#fff;
  padding:9px 11px;
  color:#111827;
  outline:none;
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
}
input::placeholder,textarea::placeholder{color:#9aa6a3}
input:hover,textarea:hover,select:hover{border-color:#cfb91e}
input:focus,textarea:focus,select:focus{
  border-color:#d7bd12;
  box-shadow:0 0 0 4px rgba(255,241,82,.24);
  background:#fffef7;
}
.alert{margin:18px 0;padding:12px 14px;border-radius:10px;font-size:14px}
.alert.error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}
.alert.success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.topbar{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:0 24px;
  background:rgba(255,249,190,.96);
  border-bottom:1px solid #eadf8c;
}
.topbar-sub{margin-left:10px;color:#64748b;font-size:13px}
.topbar-user{display:flex;align-items:center;gap:14px;font-size:13px}
.brand-link{color:#1f2937;text-decoration:none;font-weight:800}
.page{width:min(1180px,100%);margin:0 auto;padding:28px 22px 60px}
.page.narrow{width:min(760px,100%)}
.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}
.page-heading h1{margin:0}
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.stat-card{background:#fff;border:1px solid #eadf9d;border-radius:15px;padding:18px}
.stat-card span,.stat-card small{display:block;color:#64748b}
.stat-card strong{display:block;margin:5px 0;font-size:32px}
.menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.menu-card{
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
  padding:20px;
  background:#fff;
  border:1px solid #e6dea9;
  border-radius:15px;
  color:#1f2937;
  text-decoration:none;
}
.menu-card:hover{border-color:#d6c547;transform:translateY(-1px)}
.menu-card span{color:#64748b;font-size:13px}
.menu-card.disabled{opacity:.55}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;white-space:nowrap}
th,td{padding:13px 12px;border-bottom:1px solid #edf1f5;text-align:left;font-size:14px}
th{color:#64748b;font-size:12px}
.status{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700}
.status.active{background:#ecfdf5;color:#047857}
.status.inactive{background:#f1f5f9;color:#64748b}
.shift-list{display:grid;gap:8px}
.shift-row{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #edf1f5}
.shift-row:last-child{border-bottom:0}
.shift-row div:first-child{display:flex;gap:10px}
.shift-row span{color:#64748b;font-size:13px}
@media(max-width:700px){
  .topbar{padding:0 16px}
  .topbar-user{font-size:12px}
  .page{padding:22px 14px 44px}
  .page-heading{align-items:flex-start;flex-direction:column}
  .stats-grid,.menu-grid{grid-template-columns:1fr}
  .card{padding:22px}
  h1{font-size:24px}
}

.auth-card h1{
  margin-bottom:4px;
  letter-spacing:.01em;
}
.auth-card .eyebrow{
  color:#9c8710;
}
.auth-card .muted{
  color:#71807d;
}
.form-stack label > span{
  color:#554f33;
  font-size:13px;
  font-weight:700;
}
.form-stack .button{
  width:100%;
  margin-top:4px;
}
.auth-note{
  margin:18px 0 0;
  padding:12px 14px;
  border-radius:10px;
  background:#fffbe2;
  color:#6f6741;
  font-size:12px;
  line-height:1.7;
}


/* admin forms */
.inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.button.small{min-height:36px;padding:7px 12px;border-radius:8px;font-size:12px}
.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.section-heading h2{margin-bottom:4px}
.staff-editor{margin-bottom:22px}
.staff-form{display:grid;gap:18px}
.form-section{padding:16px;border:1px solid #eadf9d;border-radius:13px;background:#fffef9}
.form-section h3{margin:0 0 13px;font-size:15px;color:#554b22}
.form-grid{display:grid;gap:14px}
.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.field{display:grid;gap:6px;font-size:13px;font-weight:700;color:#554f33}
.field b{color:#cf4a55;font-size:11px}
.field small{font-size:11px;font-weight:500;color:#7c7558;line-height:1.5}
.field-wide{grid-column:1/-1}
.field-help{margin:-3px 0 12px;color:#7c7558;font-size:12px}
textarea{resize:vertical;min-height:90px}
input[type="checkbox"],input[type="radio"]{
  width:16px;
  height:16px;
  min-width:16px;
  min-height:16px;
  margin:0;
  padding:0;
  border:0;
  box-shadow:none;
  accent-color:#e0c400;
  vertical-align:middle;
}
.toggle-field{align-content:start}
.switch-line{display:flex;align-items:center;gap:7px;min-height:38px;padding:0 1px;font-weight:600}
.store-choice-grid{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.choice-card{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:36px;
  padding:7px 10px;
  border:1px solid #e0d89d;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
}
.choice-card:hover{border-color:#d1bf3b;background:#fffdf0}
.choice-card:has(input:checked){border-color:#d5bd17;background:#fff8bd}
.primary-store-field{max-width:420px}
.input-suffix{display:flex;align-items:center;gap:8px}
.input-suffix input{flex:1}
.input-suffix span{white-space:nowrap;color:#756d45}
.form-actions{display:flex;justify-content:flex-end;gap:10px}
.store-list{display:grid}
.store-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:15px 4px;
  border-bottom:1px solid #edf2f0;
}
.store-row:last-child{border-bottom:0}
.store-row-main{display:flex;align-items:center;gap:12px}
@media(max-width:760px){
  .form-grid.two{grid-template-columns:1fr}
  .store-choice-grid{grid-template-columns:1fr}
  .field-wide{grid-column:auto}
  .form-actions{flex-direction:column-reverse}
  .form-actions .button{width:100%}
  .section-heading{align-items:flex-start}
}


/* shift request periods */
.period-create-form{
  display:grid;
  grid-template-columns:1fr 1fr 1.4fr auto;
  gap:12px;
  align-items:end;
}
.period-create-action{display:flex;align-items:flex-end}
.period-create-action .button{white-space:nowrap}
.period-rule-note{margin:12px 0 0}
.period-list{display:grid;gap:12px}
.period-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px;
  border:1px solid #e7dea5;
  border-radius:13px;
  background:#fff;
}
.period-card-main{min-width:0}
.period-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.period-title-line strong{font-size:16px}
.period-meta{display:flex;gap:14px;flex-wrap:wrap;margin-top:7px;color:#687975;font-size:12px}
.period-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.period-actions form{margin:0}
.status.period-status.draft{background:#f1f5f9;color:#64748b}
.status.period-status.open{background:#ecfdf5;color:#047857}
.status.period-status.closed{background:#fff7ed;color:#c2410c}
.status.period-status.scheduling{background:#eff6ff;color:#1d4ed8}
.status.period-status.published{background:#f5f3ff;color:#6d28d9}
.status.period-status.archived{background:#f3f4f6;color:#6b7280}
.empty-state{padding:28px;text-align:center;color:#7a8884;background:#fafcfb;border-radius:12px}
@media(max-width:900px){
  .period-create-form{grid-template-columns:1fr 1fr}
  .period-create-action{grid-column:1/-1}
}
@media(max-width:700px){
  .period-create-form{grid-template-columns:1fr}
  .period-create-action{grid-column:auto}
  .period-create-action .button{width:100%}
  .period-card{align-items:flex-start;flex-direction:column}
  .period-actions{width:100%;justify-content:flex-start}
  .period-actions form{flex:1}
  .period-actions .button{width:100%}
}


/* Suzuki Karaage brand palette */
.topbar::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:linear-gradient(90deg,#fff9b8 0%,#fff152 55%,#e6c900 100%);
  z-index:20;
}
.brand-link,.topbar strong{letter-spacing:.01em}
.eyebrow{color:#9a8610}

.stat-card:nth-child(1){background:#fffbe0;border-color:#eadb6c}
.stat-card:nth-child(2){background:#eef9fd;border-color:#b9deeb}
.stat-card:nth-child(3){background:#fff0f4;border-color:#efc6d0}

.menu-card{
  transition:border-color .14s ease,transform .14s ease,box-shadow .14s ease;
  box-shadow:0 5px 14px rgba(86,72,15,.045);
}
.menu-card:nth-child(4n+1){background:#fffbea;border-color:#eadb7d}
.menu-card:nth-child(4n+2){background:#f0f9fc;border-color:#c7e4ed}
.menu-card:nth-child(4n+3){background:#fff2f5;border-color:#efd1d9}
.menu-card:nth-child(4n+4){background:#f1faf4;border-color:#cde8d6}

.form-section:nth-of-type(1){border-left:4px solid #f0d72f}
.form-section:nth-of-type(2){border-left:4px solid #8fd5ea}
.form-section:nth-of-type(3){border-left:4px solid #f2a8b8}
.form-section:nth-of-type(4){border-left:4px solid #9edbb8}
.form-section:nth-of-type(5){border-left:4px solid #d8b9ed}

.status.active{background:#eef9f2;color:#28764b}
.alert.success{background:#f2faf0;color:#36723f;border-color:#c9e8c8}
.period-card{box-shadow:0 4px 12px rgba(86,72,15,.035)}
.empty-state{background:#fffdf2;color:#807853}


/* drag sorting */
.sortable-store-list{
  display:grid;
  gap:6px;
}
.sortable-store-list .store-row{
  justify-content:flex-start;
  gap:10px;
  padding:11px 10px;
  border:1px solid transparent;
  border-bottom-color:#eee8c5;
  border-radius:9px;
  background:#fff;
  transition:box-shadow .12s ease,border-color .12s ease,transform .12s ease;
}
.sortable-store-list .store-row:last-child{
  border-bottom-color:transparent;
}
.sortable-store-list .store-row.is-dragging{
  border:1px dashed #d8c443;
  background:#fffdf1;
  box-shadow:none;
  opacity:.32;
}
.drag-handle{
  width:30px;
  height:34px;
  flex:0 0 30px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#9a8a32;
  font-size:22px;
  line-height:1;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
.drag-handle:hover{
  background:#fff5a8;
  color:#6e610e;
}
.drag-handle:active,
.is-dragging .drag-handle{
  cursor:grabbing;
  background:#fff18a;
}
body.is-sorting{
  user-select:none;
  -webkit-user-select:none;
}
.sort-save-state{
  min-height:20px;
  margin-top:8px;
  color:#837a50;
  font-size:11px;
}


.store-drag-ghost{
  position:fixed;
  z-index:9999;
  margin:0;
  padding:7px 9px !important;
  pointer-events:none;
  opacity:.52;
  overflow:hidden;
  border:1px solid #d8bd16 !important;
  border-radius:8px;
  background:#fff472 !important;
  box-shadow:0 8px 18px rgba(92,74,0,.14);
  transform:rotate(.2deg);
}
.store-drag-ghost .drag-handle{
  cursor:grabbing;
}

.store-drag-ghost .drag-handle{
  width:22px;
  height:28px;
  flex-basis:22px;
  font-size:17px;
}
.store-drag-ghost .store-row-main{
  min-width:0;
  flex:1;
  justify-content:space-between;
  gap:8px;
}
.store-drag-ghost .store-row-main strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.store-drag-ghost .status{
  padding:3px 6px;
  font-size:10px;
}
