:root {
  --bg: #eef4ff;
  --ink: #10213c;
  --muted: #5b6f94;
  --card: #ffffff;
  --accent: #1d5bff;
  --accent-2: #0f4ad6;
  --danger: #b42318;
  --line: #d6e2f6;
  --soft: #f6f9ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #dbe7ff 0%, var(--bg) 45%),
              radial-gradient(circle at 94% 90%, #e8f2ff 0%, var(--bg) 52%);
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 76px;
}

.auth-page {
  width: min(1020px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  position: relative;
}

.auth-panel {
  padding: 42px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

h1 { margin: 10px 0 8px; font-size: 2rem; }
h2 { margin: 0 0 8px; font-size: 1.1rem; }

.subtext {
  margin: 0 0 22px;
  color: var(--muted);
}

.locked-email {
  margin: 0 0 14px;
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faff;
  font-size: 0.95rem;
  color: #233b63;
}

.auth-form {
  display: grid;
  gap: 10px;
}

label {
  margin-top: 6px;
  font-size: 0.93rem;
  font-weight: 500;
}

input[type="email"],
input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

input:focus {
  outline: none;
  border-color: #77a3ff;
  box-shadow: 0 0 0 4px rgba(29, 91, 255, 0.16);
}

.floating-field {
  position: relative;
  margin-top: 6px;
}

.floating-field .floating-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 56px;
  padding: 24px 14px 8px 44px;
  font: inherit;
  background: #fff;
}

.floating-field label {
  position: absolute;
  left: 44px;
  top: 17px;
  margin: 0;
  color: #6c82ab;
  pointer-events: none;
  transition: all 0.16s ease;
}

.floating-field .floating-input:focus + label,
.floating-field .floating-input:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.72rem;
  color: #3a5b95;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 20px;
  height: 20px;
  color: #4e6ea7;
}

.input-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary, .btn-ghost, .btn-link {
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  margin-top: 8px;
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  padding: 0;
}

.btn-link:disabled {
  color: #7a8fb3;
  cursor: not-allowed;
}

.resend-form {
  margin-top: 10px;
}

.resend-countdown {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.resend-countdown[hidden] {
  display: none;
}

.back-form {
  margin-top: 14px;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.auth-art {
  position: relative;
  background: linear-gradient(160deg, #123a8f 0%, #1e54bf 58%, #2d6fe7 100%);
  color: #fff;
  min-height: 460px;
  display: flex;
  align-items: end;
  padding: 30px;
}

.card-blurb {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
}

.card-blurb p { margin: 0; opacity: 0.92; }

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(3px);
}

.orb-a {
  width: 220px;
  height: 220px;
  background: rgba(124, 178, 255, 0.45);
  top: -40px;
  right: -40px;
}

.orb-b {
  width: 150px;
  height: 150px;
  background: rgba(201, 224, 255, 0.32);
  bottom: 52px;
  left: 24px;
}

.lang-dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: rgba(16, 33, 60, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 6px;
  z-index: 100;
}

.lang-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #c2d6ff;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  padding: 5px 11px;
  cursor: pointer;
}

.lang-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.3);
}

.flash-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
  z-index: 90;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.flash-danger { border-color: #efb2ae; color: #8d1612; }
.flash-warning { border-color: #f2d595; color: #7b4e00; }
.flash-success { border-color: #b5d7bf; color: #1d5d34; }
.flash-info { border-color: #bad2ff; color: #174189; }

.dash-wrap {
  width: min(980px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
}

.dash-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.status-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.status-card p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.pager {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

@media (max-width: 900px) {
  .shell {
    padding-bottom: 82px;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-art {
    min-height: 220px;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
