/* Amovita portal :  matches the serverbed-theme.css visual language but with
   a teal/violet accent palette for the customs workspace. */

/* 2026-09-07 (Anthony): brand wordmark "Amovita" uses Lovelo Black
   (local OTF) so the portal H1 has the same letterforms as the
   printed brand. Body + rest of the page uses the OS system stack -
   we no longer load DM Sans from Google Fonts. Lovelo is the only
   loaded face and is scoped to the .amv-header-text h1 rule. */
@font-face {
  font-family: 'Lovelo';
  src: url('/amovita/assets/Lovelo-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --amv-bg: #f8fafc;
  --amv-card-bg: #ffffff;
  --amv-text: #0f172a;
  --amv-muted: #64748b;
  --amv-border: #e2e8f0;
  --amv-line-strong: #cbd5e1;
  --amv-radius: 14px;
  --amv-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --amv-shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08);
  --amv-primary: #0f766e;
  --amv-primary-hover: #115e59;
  --amv-accent: #7c3aed;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--amv-bg);
  color: var(--amv-text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--amv-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.amv-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.amv-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.amv-logo {
  width: 56px; height: 56px;
  background: #ffffff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.amv-logo img { width: 36px; height: 36px; display: block; }
.amv-header-text h1 {
  font-family: 'Lovelo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.6rem;
  font-weight: 900; /* matches the Lovelo Black file's weight */
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--amv-text);
}
.amv-header-text p {
  font-size: 0.8rem;
  color: var(--amv-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-top: 2px;
}
.amv-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.875rem;
}
.amv-username { color: var(--amv-muted); }
.amv-logout {
  color: var(--amv-muted);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--amv-line-strong);
}
.amv-logout:hover { color: var(--amv-text); background: #fff; text-decoration: none; }

/* ---------- Main ---------- */
.amv-main { flex: 1; }
.amv-lede {
  font-size: 1rem;
  color: var(--amv-muted);
  margin-bottom: 20px;
}
.amv-muted { color: var(--amv-muted); font-size: 0.875rem; }

/* ---------- Login card ---------- */
.amv-login-card {
  background: var(--amv-card-bg);
  border: 1px solid var(--amv-border);
  border-radius: var(--amv-radius);
  box-shadow: var(--amv-shadow-lg);
  padding: 28px;
  max-width: 380px;
  margin: 40px auto;
}
.amv-login-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.amv-login-card p { margin-bottom: 18px; }
.amv-login-card form { display: grid; gap: 14px; }
.amv-login-card label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--amv-text); }
.amv-login-card input[type="text"],
.amv-login-card input[type="password"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--amv-line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--amv-text);
  font-size: 16px; /* prevent iOS zoom */
}
.amv-login-card input:focus {
  outline: none;
  border-color: var(--amv-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.amv-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ---------- Buttons ---------- */
.amv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.amv-btn-primary {
  background: var(--amv-primary);
  color: white;
}
.amv-btn-primary:hover { background: var(--amv-primary-hover); text-decoration: none; }
.amv-btn-block { width: 100%; }

/* ---------- Cards grid ---------- */
.amv-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 8px;
}
.amv-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--amv-card-bg);
  border: 1px solid var(--amv-border);
  border-radius: var(--amv-radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--amv-shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.amv-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--amv-shadow-lg);
  border-color: var(--amv-line-strong);
  text-decoration: none;
}
.amv-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.amv-icon svg { width: 22px; height: 22px; }
.amv-card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--amv-text);
  margin-bottom: 4px;
}
.amv-card-body p {
  font-size: 0.875rem;
  color: var(--amv-muted);
  line-height: 1.45;
}

/* ---------- Footer ---------- */
.amv-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--amv-border);
  font-size: 0.75rem;
  color: var(--amv-muted);
  text-align: center;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .amv-shell { padding: 20px 16px 32px; }
  .amv-header { flex-wrap: wrap; }
  .amv-user { width: 100%; justify-content: flex-end; margin-left: 0; margin-top: 4px; }
  .amv-login-card { margin: 16px 0; padding: 22px; }
}
