/* Sales OS SPA — layout on top of brand.css (which owns colours/tokens). */

/* Login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--brand-soft), var(--bg));
  padding: 20px;
}
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { justify-content: center; font-size: 22px; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: 13.5px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font);
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 60px; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--brand);
  padding: 4px 8px; border-radius: var(--radius-sm);
}
.pw-toggle:hover { background: var(--brand-soft); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ok { color: var(--brand); font-weight: 600; }
.link { color: var(--brand); font-weight: 600; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }
.form-error { color: var(--bad); font-size: 13px; margin: 6px 0; min-height: 18px; }

/* Card grid (dashboard) */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat { padding: 16px; }
.stat .label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; color: var(--text); }
.stat .value.small { font-size: 18px; }
.stat.accent { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: var(--ink-on-brand); }
.stat.accent .label, .stat.accent .value { color: var(--ink-on-brand); }
.stat .muted { color: var(--muted); font-weight: 700; }

/* Kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { min-width: 200px; flex: 0 0 200px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.kcol h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.kcol .kmeta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.kcard .name { font-weight: 700; font-size: 13.5px; }
.kcard .val { color: var(--brand); font-weight: 800; font-size: 13px; }

.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 16px; text-align: center; }
.right { margin-left: auto; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.user-pill b { color: var(--text); }
.scope-toggle { display: inline-flex; gap: 4px; }
.scope-toggle button { font-size: 12px; padding: 5px 10px; }
.scope-toggle button.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
select.inline { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--font); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

/* Traffic-light indicators (Executive Overview) */
.tl { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.tl-green { background: var(--good); }
.tl-amber { background: var(--warn); }
.tl-red { background: var(--bad); }
