/* General Styling with Modern Outfit Font and Dark Mode Glassmorphism */
:root {
  --bg-primary: hsl(222, 25%, 10%);
  --bg-secondary: hsl(223, 20%, 14%);
  --bg-glass: rgba(22, 28, 45, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --color-primary: hsl(263, 85%, 65%);
  --color-primary-hover: hsl(263, 90%, 72%);
  --color-secondary: hsl(171, 75%, 45%);
  --color-secondary-hover: hsl(171, 80%, 55%);
  --color-danger: hsl(354, 70%, 54%);
  --text-main: hsl(210, 25%, 95%);
  --text-muted: hsl(211, 15%, 65%);
  --text-highlight: hsl(171, 75%, 45%);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-main: 0 12px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, hsla(263, 85%, 65%, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(171, 75%, 45%, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Toast Messages */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-main);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--color-secondary);
}

.toast.error {
  border-left: 4px solid var(--color-danger);
}

/* Helper Classes */
.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

/* Login Page Layout */
.login-body {
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px var(--color-primary));
}

.logo h1 {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Cards (Glassmorphism) */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-main);
  animation: fadeIn 0.5s ease-out;
}

.card h2 {
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Forms and Inputs */
.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(114, 46, 209, 0.2);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(114, 46, 209, 0.3);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: hsl(354, 75%, 62%);
  transform: translateY(-2px);
}

.switch-form-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 24px;
}

.switch-form-text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

.switch-form-text a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Dashboard Page Layout
   ========================================================================== */
.dashboard-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo-text {
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, var(--text-main) 40%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-user {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 8px var(--color-secondary);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-family);
  font-weight: 500;
}

.btn-logout:hover {
  color: var(--color-danger);
}

.sidebar-menu-title {
  padding: 24px 24px 8px 24px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.agent-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.agent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.agent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.agent-item.active {
  background: rgba(114, 46, 209, 0.12);
  border-color: rgba(114, 46, 209, 0.3);
}

.agent-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agent-name {
  font-weight: 600;
  font-size: 14px;
}

.agent-status-label {
  font-size: 11px;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.agent-connect-icon {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.agent-item:hover .agent-connect-icon,
.agent-item.active .agent-connect-icon {
  color: var(--color-primary);
}

.no-agents {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Placeholder Screen (When not connected) */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.welcome-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.35;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.welcome-screen h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.welcome-screen p {
  color: var(--text-muted);
  max-width: 400px;
  font-size: 15px;
  line-height: 1.5;
}

/* Active Control View */
.control-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.view-header {
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active-agent-info h3 {
  font-size: 18px;
  font-weight: 600;
}

.active-agent-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-fullscreen {
  padding: 8px 13px;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
}

.btn-fullscreen:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-disconnect {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255, 99, 71, 0.15);
  border: 1px solid rgba(255, 99, 71, 0.3);
  color: hsl(0, 100%, 75%);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-disconnect:hover {
  background: rgb(255, 99, 71);
  color: #fff;
}

/* Control Tabs (Viewer / File Explorer / Settings) */
.tab-navigation {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 24px;
}

.tab-btn {
  padding: 14px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: hsl(222, 25%, 8%);
}

.tab-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* Remote Desktop Screen Canvas */
.remote-screen-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  position: relative;
}

.screen-canvas-wrapper {
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  display: flex;
}

#remoteCanvas {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  cursor: crosshair;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* File Manager Interface */
.file-manager {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
}

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

.fm-path-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-path-label {
  color: var(--text-muted);
  margin-right: 8px;
}

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

.fm-btn {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.fm-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.fm-btn-primary {
  background: var(--color-primary);
  border: none;
}

.fm-btn-primary:hover {
  background: var(--color-primary-hover);
}

.file-list-container {
  flex: 1;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.file-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
  font-weight: 600;
  color: var(--text-muted);
}

.file-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.file-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.file-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.file-name-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-icon {
  font-size: 18px;
}

.file-actions-col {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.file-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  transition: color 0.15s ease;
}

.file-action-btn:hover {
  color: var(--color-secondary);
}

/* Clipboard Sync UI */
.clipboard-sync-card {
  max-width: 600px;
  margin: 40px auto;
  padding: 32px;
}

.clipboard-textarea {
  width: 100%;
  height: 180px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 16px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  resize: none;
  margin-bottom: 16px;
}

.clipboard-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.clipboard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Control Switch (iOS-style) */
.control-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: 20px;
}

.control-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.control-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.control-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.control-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 20px;
}

.control-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.control-switch input:checked + .control-slider {
  background-color: var(--color-secondary);
}

.control-switch input:checked + .control-slider:before {
  transform: translateX(16px);
}
.agent-item.offline {
  opacity: 0.62;
}

.agent-item.offline .agent-status-label {
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile remote-control workspace
   ========================================================================== */
.mobile-icon-btn,
.mobile-control-btn,
.mobile-key-btn {
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-family);
}

.mobile-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 28px;
  line-height: 1;
}

.mobile-control-bar {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 58px;
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  gap: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  background: rgba(20, 25, 39, 0.96);
  border-top: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-control-btn {
  flex: 0 0 67px;
  min-height: 46px;
  border-radius: 9px;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.mobile-control-btn span {
  font-size: 18px;
  line-height: 18px;
}

.mobile-control-btn small {
  font-size: 9px;
  line-height: 11px;
  white-space: nowrap;
}

.mobile-control-btn:active,
.mobile-key-btn:active {
  background: var(--color-primary);
}

.mobile-keyboard-panel {
  position: absolute;
  z-index: 40;
  left: 8px;
  right: 8px;
  bottom: calc(62px + env(safe-area-inset-bottom));
  padding: 8px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: rgba(20, 25, 39, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.mobile-keyboard-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#mobileKeyboardInput {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font: 16px var(--font-family);
}

#mobileKeyboardInput:focus {
  outline: 2px solid rgba(151, 94, 255, 0.55);
  border-color: var(--color-primary);
}

.mobile-key-btn {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 9px;
  font-size: 18px;
}

@media (max-width: 820px), (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .mobile-only {
    display: flex;
  }

  .dashboard-wrapper {
    display: block;
    width: 100%;
    height: 100dvh;
  }

  .sidebar {
    width: 100%;
    height: 100dvh;
    border-right: 0;
  }

  .sidebar-header {
    padding: max(16px, env(safe-area-inset-top)) 18px 14px;
  }

  .sidebar-user {
    padding: 12px 18px;
  }

  .sidebar-menu-title {
    padding: 18px 18px 8px;
  }

  .agent-list-container {
    padding: 0 12px calc(18px + env(safe-area-inset-bottom));
  }

  .agent-item {
    min-height: 62px;
    padding: 12px 14px;
  }

  .main-content {
    display: none;
    width: 100%;
    height: 100dvh;
  }

  body.mobile-session .sidebar {
    display: none;
  }

  body.mobile-session .main-content {
    display: flex;
  }

  .welcome-screen {
    display: none;
  }

  .control-view {
    height: 100dvh;
    min-height: 0;
  }

  .view-header {
    min-height: 52px;
    padding: calc(7px + env(safe-area-inset-top)) 10px 7px;
    gap: 8px;
  }

  .active-agent-info {
    min-width: 0;
    flex: 1;
  }

  .active-agent-info h3 {
    overflow: hidden;
    font-size: 15px;
    line-height: 18px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .active-agent-info p {
    overflow: hidden;
    max-width: 150px;
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 6px;
  }

  .control-toggle-wrapper {
    padding: 5px 7px;
  }

  .control-toggle-label {
    display: none;
  }

  .btn-disconnect {
    padding: 7px 9px;
    font-size: 10px;
  }

  .tab-navigation {
    flex: 0 0 auto;
    padding: 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tab-navigation::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 1 0 auto;
    padding: 10px 9px;
    font-size: 11px;
  }

  .tab-content,
  #tab-screen {
    min-height: 0;
  }

  #tab-screen {
    position: relative;
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .remote-screen-container {
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: #080b12;
  }

  .screen-canvas-wrapper {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: none;
  }

  #remoteCanvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    cursor: default;
  }

  .file-manager {
    padding: 10px;
  }

  .fm-toolbar {
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 7px;
  }

  .fm-path-bar {
    order: 3;
    flex-basis: 100%;
  }

  .file-table {
    min-width: 520px;
  }

  .clipboard-sync-card {
    height: calc(100% - 20px);
    margin: 10px;
    padding: 18px;
  }

  .clipboard-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    text-align: center;
  }

  body.mobile-fullscreen-ui .view-header,
  body.mobile-fullscreen-ui .tab-navigation {
    display: none;
  }

  body.mobile-fullscreen-ui #tab-screen {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 820px) and (orientation: landscape) {
  .view-header {
    min-height: 42px;
    padding-top: max(4px, env(safe-area-inset-top));
    padding-bottom: 4px;
  }

  .tab-btn {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .mobile-control-bar {
    min-height: 52px;
  }

  .mobile-control-btn {
    min-height: 40px;
  }

  #tab-screen {
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }
}
