:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687386;
  --line: #dde3ec;
  --accent: #2457d6;
  --accent-hover: #1744b4;
  --success: #087f5b;
  --danger: #c92a2a;
  --warning: #b26a00;
  font-family: Inter, "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(36, 87, 214, .12), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button, input { font: inherit; }

.shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3rem); }
h2 { margin-bottom: 0; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .12em;
}

.lead { color: var(--muted); line-height: 1.7; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  font-size: .85rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
}
.status-online .status-dot { background: var(--success); }
.status-offline .status-dot { background: var(--danger); }

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(23, 32, 51, .08);
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }

.tab {
  padding: 16px;
  border: 0;
  background: #f8f9fb;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.tab.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.tab-panel { padding: 28px; }

.field { margin-bottom: 20px; }

label {
  display: block;
  margin-bottom: 8px;
  font-size: .92rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cbd3df;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, .14);
}
input[aria-invalid="true"] { border-color: var(--danger); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }

.toggle-password {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 800;
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.primary-button, .secondary-button {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}
.primary-button {
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.primary-button:hover { background: var(--accent-hover); }
.primary-button:disabled { opacity: .65; cursor: wait; }

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.message {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  line-height: 1.55;
}
.message-success { border: 1px solid #a9dfcd; background: #eaf8f3; color: #05684b; }
.message-error { border: 1px solid #f0b7b7; background: #fff0f0; color: #9f1d1d; }
.message-info { border: 1px solid #b8caf8; background: #edf2ff; color: #173d99; }

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-left: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.user-panel { padding: 28px; }
.user-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.user-details { margin: 28px 0; }
.user-details div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.user-details dt { color: var(--muted); }
.user-details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.technical-details {
  margin-top: 20px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: .86rem;
}
.technical-details summary { cursor: pointer; font-weight: 700; }
code { overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .shell { padding: 32px 0; }
  .hero { display: block; }
  .status { margin-top: 12px; }
  .tab-panel, .user-panel { padding: 22px 18px; }
  .user-details div { grid-template-columns: 1fr; gap: 5px; }
}
