/* LotzApp CRM – based on the Groupware.Connector (connector.lotzapp.work) = LotzApp redesign (orange → red).
   Dark mode follows the browser: Quasar sets body.body--dark (ui.run(dark=None)). */

@font-face { font-family: 'Source Sans 3'; src: url('fonts/SourceSans3-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('fonts/SourceSans3-Semibold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('fonts/SourceSans3-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --brand: #E7501C;
  --brand-2: #C01C1E;
  --brand-gradient: linear-gradient(100deg, #E7501C 0%, #E7501C 20%, #C01C1E 100%);
  --accent: #C63F2A;
  --accent-hover: #A9321F;
  --accent-soft: #FDE8DD;
  --bg: #f3f3f4;
  --surface: #ffffff;
  --border: #dcdfe3;
  --text: #1d1d1b;
  --text-muted: #5f5f66;
  --text-soft: #7a7a82;
  --bar-bg: #24262b;
  --bar-text: #c9ccd2;
  --err: #b8330f; --err-bg: #fdeceb; --err-border: #e8b2a4;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 14px -6px rgba(20, 20, 20, .12);
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-ui: 'Poppins', var(--font);
}

body.body--dark {
  --accent: #E25A33;
  --accent-hover: #F2794F;
  --accent-soft: #4A2F25;
  --bg: #16191d;
  --surface: #1f2328;
  --border: #343b43;
  --text: #e8eaed;
  --text-muted: #a9b1ba;
  --text-soft: #858e98;
  --bar-bg: #111316;
  --bar-text: #a9b1ba;
  --err: #ff8f6b; --err-bg: #3f2320; --err-border: #6a3328;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px -6px rgba(0, 0, 0, .5);
}

body, body.body--dark {
  font-family: var(--font); font-size: 15px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.crm-heading { font-family: var(--font-ui); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.crm-muted { color: var(--text-muted); }

/* ---------- Quasar components ---------- */
.q-card {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.q-btn { border-radius: var(--radius-sm); font-family: var(--font); font-weight: 600; text-transform: none; }
/* Quasar's `.bg-primary { background: … !important }` sits in the cascade layer `quasar_importants` of NiceGUI; an
   !important declaration in an earlier layer wins over it, so the gradient goes into the first layer `theme`. */
@layer theme {
  .q-btn.bg-primary { background: var(--brand-gradient) !important; }
}
.q-btn.bg-primary { box-shadow: 0 2px 8px -3px rgba(192, 28, 30, .55); }
.q-btn.bg-primary:hover { filter: brightness(1.05); }
.crm-btn-block { padding: 6px 14px; font-size: .95rem; }

.crm-alert { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid; width: 100%; }
.crm-alert-error { background: var(--err-bg); color: var(--err); border-color: var(--err-border); }

/* ---------- App bar ---------- */
.q-header.crm-header { background: var(--bar-bg); color: var(--bar-text); padding-top: 4px; }
.q-header.crm-header::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-gradient);
}
.crm-header-logo { height: 34px; width: auto; }
.crm-brand-name { font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; line-height: 1.15; color: #fff; }
.crm-brand-sub { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.crm-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-gradient); color: #fff;
  display: grid; place-items: center; font-family: var(--font-ui); font-weight: 600; font-size: .85rem;
}
.crm-me-name { color: #fff; font-weight: 600; }
.q-footer.crm-footer { background: transparent; color: var(--text-soft); font-size: .78rem; }

/* ---------- Start page ---------- */
.crm-hello { position: relative; overflow: hidden; padding: 28px 32px; }
.crm-hello::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-gradient);
}
.crm-hello-title { font-size: 2rem; }

/* ---------- Login ---------- */
.crm-login { min-height: 100vh; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.crm-login-art {
  background: var(--brand-gradient); color: #fff; padding: 56px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
.crm-login-art::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
  border-radius: 50%; border: 60px solid rgba(255, 255, 255, .08);
}
.crm-login-logo { height: 96px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.crm-login-title { font-family: var(--font-ui); font-weight: 600; font-size: 2.3rem; line-height: 1.2; }
.crm-login-claim { opacity: .9; max-width: 38ch; font-size: 1.05rem; }
.crm-login-version { font-size: .875rem; opacity: .75; }
.crm-login-box { display: grid; place-items: center; padding: 40px 24px; }
.crm-login-card { width: 100%; max-width: 380px; padding: 28px; gap: 14px; }
.crm-login-heading { font-size: 1.5rem; }
.crm-login-card-logo { display: none; height: 64px; width: auto; }

@media (max-width: 860px) {
  .crm-login { grid-template-columns: 1fr; }
  .crm-login-art { display: none; }
  .crm-login-card-logo { display: block; }
}
