/* vaCRM
   Colours live in custom properties so the client portal can be
   re-skinned per tenant later by overriding --accent and --ink on
   :root, without a second stylesheet. */

:root {
  --ink:      #17212b;
  --ink-soft: #2c3946;
  --muted:    #66737f;
  --paper:    #ffffff;
  --field:    #f2f4f6;
  --edge:     #dde2e7;
  --accent:   #1f6f5c;
  --accent-d: #185848;
  --warn:     #a93226;
  --radius:   6px;
  --shadow:   0 1px 2px rgba(23, 33, 43, .06), 0 8px 24px rgba(23, 33, 43, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 400 15px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* --- Wordmark --------------------------------------------------- */

.wordmark {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.wordmark .va { color: var(--accent); }

/* --- Split auth layout ------------------------------------------ */

.auth {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.auth-aside {
  background: var(--ink);
  color: #fff;
  padding: 28px 24px;
}
.auth-aside .wordmark { color: #fff; }
.auth-aside .va { color: #6fd0b4; }
.auth-aside p {
  color: #9fb0bd;
  margin: 10px 0 0;
  max-width: 30ch;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card { width: 100%; max-width: 360px; }

.auth-card h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.auth-card .sub {
  color: var(--muted);
  margin: 0 0 26px;
}

@media (min-width: 860px) {
  .auth { grid-template-columns: 42% 1fr; }
  .auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 44px 40px;
  }
  .auth-aside p { font-size: 17px; }
}

/* --- Forms ------------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--paper);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 11px 16px;
  font: inherit;
  font-weight: 550;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--accent-d); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.alert {
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 14px;
  border-radius: var(--radius);
  background: #fdeceb;
  border: 1px solid #f3c9c5;
  color: var(--warn);
}

.alert-ok {
  background: #e9f5f1;
  border-color: #bfe3d8;
  color: var(--accent-d);
}

.tiny {
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

/* --- App shell --------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--edge);
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 18px;
}
.topbar nav a:hover { color: var(--ink); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.wrap h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}

.card {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 10px;
}

.stat {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.02em;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
