/* Enrich: the CloudClear CRM look (DESIGN.md in cloudclearproperties/CloudClear-CRM).
   Only design-tokens.css names and values; component sizes from DESIGN.md / the CRM code. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--ink); background: #fff; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--blue); }

/* ---- Brand ---- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark img { display: block; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark-name { font-size: 20px; font-weight: 600; color: #fff; }
.wordmark-sub { margin-top: 3px; font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.32em; color: var(--sky); }

/* ---- Text ---- */
.field-label { display: block; margin-bottom: 6px; line-height: 1.3; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gray); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.eyebrow span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.7px; color: var(--navy); white-space: nowrap; }
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.help { margin: 6px 0 0; font-size: 12.5px; font-weight: 500; line-height: 1.5; color: var(--gray); }
.lead { margin: 0 0 20px; font-size: 13.5px; font-weight: 600; line-height: 1.6; color: var(--gray); }

/* ---- Controls ---- */
.input, .dd-trigger {
  height: 38px; width: 100%; border: 1px solid var(--sky); border-radius: var(--radius-input); background: #fff;
  padding: 0 12px; font: 600 13.5px var(--font); color: var(--ink);
}
.input::placeholder { color: var(--gray-lt); }
.input:focus, .dd-trigger:focus, .dd.open .dd-trigger { border-color: var(--blue); outline: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px;
  border: 1px solid var(--gold); border-radius: var(--radius-ctl); background: var(--gold); color: #fff;
  font: 700 13px var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn.outline { background: #fff; border-color: var(--sky); color: var(--blue); }
.btn.outline:hover { background: var(--soft); }
.btn:disabled, .btn.outline:disabled { background: var(--soft); border-color: var(--line); color: var(--gray-lt); cursor: default; }
.btn-block { width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }

/* ---- Dropdown (never a native select) ---- */
.dd { position: relative; }
.dd-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.dd-trigger .dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-trigger .dd-caret { flex: none; color: var(--gray-lt); font-size: 12px; }
.dd-panel {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-ctl); box-shadow: var(--shadow-menu);
}
.dd-search { height: 34px; margin-bottom: 4px; background: var(--soft); border: 0; }
.dd-list { max-height: 290px; overflow-y: auto; }
.dd-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 35px; padding: 7px 10px;
  border-radius: var(--radius-input); font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.dd-row.active { background: var(--soft); }
.dd-row.sel { font-weight: 800; }
.dd-row.sel::after { content: "✓"; color: var(--blue); font-weight: 800; }
.dd-empty { padding: 9px 10px; font-size: 13px; color: var(--gray-lt); }

/* ---- Cards, bands, tiles, progress ---- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; }
.band { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-ctl); font-size: 13px; font-weight: 600; line-height: 1.5; }
.band.ok { background: var(--green-bg); color: var(--green); }
.band.warn { background: var(--amber-bg); color: var(--gold-hover); }
.band.err { background: var(--red-bg); color: var(--red); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 14px 10px; text-align: center; background: #fff; }
.tile-n { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.tile-n.red { color: var(--red); }
.tile-l { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--gray-lt); }
.progress-track { height: 8px; border-radius: var(--radius-ctl); background: var(--soft-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--navy); transition: width .3s; }
.phase { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: var(--ink); }

/* ---- Sign-in page (the CRM's AuthShell) ---- */
body.auth { display: flex; flex-direction: column; min-height: 100vh; background: var(--soft); }
.auth-band { display: flex; align-items: center; height: 64px; padding: 0 24px; background: var(--navy); }
.auth-main { display: flex; flex: 1; align-items: flex-start; justify-content: center; padding: 64px 16px 40px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px 32px 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); }
.auth-mark { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 22px; font-weight: 800; color: var(--ink); }
.auth-sub { margin: 4px 0 0; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--gray-lt); }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.auth-form .band { margin: 0; }
.auth-form .btn { height: 38px; font-size: 13.5px; }
.auth-foot { padding-bottom: 24px; text-align: center; font-size: 12px; font-weight: 600; color: var(--gray-lt); }

/* ---- App shell (the CRM's Shell) ---- */
.shell { display: flex; min-height: 100vh; }
.side { display: flex; flex: none; flex-direction: column; width: 244px; background: var(--navy);
  position: sticky; top: 0; height: 100vh; }
.side-brand { padding: 22px 18px 20px; }
.side-nav a { display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 17px; border-left: 3px solid transparent;
  font-size: 15px; font-weight: 500; color: var(--side-text); text-decoration: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .05); }
.side-nav a.on { border-left-color: var(--gold-brand); background: rgba(255, 255, 255, .10); font-weight: 600; color: #fff; }
.side-nav a .ico { color: var(--side-icon); display: flex; }
.side-nav a.on .ico { color: var(--side-active-icon); }
.page { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.top { display: flex; flex: none; align-items: center; gap: 18px; height: 76px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 28px; font-weight: 700; color: var(--ink); }
.top .link, .phone-top .link { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.top .link:hover, .phone-top .link:hover { text-decoration: underline; }
.phone-top { display: none; }
.content { padding: 28px; }

/* Steps (the CRM Uploads strip) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; list-style: none; padding: 0; }
.steps button { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 36px; padding: 6px 12px;
  border: 0; border-radius: 18px; background: var(--soft); text-align: center; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--gray); cursor: pointer; }
.steps button:disabled { cursor: default; }
.steps button.done:not(:disabled):hover { background: var(--row-hover); color: var(--ink); }
.steps button.on { background: var(--ink); color: #fff; }

/* Wizard panels */
.actions.between { justify-content: space-between; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.howto { margin: 0 0 14px; padding-left: 22px; font-size: 14px; font-weight: 600; color: var(--gray); }
.howto li { margin-bottom: 6px; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.summary dt { font-weight: 700; color: var(--gray); }
.summary dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* Drop zone */
.drop { display: block; padding: 28px 16px; border: 1.5px dashed var(--sky); border-radius: var(--radius-ctl); text-align: center; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--blue); background: var(--row-hover); }
.drop-title { font-size: 16px; font-weight: 700; color: var(--gray); }
.drop-hint { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--gray); }
.file-line { margin-top: 12px; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 860px; align-items: start; }
/* Side-by-side labels share a height so a wrapped label doesn't push its field down */
.fields .field-label { min-height: 2.6em; display: flex; align-items: flex-end; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-gap { margin-top: 12px; }

/* ---- Phone (under 768px, as in the CRM) ---- */
@media (max-width: 767px) {
  .side, .top { display: none; }
  .phone-top { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
  .phone-top .title { font-size: 18px; font-weight: 700; color: var(--ink); }
  .content { padding: 16px; }
  .input, .dd-trigger, .btn { height: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .fields .field-label { min-height: 0; }
  .actions .btn { width: 100%; }
  .actions.between { flex-direction: column-reverse; }
  .summary { grid-template-columns: 1fr; gap: 4px; }
  .summary dd { margin-bottom: 8px; }
  .auth-main { padding-top: 48px; }
  .auth-card { padding: 28px 20px 28px; }
}
