:root {
  color-scheme: light;
  --navy: #0a2664;
  --cyan: #00baff;
  --ink: #253047;
  --muted: #687187;
  --line: #dde1ee;
  --surface: #f7f8fc;
  --danger: #9f2332;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 186, 255, .13), transparent 28rem),
    var(--surface);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
}

.card {
  width: min(100%, 600px);
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(10, 38, 100, .13);
}

.brand {
  position: relative;
  padding: 31px 40px 27px;
  background: var(--navy);
  text-align: center;
}

.admin-login-link {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}

.admin-login-link:hover,
.admin-login-link:focus-visible {
  border-color: var(--cyan);
  background: rgba(0, 186, 255, .14);
  outline: none;
}

.brand img {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto 15px;
}

.brand p, .eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.7px;
  text-transform: uppercase;
}

.content { padding: 38px 40px 34px; }

h1 {
  margin: 8px 0 14px;
  color: var(--navy);
  font-size: clamp(27px, 5vw, 35px);
  line-height: 1.15;
}

.intro {
  margin: 0 0 27px;
  color: #444;
  font-size: 15px;
  line-height: 1.6;
}

form { display: grid; gap: 9px; }

label {
  margin-top: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #b9c1d3;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

input:focus {
  border-color: var(--cyan);
  outline: 3px solid rgba(0, 186, 255, .18);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-top: 17px;
  border: 0;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.button:hover { background: #103680; }
.button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.button.secondary { width: 100%; }

.notice {
  margin: 0 0 20px;
  border-left: 4px solid var(--danger);
  border-radius: 5px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
  padding: 13px 15px;
}

.privacy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.disclaimer {
  margin: 16px 0 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  padding: 11px 13px;
  text-align: center;
}

.code-box {
  margin-bottom: 28px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  padding: 25px 20px;
  text-align: center;
}

.code-box span {
  display: block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.code-box strong {
  display: block;
  margin: 5px 0 7px;
  font-size: clamp(42px, 11vw, 54px);
  letter-spacing: 12px;
  line-height: 1.1;
  padding-left: 12px;
}

.code-box small { color: #bec5d4; }
.code-box small b { color: #fff; }

.details {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.details div { padding: 13px 19px; }
.details div:nth-child(odd) { background: var(--surface); }
.details div + div { border-top: 1px solid var(--line); }
.details dt {
  color: #858b9a;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.details dd {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
}

footer {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: #858b9a;
  font-size: 12px;
  padding: 21px 40px;
  text-align: center;
}

footer a { color: #037ba7; text-decoration: none; }

.login-card { max-width: 520px; }

.back-link {
  display: block;
  margin-top: 22px;
  color: #037ba7;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

.admin-body { background: var(--surface); }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  background: var(--navy);
  color: #fff;
  padding: 18px clamp(20px, 5vw, 64px);
}

.admin-header > div {
  display: flex;
  align-items: center;
  gap: 22px;
}

.admin-header img { width: 100px; height: auto; }
.admin-header p {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.admin-header h1 { margin: 0; color: #fff; font-size: 25px; }
.admin-header form { display: block; }

.logout-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 15px;
}

.admin-main {
  width: min(1500px, calc(100% - 32px));
  margin: 28px auto 60px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.admin-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px 20px;
}

.admin-summary strong { color: var(--navy); font-size: 28px; }
.admin-summary span { color: var(--muted); font-size: 12px; }

.admin-panel {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(10, 38, 100, .06);
}

.admin-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.admin-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.admin-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
}

.admin-tabs button[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
}

.admin-tabs span {
  margin-left: 5px;
  opacity: .72;
  font-size: 11px;
}

.admin-search { width: min(430px, 100%); }
.admin-search label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
}
.admin-search input { min-height: 44px; }
.search-result {
  min-height: 18px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

[hidden] { display: none !important; }

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 22px 17px;
}

.panel-heading h2 { margin: 5px 0 0; color: var(--navy); font-size: 21px; }
.panel-heading > span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.table-code { color: var(--navy); font-size: 17px; letter-spacing: 2px; }
.technical { max-width: 260px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 28px; text-align: center; }

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.admin-pagination button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
}

.admin-pagination button:disabled { cursor: default; opacity: .45; }
.admin-pagination span { color: var(--muted); font-size: 12px; }

@media (max-width: 520px) {
  .shell { padding: 0; place-items: stretch; }
  .card { min-height: 100vh; border-radius: 0; }
  .brand { padding: 25px 24px 22px; }
  .content { padding: 31px 22px 28px; }
  .admin-header { align-items: flex-start; padding: 16px; }
  .admin-header img { display: none; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-main { width: min(100% - 20px, 1500px); margin-top: 16px; }
  .admin-tools { align-items: stretch; flex-direction: column; gap: 12px; }
  .admin-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-search { width: 100%; }
}
