@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --sky: #0EA5E9;
  --sky-dark: #0284C7;
  --sky-deep: #075985;
  --ink: #0F172A;
  --muted: #64748B;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --error: #DC2626;
  --error-bg: #FEF2F2;
  --error-border: #FECACA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Shared brand mark ---- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

/* ---- Auth pages (login / change / reset / forgot) ---- */
.auth-page {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.14), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.10), transparent 45%),
    linear-gradient(160deg, var(--sky) 0%, var(--sky-dark) 45%, var(--sky-deep) 78%, var(--ink) 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
}

.auth-shell > .lang-switcher {
  align-self: center;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 20px;
  padding: 40px 32px 32px;
  box-shadow: 0 30px 60px -15px rgba(3, 22, 40, 0.45), 0 8px 20px rgba(3, 22, 40, 0.15);
  text-align: center;
  animation: rise 0.4s cubic-bezier(.16,1,.3,1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--sky), var(--sky-dark));
  color: white;
  font-size: 20px;
  margin: 0 auto 18px;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.35);
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.auth-card label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.01em;
}

.auth-card input {
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.auth-card button {
  margin-top: 24px;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--sky), var(--sky-dark));
  color: white;
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.auth-card button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(14, 165, 233, 0.4); }
.auth-card button:active { transform: translateY(0); }

.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  text-align: left;
}

.links { margin-top: 20px; font-size: 13px; text-align: center; }
.links a { color: var(--sky-dark); text-decoration: none; font-weight: 600; }
.links a:hover { text-decoration: underline; }

/* ---- Language switcher ---- */
.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 30px 7px 14px;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.lang-switcher select option { color: var(--ink); }

.topbar .lang-switcher select {
  background-color: rgba(15, 23, 42, 0.04);
  color: var(--ink);
  border-color: var(--border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748B' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.topbar .lang-switcher select option { color: var(--ink); }

/* ---- Dashboard / hub ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

.topbar .brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--sky), var(--sky-dark));
  color: white;
  font-size: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.signed-in-as { font-size: 13px; color: var(--muted); }
.logout-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--sky-dark);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}
.logout-link:hover { background: #F0F9FF; }

.hub {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
}

.designed-for {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #F0F9FF;
  color: var(--sky-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hub h1 {
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.wave {
  display: inline-block;
  animation: wave 2.2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
}

.lede { color: var(--muted); font-size: 15.5px; margin: 0 auto 36px; max-width: 460px; line-height: 1.6; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  gap: 18px;
  justify-content: center;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: 0 16px 32px -10px rgba(14, 165, 233, 0.28);
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.35);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #F0F9FF;
  color: var(--sky-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.account-links { margin-top: 48px; font-size: 13px; }
.account-links a { color: var(--muted); text-decoration: none; }
.account-links a:hover { color: var(--sky-dark); text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card { padding: 32px 22px 26px; border-radius: 16px; }
  .hub { padding: 40px 18px 32px; }
  .hub h1 { font-size: 24px; }
  .topbar { padding: 14px 18px; }
}
