/* Handles page: Modern Dark Pro Glass Cards */

.hp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hp-head h2 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.hp-head p {
  color: #cbd5e1 !important;
  font-size: 14.5px;
  margin: 0;
}

.hp-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hp-tools input[type=search] {
  width: 260px;
  max-width: 100%;
}

.hgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 18px;
  width: 100%;
}

.hcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  background: #141f36;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.65);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.hcard:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.75), 0 0 20px -4px rgba(99, 102, 241, 0.35);
}

.hcard.off {
  opacity: 0.65;
}

.hc-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hav {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 20px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
}

.hc-id {
  min-width: 0;
  flex: 1;
}

.hc-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.hc-desc {
  font-size: 13.5px;
  color: #cbd5e1 !important;
  margin-top: 4px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.hst {
  flex: none;
  font-size: 12px;
  font-weight: 750;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0 !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hst::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.hst.on {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
}

.hst.on::before {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.hplats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.hplat {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  transition: all 0.16s ease;
}

.hplat:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.hplat svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hplat .dot {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #141f36;
}

.dot.ok {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.dot.off {
  background: #64748b;
}

.hplat .n {
  position: absolute;
  right: -5px;
  bottom: -5px;
  font-size: 10.5px;
  font-weight: 800;
  background: #6366f1;
  color: #ffffff !important;
  border-radius: 8px;
  padding: 0 5px;
  line-height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hsum {
  font-size: 13.5px;
  color: #cbd5e1 !important;
}

.hnone {
  font-size: 13.5px;
  color: #cbd5e1 !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.hlinkbtn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 750;
  color: #a5b4fc !important;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hlinkbtn:hover {
  color: #ffffff !important;
}

.hstats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hstat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 7px 15px;
  font: inherit;
  font-size: 13.5px;
  color: #ffffff !important;
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.hstat b {
  color: #a5b4fc !important;
  font-weight: 800;
}

.hstat:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.hfoot {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hfoot > .btn {
  flex: 1;
}

.hfoot .btn {
  min-height: 40px;
}

.hcard .btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff !important;
}

.hcard .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.hmore {
  position: relative;
  flex: none;
}

.hdots {
  width: 42px;
  padding: 9px 0 !important;
  text-align: center;
  font-weight: 750;
  letter-spacing: 1px;
  flex: none !important;
}

.hmenu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 200px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  padding: 8px;
  z-index: 50;
}

.hmenu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 14px;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff !important;
  transition: all 0.15s ease;
}

.hmenu button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hmenu .dng {
  color: #f87171 !important;
}

.hmenu .dng:hover {
  background: rgba(244, 63, 94, 0.2);
}

.hcard button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.hempty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 24px;
  background: #141f36;
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

.hempty h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #ffffff !important;
  font-weight: 800;
}

.hempty p {
  margin: 0 auto 20px;
  max-width: 440px;
  color: #cbd5e1 !important;
  font-size: 15px;
}

.modal-in.hm-in {
  max-width: 480px;
  margin-top: 8vh;
}

.hm-in .field input,
.hm-in .field textarea {
  width: 100%;
}

.hm-in h2 {
  margin-bottom: 16px;
  color: #ffffff !important;
}

.hm-body {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #cbd5e1 !important;
}

.hm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hpause {
  color: #fbbf24 !important;
  font-weight: 700;
}
