/*
Developed by HMD Developments
For Hushlead
www.hmddevs.org
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
}

:root {
  --primary: #f8600a;
  --primary-text: #c54900;
  --primary-hover: #e0560a;
  --foreground: #0c0a09;
  --muted-foreground: #6b6560;
  --background: #ffffff;
  --card: #ffffff;
  --border: #e5e1dc;
  --input-border: #d8d3cc;
  --secondary-bg: #fbf9f5;
  --destructive: #c0392b;
  --radius: 10px;
  --font-sans: "Inter", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
}

body {
  overflow: hidden;
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.auth-shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr 1fr; }
}

.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 8px 0 24px -8px var(--background);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.auth-logo {
  height: 28px;
  width: auto;
}

.auth-heading {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-outline {
  background: var(--background);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover:not(:disabled) { background: var(--secondary-bg); }

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-item {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
}

.link-muted {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.link-muted:hover { color: var(--foreground); text-decoration-color: currentColor; }

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--background);
  color: var(--foreground);
}

@media (max-width: 599.98px) {
  input[type="email"],
  input[type="password"] {
    font-size: 16px;
  }
}
input[type="email"]:focus-visible,
input[type="password"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.password-field { position: relative; }
.password-field input { padding-right: 40px; }
.password-toggle {
  position: absolute;
  inset: 0 0 0 auto;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
}
.password-toggle:hover { color: var(--foreground); }
.password-toggle:focus-visible { outline: 2px solid var(--primary); border-radius: 6px; }

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-message {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--secondary-bg);
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--foreground);
  display: none;
}
.auth-message.is-visible { display: block; }
.auth-message a {
  color: var(--primary-text);
  font-weight: 600;
  text-decoration: underline;
}

.early-access-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Decorative right-hand panel: a static gradient. */
.auth-side {
  display: none;
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--secondary-bg);
  align-items: center;
  justify-content: center;
}
@media (min-width: 1024px) {
  .auth-side { display: flex; }
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #f8600a1a, transparent 60%);
}
.demo-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  margin: 0 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px #0000000d;
  padding: 24px;
}
.demo-card h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}
.demo-card p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
.demo-card .btn { width: auto; }

/* Page-load / submit loader. */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  transition: opacity 0.25s ease;
}
.app-loader[hidden] { display: none; }
.app-loader.is-fading { opacity: 0; }

.loader-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: loader-spin 0.7s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner { animation: none; }
  .app-loader { transition: none; }
}
