/* ============ TOPBAR ============ */
.topbar {
  background: #121212; color: #fff;
  padding: 16px clamp(18px, 4vw, 54px);
  display: flex; justify-content: space-between;
  align-items: center; gap: 20px;
  border-bottom: 1px solid #383838;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: .1px; }
.brand-mark {
  width: 37px; height: 37px; border: 2px solid #86ded7;
  display: grid; place-items: center; border-radius: 11px;
  font-size: 22px; background: #fff; color: #111; box-shadow: none;
}
.topbar small { color: #b9b9b9; font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions small { font-size: 12px; white-space: nowrap; }
.nav-actions button { font-size: 12px; padding: 8px 11px; }
.alert-btn { position: relative; }
.alert-count {
  position: absolute; right: -5px; top: -7px;
  min-width: 17px; height: 17px;
  display: grid; place-items: center;
  background: #222; color: #fff;
  border-radius: 50%; font-size: 10px;
}

/* ============ MAIN ============ */
main { max-width: 1440px; margin: auto; padding: 30px clamp(18px, 4vw, 54px) 52px; }
.heading {
  display: flex; justify-content: space-between;
  align-items: flex-end; gap: 24px; margin: 10px 0 24px;
}
.heading h1 { background: none; color: #151515; -webkit-text-fill-color: #151515; }
.heading p { margin: 0; color: #676767; font-size: 15px; }
.footer-note { margin: 14px 3px; font-size: 12px; color: #676767; }

/* ============ STATS ============ */
.stats { display: grid; grid-template-columns: repeat(3, minmax(125px, 1fr)); gap: 12px; }
.stat {
  min-width: 125px; padding: 13px 16px;
  background: #fff; border: 1px solid #d5d5d5;
  border-radius: 16px; box-shadow: 0 8px 24px #0000000d;
  transform: perspective(800px) rotateX(2deg); transition: .25s;
}
.stat:hover { transform: perspective(800px) translateY(-4px) rotateX(0) }
.stat b { display: block; color: #111; font-size: 22px; }
.stat span { color: #6b6b6b; font-size: 12px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .nav-actions small, .desktop-nav { display: none; }
}
@media (max-width: 720px) {
  .topbar small { display: none }
  .heading { align-items: flex-start; flex-direction: column; }
  .stats { width: 100%; }
  .stat { flex: 1 }
  select { flex: 1; }
}

@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap; align-items: center;
    padding: 12px 14px; gap: 10px;
  }
  .brand { flex: 1 1 100%; }
  .nav-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .nav-actions button { min-height: 40px; }

  main { padding: 22px 14px 36px; }
  .heading { gap: 14px; margin: 0 0 17px; }
  .heading p { font-size: 14px; line-height: 1.45; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; padding: 10px 8px; border-radius: 10px; }
  .stat b { font-size: 19px; }
  .stat span { font-size: 11px; line-height: 1.3; }

  .toolbar { gap: 8px; padding: 12px; border-radius: 12px 12px 0 0; }
  .toolbar .search { flex: 1 1 100%; min-width: 0; }
  .toolbar > select,
  .toolbar > button {
    flex: 1 1 calc(50% - 4px); min-width: 0; width: auto;
    min-height: 42px; padding: 9px 8px;
    white-space: normal; line-height: 1.2;
  }
  .toolbar > #addBtn { flex-basis: 100%; }

  .table-wrap {
    overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 12px 12px;
  }
  tbody tr:hover { transform: none; }
  .footer-note { margin: 12px 2px; line-height: 1.5; }
}

@media (max-width: 380px) {
  .nav-actions { justify-content: flex-start; }
  .nav-actions button { padding: 8px; font-size: 11px; }
  .stats { gap: 6px; }
  .stat { padding: 9px 6px; }
  .stat b { font-size: 17px; }
  .toolbar { padding: 9px; gap: 7px; }
}