@media (max-width: 1200px) {
  .content {
    padding: 28px;
  }

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

  .performance-panel,
  .activity-panel {
    grid-column: span 12;
  }

  .tickets-panel,
  .health-panel,
  .website-panel,
  .backup-panel,
  .security-panel {
    grid-column: span 6;
  }

  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 74px;
  }

  .sidebar {
    padding: 14px 10px;
  }

  .brand span,
  .workspace span:nth-child(2),
  .workspace i,
  .nav p,
  .nav a span,
  .nav a em,
  .sidebar-user span {
    display: none;
  }

  .brand,
  .workspace,
  .nav a,
  .sidebar-user {
    justify-content: center;
  }

  .workspace {
    padding: 0;
  }

  .nav a {
    padding: 0;
  }

  .sidebar-user {
    padding: 8px 0;
  }

  .topbar {
    padding: 0 22px;
  }

  .search {
    width: min(360px, 44vw);
  }

  .system-status {
    display: none;
  }

  .content {
    padding: 24px;
  }

  .tickets-panel,
  .health-panel,
  .website-panel,
  .backup-panel,
  .security-panel {
    grid-column: span 12;
  }

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

@media (max-width: 700px) {
  .app {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    z-index: 50;
  }

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

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 40;
  }

  .brand span,
  .workspace span:nth-child(2),
  .workspace i,
  .nav p,
  .nav a span,
  .nav a em,
  .sidebar-user span {
    display: block;
  }

  .nav a {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .nav a em {
    display: grid;
  }

  .brand,
  .workspace,
  .sidebar-user {
    justify-content: flex-start;
  }

  .workspace {
    padding: 0 10px;
  }

  .menu-btn {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--soft);
    background: transparent;
    border: 0;
    border-radius: 9px;
  }

  .menu-btn:hover {
    background: rgba(255, 255, 255, .045);
  }

  .topbar {
    height: 58px;
    padding: 0 14px;
    gap: 10px;
  }

  .search {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 36px;
  }

  .search kbd,
  .top-actions button:nth-of-type(2),
  .top-actions .avatar {
    display: none;
  }

  .content {
    padding: 22px 14px 32px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .primary-btn {
    width: 100%;
    justify-content: center;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .performance-panel,
  .activity-panel,
  .tickets-panel,
  .health-panel,
  .website-panel,
  .backup-panel,
  .security-panel,
  .quick-panel {
    grid-column: 1;
  }

  .line-chart {
    height: 200px;
  }

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

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

@media (max-width: 460px) {
  .page-header h1 {
    font-size: 21px;
  }

  .page-header p {
    font-size: 12px;
    line-height: 1.5;
  }

  .kpi {
    min-height: 124px;
  }

  .kpi strong {
    font-size: 28px;
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    flex-direction: column;
  }

  .tabs {
    width: 100%;
  }

  .tabs button {
    flex: 1;
  }

  .line-chart {
    height: 170px;
  }

  .metric-strip,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .bars > div {
    grid-template-columns: 78px 1fr 38px;
  }

  .security-score {
    grid-template-columns: 1fr;
  }
}