﻿:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #0f172a;
  --accent: #0f766e;
  --danger: #b91c1c;
  --ok: #065f46;
  --warn: #92400e;
  --muted: #64748b;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: radial-gradient(circle at 5% 5%, #dbeafe, transparent 45%), linear-gradient(135deg, #e2e8f0, #f8fafc);
  color: var(--text);
}

.container { max-width: 980px; margin: 2.5rem auto; padding: 1rem; }
h1 { margin-bottom: 1rem; }
.card { background: var(--card); padding: 1rem; border-radius: 14px; margin-bottom: 1rem; box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.kpi-card {
  background: linear-gradient(160deg, #0f766e, #115e59);
  color: #ecfeff;
  padding: 1rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.3);
}

.kpi-card h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.kpi-value { margin: .5rem 0 0; font-size: 2rem; font-weight: 700; }

label { display: block; margin-bottom: .75rem; }
input { width: 100%; padding: .65rem; margin-top: .25rem; box-sizing: border-box; }
button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: .6rem .9rem; cursor: pointer; }
button.danger { background: var(--danger); }
button.secondary { background: #334155; margin-right: .4rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
.hidden { display: none; }
code { background: #0b1020; color: #f8fafc; padding: .4rem; display: block; border-radius: 8px; word-break: break-all; }

.table-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: .6rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
th { color: var(--muted); font-size: .9rem; }

.status { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .25rem .6rem; display: inline-block; }
.status.ok { background: #dcfce7; color: var(--ok); }
.status.revoked { background: #fee2e2; color: #991b1b; }
.status.blocked { background: #fef3c7; color: var(--warn); }

.actions { display: flex; gap: .45rem; align-items: center; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 30;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.35);
  padding: 1rem;
}
.modal-card h3 { margin-top: 0; margin-bottom: .8rem; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .8rem;
}

@media (max-width: 700px) {
  .container { margin-top: 1rem; }
  .kpi-value { font-size: 1.6rem; }
}
