:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d8d8de;
  --panel: rgba(255, 255, 255, 0.86);
  --accent: #0071e3;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: #000;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  overflow: hidden;
}

#holder {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

button,
input,
select {
  font: inherit;
}

.login-screen {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, calc(100vw - 36px));
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.login-card h1 {
  font-size: 2rem;
  line-height: 1.05;
}

.login-card p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.76);
}

.login-subtitle {
  font-size: 0.95rem;
}

.login-error {
  color: #b00020;
  font-size: 0.9rem;
}

.login-error:empty {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 32px));
  max-height: 100vh;
  overflow: auto;
  margin: 0 auto;
  padding: 30px 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-title {
  color: #ffffff;
  text-shadow:
    0 0 14px rgba(0, 113, 227, 0.42),
    0 0 30px rgba(0, 113, 227, 0.2);
}

.header p,
.results-line {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.section-tile {
  display: grid;
  gap: 9px;
  min-height: 156px;
  padding: 18px;
  border-color: rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 252, 0.86));
  box-shadow: var(--shadow);
  text-align: left;
}

.section-tile.active {
  border-color: rgba(0, 113, 227, 0.52);
  background: linear-gradient(180deg, #ffffff, #eef6ff);
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f0f0f3;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
}

.section-tile.active .tile-icon {
  background: var(--accent);
  color: #ffffff;
}

.tile-title {
  align-self: end;
  font-size: 1.25rem;
  font-weight: 700;
}

.tile-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px auto;
  gap: 8px;
  margin-bottom: 12px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.brand-tile {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 14px;
  text-align: left;
}

.brand-tile span {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-tile small {
  color: var(--muted);
}

.brand-tile.active {
  border-color: rgba(0, 113, 227, 0.52);
  background: #eef6ff;
}

.agent-panel {
  margin-bottom: 12px;
}

.agent-download-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 112px;
  padding: 18px;
  border-color: rgba(0, 113, 227, 0.28);
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  box-shadow: var(--shadow);
  text-align: left;
}

.agent-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
}

.agent-download-card strong {
  display: block;
  font-size: 1.2rem;
}

.agent-download-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
button,
.download-link {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.login-card input {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.login-card button {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 113, 227, 0.86);
  color: #ffffff;
  font-weight: 700;
}

input,
select {
  padding: 0 10px;
}

button,
.download-link {
  padding: 0 12px;
  cursor: pointer;
}

button:hover,
.download-link:hover {
  border-color: #aeb8ae;
}

button:focus-visible,
input:focus,
select:focus,
a:focus-visible {
  outline: 2px solid rgba(23, 107, 91, 0.25);
  outline-offset: 2px;
}

.download-list {
  display: grid;
  gap: 8px;
}

.download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.item-info {
  min-width: 0;
}

.download-item h2 {
  font-size: 1rem;
  line-height: 1.25;
}

.meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.description {
  margin-top: 8px;
  color: #40463f;
  font-size: 0.92rem;
  line-height: 1.35;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.empty-state {
  padding: 24px 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .login-card {
    padding: 28px;
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
  }

  .header,
  .download-item,
  .item-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .header {
    display: grid;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .brand-grid {
    grid-template-columns: 1fr;
  }

  .agent-download-card {
    grid-template-columns: 1fr;
  }

  .item-actions {
    display: grid;
  }
}
