/* Responsive CSS Rules - aaPanel Style Mobile Layout */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background-color: var(--bg-header);
  border-top: 1px solid var(--border-color);
  z-index: 120;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-nav-item .icon {
  font-size: 1.2rem;
}

.mobile-nav-item.active {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sidebar-close-btn:hover {
  background: var(--bg-card-hover);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 25px rgba(0, 0, 0, 0.6);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gauge-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .speedometer-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0 0.85rem;
  }

  .content-body {
    padding: 0.85rem;
    padding-bottom: calc(var(--mobile-nav-height) + 1.25rem);
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .gauge-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .gauge-card {
    padding: 0.85rem 0.5rem;
  }

  .radial-meter {
    width: 80px;
    height: 80px;
  }

  .radial-meter svg {
    width: 80px;
    height: 80px;
  }

  .radial-value {
    font-size: 1.05rem;
  }

  .speedometer-strip {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .service-cards-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 220px;
  }

  .section-box {
    padding: 0.85rem;
  }

  /* Table Cards for Mobile */
  .table-cards-mobile tbody,
  .table-cards-mobile tr,
  .table-cards-mobile td {
    display: block;
    width: 100%;
  }

  .table-cards-mobile thead {
    display: none;
  }

  .table-cards-mobile tr {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    padding: 0.5rem;
  }

  .table-cards-mobile td {
    text-align: right;
    padding: 0.45rem 0.65rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: normal;
  }

  .table-cards-mobile td:last-child {
    border-bottom: none;
  }

  .table-cards-mobile td::before {
    content: attr(data-label);
    float: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
  }
}

@media (max-width: 380px) {
  .gauge-row {
    grid-template-columns: 1fr;
  }

  .top-header {
    padding: 0 0.5rem;
  }

  .page-title {
    font-size: 0.95rem;
  }

  .server-tag {
    display: none;
  }
}
