/* public/style.css
   全画面共通の最小スタイル。スマホファースト。
*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", Meiryo, "Segoe UI", system-ui, sans-serif;
  background: #f6f7fa;
  color: #1f2933;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─── */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.container-wide {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
}
.card + .card {
  margin-top: 16px;
}
header.app-header {
  background: #1f2933;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.app-header h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
header.app-header .logout {
  font-size: 14px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
header.app-header .logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── Typography ─── */
h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
h3 {
  font-size: 16px;
  margin: 16px 0 8px;
}
.muted {
  color: #6b7280;
  font-size: 14px;
}
.note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin: 12px 0;
}
.error {
  color: #b91c1c;
  font-size: 14px;
  margin: 8px 0;
  min-height: 1.6em;
}
.success {
  color: #047857;
  font-size: 14px;
  margin: 8px 0;
  min-height: 1.6em;
}

/* ─── Forms ─── */
label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 500;
  font-size: 14px;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  -webkit-appearance: none;
}
input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.pin-input {
  letter-spacing: 0.6em;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
}
button.primary,
button.danger,
button.secondary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 16px;
}
button.primary {
  background: #2563eb;
  color: #fff;
}
button.primary:hover {
  background: #1d4ed8;
}
button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.secondary {
  background: #e5e7eb;
  color: #1f2933;
}
button.danger {
  background: #dc2626;
  color: #fff;
}
button.icon {
  width: auto;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  background: #f3f4f6;
  color: #1f2933;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  margin: 0;
}
button.icon:hover {
  background: #e5e7eb;
}

/* ─── Invoice list ─── */
.invoice-list {
  list-style: none;
  margin-top: 16px;
}
.invoice-list li {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.invoice-list .month {
  font-size: 16px;
  font-weight: 600;
}
.invoice-list .store {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-top: 2px;
}
.invoice-list a.download {
  background: #2563eb;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.invoice-list a.download:hover {
  background: #1d4ed8;
}
.empty {
  text-align: center;
  color: #6b7280;
  padding: 30px 16px;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  margin-top: 16px;
}

/* ─── Admin dashboard table ─── */
table.staff-table {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  border-collapse: collapse;
  font-size: 14px;
  overflow: hidden;
}
table.staff-table th,
table.staff-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
table.staff-table th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}
table.staff-table tbody tr:hover {
  background: #fafbfc;
}
table.staff-table .actions {
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.badge.pending {
  background: #fef3c7;
  color: #92400e;
}
.badge.active {
  background: #d1fae5;
  color: #065f46;
}
.badge.inactive {
  background: #e5e7eb;
  color: #6b7280;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.toolbar button {
  margin: 0;
}

/* スマホ専用 */
@media (max-width: 600px) {
  table.staff-table {
    font-size: 13px;
  }
  table.staff-table th,
  table.staff-table td {
    padding: 8px 6px;
  }
}
