* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(135deg, #f7f1e8, #e6f0f7);
  color: #1c1c1c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 16px;
}

.card {
  background: #ffffff;
  max-width: 520px;
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(26, 33, 45, 0.12);
  display: grid;
  gap: 20px;
}

.withdraw-page .card {
  max-width: 680px;
}

header > .muted {
  margin: 0;
  line-height: 1.55;
}

.lang-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.lang-switch select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d6d6d6;
  font-size: 13px;
}

h1,
h2 {
  margin: 0 0 8px 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

#login-form,
#signup-form,
#withdraw-form {
  display: grid;
  gap: 14px;
}

#signup-form {
  gap: 18px;
}

.field-status {
  font-size: 12px;
  color: #667085;
  min-height: 16px;
}

.field-status.success {
  color: #1f6a37;
}

.field-status.error {
  color: #a13232;
}

input {
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  font-size: 15px;
}

input:focus,
textarea:focus,
.lang-switch select:focus {
  border-color: #315f7d;
  box-shadow: 0 0 0 3px rgba(49, 95, 125, 0.14);
  outline: none;
}

textarea {
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

button {
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: #23374f;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(49, 95, 125, 0.3);
  outline-offset: 2px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #23374f;
  color: #23374f;
  background: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover {
  background: #f5f8fb;
}

.external-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 12px;
  line-height: 1;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e4e7ec;
}

.external-login > .muted {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  line-height: 1.5;
}

.external-login-button,
.external-delete-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
}

.external-login-button[data-provider="gitlab"] {
  grid-column: 1 / -1;
}

.external-login-button:hover,
.external-delete-button:hover,
.google-button:hover {
  background: #f8fafc;
  border-color: #98a2b3;
  box-shadow: 0 3px 10px rgba(35, 55, 79, 0.08);
  transform: translateY(-1px);
}

.provider-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
  vertical-align: middle;
}

button:hover {
  background: #1a2a3f;
}

button[disabled] {
  background: #9aa4b2;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

button.danger {
  background: #b42318;
}

button.danger:hover {
  background: #8f1d14;
}

.danger-box {
  border: 1px solid #f04438;
  background: #fff5f5;
  color: #7a271a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.profile-form-box {
  border: 1px solid #c7d7fe;
  background: #f8fbff;
  color: #1c1c1c;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.external-delete-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.external-delete-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-color: #d9e2f2;
  background: linear-gradient(180deg, #fbfdff, #f5f8fc);
}

.external-delete-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.external-delete-card .muted {
  flex: 1;
  margin: 0;
  line-height: 1.5;
}

.external-delete-card .field-status {
  margin: 0;
}

.confirmation-row > span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
}

.confirmation-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: #b42318;
}

.info-box {
  border: 1px solid #c7d7fe;
  background: #f8fbff;
}

.notice {
  margin: 0;
  border: 1px solid #b7d8c7;
  background: #f2fbf6;
  color: #244f36;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.collection-notice {
  grid-column: 1 / -1;
  border: 1px solid #d6deea;
  background: #f8fafc;
  color: #344054;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.collection-notice p {
  margin: 6px 0 0;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.policy-links span {
  flex-basis: 100%;
}

.policy-links a {
  color: #0b3d2e;
}

.profile-form-box form {
  margin-top: 12px;
}

.muted {
  color: #667085;
  font-size: 13px;
}

.profile-grid {
  display: grid;
  gap: 12px;
}

.profile-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
}

.page-footer {
  font-size: 12px;
  color: #667085;
}

.page-footer a {
  color: #0b3d2e;
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

.result {
  background: #f5f8fb;
  border-radius: 12px;
  padding: 16px;
}

.result.error {
  background: #ffecec;
  color: #7a1f1f;
}

pre {
  white-space: pre-wrap;
  word-break: break-all;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  body {
    padding: 14px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 16px;
    gap: 18px;
  }

  .external-login,
  .external-delete-options {
    grid-template-columns: 1fr;
  }

  .auth-divider,
  .external-login > .muted {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

.origin-block {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.origin-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
