.idrug-devices {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: #111722;
  color: #eaf1ff;
  overflow: hidden;
}

.idrug-devices__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.idrug-devices__eyebrow {
  margin: 0 0 5px;
  color: #bae6fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.idrug-devices__title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.idrug-devices__description {
  max-width: 660px;
  margin: 7px 0 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
}

.idrug-devices__refresh,
.idrug-device__remove,
.idrug-device-dialog__button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.idrug-devices__refresh:hover,
.idrug-device-dialog__button--cancel:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.09);
}

.idrug-devices__refresh:disabled,
.idrug-device__remove:disabled,
.idrug-device-dialog__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.idrug-devices__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(8, 10, 16, 0.28);
}

.idrug-devices__usage {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.idrug-devices__usage strong {
  font-size: 22px;
  font-weight: 900;
}

.idrug-devices__usage span {
  color: #94a3b8;
  font-size: 13px;
}

.idrug-devices__bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.idrug-devices__bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7dd3fc, #c4b5fd, #bef264);
  transition: width 200ms ease;
}

.idrug-devices__status {
  border: 1px solid rgba(190, 242, 100, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(190, 242, 100, 0.08);
  color: #d9f99d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.idrug-devices__body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.idrug-devices__message {
  margin: 0;
  padding: 20px 8px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.idrug-devices__message--error {
  color: #fecdd3;
}

.idrug-device {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.idrug-device__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 15px;
  background: rgba(125, 211, 252, 0.08);
  color: #bae6fd;
}

.idrug-device__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.idrug-device__content {
  min-width: 0;
}

.idrug-device__name {
  display: block;
  overflow: hidden;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idrug-device__meta,
.idrug-device__date {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.idrug-device__date {
  color: #64748b;
}

.idrug-device__remove {
  border-color: rgba(253, 164, 175, 0.25);
  background: rgba(251, 113, 133, 0.08);
  color: #fecdd3;
}

.idrug-device__remove:hover {
  border-color: rgba(253, 164, 175, 0.45);
  background: rgba(251, 113, 133, 0.14);
}

.idrug-device__remove[data-state="removing"] {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.idrug-device-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.76);
}

.idrug-device-dialog__panel {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  padding: 22px;
  background: #111722;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.62);
}

.idrug-device-dialog__panel h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.idrug-device-dialog__panel p {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.idrug-device-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.idrug-device-dialog__button--danger {
  border-color: rgba(253, 164, 175, 0.3);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.idrug-device-dialog__button--danger:hover {
  background: rgba(251, 113, 133, 0.2);
}

.idrug-device-toast {
  position: fixed;
  z-index: 110;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 16px;
  padding: 12px 15px;
  background: #151c29;
  color: #e0f2fe;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 639px) {
  .idrug-devices__header {
    align-items: stretch;
    flex-direction: column;
    padding: 17px;
  }

  .idrug-devices__refresh {
    width: 100%;
  }

  .idrug-devices__summary {
    padding: 14px 17px;
  }

  .idrug-device {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .idrug-device__icon {
    width: 42px;
    height: 42px;
  }

  .idrug-device__remove {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .idrug-devices__bar-fill,
  .idrug-devices__refresh,
  .idrug-device__remove,
  .idrug-device-dialog__button {
    transition: none;
  }
}
