/* style.css */

:root{
  --bg: #e6f7ff;
  --card: #ffffff;
  --text: #1d2a35;
  --muted: #5a6b7b;

  --primary: #007BFF;
  --primary-600: #0056b3;

  --border: rgba(0,0,0,0.10);
  --shadow: 0 18px 50px rgba(0,0,0,0.10);
  --shadow-soft: 0 8px 25px rgba(0,0,0,0.08);

  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(0,123,255,0.12), transparent 55%),
    radial-gradient(800px 500px at 80% 15%, rgba(0,123,255,0.08), transparent 50%),
    linear-gradient(180deg, var(--bg), #f5fbff 70%, #ffffff);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 18px;
  min-height: 100svh;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 16px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(0,123,255,0.10);
  border: 1px solid rgba(0,123,255,0.20);
  flex: 0 0 auto;
}

.logo img{
  width: 36px;
  height: 36px;
  transform: scale(2.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 16px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.card {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.title {
  margin: 4px 0 6px;
  font-size: 22px;
  letter-spacing: -0.2px;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.field { margin: 12px 0; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.control {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.control:focus {
  border-color: rgba(0,123,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,123,255,0.14);
}

.control:active {
  transform: translateY(0.5px);
}

.with-icon {
  position: relative;
}

.prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 800;
  pointer-events: none;
  opacity: 0.75;
}

.with-icon .control {
  padding-left: 28px;
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--primary), #2b8cff);
  color: white;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(0,123,255,0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { filter: brightness(0.98); }

.btn:active { transform: translateY(1px); }

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2) brightness(0.95);
  box-shadow: none;
  opacity: 0.9;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.55);
  border-top-color: rgba(255,255,255,1);
  display: none;
  animation: spin 0.8s linear infinite;
}

.btn.is-loading .btn-spinner { display: inline-block; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.message {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
  border: 1px solid rgba(0,0,0,0.10);
}

.message.success {
  background: #eaf7ee;
  color: #0f3d1e;
  border-color: rgba(21, 87, 36, 0.20);
}

.message.error {
  background: #fdecee;
  color: #5b1020;
  border-color: rgba(114, 28, 36, 0.22);
}

.msg-row {
  display: grid;
  gap: 8px;
}

.msg-text { font-weight: 700; }

.msg-link {
  display: inline-block;
  word-break: break-all;
  text-decoration: none;
  color: var(--primary-600);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,123,255,0.08);
  border: 1px solid rgba(0,123,255,0.18);
  transition: filter 0.15s ease, transform 0.05s ease;
}

.msg-link:hover { filter: brightness(0.98); }
.msg-link:active { transform: translateY(1px); }

.msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.msg-btn {
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: transform 0.05s ease, box-shadow 0.15s ease;
}

.msg-btn:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.msg-btn:active { transform: translateY(1px); }

.msg-btn.ghost {
  background: transparent;
}

.msg-btn.ok {
  border-color: rgba(21, 87, 36, 0.25);
  background: rgba(212, 237, 218, 0.75);
}

.micro {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.8);
}

.footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: rgba(29,42,53,0.65);
  font-size: 12px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0,123,255,0.65);
  box-shadow: 0 0 0 4px rgba(0,123,255,0.12);
}

.sep { opacity: 0.6; }

@media (min-width: 520px) {
  .container { padding: 18px; }
  .card { padding: 20px; }
}