/* Mobile */
@media (max-width: 768px) {
  .app {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 60px; /* Space for mobile nav */
  }

  /* Mobile bottom navigation */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 10px;
    padding: 4px 2px;
    cursor: pointer;
    transition: color 0.15s;
  }

  .mobile-nav-btn:hover,
  .mobile-nav-btn:active {
    color: var(--text-primary);
  }

  .mobile-nav-btn.active {
    color: var(--blue);
  }

  .mobile-nav-btn svg {
    width: 22px;
    height: 22px;
  }

  .mobile-nav-btn span {
    font-weight: 500;
  }

  /* Mobile panels (controls, menu) */
  .mobile-controls-panel,
  .mobile-menu-panel {
    position: fixed;
    bottom: 60px;
    left: 8px;
    right: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    padding: 12px;
    max-height: 70vh;
    overflow-y: auto;
  }

  .mobile-panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  .mobile-panel-alert {
    padding: 8px 12px;
    background: rgba(255, 196, 0, 0.12);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 12px;
  }

  .mobile-panel-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mobile-panel-btn {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
  }

  .mobile-panel-btn:hover:not(:disabled) {
    background: var(--bg-primary);
    border-color: var(--text-secondary);
  }

  .mobile-panel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .mobile-panel-btn.warning {
    border-color: var(--yellow);
    color: var(--yellow);
  }

  .mobile-panel-btn.warning:hover:not(:disabled) {
    background: var(--yellow);
    color: #000;
  }

  .mobile-panel-btn.danger {
    border-color: var(--red);
    color: var(--red);
    grid-column: span 2;
  }

  .mobile-panel-btn.danger:hover:not(:disabled) {
    background: var(--red);
    color: #fff;
  }

  /* Mobile menu items */
  .mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
  }

  .mobile-menu-item:hover {
    background: var(--bg-tertiary);
  }

  .mobile-menu-item.active {
    background: var(--bg-tertiary);
    color: var(--blue);
  }

  .mobile-menu-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
  }

  .mobile-menu-item.active svg {
    color: var(--blue);
  }

  .mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .header.header-2row {
    padding: 0;
  }

  .header-row1 {
    padding: 6px 12px;
    gap: 8px;
  }

  .header-row2 {
    padding: 6px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-title {
    font-size: 12px;
  }

  .header-symbol {
    font-size: 11px;
    padding: 3px 6px;
  }

  .header-pnl {
    gap: 12px;
    flex-wrap: wrap;
  }

  .pnl-item {
    gap: 4px;
  }

  .pnl-value {
    font-size: 12px;
  }

  .pnl-today .pnl-value {
    font-size: 13px;
  }

  .header-controls {
    gap: 6px;
  }

  .header-tz {
    display: none;
  }

  .main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  .order-pane {
    display: none;
  }

  .hide-orders-btn {
    display: none;
  }

  .chart-container {
    flex: 1;
    min-height: 200px;
    height: auto;
  }

  .gutter {
    display: none;
  }

  .bottom-section {
    height: auto !important;
    max-height: 40vh;
    flex-direction: column;
    overflow: auto;
  }

  .controls {
    display: none;
  }

  .controls-mobile {
    display: block;
  }

  .indicator-panel {
    max-width: calc(100vw - 16px);
    font-size: 10px;
  }

  .table-container {
    font-size: 11px;
  }

  .table-container th,
  .table-container td {
    padding: 6px 8px;
  }
}
