/* OnBike 관리자 사이트 — 모바일 앱 core/theme.dart AppColors 팔레트에 맞춤(2026-08-15). */
:root {
  --background: #0f0f1a;
  --surface: #1e1e30;
  --surface-variant: #252538;
  --border: #2a2a40;
  --primary: #6c63ff;
  --primary-variant: #8b5cf6;
  --online: #4caf50;
  --offline: #7b8cde;
  --warning: #ffc107;
  --error: #ff6b6b;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #7a7a7a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, Roboto, sans-serif;
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar .brand {
  font-weight: 800;
  font-size: 15px;
  margin-right: 24px;
  color: var(--text-primary);
}

header.topbar nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

header.topbar nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

header.topbar nav a:hover { background: var(--surface); text-decoration: none; }
header.topbar nav a.active { color: var(--text-primary); background: var(--surface); }

header.topbar .logout {
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

h1 { font-size: 18px; font-weight: 800; margin: 0 0 16px; }

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

input[type="text"], input[type="search"], input[type="password"], select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
input:focus, select:focus { border-color: var(--primary); }

button, .btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--surface-variant); }
button.primary { background: var(--primary); border-color: var(--primary); }
button.primary:hover { background: var(--primary-variant); }
button.danger { color: var(--error); border-color: var(--error); background: transparent; }
button.danger:hover { background: rgba(255, 107, 107, 0.12); }
button:disabled { opacity: 0.5; cursor: default; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th, td {
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface-variant);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}
.chip.online { color: var(--online); background: rgba(76, 175, 80, 0.15); }
.chip.offline { color: var(--offline); background: rgba(123, 140, 222, 0.15); }
.chip.error { color: var(--error); background: rgba(255, 107, 107, 0.15); }
.chip.warning { color: var(--warning); background: rgba(255, 193, 7, 0.15); }
.chip.muted { color: var(--text-muted); background: rgba(122, 122, 122, 0.15); }

.muted { color: var(--text-muted); }
.empty { color: var(--text-muted); padding: 40px 0; text-align: center; }

.pager { display: flex; gap: 8px; margin-top: 16px; align-items: center; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; width: 340px; max-width: 90vw;
}
.modal h3 { margin: 0 0 8px; font-size: 15px; }
.modal p { color: var(--text-secondary); font-size: 13px; margin: 0 0 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; }

.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; width: 320px;
}
.login-card h1 { text-align: center; margin-bottom: 24px; }
.login-card input { width: 100%; margin-bottom: 10px; }
.login-card button { width: 100%; margin-top: 6px; }
.login-error { color: var(--error); font-size: 12px; margin-top: 8px; min-height: 14px; }

pre.jsoneditor {
  width: 100%; min-height: 100px; background: var(--background); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: monospace;
}
textarea {
  width: 100%; background: var(--background); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: monospace;
  font-size: 12px;
}
