* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #f6f7f9;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.adb-page {
  min-height: 100vh;
  padding: 16px;
}

.adb-card {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.adb-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.adb-auth {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 24px;
}

.adb-auth__title {
  margin: 0 0 8px;
  font-size: 24px;
}

.adb-auth__desc {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 14px;
}

.adb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.adb-screen,
.adb-control {
  padding: 16px;
}

.adb-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.adb-status {
  flex: none;
  color: #2563eb;
  font-size: 13px;
}

.adb-screen__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  cursor: crosshair;
}

.adb-screen__image {
  display: none;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.adb-screen__image.is-visible {
  display: block;
}

.adb-screen__empty {
  color: #9ca3af;
  font-size: 14px;
}

.adb-screen__empty.is-hidden,
.is-hidden {
  display: none !important;
}

.adb-control {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adb-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adb-field__label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.adb-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

select.adb-input {
  cursor: pointer;
}

.adb-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.adb-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
}

.adb-button:active {
  transform: scale(0.99);
}

.adb-button--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.adb-grid {
  display: grid;
  gap: 10px;
}

.adb-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adb-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adb-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
  line-height: 1.5;
}

.adb-log {
  min-height: 120px;
  max-height: 220px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 820px) {
  .adb-page {
    padding: 12px;
  }

  .adb-layout {
    grid-template-columns: 1fr;
  }

  .adb-screen__preview {
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  .adb-auth {
    margin-top: 8vh;
    padding: 18px;
  }

  .adb-screen,
  .adb-control {
    padding: 12px;
  }

  .adb-grid--two,
  .adb-grid--four {
    grid-template-columns: 1fr;
  }

  .adb-screen__preview {
    min-height: 320px;
  }
}
