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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #0f2027;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  min-height: 100vh;
  color: #1a2733;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b3d52;
  color: #fff;
  padding: 14px 22px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: #12b886; color: #fff; font-weight: 700; font-size: 17px;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.status { font-size: 12.5px; opacity: .9; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7dffb2; margin-right: 5px; }

.admin-controls { display: flex; align-items: center; gap: 12px; }
.admin-email { font-size: 13px; opacity: .85; }

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

.card {
  background: #fff; border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-bottom: 20px;
}
.card h2 { color: #0b3d52; margin-bottom: 8px; font-size: 18px; }
.card p { font-size: 13.5px; color: #54636e; margin-bottom: 14px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #33424e; margin-bottom: 12px; }
input {
  border: 1px solid #cfd8de; border-radius: 9px; padding: 10px 13px;
  font-size: 14px; outline: none;
}
input:focus { border-color: #12b886; }

button.btn {
  border: none; border-radius: 9px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn.primary { background: #12b886; color: #fff; }
.btn.primary:hover { background: #0fa673; }
.btn.danger { background: #e03131; color: #fff; font-size: 12.5px; padding: 6px 10px; }
.btn.danger:hover { background: #c92a2a; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }

.error { color: #c62828; font-size: 13px; display: block; min-height: 18px; margin-bottom: 8px; }

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 16px 18px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #7a8a94; margin-bottom: 7px; }
.stat-value { font-size: 19px; font-weight: 700; color: #0b3d52; }

.row-between { display: flex; align-items: center; justify-content: space-between; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef2f4; vertical-align: middle; }
th { color: #5c6c76; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
code { background: #f0f4f6; border-radius: 6px; padding: 2px 7px; font-size: 12.5px; color: #0b3d52; }
.muted { color: #9aaab3; }

.badge { border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #e6f7ef; color: #087f4e; }
.badge.revoked { background: #fdeaea; color: #b02525; }

.fields { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }

.result-box { margin-top: 14px; border: 1px solid #caeee1; background: #f4fbf8; border-radius: 10px; padding: 16px; }
.success-msg { color: #087f4e; font-weight: 600; }
.warn-msg { color: #9a6b00; font-size: 13px; font-weight: 600; margin: 10px 0; }
.key-display {
  background: #0b3d52; color: #5cf2c8; border-radius: 8px; padding: 12px;
  font-size: 13px; word-break: break-all; margin: 10px 0; font-family: monospace;
}
.copy-ok { color: #087f4e; font-size: 13px; font-weight: 600; margin-left: 10px; display: inline; }

@media (max-width: 720px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
}

.hidden { display: none !important; }