/* Loop Portal — material pink on slate, matching statevault design family */

:root {
  --pink: #e91e63;
  --pink-light: #fce4ec;
  --pink-dark: #880e4f;
  --slate: #1e1e2e;
  --slate-light: #2a2a3e;
  --surface: #ffffff;
  --bg: #f5f5f7;
  --text: #1e1e2e;
  --text-muted: #6b6b80;
  --border: #e0e0e6;
  --radius: 4px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--slate);
  border-bottom: 2px solid var(--pink);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 3.25rem;
}

.brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a, .link-btn {
  color: #b0b0c0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .link-btn:hover { color: #fff; }
.link-btn { background: none; border: none; cursor: pointer; font: inherit; padding: 0; }
.inline { display: inline; }

/* Main */
main {
  max-width: 720px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
}

/* Flash messages */
.flash {
  padding: 0.65rem 1rem;
  border-left: 3px solid var(--pink);
  background: var(--pink-light);
  color: var(--pink-dark);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.flash.error { border-left-color: #c62828; background: #ffebee; color: #b71c1c; }
.flash.success { border-left-color: #2e7d32; background: #e8f5e9; color: #1b5e20; }
.flash.info { border-left-color: var(--pink); }

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

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
a.card:hover {
  border-left-color: var(--pink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

/* Typography */
h1 { font-size: 1.35rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
p { color: var(--text-muted); font-size: 0.9rem; }

/* Forms */
form label {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

form input[type="text"],
form input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin-top: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}
form input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 2px var(--pink-light);
}

form button[type="submit"] {
  margin-top: 1.5rem;
  padding: 0.6rem 1.75rem;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
form button[type="submit"]:hover { background: var(--pink-dark); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
tr + tr { border-top: 1px solid var(--border); }
th {
  text-align: left;
  padding: 0.6rem 1rem 0.6rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  width: 130px;
  vertical-align: top;
}
td { padding: 0.6rem 0; font-size: 0.95rem; }

/* Badges */
.badge {
  display: inline-block;
  background: var(--pink-light);
  color: var(--pink-dark);
  padding: 0.1rem 0.55rem;
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 0.25rem;
}

/* Footer */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2rem 1rem 1.5rem;
}

/* Token display */
.token-display {
  display: block;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--slate);
  color: #e0e0e0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  border-radius: var(--radius);
  word-break: break-all;
  user-select: all;
}

/* Table header */
thead th {
  width: auto;
  font-size: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
thead th:last-child { text-align: right; }
tbody td:last-child { text-align: right; }

/* Revoke button */
.btn-revoke {
  padding: 0.25rem 0.75rem;
  background: none;
  color: #c62828;
  border: 1px solid #c62828;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-revoke:hover { background: #ffebee; }

/* Responsive */
@media (max-width: 480px) {
  .nav-links { gap: 0.75rem; }
  .nav-links a, .link-btn { font-size: 0.8rem; }
  .cards { grid-template-columns: 1fr; }
}
