:root {
  --bg: #030303;
  --panel: #090909;
  --panel-2: #0d0d0d;
  --panel-3: #121212;

  --border: #202020;
  --border-light: #2b2b2b;

  --text: #ffffff;
  --muted: #8d8d96;
  --muted-2: #5f5f68;

  --success: #57f287;
  --danger: #ff5365;
  --blue: #5865f2;

  --radius: 20px;
  --small-radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  overflow-x: hidden;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.background {
  position: fixed;
  z-index: -2;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  filter: blur(150px);
  opacity: 0.08;

  pointer-events: none;
}

.background-one {
  top: -220px;
  left: -180px;

  background: #ff00aa;
}

.background-two {
  right: -220px;
  bottom: -220px;

  background: #0066ff;
}

.app-shell {
  width: min(1500px, 100%);
  min-height: 100vh;

  margin: 0 auto;

  padding:
    22px
    22px
    50px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;

  gap: 11px;
}

.brand-logo {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border: 1px solid #252525;
  border-radius: 12px;

  background: #0d0d0d;

  box-shadow:
    0 0 20px rgba(255, 175, 0, 0.1);
}

.brand-logo img {
  width: 100%;
  height: 100%;

  padding: 3px;

  object-fit: contain;

  user-select: none;
  pointer-events: none;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  margin-top: 2px;

  color: var(--muted-2);

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.connection {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 13px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.02);

  color: var(--muted);

  font-size: 11px;
  font-weight: 700;
}

.connection.connected {
  border-color: rgba(87, 242, 135, 0.18);
  color: var(--success);
}

.connection.disconnected {
  border-color: rgba(255, 83, 101, 0.18);
  color: var(--danger);
}

.connection.connecting {
  color: #e3e3e7;
}

.status-dot,
.mfa-status-dot,
.footer-dot {
  width: 7px;
  height: 7px;

  flex-shrink: 0;

  border-radius: 50%;

  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.main-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    350px;

  gap: 18px;
}

.browser-panel,
.security-card,
.mfa-card,
.session-card {
  border:
    1px solid var(--border);

  border-radius: var(--radius);

  background:
    linear-gradient(
      180deg,
      #0c0c0c 0%,
      #070707 100%
    );

  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.28);
}

.browser-panel {
  min-width: 0;

  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  padding: 22px 22px 16px;
}

.panel-kicker,
.side-kicker {
  color: #63636c;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.2em;
}

.panel-header h1 {
  margin: 7px 0 6px;

  font-size: 25px;
  line-height: 1.1;

  letter-spacing: -0.045em;
}

.panel-header p {
  margin: 0;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.6;
}

.icon-button,
.toolbar-button,
.small-button,
.primary-button,
.secondary-button {
  border: 1px solid var(--border-light);

  cursor: pointer;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.icon-button {
  width: 40px;
  height: 40px;

  border-radius: 11px;

  background: #111111;
  color: #ffffff;

  font-size: 20px;
}

.icon-button:hover,
.toolbar-button:hover,
.small-button:hover,
.secondary-button:hover {
  background: #171717;
  border-color: #383838;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.browser-toolbar {
  display: flex;
  align-items: center;

  gap: 7px;

  padding:
    0
    14px
    12px;

  border-bottom: 1px solid var(--border);
}

.toolbar-button {
  width: 36px;
  height: 34px;

  flex-shrink: 0;

  border-radius: 9px;

  background: #111111;
  color: #d9d9dd;

  font-size: 15px;
}

.url-bar {
  min-width: 0;
  height: 34px;

  flex: 1;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 0 11px;

  border:
    1px solid var(--border);

  border-radius: 9px;

  background: #060606;

  color: #888892;

  font-size: 10px;
}

.secure-icon {
  flex-shrink: 0;

  color: var(--success);

  font-size: 7px;

  text-shadow:
    0 0 8px
    rgba(87, 242, 135, 0.8);
}

#current-url {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-container {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 10;

  min-height: 420px;

  overflow: hidden;

  background:
    #020202;
}

.browser-screen {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  background: #000000;

  user-select: none;
  -webkit-user-drag: none;

  cursor: default;
}

.hidden {
  display: none !important;
}

.browser-loading,
.browser-offline {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-direction: column;

  text-align: center;
}

.browser-loading {
  gap: 9px;
}

.large-spinner {
  width: 38px;
  height: 38px;

  margin-bottom: 6px;

  border:
    3px solid
    rgba(255, 255, 255, 0.1);

  border-top-color:
    #ffffff;

  border-radius: 50%;

  animation:
    spin
    0.75s linear infinite;
}

.loading-title,
.offline-title {
  font-size: 14px;
  font-weight: 800;
}

.loading-text,
.offline-text {
  max-width: 310px;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.55;
}

.offline-icon {
  width: 54px;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 12px;

  border-radius: 50%;

  border:
    1px solid
    rgba(255, 83, 101, 0.25);

  background:
    rgba(255, 83, 101, 0.05);

  color: var(--danger);

  font-size: 22px;
  font-weight: 800;
}

.browser-offline {
  gap: 8px;
}

.browser-offline .primary-button {
  margin-top: 12px;
}

.browser-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding:
    11px
    14px;

  border-top:
    1px solid var(--border);

  background: #080808;

  color: var(--muted);

  font-size: 10px;
}

#browser-title {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-actions {
  display: flex;
  gap: 7px;
}

.small-button {
  min-height: 31px;

  padding:
    0
    10px;

  border-radius: 8px;

  background: #101010;
  color: #d7d7db;

  font-size: 10px;
  font-weight: 700;
}

.small-button.danger {
  color: #ff8692;

  border-color:
    rgba(255, 83, 101, 0.15);
}

.side-panel {
  display: flex;
  flex-direction: column;

  gap: 12px;

  min-width: 0;
}

.security-card,
.mfa-card,
.session-card {
  padding: 18px;
}

.security-card {
  display: grid;

  grid-template-columns: 44px 1fr;

  gap: 11px;
}

.security-icon {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(87, 242, 135, 0.12);

  border-radius: 12px;

  background:
    rgba(87, 242, 135, 0.04);

  font-size: 21px;
}

.security-card p {
  grid-column: 1 / -1;

  margin: 0;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.65;
}

.security-card h2,
.mfa-card h2 {
  margin: 5px 0 0;

  font-size: 15px;
  line-height: 1.2;

  letter-spacing: -0.03em;
}

.mfa-card h2 {
  margin-top: 7px;
}

.mfa-status {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-top: 14px;
  padding: 11px 12px;

  border-radius: 11px;

  border: 1px solid var(--border);

  background: #080808;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;

  line-height: 1.4;
}

.mfa-status.waiting {
  color: #d6d6da;
}

.mfa-status.detected {
  color: #f6d365;
}

.mfa-status.complete {
  color: var(--success);
}

.instruction-list {
  display: flex;
  flex-direction: column;

  gap: 12px;

  margin-top: 18px;
}

.instruction {
  display: flex;
  align-items: flex-start;

  gap: 10px;
}

.instruction-number {
  width: 24px;
  height: 24px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #151515;
  border: 1px solid #252525;

  color: #ffffff;

  font-size: 9px;
  font-weight: 800;
}

.instruction strong {
  display: block;

  margin-bottom: 2px;

  font-size: 10px;
  font-weight: 800;
}

.instruction span {
  display: block;

  color: var(--muted);

  font-size: 9px;
  line-height: 1.55;
}

.quick-actions {
  display: flex;

  gap: 8px;

  margin-top: 18px;
}

.primary-button,
.secondary-button {
  min-height: 42px;

  padding:
    0
    13px;

  border-radius: 10px;

  font-size: 11px;
  font-weight: 800;
}

.primary-button {
  flex: 1;

  background: #ffffff;
  color: #000000;

  border-color: #ffffff;
}

.primary-button:hover {
  box-shadow:
    0 10px 30px
    rgba(255, 255, 255, 0.08);
}

.secondary-button {
  background: #111111;
  color: #ffffff;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 10px 0;

  border-bottom:
    1px solid #161616;

  font-size: 10px;
}

.session-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.session-row span {
  color: var(--muted);
}

.session-row strong {
  color: #e1e1e5;

  font-size: 9px;

  text-align: right;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  margin-top: 16px;

  color: #4f4f57;

  font-size: 9px;
}

.footer-dot {
  width: 5px;
  height: 5px;

  color: var(--success);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .security-card {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding:
      14px
      14px
      35px;
  }

  .topbar {
    align-items: flex-start;
  }

  .connection {
    padding: 8px 10px;

    font-size: 9px;
  }

  .panel-header {
    padding: 17px;
  }

  .browser-container {
    min-height: 300px;

    aspect-ratio: 4 / 3;
  }

  .browser-toolbar {
    padding:
      0
      8px
      9px;
  }

  .toolbar-button {
    width: 32px;
    height: 31px;
  }

  .url-bar {
    height: 31px;
  }

  .browser-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-actions {
    width: 100%;
  }

  .small-button {
    flex: 1;
  }

  .side-panel {
    display: flex;
  }

  .security-card {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}