/* ===== Admin (拠点管理) ===== */

.appbar .back-link {
  color: #fff; font-size: 24px; line-height: 1; text-decoration: none;
  width: 40px; display: flex; align-items: center; justify-content: center;
}
.appbar h1 { flex: 1; }

.admin-card {
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.admin-card h2 {
  margin: 0 0 14px; font-size: 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.field { display: block; margin-bottom: 12px; }
.field > span {
  display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600;
}
.field em.req { color: var(--danger); font-style: normal; }
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; background: #fff; color: var(--text);
}
.field small { display: block; margin-top: 4px; font-size: 11px; }

.row-actions { display: flex; gap: 8px; margin: 8px 0 12px; }
.row-actions .btn { flex: 1; min-height: 40px; padding: 8px 12px; font-size: 13px; }

.geocode-results {
  background: #F9FAFB; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; margin-bottom: 12px;
}
.geocode-results .gc-item {
  background: #fff; border-radius: 6px; padding: 10px;
  margin-bottom: 6px; border: 1px solid var(--border);
  cursor: pointer; font-size: 13px; line-height: 1.5;
}
.geocode-results .gc-item:last-child { margin-bottom: 0; }
.geocode-results .gc-item.selected {
  background: #E0F2F1; border-color: var(--line);
}
.geocode-results .gc-name { font-weight: 600; }
.geocode-results .gc-coords { color: var(--muted); font-size: 12px; margin-top: 2px; }

.coords-display {
  background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px;
}
.coords-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px; padding: 2px 0;
}
.coords-row span:first-child { color: var(--muted); }
.coords-row strong { font-family: monospace; }
.coords-row .muted { color: var(--muted); }
.coords-row .small { font-size: 11px; }

.location-list { display: flex; flex-direction: column; gap: 8px; }
.loc-item {
  background: #F9FAFB; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.loc-item.inactive { opacity: 0.5; background: #F3F4F6; }
.loc-item .loc-icon { font-size: 20px; }
.loc-item .loc-body { flex: 1; min-width: 0; }
.loc-item .loc-name { font-weight: 700; font-size: 14px; }
.loc-item .loc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.loc-item .loc-coords { font-family: monospace; font-size: 11px; color: var(--muted); }
.loc-item .loc-actions { display: flex; gap: 4px; }
.loc-item .loc-actions button {
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 12px; min-height: 32px;
}
.loc-item .loc-actions button:active { background: #F3F4F6; }
.loc-item .loc-actions .del-btn { color: var(--danger); border-color: #FCA5A5; }

.badge-type {
  font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700;
  margin-left: 6px;
}
.badge-type.office { background: #DCFCE7; color: #166534; }
.badge-type.field { background: #DBEAFE; color: #1e40af; }

/* ===== Employee management ===== */
.employee-mgmt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.emp-item {
  background: #F9FAFB; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px;
}
.emp-item.inactive { opacity: 0.5; background: #F3F4F6; }
.emp-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.emp-name { font-weight: 700; font-size: 14px; flex: 1; }
.emp-badges { display: flex; gap: 4px; }
.emp-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700;
}
.emp-badge.admin { background: #FEF3C7; color: #92400e; }
.emp-badge.line { background: #DCFCE7; color: #166534; }
.emp-badge.no-line { background: #F3F4F6; color: #9ca3af; }
.emp-toggles { display: flex; gap: 14px; flex-wrap: wrap; }
.emp-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted);
}
.emp-toggle input { width: 16px; height: 16px; }
.employee-add {
  display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border);
}
.employee-add input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.employee-add .btn { min-height: 40px; padding: 8px 16px; font-size: 13px; white-space: nowrap; }

/* ===== Reminder days checkboxes ===== */
.reminder-days {
  display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap;
}
.day-chk {
  display: inline-flex; flex-direction: column; align-items: center;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 8px; cursor: pointer; min-width: 38px;
  background: #fff;
}
.day-chk input { margin: 0 0 2px; }
.day-chk span { font-size: 12px; }
.day-chk.weekend span { color: var(--danger); }
.day-chk:has(input:checked) { background: #E0F2F1; border-color: var(--line); }

/* ===== Reminder settings ===== */
.reminder-list { display: flex; flex-direction: column; gap: 10px; }
.reminder-item {
  background: #F9FAFB; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px;
}
.reminder-item.disabled { opacity: 0.55; }
.reminder-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.reminder-name { font-weight: 700; font-size: 14px; }
.reminder-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.reminder-toggle input { width: 18px; height: 18px; }
.reminder-time {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 14px;
}
.reminder-time select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; background: #fff; color: var(--text);
  min-width: 64px;
}
.reminder-time .sep { color: var(--muted); }
.reminder-time .unit { color: var(--muted); font-size: 13px; }
.reminder-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.reminder-actions .btn { min-height: 36px; padding: 6px 18px; font-size: 13px; }
.reminder-item .weekdays-note { font-size: 11px; color: var(--muted); margin-top: 6px; }

.centered-text { text-align: center; padding: 16px 0; }

@media (min-width: 480px) {
  .row-actions { justify-content: stretch; }
}
