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

body {
  background: #f4f4f4;
  color: #222;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: #444; text-decoration: underline; }
a:hover { color: #000; }

/* Layout */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: .6rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.title { font-weight: 600; font-size: .9rem; color: #111; }
nav { display: flex; gap: 1rem; }
nav a { font-size: .82rem; }

.container {
  max-width: 1000px;
  margin: 1.5rem auto;
  padding: 0 1.2rem;
}

/* Section headers */
.sh {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #777;
  border-bottom: 1px solid #ddd;
  padding-bottom: .4rem;
  margin-bottom: .75rem;
  margin-top: 2rem;
}
.sh:first-child { margin-top: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e0e0e0; }
th { text-align: left; font-size: .78rem; font-weight: 500; color: #666; padding: .5rem .75rem; background: #fafafa; border-bottom: 1px solid #e8e8e8; }
td { padding: .5rem .75rem; border-bottom: 1px solid #f0f0f0; font-size: .85rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Badges */
.badge { display: inline-block; padding: .15rem .45rem; font-size: .72rem; border-radius: 3px; font-weight: 500; }
.online  { background: #dcfce7; color: #166534; }
.offline { background: #f3f4f6; color: #6b7280; }

/* Buttons */
.btn {
  background: #fff;
  border: 1px solid #d0d0d0;
  color: #333;
  font-size: .8rem;
  padding: .3rem .65rem;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
}
.btn:hover { background: #f5f5f5; border-color: #aaa; }
.btn-primary { background: #111; color: #fff; border-color: #111; }
.btn-primary:hover { background: #333; }

/* Login */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f4f4f4; }
.login-box { background: #fff; border: 1px solid #ddd; padding: 2rem; width: 320px; border-radius: 4px; }
.login-box h1 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; color: #111; }
.field {
  display: block;
  width: 100%;
  border: 1px solid #d0d0d0;
  padding: .45rem .6rem;
  font-size: .9rem;
  font-family: inherit;
  border-radius: 3px;
  outline: none;
  background: #fff;
  margin-bottom: .6rem;
}
.field:focus { border-color: #888; }
.err { color: #b91c1c; font-size: .82rem; margin-bottom: .5rem; }

/* Audit table */
.audit { font-size: .8rem; }
.audit th { font-size: .72rem; }
.audit td { color: #555; padding: .35rem .75rem; }
.audit .ts { color: #999; white-space: nowrap; font-family: monospace; }
.audit .cm { font-family: monospace; color: #333; }
.audit .rs { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #888; }

/* Session */
.quick { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }

.terminal {
  background: #fff;
  border: 1px solid #ddd;
  padding: .75rem;
  height: 55vh;
  overflow-y: auto;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .82rem;
  line-height: 1.6;
}
.terminal pre { white-space: pre-wrap; word-break: break-all; margin-bottom: .3rem; color: #333; }
.cmd-line { color: #111; font-weight: 500; }
.err-line  { color: #b91c1c; }
.info-line { color: #999; font-style: italic; }
.terminal img { max-width: 100%; display: block; border: 1px solid #e0e0e0; margin: .3rem 0; }

.cmd-bar {
  display: flex;
  border: 1px solid #ddd;
  border-top: none;
  background: #fff;
}
.cmd-prompt {
  padding: .45rem .6rem;
  color: #999;
  border-right: 1px solid #eee;
  user-select: none;
  font-family: monospace;
}
.cmd-input {
  flex: 1;
  border: none;
  outline: none;
  padding: .45rem .6rem;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .85rem;
  color: #111;
  background: transparent;
}
.cmd-submit {
  border: none;
  border-left: 1px solid #eee;
  background: transparent;
  padding: .45rem .75rem;
  cursor: pointer;
  color: #aaa;
  font-size: 1rem;
}
.cmd-submit:hover { color: #333; }

.hint { color: #bbb; font-size: .72rem; margin-top: .35rem; }
