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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.nav-brand {
  font-weight: 700;
  font-size: 18px;
  color: #38bdf8;
  letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}
.nav-links a:hover { color: #e2e8f0; background: #334155; }
.nav-links a.active { color: #38bdf8; background: #1e3a5f; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #94a3b8;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h2 { font-size: 22px; font-weight: 600; }

/* Cards */
.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h3 { font-size: 16px; margin-bottom: 16px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #334155;
  font-size: 14px;
}
th {
  background: #0f172a;
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
tr:last-child td { border-bottom: none; }
tr.revoked { opacity: 0.5; }
td.actions { white-space: nowrap; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #334155;
  color: #94a3b8;
}
.badge-green { background: #064e3b; color: #34d399; }
.badge-red { background: #7f1d1d; color: #fca5a5; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #334155; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #991b1b; border-color: #991b1b; color: #fca5a5; }
.btn-danger:hover { background: #7f1d1d; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Forms */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #2563eb;
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group { flex: 1; }
.flex-grow { flex: 2 !important; }
.form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-inline input {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
}

/* Utility */
.hidden { display: none !important; }
.empty { color: #64748b; font-style: italic; padding: 40px 0; text-align: center; }
.text-muted { color: #64748b; font-size: 14px; }
.ttl-display { margin-right: 12px; color: #94a3b8; font-size: 14px; }
code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; }
.revealed {
  background: #fef3c7;
  color: #92400e;
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
}

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  text-align: center;
  padding: 48px;
}
.login-card h1 {
  font-size: 32px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
}
.login-subtitle {
  color: #64748b;
  margin-bottom: 32px;
}
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: white;
  color: #1f2937;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn-google:hover { background: #f3f4f6; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-content {
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Textarea */
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
textarea:focus { outline: none; border-color: #2563eb; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-entry {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #334155;
}
