/* BIISMO REG interface polish layered after the main stylesheet. */

:root {
  --admin-panel: rgba(14, 19, 30, 0.9);
  --admin-panel-strong: rgba(18, 25, 40, 0.96);
  --admin-border: rgba(132, 157, 220, 0.18);
  --admin-border-strong: rgba(110, 143, 230, 0.34);
}

.transparent-brand img {
  width: clamp(150px, 18vw, 215px);
  max-width: min(52vw, 215px);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.28));
}

.compact-brand.transparent-brand img {
  width: clamp(130px, 15vw, 180px);
}

.owner-email-line,
#selectedUserEmail {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-crown {
  display: inline-grid;
  place-items: center;
  color: #ffd34e;
  font-size: 1.05em;
  line-height: 1;
  text-shadow: 0 0 16px rgba(255, 211, 78, 0.38);
}

/* One clean initial viewport. Results unlock normal scrolling automatically. */
.home-page {
  min-height: 100svh;
}

.home-page:not(:has(#result > *)) {
  height: 100svh;
  overflow: hidden;
}

.home-header {
  min-height: 72px;
}

.home-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.home-main {
  width: min(1240px, calc(100% - 40px));
}

.home-page:not(:has(#result > *)) .home-main {
  height: calc(100svh - 72px);
}

.home-page .hero-shell {
  min-height: calc(100svh - 72px);
  padding: clamp(18px, 3.4vh, 40px) 0 clamp(14px, 2.4vh, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.76fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(22px, 4vw, 64px);
}

.home-page:not(:has(#result > *)) .hero-shell {
  height: 100%;
  min-height: 0;
}

.home-page .hero-copy h1 {
  max-width: 650px;
  font-size: clamp(42px, 5.3vw, 72px);
}

.home-page .hero-copy > p {
  margin-top: 16px;
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.55;
}

.home-page .hero-copy .eyebrow {
  margin-bottom: 10px;
}

.home-page .search-panel {
  padding: clamp(18px, 2.4vw, 25px);
  border-radius: 25px;
}

.home-page .plate {
  height: clamp(70px, 10vh, 82px);
}

.home-page .primary-button {
  min-height: 48px;
  margin-top: 13px;
}

.home-page .form-error {
  min-height: 18px;
  margin-top: 6px;
}

.home-page .data-note {
  grid-column: 1 / -1;
  padding: clamp(11px, 1.8vh, 17px) 0;
  gap: 18px;
}

.home-page .data-note p {
  max-width: 820px;
  margin-top: 3px;
  line-height: 1.45;
}

.notification-bell-icon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-bell-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.garage-heading-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.garage-limit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

/* Neutral admin control centre. Red is reserved for destructive actions. */
body:has(#adminView:not([hidden])) {
  background:
    radial-gradient(circle at 78% 8%, rgba(47, 92, 220, 0.16), transparent 31rem),
    radial-gradient(circle at 8% 38%, rgba(70, 216, 150, 0.07), transparent 26rem),
    #070a10;
}

body:has(#adminView:not([hidden])) .site-header {
  border-bottom-color: rgba(108, 137, 213, 0.22);
}

body:has(#adminView:not([hidden])) .account-menu {
  border-color: var(--admin-border);
  background: rgba(13, 19, 31, 0.76);
}

body:has(#adminView:not([hidden])) .account-menu-button.is-active {
  border-color: rgba(93, 133, 239, 0.5);
  background: linear-gradient(135deg, rgba(53, 93, 206, 0.26), rgba(33, 56, 116, 0.28));
  color: #fff;
}

.admin-control-centre {
  padding-bottom: 86px;
}

.dashboard-hero {
  margin: 28px 0 18px;
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--admin-border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(55, 93, 190, 0.13), transparent 55%), var(--admin-panel-strong);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.26);
  text-align: left;
}

.dashboard-hero h1 {
  margin-top: 7px;
  font-size: clamp(40px, 5vw, 65px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.dashboard-hero p {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.admin-overview article,
.admin-panel {
  border: 1px solid var(--admin-border);
  background: var(--admin-panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.admin-overview article {
  min-width: 0;
  padding: 19px;
  border-radius: 18px;
}

.admin-overview span,
.admin-activity-row .activity-meta {
  color: var(--muted);
  font-size: 11px;
}

.admin-overview strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(28px, 4vw, 39px);
}

.admin-dashboard-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.admin-panel {
  padding: clamp(20px, 2.8vw, 30px);
  border-radius: 23px;
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.admin-panel .eyebrow {
  margin-bottom: 6px;
}

.admin-user-search {
  margin-top: 22px;
}

.admin-user-search > label,
.admin-credit-controls > label,
.admin-direct-notification > label,
.admin-broadcast-panel > label {
  display: block;
  margin: 14px 0 7px;
  color: #b7bfcd;
  font-size: 12px;
  font-weight: 750;
}

.admin-user-search > div {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
}

#adminView input,
#adminView textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 12px;
  outline: 0;
  background: rgba(6, 10, 18, 0.66);
  color: var(--text);
}

#adminView textarea {
  padding-top: 13px;
  resize: vertical;
}

#adminView input:focus,
#adminView textarea:focus {
  border-color: rgba(102, 145, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(74, 119, 240, 0.1);
}

#adminView .primary-button {
  background: linear-gradient(135deg, #416dd8, #27489e);
}

#adminView .secondary-button {
  border-color: rgba(113, 143, 216, 0.32);
  background: rgba(58, 85, 148, 0.1);
}

#adminView .danger-button {
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid rgba(255, 94, 113, 0.42);
  border-radius: 12px;
  background: rgba(178, 34, 52, 0.15);
  color: #ffc6cc;
  font-weight: 800;
  cursor: pointer;
}

#adminView .danger-button.is-unban {
  border-color: rgba(70, 216, 150, 0.42);
  background: rgba(25, 126, 83, 0.16);
  color: #9cf1c9;
}

.admin-user-result {
  margin-top: 17px;
  padding: 21px;
  border-color: var(--admin-border-strong);
  background: rgba(8, 13, 23, 0.76);
}

.admin-user-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-status-badge {
  padding: 7px 10px;
  border: 1px solid rgba(70, 216, 150, 0.3);
  border-radius: 999px;
  background: rgba(70, 216, 150, 0.08);
  color: #95eac2;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.account-status-badge.is-banned {
  border-color: rgba(255, 92, 112, 0.36);
  background: rgba(181, 34, 52, 0.12);
  color: #ffadb7;
}

.account-status-badge.is-protected {
  border-color: rgba(255, 211, 78, 0.38);
  background: rgba(255, 211, 78, 0.08);
  color: #ffe38a;
}

.admin-user-stats article,
.admin-broadcast-stats article {
  border-color: var(--admin-border);
  background: rgba(255, 255, 255, 0.025);
}

.admin-action-buttons {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-action-buttons .primary-button,
.admin-action-buttons .secondary-button {
  width: 100%;
  min-height: 46px;
  margin: 0;
  justify-content: center;
  padding: 0 13px;
}

.admin-access-controls,
.admin-direct-notification {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-border);
}

.admin-access-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-access-controls p,
.admin-broadcast-panel > p {
  color: var(--muted);
  font-size: 13px;
}

.admin-direct-notification .secondary-button {
  margin-top: 12px;
}

.admin-broadcast-panel .primary-button,
.history-toggle {
  width: 100%;
  justify-content: center;
}

.history-toggle {
  margin-top: 12px;
}

.admin-history-panel {
  margin-top: 16px;
}

.broadcast-history-footer {
  margin-top: 12px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px;
}

.history-delete-button {
  padding: 7px 10px;
  border: 1px solid rgba(255, 92, 112, 0.36);
  border-radius: 9px;
  background: rgba(181, 34, 52, 0.12);
  color: #ffadb7;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin-quick-tools {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.admin-activity-list {
  margin-top: 17px;
  display: grid;
  gap: 8px;
}

.admin-activity-row {
  width: 100%;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.admin-activity-row:hover {
  border-color: var(--admin-border-strong);
  background: rgba(65, 109, 216, 0.08);
}

.admin-activity-row.is-banned {
  border-color: rgba(255, 92, 112, 0.22);
}

.activity-primary,
.activity-primary strong,
.activity-primary small {
  min-width: 0;
  display: block;
}

.activity-primary {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.activity-primary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.activity-meta {
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 980px) {
  .admin-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .admin-quick-tools { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-header { width: min(100% - 24px, 1240px); }
  .home-header { min-height: 62px; }
  .transparent-brand img { width: clamp(125px, 39vw, 165px); max-width: 46vw; }
  .home-header .header-action { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .home-main { width: min(100% - 24px, 1240px); }
  .home-page:not(:has(#result > *)) .home-main { height: calc(100svh - 62px); }
  .home-page .hero-shell {
    min-height: calc(100svh - 62px);
    padding: 9px 0 7px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: clamp(7px, 1.8vh, 13px);
  }
  .home-page .hero-copy { text-align: center; }
  .home-page .hero-copy .eyebrow { display: none; }
  .home-page .hero-copy h1 { font-size: clamp(30px, 8.8vw, 43px); line-height: 1; }
  .home-page .hero-copy > p { max-width: 600px; margin: 6px auto 0; font-size: clamp(12px, 3.45vw, 14px); line-height: 1.35; }
  .home-page .search-panel { align-self: center; padding: clamp(12px, 2vh, 16px); border-radius: 20px; }
  .home-page .search-heading { margin-bottom: 8px; font-size: 11px; }
  .home-page .allowance-bar { margin: 0 0 8px; padding: 7px 9px; font-size: 10px; }
  .home-page .plate { height: clamp(58px, 9.5vh, 68px); border-width: 4px; }
  .home-page .gb { width: 48px; flex-basis: 48px; }
  .home-page .plate input { font-size: clamp(28px, 9vw, 39px); }
  .home-page .primary-button { min-height: 44px; margin-top: 9px; }
  .home-page .form-error { min-height: 15px; margin-top: 3px; font-size: 11px; }
  .home-page .trust-row { margin-top: 0; font-size: 9px; gap: 7px; }
  .home-page .data-note { padding: 7px 0; align-items: flex-end; gap: 10px; font-size: 10px; }
  .home-page .data-note strong { font-size: 11px; }
  .home-page .data-note p { margin-top: 1px; line-height: 1.25; }
  .home-page .data-note a { font-size: 10px; }
  .garage-heading-meta { align-items: flex-end; flex-direction: column; gap: 5px; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-quick-tools { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .account-header { min-height: 72px; grid-template-columns: auto 1fr auto; }
  .account-header .back-link { min-width: 42px; width: 42px; padding: 0; overflow: hidden; font-size: 0; }
  .account-header .back-link span { font-size: 20px; }
  .compact-brand.transparent-brand img { width: clamp(115px, 33vw, 150px); }
  .account-header-actions { width: auto; }
  .account-header-actions .header-action { min-width: 42px; padding: 0 11px; }
  .admin-overview { grid-template-columns: 1fr 1fr; }
  .admin-overview article:last-child { grid-column: 1 / -1; }
  .admin-user-search > div,
  .admin-action-buttons { grid-template-columns: 1fr; }
  .admin-user-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-access-controls,
  .broadcast-history-footer,
  .admin-activity-row { align-items: flex-start !important; flex-direction: column; }
  .activity-meta { text-align: left; }
}

@media (max-height: 680px) and (min-width: 821px) {
  .home-header { min-height: 62px; }
  .home-page:not(:has(#result > *)) .home-main { height: calc(100svh - 62px); }
  .home-page .hero-shell { min-height: calc(100svh - 62px); padding: 10px 0 7px; }
  .home-page .hero-copy h1 { font-size: clamp(38px, 5vw, 60px); }
  .home-page .search-panel { padding: 17px; }
  .home-page .plate { height: 66px; }
  .home-page .data-note { padding: 8px 0; }
}
