/* Staff app: mobile first, light and dark. */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --text: #0e1a24;
  --text-muted: #5b6b77;
  --border: #dce3e8;
  --accent: #17607d;
  --on-accent: #ffffff;
  --notice-bg: #e1edf2;
  --status-new: #b45309;
  --status-ordered: #1f6f52;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a24;
    --surface: #172b39;
    --text: #e8eef2;
    --text-muted: #9aaebb;
    --border: #365163;
    --accent: #5fa8c6;
    --on-accent: #0e1a24;
    --notice-bg: #203748;
    --status-new: #f5a574;
    --status-ordered: #6fcf9f;
  }
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    'Noto Sans Thai',
    sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

.staff-app {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px;
}

.staff-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-location {
  flex: 1 1 100%;
  margin: 0;
  font-size: 20px;
}

.staff-user {
  flex: 1 1 auto;
  color: var(--text-muted);
}

button,
input,
textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
}

button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
}

.staff-primary {
  width: 100%;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

textarea {
  min-height: 72px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

label {
  display: block;
  margin: 12px 0 4px;
  color: var(--text-muted);
}

.staff-lang-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.staff-lang-switch button[aria-pressed='true'] {
  border-color: var(--accent);
  font-weight: 600;
}

.staff-message {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--notice-bg);
}

.staff-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-form-link {
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
}

.staff-form-name {
  display: block;
  font-weight: 600;
}

.staff-form-last {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
}

.staff-title {
  margin: 8px 0 12px;
  font-size: 20px;
}

.staff-item {
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.staff-item-label {
  margin-bottom: 6px;
  font-weight: 600;
}

.staff-item-inputs {
  display: flex;
  gap: 8px;
}

.staff-note-toggle {
  flex: 0 0 auto;
}

.staff-item-note {
  margin-top: 8px;
}

.staff-submit {
  margin-top: 16px;
}

.staff-history-entry {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.staff-history-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.staff-status {
  font-weight: 600;
}

.staff-status-new {
  color: var(--status-new);
}

.staff-status-ordered {
  color: var(--status-ordered);
}

.staff-history-lines {
  margin: 6px 0 0;
  padding-left: 18px;
}
