
.wapi-profile {
  box-sizing: border-box;
}
.wapi-profile {
  --violet: #7c7df2;
  --violet-deep: #6d67d6;
  --cyan: #13addf;
  --dark: #263240;
  --white: #fff;
  --bg: #f8f8fd;
  --gray: #6b7280;
  --border: #e5e7eb;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 8px;
  --radius-lg: 14px;
  --spinner-outer: #7c7df2;
  --spinner-inner: #3269e3;
}
.wapi-profile * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.wapi-profile {
  font-family: "Inter", sans-serif;
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  position: relative;
}
.wapi-profile .profile-page {
  padding: 40px 0;
  width: 100%;
}
.wapi-profile .profile-container {
  max-width: none;
  margin: 0 auto;
  padding: 0 24px;
}

.wapi-profile .profile-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wapi-profile .profile-loading.hidden {
  display: none;
}
.wapi-profile .profile-loading-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.7;
}
.wapi-profile .profile-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}
.wapi-profile .profile-spinner .outer-ring,
.wapi-profile .profile-spinner .inner-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
.wapi-profile .profile-spinner .outer-ring {
  width: 100%;
  height: 100%;
  color: var(--spinner-outer);
  animation-name: wapi-spin-forth;
}
.wapi-profile .profile-spinner .inner-ring {
  width: 85%;
  height: 85%;
  color: var(--spinner-inner);
  animation-name: wapi-spin-back;
}
@keyframes wapi-spin-forth {
  from {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}
@keyframes wapi-spin-back {
  from {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(-315deg);
  }
}
.wapi-profile .profile-header {
  margin-bottom: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.wapi-profile .profile-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wapi-profile .profile-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wapi-profile .profile-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 3px;
}
.wapi-profile .profile-sub {
  font-size: 14px;
  color: var(--gray);
}
.wapi-profile .alert {
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.5;
}
.wapi-profile .alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}
.wapi-profile .alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}
.wapi-profile .profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.wapi-profile .card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wapi-profile .card-full {
  grid-column: 1/-1;
}
.wapi-profile .card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}
.wapi-profile .card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  word-break: break-all;
}
.wapi-profile .card-value.mono {
  font-family: "Courier New", monospace;
  font-size: 18px;
}
.wapi-profile .card-hint {
  font-size: 14px;
  color: var(--gray);
  margin-top: 8px;
  line-height: 1.5;
}
.wapi-profile .card-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wapi-profile .card-mono {
  font-family: "Courier New", monospace;
  font-size: 14px;
  background: #f8f8fd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  word-break: break-all;
  color: var(--dark);
  letter-spacing: 0.02em;
  margin-top: 8px;
  line-height: 1.6;
}
.wapi-profile .sub-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wapi-profile .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px !important;
  border: 1.5px solid var(--violet);
  border-radius: var(--radius);
  color: var(--violet);
  background: #fff;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: 0.18s;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  line-height: 1.25 !important;
}
.wapi-profile .btn-outline:hover {
  background: var(--violet);
  color: #fff;
}
.wapi-profile .btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px !important;
  border: 1.5px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  background: #fff;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: 0.18s;
  font-family: "Inter", sans-serif;
  line-height: 1.25 !important;
}
.wapi-profile .btn-danger:hover {
  background: var(--red);
  color: #fff;
}
.wapi-profile .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 50, 64, 0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.wapi-profile .modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.wapi-profile .modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(16px);
  transition: 0.22s;
}
.wapi-profile .modal-backdrop.open .modal {
  transform: translateY(0);
}

.wapi-profile #modalResetSuccess .modal {
  max-width: 540px;
}
.wapi-profile .modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.wapi-profile .modal-desc {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 18px;
  line-height: 1.55;
}
.wapi-profile .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}
.wapi-profile .form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin: 0 0 6px;
}
.wapi-profile .form-control {
  width: 100%;
  height: 36px;
  padding: 7px 14px;
  border: 1px solid #e4e9f1;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
  font-family: "Inter", sans-serif;
  color: var(--dark);
  background: #fff;
  outline: none;
}
.wapi-profile .form-control:focus {
  border-color: var(--violet);
  box-shadow: inset 0 0 0 1px var(--violet);
}
.wapi-profile .form-control::placeholder {
  color: #6c7889;
  opacity: 1;
}
.wapi-profile .btn-sm {
  padding: 10px 20px !important;
  border-radius: var(--radius);
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  border: 1.5px solid transparent;
  transition: 0.18s;
}
.wapi-profile .btn-sm-primary {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
}
.wapi-profile .btn-sm-primary:hover {
  background: #fff;
  color: var(--violet);
}
.wapi-profile .btn-sm-cancel {
  background: #ebedf5;
  color: var(--dark);
  border-color: #ebedf5;
}
.wapi-profile .btn-sm-cancel:hover {
  background: #fff;
  color: var(--dark);
  border-color: var(--border);
}
.wapi-profile .btn-sm-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.wapi-profile .btn-sm-danger:hover {
  background: #fff;
  color: var(--red);
}
.wapi-profile .warn-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--red);
  line-height: 1.5;
}
.wapi-profile .cred-box {
  background: linear-gradient(135deg, #f0f1fe, #e8f8fe);
  border: 1px solid rgba(124, 125, 242, 0.25);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
}
.wapi-profile .cred-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(124, 125, 242, 0.15);
}
.wapi-profile .cred-row:first-child {
  padding-top: 2px;
}
.wapi-profile .cred-row:last-child {
  border: none;
  padding-bottom: 2px;
}
.wapi-profile .cred-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.wapi-profile .cred-key {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.wapi-profile .cred-val {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark);
  word-break: break-all;
  background: #fff;
  border: 1px solid rgba(124, 125, 242, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
}
.wapi-profile .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--violet);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  transition: 0.18s;
  flex-shrink: 0;
}
.wapi-profile .copy-btn:hover {
  background: rgba(124, 125, 242, 0.12);
}
@media (max-width: 720px) {
  .wapi-profile .profile-grid {
    grid-template-columns: 1fr;
  }
}

.wapi-profile .wapi-btn-loading {
  opacity: 0.7;
  cursor: wait;
}
