/* =========================================================
   EUAuth — base styles
   Clean, modern auth UI. Single stylesheet shared by every
   server-rendered fragment view.
   ========================================================= */

:root {
  --brand:        #6366f1;
  --brand-hover:  #4f46e5;
  --brand-soft:   rgba(99, 102, 241, 0.08);
  --bg-top:       #f8fafc;
  --bg-bot:       #eef2ff;
  --surface:      #ffffff;
  --border:       #e5e7eb;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --danger:       #dc2626;
  --danger-bg:    #fef2f2;
  --danger-border:#fecaca;
  --success:      #059669;
  --success-bg:   #ecfdf5;
  --success-border:#a7f3d0;
  --warning:      #b45309;
  --warning-bg:   #fffbeb;
  --warning-border:#fde68a;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md:    0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg:    0 24px 48px rgba(15, 23, 42, 0.10);
  --radius-sm:    8px;
  --radius-md:    10px;
  --radius-lg:    16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(56, 189, 248, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bot) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  animation: card-in 0.35s ease-out;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand mark / heading area at top of each card */
.logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo h1 {
  color: var(--brand);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo h1::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2L3 7v6c0 5 3.8 9.4 9 10 5.2-.6 9-5 9-10V7l-9-5zm0 2.2l7 3.9V13c0 4-3 7.6-7 8.2-4-.6-7-4.2-7-8.2V8.1l7-3.9zM11 16l-3-3 1.4-1.4 1.6 1.6 4.6-4.6L17 10l-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2L3 7v6c0 5 3.8 9.4 9 10 5.2-.6 9-5 9-10V7l-9-5zm0 2.2l7 3.9V13c0 4-3 7.6-7 8.2-4-.6-7-4.2-7-8.2V8.1l7-3.9zM11 16l-3-3 1.4-1.4 1.6 1.6 4.6-4.6L17 10l-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}
.logo p strong { color: var(--text); font-weight: 600; }

/* Alerts / flash messages */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }

/* Form layout */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover { border-color: #c7d2fe; }

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

input::placeholder { color: #94a3b8; }

button[type="submit"],
.btn-primary {
  width: 100%;
  padding: 12px 16px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
button[type="submit"]:hover,
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button[type="submit"]:active,
.btn-primary:active { transform: translateY(1px); box-shadow: none; }
button[type="submit"]:focus-visible,
.btn-primary:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

/* Links beneath the form (forgot, register, cancel) */
.link {
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.link a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.link a:hover { text-decoration: underline; }

/* Divider between primary action and secondary links */
.link:first-of-type { margin-top: 22px; }

.help-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Dashboard / home page */
.dashboard .container { max-width: 600px; }
.dashboard a {
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin: 4px;
  font-weight: 500;
  transition: background 0.15s;
}
.dashboard a:hover { background: var(--brand-hover); }
.dashboard a.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.dashboard a.secondary:hover { background: #f8fafc; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .container { padding: 28px 22px; }
  .logo h1 { font-size: 22px; }
  .logo h1::before { width: 24px; height: 24px; }
}
