@import url("https://fonts.bunny.net/css?family=figtree:400,600&display=swap");

:root {
  --bg-1: #f5f5f7;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --border: #e4e4e7;
  --text: #18181b;
  --muted: #71717a;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  align-items: center;
  background: radial-gradient(circle at 14% 8%, #efe9ff 0%, var(--bg-1) 40%, var(--bg-2) 100%);
  color: var(--text);
  display: flex;
  font-family: Figtree, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding: 48px 24px;
}

.sh-wrap { margin: 0 auto; max-width: 640px; width: 100%; }

.sh-card {
  animation: panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(24, 24, 27, 0.09);
  padding: 56px 48px 48px;
  position: relative;
}

.sh-logo-wrap { display: flex; justify-content: center; }
.sh-logo-wrap img { height: auto; width: 250px; }

.sh-greet {
  font-size: 16px;
  font-weight: 700;
  margin: 14px 0 0;
  text-align: center;
}

.sh-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 16px 0 24px;
  text-align: center;
}

.sh-lead {
  color: var(--muted);
  font-size: 12px;
  margin: -12px 0 24px;
  text-align: center;
}

.form { margin-bottom: 0.75rem; }
.form label {
  color: #52525b;
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-control, .name-area, .bank-trigger {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font: inherit;
  width: 100%;
}

.form-control {
  font-weight: 400;
  outline: none;
  padding: 0.75rem 1rem;
}

.form-control:read-only { cursor: not-allowed; opacity: 0.85; }

.bank-select-label {
  align-items: center;
  color: #3f3f46;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bank-select-hint { color: #71717a; font-size: 11px; font-weight: 500; }
.bank-select-shell { position: relative; }

.bank-trigger {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
}

.bank-trigger.active {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.bank-trigger-value { color: #3f3f46; font-size: 14px; font-weight: 500; }
.bank-trigger-value.placeholder { color: #a1a1aa; }

.bank-trigger-caret {
  border-bottom: 2px solid #71717a;
  border-right: 2px solid #71717a;
  height: 9px;
  transform: rotate(45deg);
  width: 9px;
}

.bank-trigger.active .bank-trigger-caret { transform: rotate(225deg); }

.bank-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(24, 24, 27, 0.14);
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.bank-search { background: #fafafa; border-bottom: 1px solid #ececf0; padding: 10px; }
.bank-search input {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  font: inherit;
  min-height: 40px;
  outline: none;
  padding: 0.5rem 0.75rem;
  width: 100%;
}

.bank-list { max-height: 210px; overflow: auto; padding: 6px; }

.bank-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #3f3f46;
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.bank-item:hover { background: #fafafa; border-color: #ececf0; }
.bank-item.active { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.bank-empty { color: #71717a; font-size: 12px; padding: 12px 10px; text-align: center; }

.name-area {
  color: #3f3f46;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  word-break: break-all;
}

.name-area:hover { background: #f4f4f5; border-color: #d4d4d8; }
.sh-copyhint { color: #71717a; font-size: 12px; margin: 6px 0 0; }

.btn-start, .btn-ok {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.28);
  color: #fff;
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 0.875rem 1.5rem;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.btn-start:hover, .btn-ok:hover { background: linear-gradient(135deg, var(--primary-hover), #7c3aed); }

.theme-toggle-btn {
  align-items: center;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(24, 24, 27, 0.08);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
}

.theme-toggle-btn svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.sh-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sh-picks .bank-item { width: auto; }

.custom-alert-overlay[hidden] { display: none; }

.custom-alert-overlay {
  align-items: center;
  backdrop-filter: blur(6px);
  background: rgba(24, 24, 27, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 9999;
}

.custom-alert-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 22px 44px rgba(24, 24, 27, 0.18);
  padding: 20px;
  width: min(420px, 100%);
}

.custom-alert-head { align-items: center; display: flex; gap: 10px; margin-bottom: 10px; }
.custom-alert-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  width: 24px;
}
.custom-alert-badge.info { background: #ede9fe; color: #6d28d9; }
.custom-alert-badge.success { background: #dcfce7; color: #15803d; }
.custom-alert-title { font-size: 15px; font-weight: 700; }
.custom-alert-text { color: #52525b; font-size: 14px; line-height: 1.6; margin: 0; white-space: pre-line; }
.custom-alert-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.custom-alert-btn {
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
}

.theme-dark {
  --bg-1: #09090b;
  --bg-2: #111113;
  --surface: rgba(24, 24, 27, 0.84);
  --surface-solid: #18181b;
  --border: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  color-scheme: dark;
}

.theme-dark body { background: radial-gradient(circle at 14% 8%, #2a1f46 0%, var(--bg-1) 42%, var(--bg-2) 100%); }
.theme-dark .form-control,
.theme-dark .bank-trigger,
.theme-dark .bank-search input,
.theme-dark .name-area { background: #18181b; border-color: #3f3f46; color: #f4f4f5; }
.theme-dark .bank-dropdown { background: rgba(24, 24, 27, 0.98); border-color: #3f3f46; }
.theme-dark .bank-item { color: #e4e4e7; }
.theme-dark .bank-item.active { background: rgba(139, 92, 246, 0.22); border-color: rgba(139, 92, 246, 0.45); color: #ddd6fe; }
.theme-dark .custom-alert-card { background: rgba(24, 24, 27, 0.96); border-color: #3f3f46; }
.theme-dark .custom-alert-title, .theme-dark .custom-alert-text { color: #f4f4f5; }
.theme-dark .sh-card h2 { color: #fafafa; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  body { padding: 24px 16px; }
  .sh-card { padding: 48px 20px 24px; }
  .sh-logo-wrap img { width: 210px; }
}
