:root {
  --bg: #000000;
  --surface: #050505;
  --line: #1f1f1f;
  --line-soft: #141414;
  --text: #e8e8e8;
  --text-dim: #8a8a8a;
  --accent: #cfcfcf;
  --danger: #ff7e7e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

a {
  color: inherit;
}

.page {
  width: min(760px, 92vw);
  margin: 0 auto;
  padding: 24px 0 56px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.owner-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.owner-login {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.owner-login:hover {
  color: var(--text);
}

.top-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 12px;
  transition: color 0.15s ease;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--text);
}

.page-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 500;
  letter-spacing: -0.3px;
}

.page-subtitle {
  margin: 0 0 22px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.card,
.panel,
.list-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 12px;
}

.card h3,
.panel h3,
.list-item strong {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.card p,
.list-item p {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}

.meta {
  margin-top: 6px;
  font-size: 12px;
  color: #757575;
}

.tag-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  color: #9a9a9a;
  background: transparent;
  border-radius: 0;
  font-size: 11px;
  padding: 2px 6px;
}

.link,
.card a.link {
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}

.link:hover,
.card a.link:hover {
  color: #ffffff;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #a0a0a0;
  font-size: 12px;
}

input,
textarea,
select,
button {
  width: 100%;
  background: #060606;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 0;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

button:hover {
  border-color: #3a3a3a;
  color: #ffffff;
}

button.secondary {
  background: #090909;
}

button.danger {
  color: var(--danger);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.inline-actions button {
  width: auto;
}

.notice {
  margin-top: 10px;
  font-size: 12px;
  color: #b7b7b7;
}

.notice.error {
  color: #ff8c8c;
}

.list {
  display: grid;
  gap: 8px;
}

.footer-note {
  margin-top: 18px;
  font-size: 11px;
  color: #646464;
}

@media (max-width: 860px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
