.drive-backup-card {
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px 34px;
  margin-top: 24px;
  padding: 30px;
  border: 1px solid rgba(126, 94, 139, 0.15);
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 208, 233, 0.42), transparent 34%),
    #fff;
}

.drive-backup-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -95px;
  bottom: -110px;
  border-radius: 50%;
  background: rgba(238, 220, 229, 0.4);
  pointer-events: none;
}

.drive-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.drive-card-heading h2 {
  margin: 5px 0 8px;
}

.drive-card-heading p {
  max-width: 680px;
  margin: 0;
  color: #756a79;
  line-height: 1.58;
}

.drive-card-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #775887;
  background: linear-gradient(145deg, #f0e5f3, #f9f5fa);
  border: 1px solid rgba(126, 94, 139, 0.14);
}

.drive-card-icon svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.drive-card-status {
  position: relative;
  z-index: 1;
  align-self: start;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #faf8fb;
  border: 1px solid #eee8f0;
}

.drive-card-status > span {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #aaa0ad;
  box-shadow: 0 0 0 5px rgba(170, 160, 173, 0.12);
}

.drive-card-status.connected > span {
  background: #5c9a78;
  box-shadow: 0 0 0 5px rgba(92, 154, 120, 0.13);
}

.drive-card-status.pending > span {
  background: #be8959;
  box-shadow: 0 0 0 5px rgba(190, 137, 89, 0.13);
}

.drive-card-status div {
  min-width: 0;
}

.drive-card-status strong,
.drive-card-status small {
  display: block;
}

.drive-card-status small {
  overflow: hidden;
  margin-top: 3px;
  color: #8c818f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-card-details {
  display: grid;
  gap: 8px;
  padding-left: 69px;
  color: #746978;
  font-size: 0.9rem;
}

.drive-card-details span::first-letter {
  color: #6b8f79;
}

.drive-card-actions {
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-start;
}

.drive-card-actions button[data-drive-action] {
  position: relative;
  z-index: 11;
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
}

.drive-card-actions button[data-drive-action]:disabled {
  cursor: wait;
}

.drive-card-actions a {
  color: #775887;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.drive-card-actions a:hover {
  text-decoration: underline;
}

.drive-card-warning {
  grid-column: 1 / -1;
  padding: 12px 15px;
  border: 1px solid #efd8c7;
  border-radius: 13px;
  color: #855c3e;
  background: #fff8f2;
  font-size: 0.88rem;
  line-height: 1.5;
}

.mypsi-drive-toast-area {
  position: fixed;
  z-index: 10050;
  top: 88px;
  right: 22px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.mypsi-drive-toast {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(105, 76, 118, 0.14);
  border-radius: 15px;
  color: #3c3340;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(66, 48, 75, 0.17);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}

.mypsi-drive-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.mypsi-drive-toast > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #fff;
  background: #67917a;
  font-size: 0.8rem;
  font-weight: 900;
}

.mypsi-drive-toast.error > span {
  background: #a76a6f;
}

.mypsi-drive-toast.progress > span {
  background: #80638c;
  animation: drive-spin 1s linear infinite;
}

@keyframes drive-spin {
  to { transform: rotate(360deg); }
}

.public-legal-links {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 11px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #928696;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.73rem;
  backdrop-filter: blur(8px);
}

.public-legal-links a {
  color: #7d6985;
  text-decoration: none;
}

.public-legal-links a:hover {
  text-decoration: underline;
}

body:has(.app-shell) .public-legal-links,
body:has(.vault-page) .public-legal-links {
  display: none;
}

@media (max-width: 900px) {
  .drive-backup-card {
    grid-template-columns: 1fr;
  }

  .drive-card-details {
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  .drive-backup-card {
    gap: 20px;
    margin-top: 18px;
    padding: 22px 18px;
  }

  .drive-card-heading {
    gap: 13px;
  }

  .drive-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 14px;
  }

  .drive-card-icon svg {
    width: 25px;
    height: 25px;
  }

  .drive-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .drive-card-actions button {
    width: 100%;
  }

  .drive-card-actions a {
    padding: 4px 0;
    text-align: center;
  }

  .mypsi-drive-toast-area {
    top: 76px;
    right: 16px;
  }
}
