:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d8d8df;
  --blue: #007aff;
  --green: #30d158;
  --red: #ff453a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  background: var(--blue);
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: #e8e8ed;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 220px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px;
}

.hidden { display: none !important; }

.login {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}

.panel, .profile-form, .table-wrap, .secret {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0;
}

p, span, .message {
  color: var(--muted);
}

.login-panel input, .login-panel button {
  margin-top: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e8e8ed;
}

.tab {
  color: var(--text);
  background: transparent;
}

.tab.active {
  background: white;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.secret {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
}

.secret code {
  user-select: all;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 500;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.dot.busy { background: var(--red); }

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.actions button {
  padding: 7px 10px;
}

.profile-form {
  padding: 18px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .shell { padding: 18px; }
  .topbar, .toolbar { align-items: stretch; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
}
input:disabled, textarea:disabled {
  background-color: #e8e8ed;
  color: #a1a1a6;
  cursor: not-allowed;
  border-color: #d8d8df;
}