:root {
  --navy: #003362;
  --navy-dark: #00274b;
  --cyan: #00b7ff;
  --cyan-2: #0ec2ff;
  --text: #ffffff;
  --blue-num: #0056ad;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: #061626;
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(180deg, var(--navy), var(--navy-dark));
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.topbar__time {
  font-size: clamp(1.1rem, 2.1vw, 1.9rem);
  font-weight: 700;
}

.topbar__title {
  margin: 0;
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
}

.topbar__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 0.45rem;
  padding: 0.34rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
}

.btn--icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.board {
  background: linear-gradient(180deg, var(--cyan-2), var(--cyan));
  display: grid;
  grid-template-rows: auto 1fr 1fr;
}

.board__head,
.row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 0.45fr 0.45fr 0.45fr minmax(220px, 0.9fr);
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
}

.board__head {
  min-height: 3.3rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.7vw, 1.55rem);
}

.board__head span {
  text-align: center;
}

.board__head span:first-child {
  text-align: left;
}

.row--team {
  min-height: 0;
  border-top: 2px solid rgba(0, 37, 71, 0.55);
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: #d2ff24;
  box-shadow: 0 0 6px rgba(210, 255, 36, 0.8);
}

.team-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.team-logo-wrap {
  width: clamp(58px, 5vw, 86px);
  height: clamp(58px, 5vw, 86px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.team-logo-wrap--empty {
  display: none;
}

.team-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(2.1rem, 3.6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.set-score {
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(3rem, 5.5vw, 5.6rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

.point-box {
  justify-self: center;
  width: min(100%, 92%);
  min-height: clamp(130px, 21vh, 240px);
  border-radius: 0.85rem;
  background: white;
  color: var(--blue-num);
  display: grid;
  place-items: center;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(5rem, 10vw, 10.5rem);
  font-weight: 800;
  line-height: 1;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0.7rem;
  background: #07c4ff;
  color: #003b6f;
  border-top: 2px solid rgba(0, 48, 95, 0.45);
}

.hint {
  margin: 0;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

kbd {
  font-family: inherit;
  font-size: 0.86em;
  padding: 0.05em 0.35em;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 59, 111, 0.28);
  background: rgba(255, 255, 255, 0.35);
}

.date {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 59, 111, 0.28);
  border-radius: 0.3rem;
  padding: 0.18rem 0.45rem;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 35, 0.56);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(640px, 94vw);
  max-height: 92vh;
  overflow: auto;
  margin: 3vh auto;
  border-radius: 14px;
  background: #0f2f54;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: white;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal__head h2 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.45rem;
}

.modal__body {
  padding: 1rem;
}

.block {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin: 0 0 1rem;
  padding: 0.8rem;
}

.block legend {
  padding: 0 0.4rem;
  font-weight: 700;
}

.field {
  display: block;
  margin-bottom: 0.65rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field span {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 0.22rem;
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0.52rem 0.62rem;
  color: white;
  background: #1b456f;
}

.bind-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bind-row code {
  background: #062541;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  padding: 0.3rem 0.55rem;
  min-width: 8rem;
  text-align: center;
}

.btn-assign {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #1e4d7a;
  color: white;
  border-radius: 7px;
  padding: 0.32rem 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-assign.is-waiting {
  background: #2e77b9;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

@media (max-width: 980px) {
  .board__head,
  .row {
    grid-template-columns: minmax(160px, 1.4fr) 0.45fr 0.45fr 0.45fr minmax(160px, 0.9fr);
  }
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .topbar__actions,
  .topbar__time {
    justify-self: center;
  }

  .board__head,
  .row {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0.4rem;
  }

  .board__head span:not(:first-child) {
    display: none;
  }

  .set-score,
  .point-box {
    justify-self: stretch;
  }

  .bind-row {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
:root {
  --court: #1a3d2e;
  --court-light: #2d5a45;
  --sand: #e8dcc8;
  --accent-1: #ff6b35;
  --accent-2: #4ecdc4;
  --text: #f5f2eb;
  --muted: rgba(245, 242, 235, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 2.5vw, 18px);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "DM Sans", system-ui, sans-serif;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, var(--court-light), var(--court) 55%, #0f2419);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.camera-dock {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  max-width: min(18rem, 42vw);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.camera-dock[hidden] {
  display: none !important;
}

.camera-dock__inner {
  display: flex;
  flex-direction: column;
}

.camera-dock__video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #0a0a0a;
}

.camera-dock__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-dock__rec {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 10px rgba(255, 59, 59, 0.6);
  animation: recPulse 1.2s ease-in-out infinite;
}

@keyframes recPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.camera-dock__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.camera-dock__keys {
  margin: 0;
  padding: 0.35rem 0.65rem 0.55rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.camera-dock__keys kbd {
  font-size: 0.65rem;
}

.camera-toast {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(24rem, 92vw);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 36, 25, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.camera-toast[hidden] {
  display: none !important;
}

/* Vista cámara IP (puerto 8080), esquina superior derecha */
.top-preview-dock {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 44;
  width: min(420px, 92vw);
  border-radius: 12px;
  overflow: hidden;
  background: #0b57d0;
  border: 2px solid #4f8df0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(79, 141, 240, 0.3);
  padding: 0.45rem;
}

.top-preview-dock video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(320px, 38vh);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0a0a0a;
  border-radius: 8px;
}

.top-preview-dock iframe {
  display: block;
  width: 100%;
  height: min(320px, 38vh);
  border: 0;
  border-radius: 8px;
  background: #0a0a0a;
}

.bottom-preview-dock {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 44;
  width: min(380px, 70vw);
  border-radius: 12px;
  overflow: hidden;
  background: #0b57d0;
  border: 2px solid #4f8df0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(79, 141, 240, 0.3);
  padding: 0.4rem;
}

.bottom-preview-dock video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(220px, 26vh);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0a0a0a;
  border-radius: 8px;
}

.app {
  width: min(42rem, 100%);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.header__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.header__top h1 {
  grid-column: 2;
  margin: 0;
}

.header__top .btn-settings {
  grid-column: 3;
  justify-self: end;
}

.header h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.btn-settings {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-settings:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-settings:active {
  transform: scale(0.96);
}

.btn-settings__icon {
  font-size: 1.35rem;
  line-height: 1;
  display: block;
  margin-top: -0.1em;
}

.hint {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

kbd {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-family: inherit;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 1.75rem 1rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

@media (max-width: 520px) {
  .scoreboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
  }
}

.team__logo-wrap {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team__logo[hidden] {
  display: none !important;
}

.team__logo-wrap--empty {
  display: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.team--flash {
  animation: flash 0.35s ease;
}

@keyframes flash {
  0%,
  100% {
    background: transparent;
  }
  50% {
    background: rgba(255, 255, 255, 0.12);
  }
}

.team__label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.team--1 .team__label {
  color: rgba(255, 200, 180, 0.9);
}

.team--2 .team__label {
  color: rgba(180, 240, 230, 0.95);
}

.team__score {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 18vw, 6rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.team--1 .team__score {
  color: var(--accent-1);
}

.team--2 .team__score {
  color: var(--accent-2);
}

.divider {
  width: 1px;
  min-width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.2) 15%,
    rgba(255, 255, 255, 0.2) 85%,
    transparent
  );
  align-self: stretch;
}

.btn-add {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transition: background 0.15s ease, transform 0.1s ease;
}

.team--1 .btn-add:hover {
  background: rgba(255, 107, 53, 0.35);
}

.team--2 .btn-add:hover {
  background: rgba(78, 205, 196, 0.35);
}

.btn-add:active {
  transform: scale(0.97);
}

.team__faults {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team__faults-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.team__faults-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.75rem;
  min-width: 1.5ch;
  text-align: center;
  line-height: 1;
}

.team--1 .team__faults-num {
  color: #ffb89a;
}

.team--2 .team__faults-num {
  color: #9ee8e0;
}

.btn-fault {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-fault:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.footer {
  margin-top: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hik-record-source {
  position: fixed;
  width: 160px;
  height: 90px;
  bottom: 0;
  left: 0;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
  object-fit: cover;
}

.hik-ip-record {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.btn-hik-ip {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 205, 196, 0.45);
  background: rgba(78, 205, 196, 0.18);
  color: #e8faf8;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-hik-ip:hover:not(:disabled) {
  background: rgba(78, 205, 196, 0.28);
  border-color: rgba(78, 205, 196, 0.65);
}

.btn-hik-ip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-hik-ip--stop {
  border-color: rgba(255, 107, 53, 0.55);
  background: rgba(255, 107, 53, 0.18);
  color: #ffe8e0;
}

.btn-hik-ip--stop:hover:not(:disabled) {
  background: rgba(255, 107, 53, 0.3);
  border-color: rgba(255, 107, 53, 0.75);
}

.hik-ip-record__hint {
  margin: 0;
  max-width: 28rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.hik-ip-record__hint code {
  font-size: 0.62rem;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.btn-reset {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-reset:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(26rem, 100%);
  max-height: min(90dvh, 36rem);
  overflow: auto;
  background: linear-gradient(160deg, #243d32, #1a2e26);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal__title {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.modal__close {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.modal__form {
  padding: 1rem 1rem 1.25rem;
}

.config-block {
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.config-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.config-block legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  padding: 0;
}

.config-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}

.field {
  display: block;
  margin-bottom: 0.75rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="url"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.field input:focus {
  outline: none;
  border-color: rgba(78, 205, 196, 0.55);
  box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.field--file input[type="file"] {
  width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-primary,
.btn-secondary {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--accent-2);
  color: #0f2419;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.45);
}

.config-block--usb {
  padding-bottom: 1rem !important;
}

.config-note {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.key-bind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.key-bind:last-child {
  margin-bottom: 0;
}

.key-bind__label {
  flex: 1 1 6rem;
  min-width: 0;
  font-size: 0.85rem;
}

.key-bind__code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent-2);
}

.btn-key-assign {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-key-assign:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-key-assign.is-waiting {
  border-color: rgba(78, 205, 196, 0.6);
  background: rgba(78, 205, 196, 0.15);
  color: var(--text);
}
