/* Avarna License Admin — minimal styles */

:root {
  --bg: #0f1419;
  --panel: #1a1f29;
  --border: #2a3140;
  --text: #e6e9ef;
  --text-dim: #8a93a6;
  --accent: #4f8cff;
  --accent-hover: #6ba0ff;
  --danger: #ff5a5f;
  --success: #43d18a;
  --warning: #ffb547;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

h1 { font-size: 1.25rem; margin: 0; font-weight: 600; }
h2 { font-size: 1.1rem; margin: 0 0 1rem 0; font-weight: 600; }
h3 { font-size: 0.95rem; margin: 1rem 0 0.5rem; font-weight: 600; }

#auth-status { color: var(--text-dim); font-size: 0.85rem; }

#login-section, main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
}

#login-section {
  max-width: 400px;
}

#login-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

input, select {
  padding: 0.55rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.15s;
}

button:hover { background: #232936; }
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.primary:hover { background: var(--accent-hover); }

button.ghost {
  background: transparent;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  float: right;
}

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

.error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.25em;
  margin: 0.75rem 0 0;
}
.hint { color: var(--text-dim); font-size: 0.85rem; }

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
td.mono { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.active   { background: rgba(67, 209, 138, 0.15); color: var(--success); }
.badge.revoked  { background: rgba(255, 90, 95, 0.15); color: var(--danger); }
.badge.expired  { background: rgba(255, 181, 71, 0.15); color: var(--warning); }
.badge.pending  { background: rgba(79, 140, 255, 0.15); color: var(--accent); }
