@import url('./tokens.css');
@import url('./streamline-icons.css');

/* ── Site header (auth & legal) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(5, 63, 51, 0.04);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(7, 183, 130, 0.25);
}

.site-logo-icon .sl-icon { margin: 0; color: #fff; width: 18px; height: 18px; }

.site-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--emerald);
  background: var(--primary-50);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-btn-ghost,
.site-btn-primary {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.site-btn-ghost {
  border: 1px solid var(--emerald);
  color: var(--emerald);
  background: transparent;
}

.site-btn-ghost:hover { background: var(--primary-50); }

.site-btn-primary {
  border: 1px solid transparent;
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 183, 130, 0.22);
}

.site-btn-primary:hover { background: var(--primary-hover); }

/* ── Auth layout ── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-hero {
  padding: 48px 56px;
  color: #fff;
  background: linear-gradient(160deg, var(--green) 0%, #032820 100%);
  position: relative;
  overflow: hidden;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.auth-brand-name { font-size: 26px; font-weight: 700; }

.auth-hero-title {
  font-size: 28px;
  line-height: 1.35;
  margin: 0 0 28px;
  max-width: 420px;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.auth-features li {
  padding-left: 22px;
  position: relative;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.auth-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--lime);
  font-weight: 700;
}

.auth-float-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-float-icons span {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  animation: float 6s ease-in-out infinite;
}

.auth-float-icons span:nth-child(1) { top: 10%; right: 38%; }
.auth-float-icons span:nth-child(2) { top: 24%; right: 10%; animation-delay: 0.8s; }
.auth-float-icons span:nth-child(3) { top: 40%; right: 52%; animation-delay: 1.6s; }
.auth-float-icons span:nth-child(4) { top: 54%; right: 14%; animation-delay: 2.4s; }
.auth-float-icons span:nth-child(5) { top: 68%; right: 46%; animation-delay: 3.2s; }
.auth-float-icons span:nth-child(6) { top: 80%; right: 22%; animation-delay: 4s; }
.auth-float-icons span:nth-child(7) { top: 90%; right: 56%; animation-delay: 4.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--primary-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--green);
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.auth-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 8px;
  background: var(--primary-50);
}

.auth-role-tab {
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-role-tab.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 8px rgba(5, 63, 51, 0.08);
}

.auth-role-hint {
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-field:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(7, 183, 130, 0.12);
}

.auth-field-icon { color: var(--text-muted); flex-shrink: 0; }
.auth-field-icon .sl-icon { margin: 0; width: 16px; height: 16px; }

.auth-field input,
.auth-field select {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

.auth-field--split select {
  width: 110px;
  flex: 0 0 110px;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.auth-forgot {
  display: inline-block;
  margin: 4px 0 18px;
  font-size: 13px;
  color: var(--emerald);
  text-decoration: none;
}

.auth-submit {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 8px;
  background: var(--emerald);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(7, 183, 130, 0.22);
}

.auth-submit:hover { background: var(--primary-hover); }
.auth-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.auth-links {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.auth-links a { color: var(--emerald); text-decoration: none; font-weight: 600; }
.auth-links a.highlight { font-weight: 700; }

.auth-agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-agree a { color: var(--emerald); }

.auth-success { text-align: center; padding: 12px 0; }
.auth-success-icon { margin-bottom: 16px; color: var(--emerald); font-size: 48px; }
.auth-success h2 { margin: 0 0 12px; color: var(--green); }
.auth-success p { color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

/* ── Legal pages ── */
.legal-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.legal-doc h1 {
  margin: 0 0 8px;
  font-size: 32px;
  color: var(--green);
}

.legal-date {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 13px;
}

.legal-doc h2 {
  margin: 28px 0 12px;
  font-size: 18px;
  color: var(--green);
}

.legal-doc p,
.legal-doc li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.legal-doc ul { padding-left: 20px; margin: 8px 0 16px; }

.legal-closing {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 500;
}

.site-cta {
  padding: 56px 24px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--green));
}

.site-cta h2 { margin: 0 0 10px; font-size: 28px; }
.site-cta p { margin: 0; opacity: 0.9; }

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: #032820;
  font-size: 13px;
}

.site-footer-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.site-footer-links a:hover { color: var(--lime); }

.site-footer-meta {
  text-align: center;
  padding: 0 24px 20px;
  background: #032820;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.hidden { display: none !important; }

.site-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
  max-width: min(90vw, 420px);
}

.site-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.site-toast--success { background: var(--emerald); }
.site-toast--error { background: var(--danger); }
.site-toast--warning { background: var(--warning); }
.site-toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 28px; min-height: auto; }
  .auth-float-icons { display: none; }
  .site-nav { display: none; }
}

@media (max-width: 520px) {
  .auth-card { padding: 28px 20px; }
  .site-header-inner { padding: 0 16px; }
}
