:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #0b1220;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --error: #f87171;
  --success: #4ade80;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

main {
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.panel-head h2 {
  margin: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-family: inherit;
}
input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  background: var(--accent);
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  align-self: flex-start;
}
button:hover:not(:disabled) {
  background: var(--accent-hover);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
}
.btn-danger {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--error);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.1);
}

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  text-align: left;
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td.col-actions,
th.col-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.feedback {
  color: var(--muted);
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
}
.feedback.error {
  color: var(--error);
}
.feedback.success {
  color: var(--success);
}

.hidden {
  display: none !important;
}
