.header-auth-name {
  order: 5;
  flex: 0 0 auto;
  color: #8ee9c4;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.site-header .header-admin-link { order: 2; }
.site-header .header-auth-link { order: 3; }
.site-header .language-link { order: 4; }
.header-auth-link,
.header-admin-link {
  flex: 0 0 auto;
  color: #dff8ff;
  border: 1px solid rgba(50, 203, 255, .4);
  border-radius: 999px;
  padding: .58rem .78rem;
  background: rgba(24, 150, 208, .1);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
}
.header-auth-link:hover,
.header-auth-link:focus-visible,
.header-admin-link:hover,
.header-admin-link:focus-visible {
  color: #02111c;
  border-color: var(--cyan);
  background: var(--cyan);
  outline: none;
}
[hidden] { display: none !important; }

.service-card-auth {
  border-color: rgba(130, 196, 235, .13);
  background: linear-gradient(145deg, rgba(8, 23, 36, .7), rgba(2, 8, 15, .94));
}
.service-card-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(1, 7, 13, .25);
  pointer-events: none;
}
.service-card-auth .service-card-topline em {
  color: #ffd18c;
  border-color: rgba(255, 189, 115, .34);
  background: rgba(255, 189, 115, .06);
}
.service-card-auth h2,
.service-card-auth p,
.service-card-auth > strong { opacity: .72; }
.service-card-auth.is-authorized {
  border-color: rgba(93, 229, 176, .34);
  background: radial-gradient(circle at 95% 15%, rgba(50, 203, 255, .15), transparent 18rem), linear-gradient(145deg, rgba(7, 64, 99, .84), rgba(3, 10, 19, .92));
}
.service-card-auth.is-authorized::before { display: none; }
.service-card-auth.is-authorized h2,
.service-card-auth.is-authorized p,
.service-card-auth.is-authorized > strong { opacity: 1; }
.service-card-auth.is-authorized .service-card-topline em { color: #5de5b0; border-color: rgba(93, 229, 176, .34); background: rgba(93, 229, 176, .07); }
.repeater-card[data-protected-service]:not(.is-authorized) .repeater-card-topline em { color: #ffc464; border-color: rgba(255, 196, 100, .36); background: rgba(255, 196, 100, .08); }
.repeater-card[data-protected-service]:not(.is-authorized) [data-protected-action] { opacity: .72; }
.repeater-card[data-protected-service].is-authorized .repeater-card-topline em { color: #5de5b0; border-color: rgba(93, 229, 176, .34); background: rgba(93, 229, 176, .07); }

.auth-main {
  width: min(940px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 7rem;
}
.auth-main-wide { width: min(1180px, calc(100% - 2rem)); }
.auth-hero { max-width: 780px; padding-bottom: 3rem; }
.auth-hero h1 { margin-bottom: 1.5rem; font-size: clamp(3.7rem, 7vw, 7rem); }
.auth-hero > p:last-child { max-width: 720px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.auth-hero-compact h1 { font-size: clamp(3.1rem, 6vw, 5.8rem); }
.auth-hero .auth-eligibility {
  max-width: 760px;
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  color: #c8eafa;
  border-left: 3px solid var(--cyan);
  background: rgba(12, 58, 83, .42);
}
.auth-panel {
  width: min(680px, 100%);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(4, 14, 25, .88);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
  display: grid;
  gap: 1.2rem;
}
.auth-panel-wide { width: 100%; }
.auth-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.auth-field-wide { grid-column: 1 / -1; }
.auth-panel label { display: grid; gap: .55rem; color: #c8dbe8; font-size: .82rem; line-height: 1.55; }
.auth-panel label b { color: #ff9e9e; }
.auth-panel input[type="text"],
.auth-panel input[type="email"],
.auth-panel input[type="tel"],
.auth-panel input[type="password"] {
  width: 100%;
  border: 1px solid rgba(130, 196, 235, .32);
  border-radius: .65rem;
  padding: .82rem .9rem;
  color: var(--ink);
  background: #04111c;
  font: inherit;
}
.auth-panel input:focus-visible { border-color: var(--cyan); outline: 2px solid rgba(50, 203, 255, .2); outline-offset: 2px; }
.auth-consent { grid-template-columns: auto 1fr !important; align-items: start; gap: .8rem !important; color: var(--muted) !important; }
.auth-consent input { margin-top: .28rem; }
.auth-note { margin: 0; color: #a9c3d4; line-height: 1.6; }
.auth-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.auth-actions button { border: 0; font: inherit; cursor: pointer; }
.auth-actions a { color: var(--cyan); font-size: .8rem; font-weight: 800; }
.auth-message { min-height: 1.4rem; margin: 0; color: #8ee9c4; line-height: 1.5; }
.auth-message.is-error { color: #ffabab; }
.auth-turnstile { min-height: 65px; display: flex; align-items: center; overflow: hidden; }
.auth-turnstile .cf-turnstile { max-width: 100%; }
.auth-password-rules { margin: 0; padding-left: 1.3rem; color: var(--muted); line-height: 1.75; }

.admin-heading { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.admin-live { flex: 0 0 auto; color: #5de5b0; border: 1px solid rgba(93, 229, 176, .34); border-radius: 999px; padding: .62rem .85rem; background: rgba(93, 229, 176, .07); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.admin-live.is-offline { color: #ffabab; border-color: rgba(255, 110, 116, .38); background: rgba(132, 33, 39, .12); }
.admin-app { display: grid; gap: 1rem; }
.admin-summary { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .78rem; }
.admin-layout { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr); gap: 1rem; align-items: start; }
.admin-list,
.admin-profile { border: 1px solid var(--line); border-radius: 1rem; background: rgba(4, 14, 25, .88); }
.admin-list { max-height: 760px; overflow-y: auto; padding: .65rem; }
.admin-user {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem 1rem;
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.admin-user:last-child { border-bottom: 0; }
.admin-user:hover,
.admin-user:focus-visible,
.admin-user.is-selected { color: #02111c; border-radius: .65rem; background: var(--cyan); outline: none; }
.admin-user strong { font-family: "Courier New", monospace; }
.admin-user small { grid-column: 1 / -1; color: var(--muted); }
.admin-user:hover small,
.admin-user:focus-visible small,
.admin-user.is-selected small { color: #123d54; }
.admin-user em { color: #ffcf85; font-size: .68rem; font-style: normal; font-weight: 800; text-transform: uppercase; }
.admin-profile { min-height: 420px; padding: clamp(1.2rem, 3vw, 2rem); }
.admin-empty { color: var(--muted); }
.admin-profile-header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.admin-profile-header h2 { margin: .3rem 0 0; font-size: clamp(2rem, 4vw, 3rem); }
.admin-profile-badges { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.admin-profile-badges button {
  border: 1px solid rgba(50, 203, 255, .42);
  border-radius: 999px;
  padding: .5rem .75rem;
  color: #dff8ff;
  background: rgba(24, 150, 208, .11);
  font: inherit;
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
}
.admin-profile-badges button:hover,
.admin-profile-badges button:focus-visible { border-color: var(--cyan); outline: none; }
.admin-profile-status { color: #ffcf85; border: 1px solid rgba(255, 189, 115, .3); border-radius: 999px; padding: .5rem .7rem; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.admin-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.2rem; padding: 1.5rem 0; }
.admin-fact { min-width: 0; padding-top: .8rem; border-top: 1px solid var(--line); }
.admin-fact span { display: block; margin-bottom: .35rem; color: #7891a6; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.admin-fact strong { overflow-wrap: anywhere; font-size: .9rem; }
.admin-session { margin-top: 1rem; padding: 1rem; border-left: 2px solid var(--cyan); background: rgba(12, 53, 78, .34); }
.admin-session h3 { margin: 0 0 .9rem; }
.admin-profile .auth-actions button {
  border: 1px solid rgba(50, 203, 255, .42);
  border-radius: 999px;
  padding: .65rem .9rem;
  color: #dff8ff;
  background: rgba(24, 150, 208, .11);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.admin-profile .auth-actions button[data-action="delete"] { color: #ffabab; border-color: rgba(255, 110, 116, .38); background: rgba(132, 33, 39, .12); }
.admin-profile .auth-actions button[data-action="refuse"] { color: #ffd0ad; border-color: rgba(255, 156, 82, .42); background: rgba(132, 67, 21, .16); }
.admin-profile .auth-actions button:hover,
.admin-profile .auth-actions button:focus-visible { border-color: var(--cyan); outline: none; }
.admin-profile .auth-actions button:disabled { opacity: .42; cursor: not-allowed; }
.admin-qrz { margin-top: 1.4rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(12, 53, 78, .22); }
.admin-qrz h3 { margin: 0 0 .8rem; font-size: 1rem; }
.admin-qrz p { margin: 0; line-height: 1.6; }
.admin-qrz-pending { color: var(--muted); }
.admin-qrz-warning { color: #ffcf85; }
.admin-qrz-success { color: #8ee9c4; font-weight: 800; }
.admin-qrz-facts { padding-bottom: 0; }
.admin-qrz-facts .is-match strong { color: #8ee9c4; }
.admin-qrz-facts .is-mismatch strong { color: #ffabab; }
.admin-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.5rem 0 0; }
.admin-edit-form label { display: grid; gap: .45rem; color: #7891a6; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.admin-edit-form input { width: 100%; border: 1px solid var(--line); border-radius: .65rem; padding: .82rem .9rem; color: var(--ink); background: rgba(2, 14, 24, .92); font: inherit; text-transform: none; }
.admin-edit-form input:focus { border-color: var(--cyan); outline: 2px solid rgba(50, 203, 255, .16); }
.admin-edit-wide,
.admin-edit-actions { grid-column: 1 / -1; }
.admin-edit-actions { margin-top: .4rem; }

.admin-breadcrumb { margin: -1.4rem 0 1.5rem; }
.admin-breadcrumb a { color: var(--cyan); font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.admin-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.admin-hub-card {
  min-height: 300px;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--ink);
  background: radial-gradient(circle at 100% 0, rgba(50, 203, 255, .12), transparent 15rem), rgba(4, 14, 25, .88);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.admin-hub-card:hover,
.admin-hub-card:focus-visible { transform: translateY(-3px); border-color: var(--cyan); outline: none; }
.admin-hub-card > span { color: #7891a6; font-family: "Courier New", monospace; font-size: .72rem; }
.admin-hub-card p { margin: 4rem 0 .8rem; color: var(--cyan); font-family: "Courier New", monospace; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.admin-hub-card h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.05; }
.admin-hub-card strong { margin-top: auto; padding-top: 2rem; color: #8ee9c4; font-size: .76rem; }

.radio-admin { display: grid; gap: 1rem; }
.radio-admin-toolbar,
.radio-panel,
.radio-status-card,
.radio-safety {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(4, 14, 25, .88);
}
.radio-admin-toolbar { padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; }
.radio-admin-toolbar > div { display: grid; gap: .25rem; }
.radio-admin button,
.radio-admin select,
.radio-admin input { font: inherit; }
.radio-admin button {
  border: 1px solid rgba(50, 203, 255, .42);
  border-radius: 999px;
  padding: .65rem .9rem;
  color: #dff8ff;
  background: rgba(24, 150, 208, .11);
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.radio-admin button:hover,
.radio-admin button:focus-visible { color: #02111c; border-color: var(--cyan); background: var(--cyan); outline: none; }
.radio-admin button.is-danger { color: #ffb8b8; border-color: rgba(255, 110, 116, .38); background: rgba(132, 33, 39, .12); }
.radio-admin button:disabled { opacity: .42; cursor: not-allowed; }
.radio-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.radio-status-card { min-height: 155px; padding: 1.2rem; display: flex; flex-direction: column; }
.radio-status-card span { color: #7891a6; font-family: "Courier New", monospace; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.radio-status-card strong { margin: auto 0 .65rem; overflow-wrap: anywhere; font-family: "Courier New", monospace; font-size: clamp(1.2rem, 2.2vw, 1.65rem); }
.radio-status-card small { color: var(--muted); line-height: 1.45; }
.radio-status-card.is-online strong { color: #8ee9c4; }
.radio-status-card.is-offline strong { color: #ffabab; }
.radio-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 1rem; align-items: start; }
.radio-panel { min-width: 0; padding: clamp(1.2rem, 3vw, 1.7rem); }
.radio-panel-full { grid-column: 1 / -1; }
.radio-panel-header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.radio-panel h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.radio-panel-header p { margin: .35rem 0 0; color: var(--muted); line-height: 1.5; }
.radio-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.radio-form label { display: grid; gap: .4rem; color: #7891a6; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.radio-form input,
.radio-form select { width: 100%; border: 1px solid var(--line); border-radius: .65rem; padding: .78rem .85rem; color: var(--ink); background: #04111c; }
.radio-form input:focus,
.radio-form select:focus { border-color: var(--cyan); outline: 2px solid rgba(50, 203, 255, .15); }
.radio-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .7rem; }
.radio-node-list,
.radio-profile-list,
.radio-event-list { max-height: 430px; overflow-y: auto; border-top: 1px solid var(--line); }
.radio-row { padding: .9rem .2rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; }
.radio-row:last-child { border-bottom: 0; }
.radio-row strong { overflow-wrap: anywhere; font-family: "Courier New", monospace; }
.radio-row small { grid-column: 1 / -1; color: var(--muted); line-height: 1.45; }
.radio-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.radio-row-actions button { padding: .45rem .65rem; font-size: .64rem; }
.radio-empty { color: var(--muted); line-height: 1.6; }
.radio-safety { margin: 0; padding: 1rem 1.2rem; color: #8fa9bb; font-size: .75rem; line-height: 1.55; }
.radio-panel-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(50, 203, 255, .28);
  border-radius: 999px;
  padding: .45rem .7rem;
  color: var(--cyan);
  font-family: "Courier New", monospace;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.radio-diagnostic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.radio-diagnostic-card {
  min-height: 145px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(5, 24, 39, .78);
  display: flex;
  flex-direction: column;
}
.radio-diagnostic-card > span { color: #7891a6; font-family: "Courier New", monospace; font-size: .61rem; font-weight: 800; letter-spacing: .07em; }
.radio-diagnostic-card strong { margin: auto 0 .55rem; overflow-wrap: anywhere; font-family: "Courier New", monospace; font-size: clamp(1rem, 1.8vw, 1.35rem); }
.radio-diagnostic-card small { color: var(--muted); font-size: .73rem; line-height: 1.45; }
.radio-diagnostic-card.is-good { border-color: rgba(93, 226, 174, .3); }
.radio-diagnostic-card.is-good strong { color: #8ee9c4; }
.radio-diagnostic-card.is-warning { border-color: rgba(255, 178, 93, .38); }
.radio-diagnostic-card.is-warning strong { color: #ffd09b; }
.radio-input-unit { position: relative; }
.radio-input-unit input { padding-right: 3.2rem; }
.radio-input-unit span { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: #7891a6; font-family: "Courier New", monospace; }
.radio-setting-note { margin: 1rem 0 0; color: #8fa9bb; font-size: .74rem; line-height: 1.55; }
.radio-log-list {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #020a12;
  scrollbar-color: rgba(50, 203, 255, .45) rgba(6, 20, 32, .9);
}
.radio-log-row {
  display: grid;
  grid-template-columns: minmax(175px, .75fr) minmax(105px, .45fr) 80px minmax(320px, 2.8fr);
  gap: .65rem;
  align-items: start;
  padding: .72rem .85rem;
  border-bottom: 1px solid rgba(50, 203, 255, .1);
  font-size: .7rem;
}
.radio-log-row:last-child { border-bottom: 0; }
.radio-log-row time, .radio-log-row strong, .radio-log-row span { white-space: nowrap; }
.radio-log-row time { color: #7891a6; }
.radio-log-row strong { color: #bfd7e8; }
.radio-log-row span { color: #78dfff; font-family: "Courier New", monospace; font-size: .62rem; font-weight: 800; }
.radio-log-row code { color: #9db6c8; white-space: pre-wrap; overflow-wrap: anywhere; font-family: "Courier New", monospace; line-height: 1.45; }
.radio-log-row.is-warning { background: rgba(139, 85, 18, .08); }
.radio-log-row.is-warning span { color: #ffd09b; }
.radio-log-row.is-error { background: rgba(139, 30, 38, .11); }
.radio-log-row.is-error span { color: #ffabab; }

@media (max-width: 1050px) {
  .site-header { min-height: auto; padding: .65rem 0; gap: .7rem; flex-wrap: wrap; justify-content: flex-start; }
  .site-header .brand { margin-right: auto; }
  .site-header nav { order: 10; width: 100%; justify-content: center; gap: 1rem; }
}
@media (max-width: 880px) {
  .site-header .header-admin-link { order: 2; }
  .site-header .header-auth-link { order: 3; }
  .site-header .language-link { order: 4; }
  .site-header .header-auth-name { order: 5; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-list { max-height: 320px; }
  .admin-hub { grid-template-columns: 1fr; }
  .admin-hub-card { min-height: 230px; }
  .admin-hub-card p { margin-top: 2rem; }
  .radio-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radio-diagnostic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radio-workspace { grid-template-columns: 1fr; }
  .radio-panel-full { grid-column: auto; }
}
@media (max-width: 700px) {
  .site-header .header-auth-name { display: none !important; }
  .site-header .mobile-header-links { order: 10; width: 100%; justify-content: center; }
  .auth-main { padding-top: 3.5rem; }
  .auth-fields,
  .admin-facts { grid-template-columns: 1fr; }
  .auth-field-wide { grid-column: auto; }
  .admin-heading,
  .admin-profile-header,
  .admin-summary { align-items: flex-start; flex-direction: column; }
  .admin-profile-badges { justify-content: flex-start; }
  .admin-edit-form { grid-template-columns: 1fr; }
  .admin-edit-wide,
  .admin-edit-actions { grid-column: auto; }
  .radio-status-grid,
  .radio-diagnostic-grid,
  .radio-form { grid-template-columns: 1fr; }
  .radio-form-actions { grid-column: auto; }
  .radio-admin-toolbar,
  .radio-panel-header { align-items: flex-start; flex-direction: column; }
  .radio-log-row { grid-template-columns: 1fr auto; gap: .35rem .65rem; }
  .radio-log-row time { white-space: normal; }
  .radio-log-row code { grid-column: 1 / -1; }
}
