* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

/* ── 로그인 ── */
#loginScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
#loginScreen h1 {
  font-size: 20px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 8px;
}
#loginScreen input {
  width: 300px;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}
#loginScreen input:focus { border-color: #4ade80; }
#loginScreen input::placeholder { color: #555; }
#loginScreen button {
  width: 300px;
  padding: 10px;
  background: #166534;
  color: #4ade80;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#loginScreen button:hover { background: #15803d; }
#loginError {
  color: #f87171;
  font-size: 13px;
  min-height: 20px;
}

/* ── 대시보드 ── */
#dashboard { display: none; padding: 24px; max-width: 1000px; margin: 0 auto; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #222;
}
.dash-header h1 { font-size: 18px; color: #4ade80; }
.dash-header button {
  padding: 6px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #999;
  font-size: 12px;
  cursor: pointer;
}
.dash-header button:hover { color: #f87171; border-color: #f87171; }

/* ── 생성 폼 ── */
.create-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field label {
  font-size: 11px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-field input, .form-field select {
  padding: 8px 10px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
}
.form-field input:focus, .form-field select:focus { border-color: #4ade80; }
.btn-create {
  padding: 8px 18px;
  background: #166534;
  color: #4ade80;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-create:hover { background: #15803d; }

/* ── 테이블 ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 10px 12px;
  color: #777;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #222;
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: top;
}
tr:hover td { background: #111; }

.key-cell {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #4ade80;
  letter-spacing: 0.5px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-active { background: #166534; color: #4ade80; }
.badge-inactive { background: #7f1d1d; color: #f87171; }
.badge-devices {
  background: #1a1a1a;
  color: #999;
  font-weight: 400;
}

.btn-sm {
  padding: 4px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  background: #1a1a1a;
  color: #999;
  font-size: 11px;
  cursor: pointer;
  margin-right: 4px;
}
.btn-sm:hover { color: #e0e0e0; border-color: #444; }
.btn-sm.danger:hover { color: #f87171; border-color: #f87171; }

/* ── 세션 상세 ── */
.sessions-row td {
  padding: 0;
  background: #0f0f0f;
}
.sessions-detail {
  padding: 10px 12px 10px 40px;
}
.sessions-detail table {
  font-size: 12px;
}
.sessions-detail th {
  font-size: 10px;
  padding: 6px 10px;
}
.sessions-detail td {
  padding: 6px 10px;
  color: #999;
}
.fingerprint {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #777;
}

.empty-msg {
  text-align: center;
  padding: 40px;
  color: #555;
  font-size: 14px;
}

/* ── 알림 ── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 18px;
  background: #166534;
  color: #4ade80;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
